Loopy Pro: Create music, your way.

What is Loopy Pro?Loopy Pro is a powerful, flexible, and intuitive live looper, sampler, clip launcher and DAW for iPhone and iPad. At its core, it allows you to record and layer sounds in real-time to create complex musical arrangements. But it doesn’t stop there—Loopy Pro offers advanced tools to customize your workflow, build dynamic performance setups, and create a seamless connection between instruments, effects, and external gear.

Use it for live looping, sequencing, arranging, mixing, and much more. Whether you're a live performer, a producer, or just experimenting with sound, Loopy Pro helps you take control of your creative process.

Download on the App Store

Loopy Pro is your all-in-one musical toolkit. Try it for free today.

MIDI clock to AU unit

edited January 20 in Loopy Pro

Hello dear loopy fans, not sure if this is a bug, or if I'm not understanding the capabilities of Loopy Pro. I am using StreamByter to count clock ticks and trigger other samples based on when the measure starts. But I can only do that with it as an external app.

When I open Loopy Pro and StreamByter as separate apps, I can add Streambyter as a MIDI device in the LoopyPro mixer (black and white logo), and I see the clock ticks in the StreamByter monitor. Here's the image of both apps side by side on my iPad:

But if I setup Loopy Pro with StreamByter as Audio Unit Input (color logo) then I do not see the clock ticks in the StreamByter monitor. Only thing I see is two Systex messages. I tired enabling Ableton Link, and setting "Virtual MIDI Out" as the MIDI Clock destination, and then "Virtual MIDI In" as the source for StreamByter, but no success either.

Why the difference? How can I get clock ticks in the second setup?

Comments

  • edited January 20

    Hi. StreamByter is not an "instrument"; it produces no audio output. I believe you want to load it as a MIDI device. You can route its output to whatever you want.

    By the way, the Virtual MIDI Out and Virtual MIDI Out ports of Loopy Pro are visible to other external apps. They are not connected to each other.

    Edit: Sorry. I overlooked that your "working" setup was running StreamByter stand-alone. You've already gotten good answers for the problem.

  • wimwim
    edited January 20

    AudioUnit plugins aren't designed to be driven by midi clock. They're designed to be synced by the host through a tighter timing integration. Probably Loopy simply isn't passing midi clock to plugins - by design.

    Sending to Virtual MIDI Out won't be reflected back into Virtual MIDI In. There's nothing to handle the routing. But Streambyter Standalone can serve as something to bounce off of.

    If you want clock available to plugins (few will make use of it), send it out to standalone Streambyter, then back in from Streambyter.

    • Start up Streambyter in standalone.
    • Set midi clock out to it.
    • Add the Streambyter standalone port as a midi input.
    • Now add your Streambyter AU and route the input from the standalone port to it.
  • @pianosnake : fwiw, Mozaic would be a better fit for this use-case as it directly supports host sync and tracks the transport state and tracks host beats and measures.

    @wim’s suggestion of bouncing of the standalone StreamByter app works.

    There is also a self-contained solution with Streambyter that doesn’t require SB as a standalone. Add Loopy Pro as a midi AU. Turn on host synch in it. Set Loopy Pro as a midi destination. In the Loopy host, add Virtual
    midi In and Streambyter AU. Make streambyter a destination of the virtual midi in port.

  • edited January 20

    This illustrates loopy loaded as a midi AU in loopy. The loopy AU sends clock to the Loopy Pro port. The Virtual Midi In port (that is where midi directed to loopy pro goes) passes the midi clock to streambyter au.

  • wimwim
    edited January 20

    Thanks @espiegel123. I was too lazy to post screenshots.

  • You're amazing @espiegel123, your self-contained solution works! I would have never thought of that!

  • wimwim
    edited January 20

    I couldn't say for sure without testing, but the self-contained solution is likely higher overhead than just bouncing off of standalone Streambyter. A full featured plugin vs. a very lightweight separate app.

    Tidier though, I suppose.

  • @wim said:
    I couldn't say for sure without testing, but the self-contained solution is likely higher overhead than just bouncing off of standalone Streambyter. A full featured plugin vs. a very lightweight separate app.

    On my iPhone X and a buffer of 64, the CPU indicator is at 4% with this setup and 2% without the Loopy AU. So, it probably does use more resources, but in many use-cases the difference may be inconsequential.

  • @espiegel123 said:
    ... but in many use-cases the difference may be inconsequential.

    Yes, I should have added that.

  • On the other hand, there is also memory consumption to consider.

  • Thanks @espiegel123 and @uncledave for your script which I shortened it a bit for my purpose. Putting it out here in case anybody else finds it useful. Starting with the sysex message for clock start from LoopyPro host, I can send clock ticks from StreamByter as AU. I'm sending out a drum note on each beat (I know F8 is supposed to go out 24 times per quarter note, but in this case once per quarter note is enough). I turned on the metronome in LoopyPro to make sure they're staying in sync.

    IF LOAD
      ALIAS J0 ticking
      ALIAS J1 drift
      ALIAS J2 drift_accum #accumulation of drift
      ALIAS P0 delay #use large integer from P array
      ALIAS P1 adjusted_delay
      ASS J0 = 0 0 0
      ASS P0 = 0 0
    END
    
    SUB issue_tick
      # Accumulate the drift. If it's bigger than BPM make it equal to how much over BPM it is, and add a millisecond to the delay. Kinda like adding a "leap" millisecond that we lose when we send rounded down delays, which is done because the delay (P0) has to be an integer.
    
      MAT drift_accum = drift + drift_accum
      ASS adjusted_delay = delay
      IF drift_accum >= BPM
        MAT drift_accum = drift_accum % BPM
        MAT adjusted_delay = delay + 1
      END
    
      SND F8 +I +DP1 #+I so it gets sent to SB and this function gets triggered again and +D which is the adjusted delay
    END
    
    IF M0 == F0 7D 01 7A #sysex when starting host clock
      ASS ticking = 1
      # 60,000 ms in a bpm, multiply by 100 because built-in SB BPM variable is reported *100
      MAT delay = $6000000 / BPM
      MAT drift = $6000000 % BPM
      SND F8 +I
    END
    
    IF M0 == F0 7D 01 7C #sysex when stopping host clock
      ASS ticking = 0
      ASS J0 = 0 0 0
      ASS P0 = 0 0
    END
    
    IF M0 == F8
      IF ticking == 1
        SND 99 3C 40 #send out a drum note
        issue_tick
      END
    END
    
  • If you're curious about an approach using Mozaic, MIDI Clock Tool and Midi Clock Toolbox might be of interest.

  • @wim wow! I looked at Mozaic, and the same thing can be written in 3 lines:

    @OnNewBeat
      SendMIDIOut 0xF8
    @End
    

    Mind blown, thank you!!!

  • Yeh, a lot of StreamByter scripts are simpler and more compact than Mozaic, but as you've shown, some things are easier in Mozaic.

Sign In or Register to comment.