Help with "easy" Script

Hi Gigperformer Brain,

please help me with the following simple task.

I have a Faderfox Midi Controller that just sends note values. But to control my Enso Looper Plugin I need CC messages.
So I need a script that takes a dedicated note on message from E3 for instance and turns it into a midi CC which is then sent to the Enso plugin.

How would the body for that script look like?

What I started with is the following:
//$
// DO NOT EDIT THIS SECTION MANUALLY
Var
ENSO : PluginBlock
Faderfox : MidiInBlock

//Called when a NoteOn message is received at some MidiIn block
On NoteEvent (m : NoteMessage) From Faderfox
if m == E3
then MakeControlChangeMessage(80, 127) //How do I define the receiver for that CC?

End
End

But this is not working.

Many Thanks
Christian

Check the GetNoteNumber function

https://gigperformer.com/docs/GPScript36/content/reference/list-of-functions.html#GetNoteNumber

This is an example script:

var MIN : MidiInBlock
    n   : Integer
    cn  : ControlChangeMessage

on NoteEvent(m : NoteMessage)  from MIN
 n = GetNoteNumber(m)
 
 if n == E3 then
  cn = MakeControlChangeMessage(80, 127)
  SendNow(MIN, cn)
 end
end

Halleluja Paul! Works perfectly. :smiley:
Many thanks for your fast response.