Synth.sendController() crash



  • This code causes a crash. I'm not sure if I'm meant to have called something like getSampler() first and used the sampler variable instead of Synth. if so how should I send a controller message to all samplers - would it be another use case for the new helper function perhaps?

    Content.setHeight(150);
    
    const var Knob = Content.addKnob("Knob", 277, 34);
    // [JSON Knob]
    Content.setPropertiesFromJSON("Knob", {
      "text": "Mod-Wheel",
      "max": 127,
      "stepSize": "1",
      "middlePosition": 64
    });
    // [/JSON Knob]
    
    function onNoteOn()
    {
    	
    }
    function onNoteOff()
    {
    	
    }
    function onController()
    {
    	
    }
    function onTimer()
    {
    	
    }
    function onControl(number, value)
    {
    	if (number == Knob)
    	{
    		Synth.sendController(1, value);
    	}
    }
    


  • Ah yes, I forgot a safe check... It's fixed now (Synth.addVolumeFade() was also crashing).


 

0
Online

353
Users

1.1k
Topics

7.5k
Posts