Ignore All Notes off Script?

Discussion in 'Scripting Workshop' started by StudioFreak, Jan 2, 2010.

Thread Status:
Not open for further replies.
  1. StudioFreak

    StudioFreak New Member

    Messages:
    6
    Hi All,

    Been trying to bypass an 'All Notes Off' CC message that is sent from my old Roland RD300 keyboard when a note is released.

    New to Kontakt and scripting, but could really use some help here on a script that would tell the instrument to ignore it.

    There is a midi fx MFX program that addresses it in hosts like Sonar that support MFX, but I would like to use it in stand alone mode and in non-MFX supported hosts.

    Here's a blurb from the TenCrazy.com site for the MFX fix.

    MFX SustainFix
    Some keyboards (like my old Kawai K1) send out an "All Notes Off" CC message when you lift your hands off the keyboard. Some software synths take this message as a command to turn all sound off, even if you're holding down the sustain pedal! Also, some keyboards send out CC values for the Hold Pedal other than 0 (off) and 127 (on). Now, that's allowed as part of the MIDI spec, but some lazy soft synths think otherwise and might cause your notes to hang forever, or simply ignore your pedal altogether. This MFX plug-in fixes these problems and many more (e.g. hold pedal polarity, continuous value thinning) in SONAR or other MFX capable hosts.


    need to have this translated into a Kontakt script so that I can apply it on the instruments needed.

    Any help or direction is appreciated.

    thanks,

    Rich
     
  2. kotori

    kotori NI Product Owner

    Messages:
    1,153
    Here's a little script that ignores CC#123 message:
    Code:
    on controller
      if ($CC_NUM = 123)
        ignore_controller
      end if
    end on
    I hope that helps.
     
  3. StudioFreak

    StudioFreak New Member

    Messages:
    6
    Hey,

    thanks for the quick reply. seems like it should do the trick. but I'm having issues when I load it into kontakt.

    Any reason why I would get an error on the 'end if' line?
     
  4. kotori

    kotori NI Product Owner

    Messages:
    1,153
    No, there shouldn't be any error. If you have trouble pasting it, maybe you could try to enter it by hand. If it still doesn't work, please post more info about the error message.
     
  5. StudioFreak

    StudioFreak New Member

    Messages:
    6
    Hey,

    got it to work. I was originally trying to pass it on the multi level.

    Dropped it within the instrument scripts and it worked like a charm.

    With that, how would you modify this script to be able to apply on the muli level?

    Thanks a million!
     
  6. kotori

    kotori NI Product Owner

    Messages:
    1,153
    You're welcome. Glad you solved it.

    I think it would be something like this (not tested):
    Code:
    on midi_in
      if ($MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = 123)
        ignore_midi    
      end if
    end on
    I thought that you were trying to do it at the instrument level so I first looked for a CC transform script on the instrument level without luck. But now I see that another solution at the multi level is actually to use the Transformer script and simply transform CC#123 to some unused CC number.
     
  7. StudioFreak

    StudioFreak New Member

    Messages:
    6
    That multi-level script worked right on the money.

    Thanks so much!

    -Rich
     
Thread Status:
Not open for further replies.