@d-healey
thank you for your help, however I'm still struggling a bit to understand what would be the best practice here.
Looking at the Scripting practices I think I understand the gist, comments added to showcase my though process
//button atmos
const var Button1 = Content.addButton("Button1", 0, 0); // call for button to be added to the main script
const var MIDIprocessor = Synth.getMidiProcessor("Midi Processor"); //calling a MIDI processor to be added
Synth.deferCallbacks("true"); // need this to to run in the message thread instead of audio thread?
///call for a function
function onControl(number, value)
{
MidiProcessor.setAttribute(0,value); //calling our Midi processor
}
after this, jump into my MIDI processor & Script Processor, I have added this
const var processorButton = Content.addButton("processorButton", 0, 0); // adds a button to the MIDI processor
const var AudioLoopPlayer1 = Synth.getChildSynth("Audio Loop Player1"); //connects to my Audio Loop Player?
reg eventId;
inline function playAtmo(component, value) //function to play the atmo button
{
if (value)
{
eventId = Synth.playNote(64, 100);
}
else
Synth.noteOffByEventId(eventId);
};
and then back to my interface with
Content.getComponent("processorButton");
I can see the button in both interface and MIDI processor but cannot get them linked up or to play a note. I'm still trying to wrap my head around how exactly to set up this trigger :) I'm assuming that I need to somehow tell my MIDI processor to trigger the button for the atmo.