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.

Simple midi cc clipping filter for mozaic?

Hello

I am trying to draft up a simple midi cc clipping filter for @brambos Mozaic but have been running into some difficulty

Could someone please help me by providing me with the code required to clip midi cc values such that only a specified range of values passes through mozaic?

I would like all cc values for controller #17 lower than 9 and greater than 17 to be clipped such that they do not exit streambyter and only cc values between 9 and 17 pass through for that controller number, all values outside of this range should be ignored as if they were never received

Ideally it only clips cc values on controller #17 and does not effect other cc controllers or note input on the same channel (channel 1 if this is relevant)

Thank you so much for your help! Please let me know if any additional information would be helpful

Comments

  • I can write one if you still need it.

  • @brambos said:
    I can write one if you still need it.

    Hi Bram! Thank you so so much~ I would love that if you don't mind

  • OnMidiInput
       if MIDICommand = 0xB0 // B0 is the standard MIDI CC event
         if MIDIByte2 = 17 // this is the CC number we're looking out for
           if MIDIByte3 < 9 or MIDIByte3 > 17
             Exit // out of range... exit
           endif
         endif
       endif
    
       SendMIDIThru 
    @End
    
  • @brambos said:
    OnMidiInput
    if MIDICommand = 0xB0 // B0 is the standard MIDI CC event
    if MIDIByte2 = 17 // this is the CC number we're looking out for
    if MIDIByte3 < 9 or MIDIByte3 > 17
    Exit // out of range... exit
    endif
    endif
    endif

    SendMIDIThru
    @End

    Hi Bram

    Thank you so so much for this!

    I just tried implementing this but it seems that it is also blocking out other note events and CCs on the same channel

    Would it be possible for you to make the code such that it only filters CCs for controller 17 and let’s all other CCs and note events pass through without interruption?

    Thank you so much again for your help I really appreciate it!!

  • @annahahn said:

    @brambos said:
    OnMidiInput
    if MIDICommand = 0xB0 // B0 is the standard MIDI CC event
    if MIDIByte2 = 17 // this is the CC number we're looking out for
    if MIDIByte3 < 9 or MIDIByte3 > 17
    Exit // out of range... exit
    endif
    endif
    endif

    SendMIDIThru
    @End

    Hi Bram

    Thank you so so much for this!

    I just tried implementing this but it seems that it is also blocking out other note events and CCs on the same channel

    Would it be possible for you to make the code such that it only filters CCs for controller 17 and let’s all other CCs and note events pass through without interruption?

    Thank you so much again for your help I really appreciate it!!

    It really shouldn’t block anything else. Are you sure?

  • @brambos said:

    @annahahn said:

    @brambos said:
    OnMidiInput
    if MIDICommand = 0xB0 // B0 is the standard MIDI CC event
    if MIDIByte2 = 17 // this is the CC number we're looking out for
    if MIDIByte3 < 9 or MIDIByte3 > 17
    Exit // out of range... exit
    endif
    endif
    endif

    SendMIDIThru
    @End

    Hi Bram

    Thank you so so much for this!

    I just tried implementing this but it seems that it is also blocking out other note events and CCs on the same channel

    Would it be possible for you to make the code such that it only filters CCs for controller 17 and let’s all other CCs and note events pass through without interruption?

    Thank you so much again for your help I really appreciate it!!

    It really shouldn’t block anything else. Are you sure?

    Yeah I just tried it in the same slot in the chain and just replaced the code with a different patch and all of the notes flowed right through~ switched it back to the CC filtering code and the notes hit a brick wall

  • @annahahn said:

    @brambos said:

    @annahahn said:

    @brambos said:
    OnMidiInput
    if MIDICommand = 0xB0 // B0 is the standard MIDI CC event
    if MIDIByte2 = 17 // this is the CC number we're looking out for
    if MIDIByte3 < 9 or MIDIByte3 > 17
    Exit // out of range... exit
    endif
    endif
    endif

    SendMIDIThru
    @End

    Hi Bram

    Thank you so so much for this!

    I just tried implementing this but it seems that it is also blocking out other note events and CCs on the same channel

    Would it be possible for you to make the code such that it only filters CCs for controller 17 and let’s all other CCs and note events pass through without interruption?

    Thank you so much again for your help I really appreciate it!!

    It really shouldn’t block anything else. Are you sure?

    Yeah I just tried it in the same slot in the chain and just replaced the code with a different patch and all of the notes flowed right through~ switched it back to the CC filtering code and the notes hit a brick wall

    I retried on my end and it works as expected. Are you sure there isn’t any other bits of code lingering in your script?

  • @brambos said:

    @annahahn said:

    @brambos said:

    @annahahn said:

    @brambos said:
    OnMidiInput
    if MIDICommand = 0xB0 // B0 is the standard MIDI CC event
    if MIDIByte2 = 17 // this is the CC number we're looking out for
    if MIDIByte3 < 9 or MIDIByte3 > 17
    Exit // out of range... exit
    endif
    endif
    endif

    SendMIDIThru
    @End

    Hi Bram

    Thank you so so much for this!

    I just tried implementing this but it seems that it is also blocking out other note events and CCs on the same channel

    Would it be possible for you to make the code such that it only filters CCs for controller 17 and let’s all other CCs and note events pass through without interruption?

    Thank you so much again for your help I really appreciate it!!

    It really shouldn’t block anything else. Are you sure?

    Yeah I just tried it in the same slot in the chain and just replaced the code with a different patch and all of the notes flowed right through~ switched it back to the CC filtering code and the notes hit a brick wall

    I retried on my end and it works as expected. Are you sure there isn’t any other bits of code lingering in your script?

    Hmmmm this is so strange, I just tried re setting everything up again and same results

    The code is identical to what you sent~ screencap attached below

    Any idea what else could be causing this? I’m totally baffled

  • Looks like there’s an @ missing before the OnMidiInput... copy/paste gone bad.. my mistake!

  • That's what happens when you let amateurs loose with scripting apps. ;)

  • @brambos said:
    Looks like there’s an @ missing before the OnMidiInput... copy/paste gone bad.. my mistake!

    Gorgeous this fixed it~ thanks so much!!

Sign In or Register to comment.