Scriptlet - MIDI#CC to Note ON

Need a help with a scriptlet to convert MIDI#CC 20 to Note ON C0 and MIDI#CC 21 to Note ON A#-1. :folded_hands:

And what with Note OFF?

Need Note ON to trigger sample in DecentSampler, so Note OFF can be right after Note ON?

Use a widget, midi learn the cc number.
Map the widget to a midi in and select the note number

1 Like

Why do you need a scriptlet to do this?

I’m trying to get a bit more flexibility out of my Arturia KeyLab 61 transport buttons (Play and Stop).
Normally I trigger one-shot samples in DecentSampler from the keyboard itself, but for a particular song it would be much more convenient to trigger two specific samples using those two transport buttons.

The KeyLab sends fixed MIDI CC messages for Play and Stop ( CC#20 and CC#21 in DAW mode).

What I need is a way that, depending on the song/rackspace, the same incoming CC from the Play button can trigger different notes to DecentSampler (e.g. C0 in song A, F4 in song B, or even nothing at all in song C).

The Scriptlet seems perfect for this because:

  • It can easily convert a MIDI CC (value > 0 or 127) into a Note On/Off on whatever pitch I want.

  • I can create several different scriptlets (or variations of the same one) that output different target notes.

  • Inside the rackspace I can simply bypass the scriptlets I don’t need and enable the one that sends the correct note for that song.

  • The scriptlet is completely reusable across rackspaces and songs – I just drop in the version I need.

Is this even possible to achive with a scriptlet?

Did you try with widgets?

Yes. And it works, so the problem solved. BUT it would be nicer and more reusable solution to do it with a scriptlet. Just sayin’… :wink: :smiling_face:

That is a really good reason to learn GP script :wink:

1 Like

It seem that this request is not new, and we came to the same conclusion :wink::

For the GPScript solution, if your CC buttons sends a CC 0 when released, there is nothing to change in the GPScript. But if it doesn’t, you need to uncomment the commented lines by removing the double slash.

1 Like