Radio group controlled from another script
-
I've come across an edge case type bug (if it is a bug). I have 3 buttons in the second script that are set up in a radio group. In the first script I have 3 buttons that are not radio grouped (although they act like they are in my demo but don't need for this bug to be present). Clicking the three buttons in the first script should control the buttons in the second script and it does but you'll notice that after clicking button 3 in the first script the other buttons don't change the state of the buttons in script 2, however the on control callback is still triggering for those buttons.
<Processor Type="SynthChain" ID="Master Chain" Bypassed="0" Gain="1" Balance="0" VoiceLimit="64" KillFadeTime="20" IconColour="0" packageName="" views="32.rk1bzA.....B.........LUYtQVL.vF.vkTagcVY..." currentView="-1"> <EditorStates BodyShown="0" Visible="1" Solo="0" Folded="0" InterfaceShown="0"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="ScriptProcessor" ID="Script Processor" Bypassed="0" Script="const var ScriptProcessor2 = Synth.getMidiProcessor("Script Processor2"); const var Button = Content.addButton("Button", 0, 0); const var Button2 = Content.addButton("Button2", 150, 0); const var Button3 = Content.addButton("Button3", 300, 0); inline function allOff() { 	Button.setValue(0); 	Button2.setValue(0); 	Button3.setValue(0); }function onNoteOn() { 	 } function onNoteOff() { 	 } function onController() { 	 } function onTimer() { 	 } function onControl(number, value) { 	switch (number) 	{ 		case Button: 			allOff(); 			Button.setValue(1); 			ScriptProcessor2.setAttribute(0, value); 		break; 		 		case Button2: 			allOff(); 			Button2.setValue(2); 			ScriptProcessor2.setAttribute(1, value); 		break; 		 		case Button3: 			allOff(); 			Button3.setValue(3); 			ScriptProcessor2.setAttribute(2, value); 		break; 	} 	 } "> <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="0" onNoteOnOpen="0" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0" onControlOpen="1"/> <ChildProcessors/> <Content> <Control type="ScriptButton" id="Button" value="0"/> <Control type="ScriptButton" id="Button2" value="0"/> <Control type="ScriptButton" id="Button3" value="3"/> </Content> </Processor> <Processor Type="ScriptProcessor" ID="Script Processor2" Bypassed="0" Script=" const var Button = Content.addButton("Button", 0, 0); const var Button2 = Content.addButton("Button2", 150, 0); const var Button3 = Content.addButton("Button3", 300, 0); Button.set("radioGroup", 1); Button2.set("radioGroup", 1); Button3.set("radioGroup", 1);function onNoteOn() { 	 } function onNoteOff() { 	 } function onController() { 	 } function onTimer() { 	 } function onControl(number, value) { 	switch (number) 	{ 		case Button: 			Console.print("Button 1"); 		break; 		 		case Button2: 			Console.print("Button 2"); 		break; 		 		case Button3: 			Console.print("Button 3"); 		break; 	} 	 } "> <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="0" onNoteOnOpen="0" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0" onControlOpen="1"/> <ChildProcessors/> <Content> <Control type="ScriptButton" id="Button" value="0"/> <Control type="ScriptButton" id="Button2" value="0"/> <Control type="ScriptButton" id="Button3" value="0"/> </Content> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="1" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="StreamingSampler" ID="sampler0" Bypassed="0" Gain="1" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" PreloadSize="8192" BufferSize="4096" VoiceAmount="128" SamplerRepeatMode="6.2075699e+08" RRGroupAmount="1" PitchTracking="1" OneShot="0" CrossfadeGroups="0" Purged="0" NumChannels="1" SampleMap=""> <EditorStates BodyShown="1" Visible="1" Solo="0" MapPanelShown="1" BigSampleMap="1" GainModulationShown="1" CrossfadeTableShown="0" Folded="1" SettingsShown="1"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="MidiController" ID="dynamicLayer0" Bypassed="0" Intensity="1" UseTable="0" Inverted="0" ControllerNumber="11" SmoothTime="200" DefaultValue="64"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="0" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="PolyphonicFilter" ID="Polyphonic Filter" Bypassed="0" Gain="-18" Frequency="20000" Q="1" Mode="0" Quality="0"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors> <Processor Type="ModulatorChain" ID="Frequency Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Gain Modulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="Sample Start" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Group Fade" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <channels> <channelData enabled="1" level="0" suffix=""/> </channels> <samplemap ID="" SaveMode="1" RRGroupAmount="1" MicPositions=";"> <sample ID="0" FileName="{PROJECT_FOLDER}mic2_67_rr2.wav" Root="67" HiKey="67" LoKey="67" LoVel="0" HiVel="127" RRGroup="1" Volume="0" Pan="0" Normalized="0" Pitch="0" SampleStart="0" SampleEnd="137055" SampleStartMod="0" LoopStart="0" LoopEnd="137055" LoopXFade="0" LoopEnabled="0" LowerVelocityXFade="0" UpperVelocityXFade="0" SampleState="0" NormalizedPeak="-1" Duplicate="0"/> <sample ID="1" FileName="{PROJECT_FOLDER}mic1_62_rr2.wav" Root="62" HiKey="63" LoKey="62" LoVel="0" HiVel="127" RRGroup="1" Volume="0" Pan="0" Normalized="0" Pitch="0" SampleStart="0" SampleEnd="203213" SampleStartMod="0" LoopStart="0" LoopEnd="203213" LoopXFade="0" LoopEnabled="0" LowerVelocityXFade="0" UpperVelocityXFade="0" SampleState="0" NormalizedPeak="-1" Duplicate="0"/> <sample ID="2" FileName="{PROJECT_FOLDER}mic1_64_rr2.wav" Root="64" HiKey="66" LoKey="64" LoVel="0" HiVel="127" RRGroup="1" Volume="0" Pan="0" Normalized="0" Pitch="0" SampleStart="0" SampleEnd="97729" SampleStartMod="0" LoopStart="0" LoopEnd="97729" LoopXFade="0" LoopEnabled="0" LowerVelocityXFade="0" UpperVelocityXFade="0" SampleState="0" NormalizedPeak="-1" Duplicate="0"/> </samplemap> </Processor> <Processor Type="StreamingSampler" ID="sampler1" Bypassed="0" Gain="1" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" PreloadSize="8192" BufferSize="4096" VoiceAmount="128" SamplerRepeatMode="6.2075699e+08" RRGroupAmount="1" PitchTracking="1" OneShot="0" CrossfadeGroups="0" Purged="0" NumChannels="1" SampleMap=""> <EditorStates BodyShown="0" Visible="1" Solo="0" MapPanelShown="1" BigSampleMap="1" GainModulationShown="1" CrossfadeTableShown="0" Folded="1"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="MidiController" ID="dynamicLayer1" Bypassed="0" Intensity="1" UseTable="1" Inverted="0" ControllerNumber="1" SmoothTime="200" DefaultValue="0" ControllerTableData="36...............zO....+....7C...nO...f+....9C...zO"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="0" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Sample Start" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Group Fade" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <channels> <channelData enabled="1" level="0" suffix=""/> </channels> <samplemap ID="" SaveMode="0" RRGroupAmount="1" MicPositions=";"/> </Processor> <Processor Type="StreamingSampler" ID="sampler2" Bypassed="0" Gain="1" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" PreloadSize="8192" BufferSize="4096" VoiceAmount="128" SamplerRepeatMode="6.2075699e+08" RRGroupAmount="1" PitchTracking="1" OneShot="0" CrossfadeGroups="0" Purged="0" NumChannels="1" SampleMap=""> <EditorStates BodyShown="0" Visible="1" Solo="0" MapPanelShown="1" BigSampleMap="1" GainModulationShown="1" CrossfadeTableShown="0" Folded="1"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="MidiController" ID="dynamicLayer2" Bypassed="0" Intensity="1" UseTable="1" Inverted="0" ControllerNumber="1" SmoothTime="200" DefaultValue="0" ControllerTableData="24...............vO...f+....9C...vO"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="0" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Sample Start" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Group Fade" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <channels> <channelData enabled="1" level="0" suffix=""/> </channels> <samplemap ID="" SaveMode="0" RRGroupAmount="1" MicPositions=";"/> </Processor> <Processor Type="StreamingSampler" ID="sampler3" Bypassed="0" Gain="1" Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0" PreloadSize="8192" BufferSize="4096" VoiceAmount="128" SamplerRepeatMode="6.2075699e+08" RRGroupAmount="1" PitchTracking="1" OneShot="0" CrossfadeGroups="0" Purged="0" NumChannels="1" SampleMap=""> <EditorStates BodyShown="0" Visible="1" Solo="0" MapPanelShown="1" BigSampleMap="1" GainModulationShown="1" CrossfadeTableShown="0" Folded="1"/> <ChildProcessors> <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/> <ChildProcessors> <Processor Type="MidiController" ID="dynamicLayer3" Bypassed="0" Intensity="1" UseTable="1" Inverted="0" ControllerNumber="1" SmoothTime="200" DefaultValue="0" ControllerTableData="24...............vO...f+....9C...vO"> <EditorStates BodyShown="1" Visible="1" Solo="0"/> <ChildProcessors/> </Processor> </ChildProcessors> </Processor> <Processor Type="ModulatorChain" ID="PitchModulation" Bypassed="0" Intensity="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="EffectChain" ID="FX" Bypassed="0"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Sample Start" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> <Processor Type="ModulatorChain" ID="Group Fade" Bypassed="0" Intensity="1"> <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/> <ChildProcessors/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <channels> <channelData enabled="1" level="0" suffix=""/> </channels> <samplemap ID="" SaveMode="0" RRGroupAmount="1" MicPositions=";"/> </Processor> </ChildProcessors> <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/> <macro_controls> <macro name="Macro 1" value="0" midi_cc="-1"/> <macro name="Macro 2" value="0" midi_cc="-1"/> <macro name="Macro 3" value="0" midi_cc="-1"/> <macro name="Macro 4" value="0" midi_cc="-1"/> <macro name="Macro 5" value="0" midi_cc="-1"/> <macro name="Macro 6" value="0" midi_cc="-1"/> <macro name="Macro 7" value="0" midi_cc="-1"/> <macro name="Macro 8" value="0" midi_cc="-1"/> </macro_controls> <MidiAutomation/> </Processor>
-
Yes, that's odd. I'll investigate.
-
Alright it's fixed (it wasn't setting the internal values of the other buttons).
BTW, you might have to rearrange your build setup, I transitioned to the latest JUCE version (needed for AAX support). I updated the GitHub README file with the new instructions.
-
Thanks, I'll check it out now. Going to try and do a Linux build too
-
Yeah, let me know how it works on Linux.
I uploaded the new build version 647 anyway, so you don't have to build it for Windows.