Aiming For Smart
• Chris Liscio
• Chris Liscio
I'm focusing my effort on the audio device selection code for FuzzMeasure 1.1, since I feel that it was an important feature that didn't make it into 1.0. This is a huge undertaking for me, mainly because I have a specific goal set for FuzzMeasure.</p> <p>For example, I deal with laptop users as well as desktop users, and audio devices aren't always connected. I want FuzzMeasure to be smart about its device handling. If you save a USB device as your default input and output device, and they're not there on startup, FuzzMeasure should not leave your selections blank. Instead, FuzzMeasure will be smart about this situation and select the default input and output device that is set in your System Preferences.</p> <p>With every feature I add, I try to think about how smart they will behave. FuzzMeasure's positioning is “Simple, accurate MLS measurements. On Mac OS X.”. In this post, I hope to address the simple part of that statement.</p> <p>My vision for FuzzMeasure includes simplicity. MLS measurements are a powerful tool, just like any oscilloscope or multimeter. You can get a lot of information from an oscilloscope, but not if you don't know what to measure, or what to look for on the display. FuzzMeasure's users need to know what they can measure with FuzzMeasure, and how they can get those measurements done. I'm trying to address those users with my user stories, which are apparently quite popular, judging by my access logs. That is my attempt at making the learning part simple. Learning is fun, especially if it's easy. I could easily point you to a hundred papers or so to learn everything about MLS measurements, but trust me when I say that you likely don't want to read them.</p> <p>Once you've made the leap to understanding a tool, you do not want to think very much about how to use that tool. If there's a problem with your line voltage at home, you know enough to set a multimeter to AC voltage mode and probe your outlet. It's a tool that will sit in your toolbox, and when you need it, it just works. FuzzMeasure just works, and I want to keep it that way. By adding the ability to select and interface with multiple devices, I have paved the way for many UI issues.</p> <p>What happens when the user removes a USB device while FuzzMeasure is loaded? FuzzMeasure will have to select the system's default device for whichever devices are affected by the unplugging. It's simple to just do nothing, but that's not smart enought.</p> <p>What about two devices that do not share all the same sampling rates? FuzzMeasure will only allow you to select sampling rates supported by both devices. If the currently-selected sampling rate is not supported, FuzzMeasure will try to negotiate a supported rate (starting from the highest) between the two devices. If no rate is supported by both devices, I will disable the sampling rate popup button, and disable the audio interfaces until another selection is made.1</p> <p>As you can probably tell, there are a lot of issues similar to the ones above that I will have to deal with before putting 1.1 out there. Unfortunately, testing insertion/removal of a Transit USB is really difficult when it likes to completely kill my iBook and PowerMac with a kernel panic upon reinsertion. If you haven't already heard from me about this, don't buy one of those things, unless, of course, you enjoy kernel panics on a regular basis. Perhaps in good time I'll learn how to tell someone to power off their Mac in multiple languages. :P</p> <p> 1This is a temporary solution for now, and I have a cool idea for handling it better. What I would like is a solution that would behave similar to the loop browsing UI in GarageBand. Selecting a device will only populate the other device selection with a compatible complementary device. Also, if you select one device, and a sampling rate, I will only populate the other device's popup with devices that share that same sampling rate. This requires a fair bit of code to develop and test, but the end result will be worth it. </p>