Solved Need help, displaying selected waveform inside FloatingTile
-
I managed to populate and use the callback of the combo box to choose the waveform of my Waveform Generator1. Now I would like some help on displaying the selected waveform inside the FloatingTile.
// Synth const var WaveformGenerator1 = Synth.getChildSynth("Waveform Generator1"); // combo box const var cmbWaveform1 = Content.getComponent("cmbWaveform1"); const var cmbWaveform2 = Content.getComponent("cmbWaveform2"); // audio waveform tile const var OSC1Waveform = Content.getComponent("OSC1Waveform"); const var OSC2Waveform = Content.getComponent("OSC2Waveform"); inline function oncmbWaveform1Control(component, value) { WaveformGenerator1.setAttribute(WaveformGenerator1.WaveForm1, value); // ?? OSC1Waveform.set(WaveformGenerator1.WaveForm1, value); }; Content.getComponent("cmbWaveform1").setControlCallback(oncmbWaveform1Control); inline function oncmbWaveform2Control(component, value) { WaveformGenerator1.setAttribute(WaveformGenerator1.WaveForm2, value); // ?? OSC2Waveform.set(WaveformGenerator1.WaveForm2, value); }; Content.getComponent("cmbWaveform2").setControlCallback(oncmbWaveform2Control);
[ { "type": "ScriptFloatingTile", "id": "OSC1Waveform", "x": 310.0, "y": 110.0, "width": 80, "height": 80, "ContentType": "Waveform", "bgColour": 0, "itemColour": 4294967295, "itemColour2": 2164260863, "textColour": 0, "Data": "{\n \"ProcessorId\": \"\",\n \"Index\": -1,\n \"FollowWorkspace\": false\n}" } ]
-
@Mighty23 - what do you mean "displaying the selected waveform inside the FloatingTile" - do you mean the shape? Sine? Square etc.? If so theres no way to dynamically do this - just use a png for each shape...
-
@Lindon said in Need help, displaying selected waveform inside FloatingTile:
If so theres no way to dynamically do this - just use a png for each shape...
You could also draw it in a panel
-
@d-healey oh hang on I think I know what he means....
so create a Floating Tile and in the tile data..put the name of your Waveform generator in "Processor Id": ....put it here...
index = 0 is the first Osc, index = 1 is the 2nd.
-
@Lindon said in Need help, displaying selected waveform inside FloatingTile:
so create a Floating Tile and in the tile data..put the name of your Waveform generator in "Processor Id": ....put it here...
What floating tile type? I tried a few and it doesn't show up.
-
@d-healey waveform
-
Index 1 & Index 0, that solved. Thank you, it's amazing how simple it was and how much time I've wasted. Thank you for getting me to the next step.
{ "ProcessorId": "Waveform Generator1", "Index": 1, "FollowWorkspace": false }
-
-