add probability

hi, i’m using presets that randomise octaves or note order. i’d love to be able to control the degree of action on the incoming midi info, or some sort of probability control. how can that be done in a simple way? thanks!

One comments on “add probability
  • shld on said:

    Hi,
    The following code would output notes based on probability:

    @OnMidiInput
    if MIDICommand = 144 // Note On
    if Random 0, 99 < probability
    SendMIDIOut MIDIByte1, MIDIByte2, MIDIByte3
    endif
    elseif MIDICommand = 128 // Note Off
    SendMIDIOut MIDIByte1, MIDIByte2, MIDIByte3
    else
    SendMIDIOut MIDIByte1, MIDIByte2, MIDIByte3
    endif
    @End

  • Leave a Reply

    • Platform:
    • Modified: 5 months ago
    • Views: 297
      Likes: 0