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.

Scripts to Process a SINGLE MIDI Message……and do/effect Multiple Functions/Things in AUM?

Hi,
Perhaps… I’ve asked this before; let me give the specific use case:

I have 6 channels in AUM, and each is like a different patch or preset for my violin.

I want to send a (SINGULAR) MIDI message (likely a CC message) - that will
* ‘unmute’ a specific channel (like my grunge lead, or my ethereal lead, etc.
* ‘mute’ all of the other channels for the presets I don’t want to use

one message - will UNMUTE one AUM channel and MUTE a bunch of other AUM channels.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
I have written a Mozaic Script (spelling?) - but I looked at some code examples of StreamByter and it seems WAY, WAY, WAY too complicated.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
I have a Morningstar MIDI controller, and I can do some adjustments to the message I sent (set it to CC or Program Change, and set the channel and the value.

OK…… truth be told….. I can actually set it up in the MIDI controller to send multiple messages; but something inside says this is a bad place to put the business logic (when I press on this footswitch send these 5 messages, where I have to know/remember - message 1 unmutes something and the other 4 messages mute various channels)
                      • *
                        Is there any other SIMPLE scripting language (like Mozaic) that can access the channel MUTE functions, and perhaps some other node /AudioUnit plugin BYPASS functions?????
                      • *

Scriptless in Seattle
Thanks!!

Comments

  • You can use Mozaic to do this. Just route the Mozaic output to MIDI Control in AUM. StreamByter is actually simpler for this, but Mozaic is fine, since you know how to use it. And what is it with all the emphasis? Can't we just have a simple conversation?

    You can access the Mute, Solo, etc. channel controls from the Controls (sliders icon) in the main AUM hamburger menu. Actually, I believe I posted a StreamByter script for this unmute one channel problem either here or in the SB forum.

    I guess you know that you can use multiple script instances in AUM and route their inputs and outputs differently. Here's one of my setups using multiple StreamByter scripts, including one sending to MIDI Control. In this case it's mapped to the AUv3 parameters in ZOA.

  • @Vmusic said:
    Hi,
    Perhaps… I’ve asked this before; let me give the specific use case:

    I have 6 channels in AUM, and each is like a different patch or preset for my violin.

    I want to send a (SINGULAR) MIDI message (likely a CC message) - that will
    * ‘unmute’ a specific channel (like my grunge lead, or my ethereal lead, etc.
    * ‘mute’ all of the other channels for the presets I don’t want to use

    one message - will UNMUTE one AUM channel and MUTE a bunch of other AUM channels.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
    I have written a Mozaic Script (spelling?) - but I looked at some code examples of StreamByter and it seems WAY, WAY, WAY too complicated.
    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
    I have a Morningstar MIDI controller, and I can do some adjustments to the message I sent (set it to CC or Program Change, and set the channel and the value.

    OK…… truth be told….. I can actually set it up in the MIDI controller to send multiple messages; but something inside says this is a bad place to put the business logic (when I press on this footswitch send these 5 messages, where I have to know/remember - message 1 unmutes something and the other 4 messages mute various channels)
    
                        • *
                          Is there any other SIMPLE scripting language (like Mozaic) that can access the channel MUTE functions, and perhaps some other node /AudioUnit plugin BYPASS functions?????
                        • *

    Scriptless in Seattle
    Thanks!!

    Why not do it in Mozaic? Mozaic and Streambyter are the two midi scripting options.

  • edited January 25

    I found my previous unmute one channel script here. Turns out I posted it to you. I could revise it if it's not doing what you need/expect. Or rewrite it in Mozaic. I personally find Mozaic a little harder to read because the user-written subroutines don't take parameters; they just work with the global pool (or stew) of variables.

    Sending multiple messages in response to one input is no problem in either SB or Mozaic. You just do it. And the input a script responds to can be pretty much anything (CC, PC, note, aftertouch) on any MIDI channel. The script can be picky about the exact messages/channels it accepts, or it can take a more omni approach, which may be handier for reuse.

    That earlier script mutes all the channels when it loads, i.e. when the AUM session loads. You might prefer to leave them all unmuted, then mute them all when one of the selected CCs is received, before unmuting the selected one. I can change that in a jiffy.

    And I would be glad to rewrite it in Mozaic, if you feel that would be easier to maintain. The translation is very direct.

  • So, here it is in Mozaic. I changed the algorithm to actually send mute or unmute to every channel, instead of relying on them to be muted already. But I don't believe Mozaic is notably simpler than SB, just different. I have tested this, and it works as described. Using the array of modeFlags is just a lazy way of sending different CC values to different CC#s. It saves using if logic inside the loop.

    //SelectChannelMoz
    // route controller to script input, output to AUM MIDI Control
    // Access channel controls from AUM hamburger menu,
    // control sliders. Configure each channel mute to respond to
    // one of CC21 and up on the same channel as the controller.
    // Assumes inputs send value 127 on press, 0 on release.
    
    @OnLoad
      // edit these 3 variables to change the CCs
      // note: you don't have to map all the CCs to channels. Extra
      // messages will just float away.
      baseInputCC = 21    // input CCs start here
      baseOutputCC = 21    // outputs start here
      numbChannels = 6    // number of channels and CCs
      theChannel = 0
      // ready for up to 10 channels. Extend this to add more.
      modeFlags = [ 127, 127, 127, 127,   127, 127, 127, 127,   127, 127 ]
      SetShortName {ChMute}
    @End
    
    @OnMidiCC
      // logic ignores CCs not in range
      if MIDIByte2 >= baseInputCC
        theChannel = MIDIByte2 - baseInputCC
        if theChannel < numbChannels
          If MIDIByte3 = 127    // only act on CC press
            Call @MyUnMuteChannel
          endif
        endif
      endif
    @End
    
    // mutes all channels except theChannel
    @MyUnMuteChannel
      modeFlags[theChannel] = 0
      i = 0
      while i < numbChannels
        numbCC = i + baseOutputCC
        // sends the commands on the same channel as input
        // the modeFlags are all 127, except for theChannel
        SendMIDICC MIDChannel, numbCC, modeFlags[i]
        i = i + 1
      endwhile
      // leave the flag set for next time.
      modeFlags[theChannel] = 127
    @End
    
  • @uncledave

    WOW!!! Thank you so much. I just got to look at this here this afternoon.

    One question, just to make sure I understand…. so there is some up front set up work - you said - go to the hamburger menu, and for each channel that may need muted or unmuted - set the Mute function to respond to CC21 on the same channel the MIDI controller will

    In my head….. I’m thinking I will use different foot switches on my MIDI controller to send, what I assume is different messages, telling the Mozaic script what to do. Something like this - in psuedo code or business speak:
    Foot switch A - Unmute channel A; which implies muting all of the other channels
    Foot switch B - Unmute channel B; which implies all of the other channels
    Foot switch C - Unmute channel C; which implies muting all of the other channels
    Foot switch D - Unmute channel D; which implies muting all of the other channels

    Where I’m confused….. wouldn’t each foot switch have to send a different CC message? or at least a different value? Something has to be different about the MIDI message sent from the different foot switches; otherwise how can the Mozaic script which channel needs unmuted (and by default know all of the other channels need muted).

    Thank you again for the script!! - and for answering the question to help my understanding on what type of MIDI message the different foot switches need to send.

  • edited January 30

    @Vmusic . What I tried to say was "CC21 and on up", meaning 21, 22, 23, 24, 25, 26, and so on. That was the scenario you described in your earlier request. So the footswitches would need to send those CC#s, a different one for each audio channel. And you can use the same CC#s to control the mutes in AUM. You can change those numbers in the @OnLoad or If load sections of the scripts. If the controller has some rigid scheme that you cannot (or don't want to) change, we can probably modify the script to handle it: Notes, Program Change messages, CC toggles (sending value 127 one time, and 0 the next time), etc. It currently expects footswitch A to send CC21 value 127 every time you press it (and probably 0 on release, which is ignored), and the same for the other switches.

  • @uncledave said:
    @Vmusic . What I tried to say was "CC21 and on up", meaning 21, 22, 23, 24, 25, 26, and so on. That was the scenario you described in your earlier request. So the footswitches would need to send those CC#s, a different one for each audio channel. And you can use the same CC#s to control the mutes in AUM. You can change those numbers in the @OnLoad or If load sections of the scripts. If the controller has some rigid scheme that you cannot (or don't want to) change, we can probably modify the script to handle it: Notes, Program Change messages, CC toggles (sending value 127 one time, and 0 the next time), etc. It currently expects footswitch A to send CC21 value 127 every time you press it (and probably 0 on release, which is ignored), and the same for the other switches.

    When you receive a MIDI event, you would check to see what MIDI event you received and then send on whatever MIDI messages you want that footswitch to trigger.

  • @espiegel123 said:

    @uncledave said:
    @Vmusic . What I tried to say was "CC21 and on up", meaning 21, 22, 23, 24, 25, 26, and so on. That was the scenario you described in your earlier request. So the footswitches would need to send those CC#s, a different one for each audio channel. And you can use the same CC#s to control the mutes in AUM. You can change those numbers in the @OnLoad or If load sections of the scripts. If the controller has some rigid scheme that you cannot (or don't want to) change, we can probably modify the script to handle it: Notes, Program Change messages, CC toggles (sending value 127 one time, and 0 the next time), etc. It currently expects footswitch A to send CC21 value 127 every time you press it (and probably 0 on release, which is ignored), and the same for the other switches.

    When you receive a MIDI event, you would check to see what MIDI event you received and then send on whatever MIDI messages you want that footswitch to trigger.

    I see. I was explaining the function of this script which does as you suggest. Was it still so unclear?

  • No… your code and explanation is great!!

    I will copy it and paste it into Mozaic…. connect up my MIDI controller and see what I got there.

    THANK YOU!!!

  • Maybe I’m missing something, but… why not midi control channel “solo”??

  • @Synthi said:
    Maybe I’m missing something, but… why not midi control channel “solo”??

    Solo mutes any FX channels as well, so you get just the instrument channel. That may be a peculiarity of AUM, but it is what it is.

  • They other issue of sorts is my set up. I have a “base” sound created in one channel, and then 4 or 5 other FX channels that receive the base or starter sound from a bus, and add on certain FX. (BUT WAIT…. that’s not all, if you act now…..); one of the FX channels isn’t really an FX channel per se, it’s a channel for looping (I use Enso). SoooOOOooo…. the first step is for me to kind draw up a crude flow chart to create the business logic of what gets unmuted and muted in different cases.

    All of you have been extremely helpful!!

  • edited February 3

    @Vmusic said:
    They other issue of sorts is my set up. I have a “base” sound created in one channel, and then 4 or 5 other FX channels that receive the base or starter sound from a bus, and add on certain FX. (BUT WAIT…. that’s not all, if you act now…..); one of the FX channels isn’t really an FX channel per se, it’s a channel for looping (I use Enso). SoooOOOooo…. the first step is for me to kind draw up a crude flow chart to create the business logic of what gets unmuted and muted in different cases.

    All of you have been extremely helpful!!

    Cool. This would not be difficult. In my Mozaic script there's an array (modeFlags) of N values 127, where N is the number of mutes. I set one of those to zero, then send each element of the array to a different mute. We could add more mute CC outputs for the other channels, then define a different array for each of the CC inputs. That array can be encoded to mute only selected channels when a specific input is received. So basically, when this input is received, mute these channels. That way, there's total flexibility, and you can change them whenever you may need, by editing the script.

    If you can think along those lines, the new script would be straightforward. All I really need to know is the number of input CCs, and the total number of mute CCs for output.

  • @uncledave said:
    So, here it is in Mozaic. I changed the algorithm to actually send mute or unmute to every channel, instead of relying on them to be muted already. But I don't believe Mozaic is notably simpler than SB, just different. I have tested this, and it works as described. Using the array of modeFlags is just a lazy way of sending different CC values to different CC#s. It saves using if logic inside the loop.

    //SelectChannelMoz
    // route controller to script input, output to AUM MIDI Control
    // Access channel controls from AUM hamburger menu,
    // control sliders. Configure each channel mute to respond to
    // one of CC21 and up on the same channel as the controller.
    // Assumes inputs send value 127 on press, 0 on release.
    
    @OnLoad
      // edit these 3 variables to change the CCs
      // note: you don't have to map all the CCs to channels. Extra
      // messages will just float away.
      baseInputCC = 21    // input CCs start here
      baseOutputCC = 21    // outputs start here
      numbChannels = 6    // number of channels and CCs
      theChannel = 0
      // ready for up to 10 channels. Extend this to add more.
      modeFlags = [ 127, 127, 127, 127,   127, 127, 127, 127,   127, 127 ]
      SetShortName {ChMute}
    @End
    
    @OnMidiCC
      // logic ignores CCs not in range
      if MIDIByte2 >= baseInputCC
        theChannel = MIDIByte2 - baseInputCC
        if theChannel < numbChannels
          If MIDIByte3 = 127    // only act on CC press
            Call @MyUnMuteChannel
          endif
        endif
      endif
    @End
    
    // mutes all channels except theChannel
    @MyUnMuteChannel
      modeFlags[theChannel] = 0
      i = 0
      while i < numbChannels
        numbCC = i + baseOutputCC
        // sends the commands on the same channel as input
        // the modeFlags are all 127, except for theChannel
        SendMIDICC MIDChannel, numbCC, modeFlags[i]
        i = i + 1
      endwhile
      // leave the flag set for next time.
      modeFlags[theChannel] = 127
    @End
    

    Is this on Patchstorage?

  • edited February 4

    @Poppadocrock said:
    Is this on Patchstorage?

    its been minted as an NFT im afraid

Sign In or Register to comment.