Scimpy: open-source speaker design, impedance measurements, & book (Win/Mac/Linux) - diyAudio
Go Back   Home > Forums > Design & Build > Software Tools
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 6th March 2016, 03:20 AM   #1
diyAudio Member
 
Join Date: Mar 2016
Default Scimpy: open-source speaker design, impedance measurements, & book (Win/Mac/Linux)

Scimpy Speaker Design Tool:

Sound Card Based Impedance Measurements in Python

I've been working on an open-source speaker impedance testing tool using your soundcard as an ADC/DAC; extracts electrical, mechanical and acoustic component values; design and model speaker performance from T/S values; closed and vented-box optimization; and cross-over/impedance matching design. At the same time, the manual for the software has turned in to quite a stand-alone book in which some might be interested; the book is open-source as well.

Screen shot:
Click the image to open in full size.

Book (work in progress! comments welcom):
https://github.com/maqifrnswa/scimpy...doc/scimpy.pdf

Code Repository:
https://github.com/maqifrnswa/scimpy

Feedback:
https://github.com/maqifrnswa/scimpy/issues

What Works:
  • Finds system T/S from component values, and visa versa
  • Modeling infinite baffle performance from T/S
  • Modeling closed-box performance from T/S
  • Calculate & model optimum B2 closed box from T/S
  • Cross-platform soundcard control for impedance measurements, swept frequency output input and frequency analysis (no impedance measuring set up yet)
  • Book has detailed description and derivation of all T/S parameters, pretty much covering all topics except large-signal analysis and far field diffraction from a baffle.

Tech details:
  • Python, PortAudio, and Qt for cross-platform support with easy learning curve for contributors.
  • Book is latex. I'm thinking of uploading it to a print-on-demand site and "selling" it at-cost if people want a physical version of the book. I might, actually!

Plan:
  • Finish vented box modeling and optimization (QB3-B4-C4 alignment)
  • Cross-over design
  • Take data from impedance measurement and extract T/S parameters.
  • Windows & Mac binaries. It runs on all platforms, but you need to install Python and supporting libraries at the moment. Once it's further along we can offer a single file that just runs. I'm on Linux, so I just haven't had the time to build binaries on Windows (and I don't have a Mac, so I'd need someone with one to volunteer to build it!)
  • Clean up code, some of it is not great software engineering, but i'm just trying to get it all working at the moment.

License: code is GPL3, book is CC-BY-SA 4.0.

Feedback welcome, fork it and pull request if you're interested as well! Book contributions/edits/corrections/discussion is welcome as well.

EDIT:
I went over to windows and test it out, it works the same as Linux. Box modeling works perfectly; in the impedance tester, some warnings might pop-up if you try to verify sound card compatibility, but if you ignore those warnings it actually works as intended. Below is a screen shot of the same speaker as the above screen shot, just modeled in an infinite baffle while the top screen shot was modeled in an ideal B2 closed box.
Click the image to open in full size.

Last edited by maqifrnswa; 6th March 2016 at 02:22 PM.
  Reply With Quote
Old 6th March 2016, 12:14 PM   #2
diyAudio Member
 
Join Date: Aug 2008
Fantastic work !
Please keep going.
  Reply With Quote
Old 6th March 2016, 07:19 PM   #3
lauda is offline lauda  United States
diyAudio Member
 
lauda's Avatar
 
Join Date: Mar 2015
Location: Minneapolis metro
Seconding LinksGuru!
  Reply With Quote
Old 6th March 2016, 08:50 PM   #4
frugal-phile(tm)
diyAudio Moderator
 
planet10's Avatar
 
Join Date: Oct 2001
Location: Victoria, BC, NA, Sol III
Blog Entries: 5
Quote:
I'm on Linux, so I just haven't had the time to build binaries on Windows (and I don't have a Mac,


Whatever version of Linux you are using stole a bunch of menubar icons from Mac OS X,

I'll see if i can try it out on my Mac. I can also compare results to S+L WooferTester 2 and how the sims do against John Murphy's MacSpeakerz sim sw.

Build? I might need help with that.

dave
__________________
community sites t-linespeakers.org, frugal-horn.com, frugal-phile.com ........ commercial site planet10-HiFi
p10-hifi forum here at diyA
  Reply With Quote
Old 6th March 2016, 09:12 PM   #5
Ron E is offline Ron E  United States
diyAudio Member
 
Ron E's Avatar
 
Join Date: Jun 2002
Location: USA, MN
Your PDF won't load using Chrome or MS Edge on win10, can view in browser on github but unusably slow. Just looking to see what your approach is before I bother to investigate further.

With reference to Q=0.383 you appear to be planning on doing undamped vented alignments?

Real speaker inductive impedance is closer to an inductor in series with a resistor/Inductor in parallel

Good luck!
__________________
Our species needs, and deserves, a citizenry with minds wide awake and a basic understanding of how the world works. --Carl Sagan
Armaments, universal debt, and planned obsolescence--those are the three pillars of Western prosperity. —Aldous Huxley
  Reply With Quote
Old 6th March 2016, 09:43 PM   #6
diyAudio Member
 
Join Date: Mar 2016
Quote:
Originally Posted by Ron E View Post
Your PDF won't load using Chrome or MS Edge on win10, can view in browser on github but unusably slow. Just looking to see what your approach is before I bother to investigate further.

With reference to Q=0.383 you appear to be planning on doing undamped vented alignments?

Real speaker inductive impedance is closer to an inductor in series with a resistor/Inductor in parallel

Good luck!
Thanks for checking it out!
Here's a link to the file for download, maybe acrobat or adobe reader can open it.

https://github.com/maqifrnswa/scimpy...doc/scimpy.pdf

For the most part my approach is just a rehashing of Thiele and Small's original papers, but with more explicit derivations and a little more discussion as to strategy.

The default closed box is perfectly damped, but the user can set to over or underdamped as desired. Same will happen for the closed box. Default will be QB3-B4-C4 ideal alignment, but the user can override and tune as they wish.

Qt=.383 was for the B4 alignment for a driver that also happened to exactly have Qts=0.383. After discussing that, I say how it's pretty unlikely to be used, so instead will use quasi-butterworth and Chebyshev alignments to get a continiuum of possible Qts. One of the figure towards the end shows the response curves of a bunch of different Qts, ranging from under- to over-damped. The code will follow that: for Qts<.0383 will be a QB3 alignment, > 0.383 will be a C4 alignment. But that is just the first implementation, anyone can implement any strategy they like - in fact, in the end I'll probably just have a global optimization function where you just give the sepcs of the drivers (multiway) and desired cross over frequencies, and it will find the box design that optimizes the whole system.

You're right about the inductor model. In your opinion, how useful is it to include that shunt resistor in speaker design and modeling? Essential, nice to have, or not-really-needed? Figure 4.8 in the text shows the complete model, which is the end goal I'm aiming for. Drivers don't give that shunt resistance value, but we can find it during impedance testing. Same thing with acoustic filling. I think I call it "Reb" in the text, but for now I'm leaving it out to get a proof-of-concept implementation working.

Quote:
Whatever version of Linux you are using stole a bunch of menubar icons from Mac OS X,

I'll see if i can try it out on my Mac. I can also compare results to S+L WooferTester 2 and how the sims do against John Murphy's MacSpeakerz sim sw.

Build? I might need help with that.

dave
;-) people all the time ask me how i got MacOS to run on a thinkpad! It's a base ubuntu install, that's what they do (include close/minimize being in the top left like macs). Yes, please check and compare. I've been comparing against online data I can find. Some of the math gets hairy, and if we implement automated multi-way cabinet and cross-over design, it will only get more complicated. Complicated = powerful, but potential for bugs.

I see it is super-easy to edit and develop on Linux, but windows had a couple extra steps since getting compilers and libraries up and running. I know people use homebrew on OSX, so difficulty might be somewhere in between windows and linux.
  Reply With Quote
Old 6th March 2016, 10:24 PM   #7
JohnPM is offline JohnPM  United Kingdom
diyAudio Member
 
Join Date: Oct 2008
Quote:
Originally Posted by Ron E View Post
Your PDF won't load using Chrome or MS Edge on win10, can view in browser on github but unusably slow.
Opens fine in Win10 for me using Adobe, Chrome and Edge. Click the 'Raw' button on github to download the pdf.
  Reply With Quote
Old 7th March 2016, 12:46 AM   #8
frugal-phile(tm)
diyAudio Moderator
 
planet10's Avatar
 
Join Date: Oct 2001
Location: Victoria, BC, NA, Sol III
Blog Entries: 5
Quote:
Originally Posted by maqifrnswa View Post
so instead will use quasi-butterworth and Chebyshev alignments to get a continiuum of possible Qts.
I'd suggest forget about the classical alignments cribbed from filter analogies & a lack of computing power. One should be able to work in the entire space possible.

Quote:
;-) people all the time ask me how i got MacOS to run on a thinkpad!
They should just buy a MacBook Pro… the best hardware.

Quote:
I see it is super-easy to edit and develop on Linux...I know people use homebrew on OSX, so difficulty might be somewhere in between windows and linux.
OSX is FreeBSD with a Mach kernel and then proprietary software on top for graphics, UI etc. A lot closer to Linux than to Windows -- especially if you are comfortable with using terminal (not me).

dave
dave
__________________
community sites t-linespeakers.org, frugal-horn.com, frugal-phile.com ........ commercial site planet10-HiFi
p10-hifi forum here at diyA
  Reply With Quote
Old 7th March 2016, 03:13 AM   #9
relder is offline relder  United States
diyAudio Member
 
relder's Avatar
 
Join Date: Jan 2002
Location: Tucson, AZ
Blog Entries: 14
Send a message via Yahoo to relder
How to get it to come up on a mac...

Note, if you've never fired up the Terminal.app, this may be a rough exercise for you. You're about to venture into Unix territory.

There are two major open source package managers out there for mac, macports and homebrew. For reasons I can't remember, I went with macports. I've never really had a problem with it and it has a darn good selection of packages. You first must install Xcode from the app store (so macports can compile programs). It's a big package. See instructions here.

I already had python3.4, matplotlib, and numpy installed previously via macports for other things. I needed two more things, so I installed them. I include some of the other packages I'd already installed which you'll need:
sudo port install python34 py34-pyaudio py34-pyqt4 py34-matplotlib py34-numpy
You might need more that I had already installed. After that you can download the code:
git clone https://github.com/maqifrnswa/scimpy.git
And run it:
cd scimpy
python3.4 scimpy.py


The sound card handling could be improved. I plugged in a Dayton WT3, which behaves as a USB sound card. It appears twice. The input and output appeared separately in the sound card list. Perhaps it's a Mac thing that the inputs and outputs appear separately. So it would be nice to select an input and an output, or coalesce both 'USB Audio CODEC' entries (the WT3) into one unit to select. I get a weird error message when doing the test. I presume that's since that selection has no input channels (but the one below it does)
Click the image to open in full size.

Hmm, actually I just plugged in a Behringer UMC202HD and it's inputs and outputs appear under a single entry and no error message when doing the test.

Once you're able to select the sound card I'll give it another whirl.
__________________
"That which does not kill us makes us stronger." - Friedrich Nietzsche (who is, BTW, dead)
  Reply With Quote
Old 7th March 2016, 03:21 AM   #10
frugal-phile(tm)
diyAudio Moderator
 
planet10's Avatar
 
Join Date: Oct 2001
Location: Victoria, BC, NA, Sol III
Blog Entries: 5
Thanx for that. I am not unfamiliar with Terminal, but only to copy & paste stuff into.

If i use my FireWire ADC/DAC then choose it in the Sound Control Panel?

I've had a number of USB and Firewire ADC/DACs connected and they all show up as a single device.

Aside: WT3 is not a worthwhile device IMO. I've had quite a few people contact me with issues, and i think it underhanded that PE/Dayton stole Smith + Larson's product name for a much less capable device.

dave
__________________
community sites t-linespeakers.org, frugal-horn.com, frugal-phile.com ........ commercial site planet10-HiFi
p10-hifi forum here at diyA
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound Design, a new book on innovative and interesting ideas in speaker design. Studio Au Multi-Way 3 8th April 2012 09:46 PM
Linux Philosophy, Open Source Amp Wiki uzernaam Solid State 0 16th October 2010 09:55 AM
How to get started with speaker measurements for Dipole design? (and I have a Mac) santiu Multi-Way 4 12th January 2008 04:56 AM
Open call for suggestions on Open Source DIY Audio Design gfergy Everything Else 1 15th April 2007 08:33 AM
Looking for Linux based (open source) speaker design software Maxxarcade Multi-Way 3 17th January 2007 01:41 PM


New To Site? Need Help?

All times are GMT. The time now is 03:56 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Copyright ©1999-2016 diyAudio

Content Relevant URLs by vBSEO 3.3.2
Wiki