[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OS X woes



> :for emails and word processing maybe, but there are some significant
> :issues when trying to do intensive audio processing in OS X.
> :especially with audio input.

> ben, could you give some detail on that?

okay.  i have been sitting on this for a few months, waiting for apple 
to figure something out, but since my report seems to be stuck in a 
holding pattern with their developers and my emails don't get beyond a 
customer support person who can only tell me the updated status of the 
bug from their database (the Open/Verify state)...  maybe sharing this 
info will allow some of you to verify the bug's existence, and if some 
of you report it as well it will light a fire somewhere important.

first of all let me say that I love OS X.  I find using OS 9 painful; I 
rarely go back, even for producing music.  in fact I was happily a full 
time X user for months before discovering this problem, and I would not 
have tripped on it if it were not for the nature of my school work.

The goal of my thesis project is to create a software/hardware bridge 
for gestural control that communicates with the computer via sound 
input instead of one of the typical digital inputs (USB, firewire, 
serial, etc.)  i am trying to create a very fluid, tight connection 
with the computer that transmits a LOT of data - playing a traditional 
instrument involves a continuous engagement with the interface, so to 
capture all of the subtleties of a performance the data that flows from 
an instrument to a computer should be (approximately) continuous as 
well.  i've developed a system where multiple channels of gestural data 
are multiplexed into a regular built-in stereo input, and some hairy 
DSP is used to decode the incoming modulated data streams into 
"musically useful" control parameters.

of course the whole thing is built in Max/MSP, and until April I was 
doing all of the dev in OS X and loving the fact that I never had to 
reboot, even when developing crash-prone externals.  but I noticed that 
the signals that I was importing had some odd "bursty" characteristics 
after I de-multiplexed them. ( http://saoul.ca/osxbug1.pdf - there is a 
width of noise that is normal, but the spikes are unusual.)  at first I 
suspected these bursts might came from the custom-built chopper 
hardware, but after a few days of head-scratching I couldn't get rid of 
them.  my first clue that the hardware was OK was when I noticed that 
reducing the signal vector size - in effect, making the computer work 
harder - increased the frequency of the spikes.  so I made a max patch 
that slowly increases the load on the CPU (from approx 16% to 91%) as 
it is recording 10 seconds of input, and here was the result: 
http://saoul.ca/osxbug2.pdf .  the left of the graph is at low CPU %, 
the right at high.  notice how the burstiness increases.

then on a lark I rebooted into OS 9, and like magic all the burstiness 
disappeared no matter how hard I worked the computer.  I started to 
understand that OS X's audio input was a little wonky.  to confirm that 
the problem was not Max/MSP related, I recorded the same type of input 
using Ableton Live, first with no plugins running ( 
http://saoul.ca/osxbug3.pdf ) and then with two of Ableton's most 
expensive plugin reverbs running so that DSP % was somewhere above 70 ( 
http://saoul.ca/osxbug4.pdf ).  note that the scales of those two 
graphs are different - both signals similar wandering paths, but the 
second adds huge bursts of noise.

then I tried a different type of input: i got out a scientific function 
generator and fed a 50Hz sine wave into the patch I made that slowly 
made the computer work harder.  then I high pass filtered the result so 
that the sine wave would mostly disappear, and this is what it looked 
like: http://saoul.ca/osxbug5.pdf .  then I identified one of the 
spikes in the file that was recorded, and this is what it looked like 
(blue is sine wave, green is filtered): http://saoul.ca/osxbug6.pdf .  
as you can see there were a bunch of samples that just got dropped.  I 
figured out that it was about 76 samples: http://saoul.ca/osxbug7.pdf .

so after a lot more testing here is my guess at what happens: the OS 
drops samples at what used to be reasonable DSP load %s.  I've 
experienced dropped samples at usage %s as low as 20%!  the number of 
samples that are dropped appears to be variable- I've analyzed sections 
with anywhere between 45 and 80 samples missing.  when a discontinuity 
happens it's like an impulse in the signal, and the "bursty" behaviour 
that I identified was just the combined impulse responses of all the 
filters in my DSP algorithm.  I thought that I was going crazy - after 
all, wouldn't someone from Apple or another music software company have 
noticed this?!? - so I tested with three different computers (dual 867, 
Ti 867 and G3 400 powerbook) and four different audio interfaces (motu 
24i, mobile i/o 2882, emi 2|6, and built-in).  same result every time.

if you are using OS X, please try and verify this behaviour with as 
many softwares as possible, document your testing, and if you get 
similar results, send them to Apple.  I would be especially curious to 
see if you can reproduce this in Logic.  if you don't get the same 
results, contact me.  i think i've been thorough and i've demonstrated 
the behaviour to a number of people, but it's always possible that 
there's something I've overlooked.  feel free to contact me if you have 
any questions.  I am anxious for this problem to be fixed.

Ben

------------------------------