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.

AUM MIDI "Mute": Best Hack?

AB3 has a handy "bypass" control that effectively acts as a MIDI "mute", which I prefer to audio mutes because it allows for nice clean transitions. Unfortunately, AUM doesn't have the same--what are the quickest/easiest hacks for creating a MIDI mute hack for AUM?

«13

Comments

  • wimwim
    edited July 2019

    This could be done easily with a Mozaic script. It would only be a few lines of code except for the need to prevent stuck notes (Note on received but no Note off received yet). Still, pretty simple. Do you have Mozaic? If so, I could hook you up with a script.

    StreamByter would be easy too.

    mfxStrip could do this with no coding, but the AU parameter that blocks throughput isn't exposed, so you'd have to do it from the interface.

    @blueveek's MIDI Clone & Filter and MIDI Latch can do it, but also only from the interface, not via AU parameter. iPad only too.

  • have a special midi note on an instrument reserved to trigger a streambyter script that sends all notes off, like

    ASS L0 = 00 # start at midi note 0
    IF L0 <= 7F +L # end at midi note 128
    SND 80 L0 00 # send note off
    MAT L0 = L0 + 01 # increment to next note
    END

  • edited July 2019

    @wim Yes, I have both Mozaic and Streambyter. I would much prefer to mute MIDI using an AU parameter. Would be awesome if I could set up all of the mutes in one screen, so both Mozaic and SB (with the Q feature) would do the trick.

  • @Zetagy said:
    have a special midi note on an instrument reserved to trigger a streambyter script that sends all notes off, like

    ASS L0 = 00 # start at midi note 0
    IF L0 <= 7F +L # end at midi note 128
    SND 80 L0 00 # send note off
    MAT L0 = L0 + 01 # increment to next note
    END

    That's not quite what I meant. I meant that I set up note C3 to mute all incoming MIDI notes on a channel. Pressing C3 again toggles the mute to allow incoming MIDI notes on that channel.

  • ------------

    if m1 == 3c # midi note c3

    if m0 == 90 # note on
    ass L0 = 1 # flag on
    end

    if m0 == 80 # note off
    ass L0 = 0 # flag off
    end

    end

    ------------

    if L0 == 1
    XX = XX +B # all messages blocked
    end

    ------------

    don't know about your specific setup, you may need to place these blocks in different places depending, but a toggled flag is the way to go

  • wimwim
    edited July 2019

    @lukesleepwalker said:
    @wim Yes, I have both Mozaic and Streambyter. I would much prefer to mute MIDI using an AU parameter. Would be awesome if I could set up all of the mutes in one screen, so both Mozaic and SB (with the Q feature) would do the trick.

    When you mute, do you expect all playing notes to be immediately cut off, or to sustain until their end?
    [edit] oh ... and do you expect CC's to be muted too, or only notes?

  • My ‚Toggle Channels on Bar Divisions‘ allows to toggle midi connections including the muting of suspended note. It does immediate toggle if you hold shift while pressing the channels pad.

    I could easily strip it down to a ‚Toggle Channels‘ script (removing the queuing and bar division timing) if you want. That new script would just do midi connection toggles for the 16 channels and mute the notes that were still active when a channel is muted.

    BTW: CCs and other events are also muted together with their channel.

  • @wim said:

    @lukesleepwalker said:
    @wim Yes, I have both Mozaic and Streambyter. I would much prefer to mute MIDI using an AU parameter. Would be awesome if I could set up all of the mutes in one screen, so both Mozaic and SB (with the Q feature) would do the trick.

    When you mute, do you expect all playing notes to be immediately cut off, or to sustain until their end?
    [edit] oh ... and do you expect CC's to be muted too, or only notes?

    It would be best if the notes could sustain until their end (note off). I don't have an immediate need for CCs to be muted. Thanks for thinking about it!

  • @Zetagy said:

    ------------

    if m1 == 3c # midi note c3

    if m0 == 90 # note on
    ass L0 = 1 # flag on
    end

    if m0 == 80 # note off
    ass L0 = 0 # flag off
    end

    end

    ------------

    if L0 == 1
    XX = XX +B # all messages blocked
    end

    ------------

    don't know about your specific setup, you may need to place these blocks in different places depending, but a toggled flag is the way to go

    cool, will give it a go. Thanks!

  • @_ki said:
    My ‚Toggle Channels on Bar Divisions‘ allows to toggle midi connections including the muting of suspended note. It does immediate toggle if you hold shift while pressing the channels pad.

    I could easily strip it down to a ‚Toggle Channels‘ script (removing the queuing and bar division timing) if you want. That new script would just do midi connection toggles for the 16 channels and mute the notes that were still active when a channel is muted.

    BTW: CCs and other events are also muted together with their channel.

    Oh wow! I hadn't thought about cutting down your script (which I love btw). Do you think this approach would be more efficient, @wim?

  • @lukesleepwalker said:

    @_ki said:
    My ‚Toggle Channels on Bar Divisions‘ allows to toggle midi connections including the muting of suspended note. It does immediate toggle if you hold shift while pressing the channels pad.

    I could easily strip it down to a ‚Toggle Channels‘ script (removing the queuing and bar division timing) if you want. That new script would just do midi connection toggles for the 16 channels and mute the notes that were still active when a channel is muted.

    BTW: CCs and other events are also muted together with their channel.

    Oh wow! I hadn't thought about cutting down your script (which I love btw). Do you think this approach would be more efficient, @wim?

    Yep. If @_ki wants to do that, then the result will be better than I would have done anyway. 👍

  • _ki_ki
    edited July 2019

    I already finished implementing - by enhancing the script with an instant mode (as if shift was pressed together with a pad in previous versions) and a new knob in the HELP view to enable this mode.

    V2.2 with the new instant mode feature is published on patchstorage.

  • AudioBus has this as an in built feature per AU but I wish AUM had a mute parameter as mentioned per midi node.

  • Midiflow also does a proper midi mute, so I use this to feed AUM. Works great, and you can add conditions - literally anything you can dream of eg. if I press this note at this velocity then unmute this channel, if this button is on but another button is off, then unmute this midi channel etc - quite brilliant!

  • Yep! I have Midifire and set up channel filter mutes there a while back using the GUI. Was hoping to have the mute feature in AUM itself to cut down one extra step in my workflow. I've gotten spoiled with the AB3 bypass button!

  • Anyone using the Mozaic midi mutes? Any demos?

  • wimwim
    edited January 2020

    Here’s a working script with 16 channels of mute. Default is to pass MIDI through, but that could easily be reversed.

    @Description
    Pad Lit = send MIDI Thru
    Pad Not Lit = mute MIDI
    @End
    
    @OnLoad
    
      if Unassigned init
        init = TRUE
        FillArray ch, TRUE, 16
        for pad = 0 to 15
          LabelPad pad, {Ch. }, (pad + 1)
          LatchPad pad, TRUE
        endfor  
      endif
    
      ShowLayout 2
    
    @End
    
    @OnPadDown
     ch[LastPad] = NOT ch[LastPad]
     LatchPad LastPad, ch[LastPad] 
    @End
    
    @OnMidiInput
      if ch[MIDIChannel] = TRUE
        SendMIDIThru
      endif
    @End
    
  • Thanks so much @wim
    Is there any ways to avoid the hanging notes?

  • wimwim
    edited January 2020

    @Tamir_Raz_Mataz said:
    Thanks so much @wim
    Is there any ways to avoid the hanging notes?

    Sure ... gimme a couple minutes. B)

  • wimwim
    edited January 2020
    @Description
    Pad Lit = send MIDI Thru
    Pad Not Lit = mute MIDI
    Muting a channel will send Note-OFF for any playing notes.
    @End
    
    @OnLoad
    
      if Unassigned init
        init = TRUE
        FillArray ch, TRUE, 16
        for pad = 0 to 15
          LabelPad pad, {Ch. }, (pad + 1)
          LatchPad pad, TRUE
        endfor  
        ResetNoteStates FALSE
      endif
    
      ShowLayout 2
    
    @End
    
    @OnPadDown
     ch[LastPad] = NOT ch[LastPad]
     LatchPad LastPad, ch[LastPad]
    
     if ch[LastPad] = FALSE
       for note = 0 to 127
         if (GetNoteState LastPad, note) = TRUE
           SendMIDINoteOff LastPad, note, 0, (Random 0, 5)
           //Random delay is for some hosts that don't like too many simultaneous events
    
           SetNoteState LastPad, note, FALSE 
         endif
       endfor
     endif
    
    @End
    
    @OnMidiInput
      if ch[MIDIChannel] = TRUE
        SendMIDIThru
      endif
    
      //Track Note ON/OFF
      if MIDICommand = 0x90 //Note-ON
        SetNoteState MIDIChannel, MIDINote, TRUE
      elseif MIDICommand = 0x80 //Note-OFF
        SetNoteState MIDIChannel, MIDINote, FALSE
      endif 
    @End
    
  • @wim Nice script.

    I would recommend to move the ResetNoteStates FALSE outside of the if block, so that they are always cleared on load. Otherwise, if one saves the session while same notes were active, these would be marked as still active on recall. But its not a real problem since the only thing that could go wrong is sending some surplus note-offs on muting.

    I just noticed the usage of TRUE and FALSE constants, i haven‘t been aware of these two, i always used YES and NO - but they a) work and b) are officially listed in the Mozaic 1.3 manual. So i‘ll need to add them asap to the Textastic/Sublime Language package :)

  • wimwim
    edited January 2020

    @_ki said:
    @wim Nice script.

    I would recommend to move the ResetNoteStates FALSE outside of the if block, so that they are always cleared on load. Otherwise, if one saves the session while same notes were active, these would be marked as still active on recall. But its not a real problem since the only thing that could go wrong is sending some surplus note-offs on muting.

    That makes sense.👍

  • @_ki said:
    @wim Nice script.
    I just noticed the usage of TRUE and FALSE constants, i haven‘t been aware of these two, i always used YES and NO - but they a) work and b) are officially listed in the Mozaic 1.3 manual. So i‘ll need to add them asap to the Textastic/Sublime Language package :)

    If you feel like it, you could also capitalize the ‘Call’ keyword. ;)

    Not that I’m OCD or anything. 😂

  • Thanks @wim, that's very helpful!

  • @wim said:


    @OnMidiInput if ch[MIDIChannel] = TRUE SendMIDIThru endif //Track Note ON/OFF if MIDICommand = 0x90 //Note-ON SetNoteState MIDIChannel, MIDINote, TRUE elseif MIDICommand = 0x80 //Note-OFF SetNoteState MIDIChannel, MIDINote, FALSE endif @End

    This does not work when your keyboard sends noteOn with velocity 0 as a noteOff.
    I think only my DeepMind and Seaboard send true noteOff with velocity. All the other ones I have do the noteOn with velocity 0. This is because it saves one byte, the status byte does not have to be resent. So you can get a 33% data reduction.

      //Track Note ON/OFF
      if MIDICommand = 0x90 and MIDIByte3  > 0 //Note-ON
        SetNoteState MIDIChannel, MIDINote, TRUE
      elseif MIDICommand = 0x80 or MIDICommand = 0x90 //Note-OFF
        SetNoteState MIDIChannel, MIDINote, FALSE
      endif 
    @End
    

    With this little code adaptation it is also save for keyboards that use noteOn with velocity 0 as noteOff.

    P.S.

    When you look at streambyter scripts you will see the first thing Nick does is convert those faux noteOffs into real noteOffs.

  • @Alfred said:

    @wim said:


    @OnMidiInput if ch[MIDIChannel] = TRUE SendMIDIThru endif //Track Note ON/OFF if MIDICommand = 0x90 //Note-ON SetNoteState MIDIChannel, MIDINote, TRUE elseif MIDICommand = 0x80 //Note-OFF SetNoteState MIDIChannel, MIDINote, FALSE endif @End

    This does not work when your keyboard sends noteOn with velocity 0 as a noteOff.
    I think only my DeepMind and Seaboard send true noteOff with velocity. All the other ones I have do the noteOn with velocity 0. This is because it saves one byte, the status byte does not have to be resent. So you can get a 33% data reduction.

      //Track Note ON/OFF
      if MIDICommand = 0x90 and MIDIByte3  > 0 //Note-ON
        SetNoteState MIDIChannel, MIDINote, TRUE
      elseif MIDICommand = 0x80 or MIDICommand = 0x90 //Note-OFF
        SetNoteState MIDIChannel, MIDINote, FALSE
      endif 
    @End
    

    With this little code adaptation it is also save for keyboards that use noteOn with velocity 0 as noteOff.

    P.S.

    When you look at streambyter scripts you will see the first thing Nick does is convert those faux noteOffs into real noteOffs.

    Mozaic converts Note On with velocity 0 to actual note off messages before they’re passed on to the scripts.

    So you don’t have to deal with them yourself.

  • Does this also work in the on midiInput handler? I started doing this when experimenting with scripts of other developers. Those were treating the faux noteOffs as NoteOns...

  • Yes, it’s automatically done for all MIDI input handlers.

Sign In or Register to comment.