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.

Audiobus internal clock to StreamByter

Is it possible for a StreamByter script loaded in Audiobus to receive the MIDI clock generated by Audiobus? I tried to do this without success, detecting the F8 clock message. But I found a Mozaic script that can do this, using the @OnMetroPulse event (thanks @wim). That script sends a clock message which StreamByter receives with no problem. Using Mozaic like this is a viable solution, but seems unnecessary. I can also do it by having Audiobus send clock to the external FreEWI app and receiving it back, but this is very roundabout. Is there a trick that causes Audiobus to send clock to internal modules?

Comments

  • Nick of StreamByter has provided a possible answer. We can generate a periodic clock event by sending a delayed internal SysEx message to ourselves. This seems to work fine, and may be essentially what the Mozaic Metronome does. We just need to be clever with the delay time if it's not an integral number of ms. Here is my working sample implementation.

  • wimwim
    edited March 8

    @uncledave said:
    Nick of StreamByter has provided a possible answer. We can generate a periodic clock event by sending a delayed internal SysEx message to ourselves. This seems to work fine, and may be essentially what the Mozaic Metronome does. We just need to be clever with the delay time if it's not an integral number of ms. Here is my working sample implementation.

    The Mozaic metronome is linked to the host clock. It doesn't run unless the host transport is running. So, it's as accurate as the host because it's using the same.

    The problem with trying to do midi clock with a timer is ms isn't fine grained enough to be accurate, especially at 24 ppqn. Even in Mozaic which has sub millisecond timer resolution and Arduino, which has even finer resolution, I've had to jump through hoops to correct every so often.

    It's kind of a fun challenge though.

  • edited March 8

    @wim said:

    @uncledave said:
    Nick of StreamByter has provided a possible answer. We can generate a periodic clock event by sending a delayed internal SysEx message to ourselves. This seems to work fine, and may be essentially what the Mozaic Metronome does. We just need to be clever with the delay time if it's not an integral number of ms. Here is my working sample implementation.

    The Mozaic metronome is linked to the host clock. It doesn't run unless the host transport is running. So, it's as accurate as the host because it's using the same.

    The problem with trying to do midi clock with a timer is ms isn't fine grained enough to be accurate, especially at 24 ppqn. Even in Mozaic which has sub millisecond timer resolution and Arduino, which has even finer resolution, I've had to jump through hoops to correct every so often.

    It's kind of a fun challenge though.

    The StreamByter implementation also does not run unless the host transport is running. StreamByter provides Run and Stop events. Are you certain the Mozaic metronome is linked directly to the host clock?

    My implementation avoids the problem of integer ms resolution by periodically inserting one extra ms in the delay when needed. You basically accumulate the remainder from integer division and add one ms every time the total exceeds the divisor. This is a useful trick for implementing fractional steps on an integer grid.

    Edit: I ran the program in Audiobus for 30 minutes (93 bpm, 4 ppqn), along with an AR-909 pattern, with no detectable error. The program flashes each beat and bar on the StreamByter labels, and the flashes remain synced with the drums and the Audiobus beat ticker. So it appears to be reasonably stable.

    Edit 2: Ran for 85 minutes at 120 bpm, 24 ppqn. Still stable, right on the beat.

Sign In or Register to comment.