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.

Learn to Program the Mozaic Workshop to create MIDI FX and Controllers *you could learn something*

12345679»

Comments

  • Greets Mozaicers.
    Kindly place an editable (assignable cc/channel etc) code for turning those knobs to send cc.

    That would make them useful for me.

    Danke shun!

  • Ok I did RTFM 😑

    @OnLoad
    ShowLayout 2
    LabelKnob 0, {🤑}
    LabelKnob 1, {🤢}
    LabelKnob 2, {🤬}
    LabelKnob 3, {🥶}

    @End
    @OnKnobChange
    if LastKnob = 0
    setting = GetKnobValue 0
    SendMIDICC 0, 1, setting // send out CC#1 on channel 0
    endif

    @OnKnobChange
    if LastKnob = 1
    setting = GetKnobValue 1
    SendMIDICC 0, 2, setting // send out CC#2 on channel 0
    endif

    @OnKnobChange
    

    if LastKnob = 2
    setting = GetKnobValue 2
    SendMIDICC 0, 3, setting // send out CC#3 on channel 0
    endif

    @OnKnobChange
    

    if LastKnob = 3
    setting = GetKnobValue 3
    SendMIDICC 0, 4, setting // send out CC#4 on channel 0
    endif

    @End

    @End

  • Any ideas why I get syntax error?

  • // CC-Toggle v1.04, mod -ki
    // based on CC-Switch v1.03 by mbncp @ audiobus forum

    // Allows the use of a Controller to act like a switch
    // Usefull with controllers that return to their initial position once you release them
    // The state is stored for each midi channel
    // Off course you can also use the pads

    @OnLoad
    // Adjust to your needs
    TrigCC = 64 // Incoming CC to make it act like a switch
    CCValRange = 15 // CC input value tolerance, for a knob use 64

    // A list of off/on CC values send, two numbers per pad
    CCVal[ 0] = [0,0, 8,8, 16,16, 24,24] // CC Values for pads 0.. 3
    CCVal[ 8] = [32,32, 40,40, 48,48, 56,56] // pads 4.. 7
    CCVal[16] = [64,64, 72,72, 80,80, 88,88] // pad 8..11
    CCVal[24] = [96,96, 102,102, 110,110, 118,118] // pad 12..15

    OutCC[0] = [0,0,0,0,0,0,0,0] // CCs for upper row
    OutCC[8] = [0,0,0,0,0,0,0,0,] // CCs for lower row

    OutCH[0] = [0,0,0,0,0,0,0,0] // Output channel (0..15) for upper row
    OutCH[8] = [0,0,0,0,0,0,0,0] // Output channel (0..15) for lower row

    FillArray TrigState, 0,16 // keep state of all channels
    FillArray TrigReset, 1,16
    SetShortName {Toggle}
    LabelPads {CC Toggle}
    LabelKnobs { }
    for k = 0 to 3
    LabelKnob k,{ }
    SetKnobValue k,0
    endfor

    ShowLayout 2
    for n = 0 to 15
    LabelPad n, {CC },OutCC[n], {👽},{ch},OutCH[n]+1

    ColorPad 0, 1
    ColorPad 1, 2
    ColorPad 2, 3
    ColorPad 3, 4
    ColorPad 4, 5
    ColorPad 5, 6
    ColorPad 6, 7
    ColorPad 7, 0
    ColorPad 8, 7
    ColorPad 9, 6
    ColorPad 10, 5
    ColorPad 11, 4
    ColorPad 12, 3
    ColorPad 13, 2
    ColorPad 14, 1
    ColorPad 15, 0

    LabelPads
    LabelPad 0, { .🥾🥾🥾🥾🥾🥾🥾🥾}
    LabelPad 1, {💠💠💠💠💠💠💠💠💠💠💠💠}
    LabelPad 2, {🎩🎩🎩🎩🎩🎩🎩🎩🎩🎩🎩🎩}
    LabelPad 3, {🧤🧤🧤🧤🧤🧤🧤🧤🧤🧤🧤🧤}
    LabelPad 4, {👾👾👾👾👾👾👾👾👾👾👾👾}
    LabelPad 5, {🪘🪘🪘🪘🪘🪘🪘🪘🪘🪘🪘🪘}
    LabelPad 6, {🥁🥁🥁🥁🥁🥁🥁🥁🥁🥁🥁🥁}
    LabelPad 7, {⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️}
    LabelPad 8, {🛎🛎🛎🛎🛎🛎🛎🛎🛎🛎🛎🛎}
    LabelPad 9, {❇️❇️❇️❇️❇️❇️❇️❇️❇️❇️❇️❇️}
    LabelPad 10, {♒️♒️♒️♒️♒️♒️♒️♒️♒️♒️♒️♒️}
    LabelPad 11, {🪅🪅🪅🪅🪅🪅🪅🪅🪅🪅🪅🪅}
    LabelPad 12, {🪆🪆🪆🪆🪆🪆🪆🪆🪆🪆🪆🪆}
    LabelPad 13, {🪣🪣🪣🪣🪣🪣🪣🪣🪣🪣🪣🪣}
    LabelPad 14, {🛢🛢🛢🛢🛢🛢🛢🛢🛢🛢🛢🛢}
    LabelPad 15, {💿💿💿💿💿💿💿💿💿💿💿💿}

    LabelKnob 0, {🤑}
    LabelKnob 1, {🤢}
    LabelKnob 2, {🤬}
    LabelKnob 3, {🥶}

    endfor
    Call @UpdateGUI
    @End

    @OnMidiInput
    If MIDICommand = 0xB0 And MIDIByte2 = TrigCC
    If MidiByte3 > (127 - CCValRange) And TrigReset[MIDIChannel]
    TrigState[MIDIChannel] = not TrigState[MIDIChannel]
    idx = MIDIChannel * 2 + TrigState[MIDIChannel]
    SendMIDICC OutCH[MIDIChannel], OutCC[MIDIChannel], CCVal[idx]
    TrigReset[MIDIChannel] = 0
    Call @UpdateGUI
    ElseIf MidiByte3 < CCValRange
    TrigReset[MIDIChannel] = 1
    EndIf
    Else
    SendMIDIThru
    EndIf
    @End

    @OnPadUp
    TrigState[LastPad] = not TrigState[LastPad]
    idx = LastPad * 2 + TrigState[LastPad]
    SendMIDICC OutCH[LastPad], OutCC[LastPad], CCVal[idx]
    TrigReset[LastPad] = 1
    Call @UpdateGUI

    @End

    @OnPadDown
    pad = LastPad
    if pad <= 15
    if (pad >= 0) and (pad <= 15)
    endif
    for a = 0 to 15
    LatchPad a, NO
    endfor
    LatchPad pad, YES
    endif

    @End

    @UpdateGUI
    for n = 16 to 16
    LatchPad n, TrigState[n]
    endfor
    @End

    @OnKnobChange
    if LastKnob = 0
    setting = GetKnobValue 0
    SendMIDICC 0, 1, setting // send out CC#1 on channel 0
    endif

    @OnKnobChange
    if LastKnob = 1
    setting = GetKnobValue 1
    SendMIDICC 0, 2, setting // send out CC#2 on channel 0
    endif

    @OnKnobChange
    

    if LastKnob = 2
    setting = GetKnobValue 2
    SendMIDICC 0, 3, setting // send out CC#3 on channel 0
    endif

    @OnKnobChange
    

    if LastKnob = 3
    setting = GetKnobValue 3
    SendMIDICC 0, 4, setting // send out CC#4 on channel 0
    endif

    @End

  • heshes
    edited May 2021

    @Tamir_Raz_Mataz said:
    Any ideas why I get syntax error?

    What is all this stuff below supposed to be doing? All sorts of errors. First of all, there should be only one @OnKnobChange event in your script. You have many. Second, any @[EVENT] block needs to be terminated by an @END line. Some of yours are not. You might want to review the basics of event blocks and how they work, so you understand better why only one of each type is allowed (and why more aren't needed) within your script.

    [. . . ]
    @OnKnobChange
    if LastKnob = 0
    setting = GetKnobValue 0
    SendMIDICC 0, 1, setting // send out CC#1 on channel 0
    endif
    
    @OnKnobChange
    if LastKnob = 1
    setting = GetKnobValue 1
    SendMIDICC 0, 2, setting // send out CC#2 on channel 0
    endif
    
    @OnKnobChange
    
    if LastKnob = 2
    setting = GetKnobValue 2
    SendMIDICC 0, 3, setting // send out CC#3 on channel 0
    endif
    
    @OnKnobChange
    
    if LastKnob = 3
    setting = GetKnobValue 3
    SendMIDICC 0, 4, setting // send out CC#4 on channel 0
    endif
    
    @End
    

    [Note: All of the code below is untested.]

    One fix would be to create your set of tests within a single if/elseif/endif structure, located within a single @OnKnobChange event block.

    @OnKnobChange
    
      if LastKnob = 0
          setting = GetKnobValue 0
          SendMIDICC 0, 1, setting // send out CC#1 on channel 0
     elseif LastKnob = 1
         setting = GetKnobValue 1
         SendMIDICC 0, 2, setting // send out CC#2 on channel 0
     elseif LastKnob = 2
         setting = GetKnobValue 2
         SendMIDICC 0, 3, setting // send out CC#3 on channel 0
     elseif LastKnob = 3
         setting = GetKnobValue 3
         SendMIDICC 0, 4, setting // send out CC#4 on channel 0
     endif
    
    @End
    
    

    Or, even better:

    @OnKnobChange
      if (LastKnob >= 0) and (LastKnob <=3)
         setting = GetKnobValue LastKnob
         SendMIDICC 0, (Lastknob + 1), setting
      endif
    @End
    

    Or, just:

    @OnKnobChange
      if  (LastKnob <=3)
         SendMIDICC 0, (LastKnob + 1), (GetKnobValue LastKnob)
      endif
    @End
    
  • @hes said:

    @Tamir_Raz_Mataz said:
    Any ideas why I get syntax error?

    What is all this stuff below supposed to be doing? All sorts of errors. First of all, there should be only one @OnKnobChange event in your script. You have many. Second, any @[EVENT] block needs to be terminated by an @END line. Some of yours are not. You might want to review the basics of event blocks and how they work, so you understand better why only one of each type is allowed (and why more aren't needed) within your script.

    [. . . ]
    @OnKnobChange
    if LastKnob = 0
    setting = GetKnobValue 0
    SendMIDICC 0, 1, setting // send out CC#1 on channel 0
    endif
    
    @OnKnobChange
    if LastKnob = 1
    setting = GetKnobValue 1
    SendMIDICC 0, 2, setting // send out CC#2 on channel 0
    endif
    
    @OnKnobChange
    
    if LastKnob = 2
    setting = GetKnobValue 2
    SendMIDICC 0, 3, setting // send out CC#3 on channel 0
    endif
    
    @OnKnobChange
    
    if LastKnob = 3
    setting = GetKnobValue 3
    SendMIDICC 0, 4, setting // send out CC#4 on channel 0
    endif
    
    @End
    

    [Note: All of the code below is untested.]

    One fix would be to create your set of tests within a single if/elseif/endif structure, located within a single @OnKnobChange event block.

    @OnKnobChange
    
      if LastKnob = 0
          setting = GetKnobValue 0
          SendMIDICC 0, 1, setting // send out CC#1 on channel 0
     elseif LastKnob = 1
         setting = GetKnobValue 1
         SendMIDICC 0, 2, setting // send out CC#2 on channel 0
     elseif LastKnob = 2
         setting = GetKnobValue 2
         SendMIDICC 0, 3, setting // send out CC#3 on channel 0
     elseif LastKnob = 3
         setting = GetKnobValue 3
         SendMIDICC 0, 4, setting // send out CC#4 on channel 0
     endif
    
    @End
    
    

    Or, even better:

    @OnKnobChange
      if (LastKnob >= 0) and (LastKnob <=3)
         setting = GetKnobValue LastKnob
         SendMIDICC 0, (Lastknob + 1), setting
      endif
    @End
    

    Or, just:

    @OnKnobChange
      if  (LastKnob <=3)
         SendMIDICC 0, (LastKnob + 1), (GetKnobValue LastKnob)
      endif
    @End
    

    Perfect explanation. I chose the first example for its more assignable per knob.
    Many thanx!

  • heshes
    edited May 2021

    @Tamir_Raz_Mataz said:
    Perfect explanation. I chose the first example for its more assignable per knob.
    Many thanx!

    Not sure, but there may be other stuff in your code that, while it may not generate errors, is generally something to avoid. For example, in your @Load block check out all the LabelPad and ColorPad statements that are within the 'for n = 0 to 15' to 'endfor' block. Most of those LabelPad and ColorPad statements specify their arguments fully, don't use the 'n' value that's varying within the for/endfor block. So each of them is being unnecessarily executed 16 times (0 to 15). This is suboptimal, since each needs to be executed only once. As things stand, you probably won't even notice, since this code is just in the '@OnLoad' block that gets executed only once upon project load. But if you had unnecessary repetition like this in a block of code that was getting called often, you might notice some sluggish UI behavior. [The fix, if you do indeed want to specify them fully, without referencing 'n', is just to move all these statements outside the for/endfor block.]

  • McDMcD
    edited May 2021

    I don't understand why the OP didn't put this information into the Wiki.
    And you're thinking "There's a Wiki!?"

    https://wiki.audiob.us/doku.php?id=mozaic_plugin_engine&s[]=mozaic

    I went to the wiki and it points back here... so, back to farting around.

  • @hes said:

    @Tamir_Raz_Mataz said:
    Perfect explanation. I chose the first example for its more assignable per knob.
    Many thanx!

    Not sure, but there may be other stuff in your code that, while it may not generate errors, is generally something to avoid. For example, in your @Load block check out all the LabelPad and ColorPad statements that are within the 'for n = 0 to 15' to 'endfor' block. Most of those LabelPad and ColorPad statements specify their arguments fully, don't use the 'n' value that's varying within the for/endfor block. So each of them is being unnecessarily executed 16 times (0 to 15). This is suboptimal, since each needs to be executed only once. As things stand, you probably won't even notice, since this code is just in the '@OnLoad' block that gets executed only once upon project load. But if you had unnecessary repetition like this in a block of code that was getting called often, you might notice some sluggish UI behavior. [The fix, if you do indeed want to specify them fully, without referencing 'n', is just to move all these statements outside the for/endfor block.]

    Thanks mate. Will you send the correction please?

  • heshes
    edited May 2021

    @Tamir_Raz_Mataz said:

    @hes said:

    @Tamir_Raz_Mataz said:
    Perfect explanation. I chose the first example for its more assignable per knob.
    Many thanx!

    Not sure, but there may be other stuff in your code that, while it may not generate errors, is generally something to avoid. For example, in your @Load block check out all the LabelPad and ColorPad statements that are within the 'for n = 0 to 15' to 'endfor' block. Most of those LabelPad and ColorPad statements specify their arguments fully, don't use the 'n' value that's varying within the for/endfor block. So each of them is being unnecessarily executed 16 times (0 to 15). This is suboptimal, since each needs to be executed only once. As things stand, you probably won't even notice, since this code is just in the '@OnLoad' block that gets executed only once upon project load. But if you had unnecessary repetition like this in a block of code that was getting called often, you might notice some sluggish UI behavior. [The fix, if you do indeed want to specify them fully, without referencing 'n', is just to move all these statements outside the for/endfor block.]

    Thanks mate. Will you send the correction please?

    Try comparing the code below with the similar section in your @OnLoad block, and see why the code below executes the specific ColorPad and LabelPad statements only once, while in your code they get executed 16 times, without needing to be:

    for n = 0 to 15
        LabelPad n, {CC },OutCC[n], {👽},{ch},OutCH[n]+1
    endfor     //  this line was moved up from bottom of code section
                     // because you don't want all the lines below included in the 
                    // for-endfor block
    
    ColorPad 0, 1
    ColorPad 1, 2
    ColorPad 2, 3
    ColorPad 3, 4
    ColorPad 4, 5
    [. . . ]
    
    LabelPads
    LabelPad 0, { .🥾🥾🥾🥾🥾🥾🥾🥾}
    LabelPad 1, {💠💠💠💠💠💠💠💠💠💠💠💠}
    LabelPad 2, {🎩🎩🎩🎩🎩🎩🎩🎩🎩🎩🎩🎩}
    LabelPad 3, {🧤🧤🧤🧤🧤🧤🧤🧤🧤🧤🧤🧤}
    [. . . ]
    
    LabelKnob 0, {🤑}
    LabelKnob 1, {🤢}
    LabelKnob 2, {🤬}
    LabelKnob 3, {🥶}
    
    //  endfor   -- I'm taking this out and moving it up near the top 
    //  now only the lines that need to are in the for-endfor block
    

    I'm also not clear on what all the lines in @PadDown are doing. Some are unnecessary and I'm not clear on the logic of that block. What exactly are you trying to accomplish on pad down? I assume you've changed it from what was in _ki's project. I would review those changes to see why you made them, might want to revert back to whatever it was in original project. You shouldn't need to change any of the logic for @OnPadUp or @OnPadDown if all you're trying to do is (1) implement knob cc functionality, and (2) change to your desired labels for the pads.

    Also, it seems like there may be an error in @UpdateGUI:

    @UpdateGUI
    for n = 16 to 16
    LatchPad n, TrigState[n]
    endfor
    @End 
    

    The code above may be throwing an error because in Mozaic all pads are numbered from 0 to 15. Isn't the code below what you actually want?:

    @UpdateGUI
      for n = 0 to 15
         LatchPad n, TrigState[n]
     endfor
    @End 
    
  • hi folks! forum newbie here. just uploaded my first Mozaic patch to patchstorage and could use some help testing. it is a simple live looping midi note sequencer called seq-l. patch here:https://patchstorage.com/seq-l/. thanks for checking it out. enjoy! /dan

  • @bangzero said:
    hi folks! forum newbie here. just uploaded my first Mozaic patch to patchstorage and could use some help testing. it is a simple live looping midi note sequencer called seq-l. patch here:https://patchstorage.com/seq-l/. thanks for checking it out. enjoy! /dan

    Dan. Feel free to create a thread for your script and ask users for feedback on it. It will
    hang about for a few days and roll into the legacy database... which is still referenced by pages.

    It's OK. Words here or words on a new thread... it consumes the same amount of space.
    This thread is where we talk about coding examples. I looked at your script and it's too complex for a beginner to understand. It looks great by the way. By the way, they tell me that the download counter at pachstorage.com is not accurate. Not sure if it's true.

  • @McD said:
    Dan. Feel free to create a thread for your script and ask users for feedback on it. It will
    hang about for a few days and roll into the legacy database... which is still referenced by pages.

    will do McD. thanks for encouragement and patchstorage tip.

  • @McD

    I cannot figure out how to send sysex messages in Mozaic.

    The sysex message I need to send is this

    "F0 41 10 6A 12 0 0 0 A 0 76 F7"

    It switches the Master Reverb on and off for the JV1010

    I got as far as

    @OnPadDown

    " SendSysex array, size, checksum, checksumstart"

    @End

    How do I translate the sysex string for Mozaic to send it please?

  • You asked @McD but I'm bored and have a minute so ...

    You replace each part after SendSysex with the needed information. Also no quotes around the command string.

    • array: the values of the sysex message in hexadecimal. The contents of the array is everything between the F0 and F7. Arrays are specified as comma separated numbers between square brackets. Hex numbers are expressed with a 0x in front of them. Thus, substitute [0x41, 0x10, 0x6A, 0x12, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x76] for "array" in the command.
    • size: the number of bytes in the array. In this case, 10.
    • checksum: probably not needed, though some manufacturers may require it. See the manual.
    • checksum: probably not needed. See the manual.

    It's cleanest to to create a variable with the array, then use that in the SendSysex command. So, you end up with something like this:

    @OnPadDown
      message = [0x41, 0x10, 0x6A, 0x12, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x76]
      SendSysex message, 10
    @End
    
  • Thanks @wim.

    Does anyone happen to know if StreamByter can send sysex messages too?

  • @wim said:
    You asked @McD but I'm bored and have a minute so ...

    Thank you....

    You replace each part after SendSysex with the needed information. Also no quotes around the command string.

    The quotes were for posting purposes only.

    • array: the values of the sysex message in hexadecimal. The contents of the array is everything between the F0 and F7. Arrays are specified as comma separated numbers between square brackets. Hex numbers are expressed with a 0x in front of them. Thus, substitute [0x41, 0x10, 0x6A, 0x12, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x76] for "array" in the command.

    Ahhh I was looking at the Hex numbers in the manual and I wasn't to sure.
    Thank you for confirming this.

    • size: the number of bytes in the array. In this case, 10.

    Cool, good to know.

    • checksum: probably not needed, though some manufacturers may require it. See the manual.
    • checksum: probably not needed. See the manual.

    From my days of old when I used to put stuff together in Cubase,
    the Atari version, I used to use Sysex a lot with Roland stuff.
    They are sticklers for checksums.
    I'll be double checking the manual anyway.

    It's cleanest to to create a variable with the array, then use that in the SendSysex command. So, you end up with something like this:

    @OnPadDown
      message = [0x41, 0x10, 0x6A, 0x12, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x76]
      SendSysex message, 10
    @End
    

    Sweet.

    I know what I'm putting together over the next couple of days
    as I need to tempo sync some of the patches in the JV1010
    and the JV1010 needs to receive Sysex commands to do so.

    @McD Yup, streambyter can send Sysex.
    I sent the Sysex string to the JV1010 to switch off the reverb and it worked.
    I tried the same Sysex and it didn't work in Mozaic hence my request.

  • One nice thing about Mozaic’s sysex is that it will calculate the checksum sometimes needed whereas in Streambyter you need to calculate it yourself.

  • @espiegel123 said:
    One nice thing about Mozaic’s sysex is that it will calculate the checksum sometimes needed whereas in Streambyter you need to calculate it yourself.

    This is good to know for sure.
    It'll make things much easier.

  • @espiegel123 said:
    One nice thing about Mozaic’s sysex is that it will calculate the checksum sometimes needed whereas in Streambyter you need to calculate it yourself.

    Oh no... I would imagine there's some python or perl module that calculates checksums.
    I'm just a musician... with a bachelors degree in electrical engineering. But I only studied the math to graduate and then forgot everything back to middle school.

    But there are math "boffins" that create open source code for the math-y stuff.

    It does amaze me how much of the really cool programming stuff @brambos takes off our plates like the event manager built into Mozaic.

    I created an app that timestamps incoming notes and plays them back with perfect timing
    because you can request a batch send with up to 256 notes and each note gets it's own "delay" value. Thanks @brambos! Now the next trick it to set a timer to launch the next 256 notes in a batch and set a timer to launch another 256...

    We keep asking @brambos to allow "strings" but he's not going there. I'm sincerely glad we got what we got for our (what?) $10?

Sign In or Register to comment.