HISE Logo Forum
    • Categories
    • Register
    • Login

    Radio group controlled from another script

    Scheduled Pinned Locked Moved Bug Reports
    5 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by d.healey

      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(&quot;Script Processor2&quot;);&#13;&#10;&#13;&#10;const var Button = Content.addButton(&quot;Button&quot;, 0, 0);&#13;&#10;const var Button2 = Content.addButton(&quot;Button2&quot;, 150, 0);&#13;&#10;const var Button3 = Content.addButton(&quot;Button3&quot;, 300, 0);&#13;&#10;&#13;&#10;inline function allOff()&#13;&#10;{&#13;&#10;&#9;Button.setValue(0);&#13;&#10;&#9;Button2.setValue(0);&#13;&#10;&#9;Button3.setValue(0);&#10;}function onNoteOn()&#10;{&#10;&#9;&#10;}&#10;function onNoteOff()&#10;{&#10;&#9;&#10;}&#10;function onController()&#10;{&#10;&#9;&#10;}&#10;function onTimer()&#10;{&#10;&#9;&#10;}&#10;function onControl(number, value)&#10;{&#13;&#10;&#9;switch (number)&#13;&#10;&#9;{&#13;&#10;&#9;&#9;case Button:&#13;&#10;&#9;&#9;&#9;allOff();&#13;&#10;&#9;&#9;&#9;Button.setValue(1);&#13;&#10;&#9;&#9;&#9;ScriptProcessor2.setAttribute(0, value);&#13;&#10;&#9;&#9;break;&#13;&#10;&#9;&#9;&#13;&#10;&#9;&#9;case Button2:&#13;&#10;&#9;&#9;&#9;allOff();&#13;&#10;&#9;&#9;&#9;Button2.setValue(2);&#13;&#10;&#9;&#9;&#9;ScriptProcessor2.setAttribute(1, value);&#13;&#10;&#9;&#9;break;&#13;&#10;&#9;&#9;&#13;&#10;&#9;&#9;case Button3:&#13;&#10;&#9;&#9;&#9;allOff();&#13;&#10;&#9;&#9;&#9;Button3.setValue(3);&#13;&#10;&#9;&#9;&#9;ScriptProcessor2.setAttribute(2, value);&#13;&#10;&#9;&#9;break;&#10;&#9;}&#10;&#9;&#10;}&#10;">
                <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="&#10;const var Button = Content.addButton(&quot;Button&quot;, 0, 0);&#13;&#10;const var Button2 = Content.addButton(&quot;Button2&quot;, 150, 0);&#13;&#10;const var Button3 = Content.addButton(&quot;Button3&quot;, 300, 0);&#10;&#13;&#10;Button.set(&quot;radioGroup&quot;, 1);&#13;&#10;Button2.set(&quot;radioGroup&quot;, 1);&#13;&#10;Button3.set(&quot;radioGroup&quot;, 1);function onNoteOn()&#10;{&#10;&#9;&#10;}&#10;function onNoteOff()&#10;{&#10;&#9;&#10;}&#10;function onController()&#10;{&#10;&#9;&#10;}&#10;function onTimer()&#10;{&#10;&#9;&#10;}&#10;function onControl(number, value)&#10;{&#13;&#10;&#9;switch (number)&#13;&#10;&#9;{&#13;&#10;&#9;&#9;case Button:&#13;&#10;&#9;&#9;&#9;Console.print(&quot;Button 1&quot;);&#13;&#10;&#9;&#9;break;&#13;&#10;&#9;&#9;&#13;&#10;&#9;&#9;case Button2:&#13;&#10;&#9;&#9;&#9;Console.print(&quot;Button 2&quot;);&#13;&#10;&#9;&#9;break;&#13;&#10;&#9;&#9;&#13;&#10;&#9;&#9;case Button3:&#13;&#10;&#9;&#9;&#9;Console.print(&quot;Button 3&quot;);&#13;&#10;&#9;&#9;break;&#10;&#9;}&#10;&#9;&#10;}&#10;">
                <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>
      

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Yes, that's odd. I'll investigate.

        1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by

            Thanks, I'll check it out now. Going to try and do a Linux build too

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              46

              Online

              1.7k

              Users

              11.7k

              Topics

              101.9k

              Posts