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 StoreAudiobus is the app that makes the rest of your setup better.
Comments
I completely agree, @Janosax! It's mainly for making practicing easier, to feel more in control. In a live situation you definitely should do this without any audio feedback... but until then, it will make my life easier and more "responsive".
I’m sure you will master it faster than you think
@josh83 You need to setup a ‚background‘ task with the timer event. This maybe runs every 100 or 50 msec and in the OnTImer event you need to check the states of your four possible input notes.
.
I suggest restructuring your code a bit, to simplify further development.
In OnLoad define an array containing 4 blueboard notes
And an array containg either EMPTY = -1 or SystemTime of each possible of the 127 notes - managing it for all notes is simpler than having 4 vars with individual if‘s.
In OnMidiNoteOn add
In OnMidiNoteOff add
The Timer
.
BTW: You can use trick with the indirection via bbNote[] everywhere you already had a 4 stage if-cascade your code to simplify it to a single test inside a loop.
Like for instance in ShortTap:
Hmm, the OnTimer is now running its four-step loop every 50msec - this does no harm on iPads, but maybe it‘s wiser to further reduce the CPU load:
In OnLoad add
.
In MidiNoteOn add
.
In MidiNoteOff add
.
Modify OnTimer
This immediately ‚leaves‘ the OnTimer event if no note is active - thus no loop, no further if‘s etc.
Here's a highly simplified example to do only what you want it to do. It gets a little more complicated if you need to time more than one thing simultaneously and so need to keep the timer running all the time.
@Bryan 's https://patchstorage.com/double-tap-and-hold/ and @_ki 's https://patchstorage.com/pad-manager-include/have some excellent code examples.
BTW: My code snipptes have extra documentation including their source available in the AudioBus wiki, here the link to the Pad and Shift Manager Snippet Documentation.
Thanks for your suggestions and inspirations, guys!
@_ki:
I took your idea of removing the
if/else
stuff and replacing it with this beautiful loop: https://github.com/jmuheim/mozaic-blueboard/commit/43eab7e4dff99b450849f5ef520e12ea74b0e08d#diff-3205c0ded576131ea255ad2bd38b0fb2I liked @wim's implementation of the timer better though, as it only runs when a button is pressed: https://github.com/jmuheim/mozaic-blueboard/commit/e2473445e57ca9ff44a5929be6400a643949f695#diff-3205c0ded576131ea255ad2bd38b0fb2
I'm starting to get the concept of working with those events. Powerful stuff! I have many more cool ideas on how to improve my workflow!
Oops, didn’t notice the next page, @_ki already has you covered. Sorry
@josh83 if you’re not already using timers the you can do something like this (assumes you don’t want to reset the countdown on a second midi on event)...
If you’re already using a timer then you’d need to use the SystemTime and check it in your timer event
Thanks for your explanation, @xor! The detail with
SystemTime
is pretty relevant, good to know!