Simple Scriptlet reset button

I am trying to create a simple scriptlet and can not figure it out :frowning: Can anyone please help? I get ideas from examples and AI but nothing works, seems the scriplets use different commands to scripts?. If you could please copy the code in the answer so I can see the syntax would help me try and understand. I just want a ‘reset’ button I can push that will send midi CC121 to Halion Sonic 7 vst. (on Channel 1) I can see how to do the button and if the code compile, will be able to connect to it but exactly how to make this work… I get compile errors. my last attempt:

var resetbutton : Parameter

var ouch : ControlChangeMessage = MakeControlChangeMessage (121,0)

on ParamiterValueChanged

SendNow (ouch)

End

Thanks

There are som syntax issues. Try this example below to see whether is compiles. If it does, extend it with the MIDI sending parts.

var resetbutton : parameter = 0.0

On ParameterValueChanged matching resetbutton
   // 
End

I think reading the manual could be helpful (it’s in the help menu of GP).

The latest list of built-in functions can always be found online at:
https://gigperformer.com/downloads/GPScript/SystemFunctionList.html

If I have understood correctly this should be easy to do without any scripting.

  1. Place a button widget on a panel
  2. Map the widget to a Local MIDI Output CC#121 OR to a Reset Parameter if exposed by the VST
  3. Assign the MIDI input control to the widget
  4. If the parameter is not exposed link the Local MIDI Input to the VST

2 Likes

Thank you Frank :slight_smile: Works now

@spav is correct. You don’t need a scriptlet to do this