Audiobus: Use your music apps together.

What is Audiobus?Audiobus is an award-winning music app for iPhone and iPad which lets you use your other music apps together. Chain effects on your favourite synth, run the output of apps or Audio Units into an app like GarageBand or Loopy, or select a different audio interface output for each app. Route MIDI between apps — drive a synth from a MIDI sequencer, or add an arpeggiator to your MIDI keyboard — or sync with your external MIDI gear. And control your entire setup from a MIDI controller.

Download on the App Store

Audiobus is the app that makes the rest of your setup better.

What is a frame?

I understand latency in terms of milliseconds or samples. Given the sample rate, say 44.1K samples per second, then it's trivial to express the latency in number of samples or in ms. As a physical concept the speed of sound at sea level is about 1 foot per ms. So a 20ms latency is like playing a guitar 20ft away from your amp. But what is a frame? As in 512 or 256 frames?

Comments

  • I'm not sure-
    But I do know that 128 frames = 2.9ms
    128 divided by 2.9 is 44.13793103448276
    :-)

  • Audio on iOS (and most digital devices) is processed in multi-sample chunks. The iPad records 256 samples (for example) at 44.1k samples per second, and then hands the entire 256-sample chunk over to the app to chew on.

    Output works sort of the same way -- an app generates 256 samples, then hands that off to the operating system, and then each sample goes out in time.

    For everything to work correctly (and to avoid glitches), there's a little bit of buffering, and there are some hard deadlines (particularly for sound going out). I don't recall it being spelled out in the documentation anywhere, but my understanding is that at any given time, there's 3 buffers in use: one to record incoming sound, one that is under the control of the app (to process incoming audio, and to generate the output sound), and one that is being played back live.

    The smaller the frame, the lower the latency -- but the more difficult it is (coding wise) to get all the number crunching done on time. There's also more processing overhead for small buffers. The 256/512 that Audiobus uses is sort of the sweet spot -- fast enough to be very responsive, but slow enough that the hardware can handle things. There's a bit more latency (potentially) when audio has to move through the stages of the AB pipeline.

  • Thank you, so when we set the frame to 256 that's 256 samples? Or 5ms latency? Times 3 slots, max 15. Impressive even at 512/30 ms

  • Yup -- that's pretty much it. 256 means 256 samples in a packet/frame, and they're normally at 44.1khz (although potentially it could be a different sample frequency). And the "3 time slots" is my impression -- but it's potentially a bit different (and you can have some more delays in the AB pipeline).

    When a synth app doesn't prepare the audio to be played in time, there's a drop-out -- iOS doesn't know what to send to the speakers. For apps that do lots of processing (filtering, chorus, reverb, ...), the 256-sample window can be pretty hard to hit. This is part of the reason that the iPad1 and older iPhones are not recommended -- just not enough horsepower to get the bits out in time. There's a bit of overhead processing for each frame; going from 256 to 512 sized samples cuts that in half, reducing the CPU load.

  • I keep mine at 512

  • A frame is simply a set of samples with the same timestamp, one for each channel. E.g. if your audio is mono, 1 frame is 1 sample. If your audio is stereo, 1 frame is 2 samples (left + right). When we say 44100 kHz we mean 44100 samples per channel per second, i.e. 44100 frames per second.

Sign In or Register to comment.