HISE Logo Forum
    • Categories
    • Register
    • Login

    Turn faded out voices off

    Scheduled Pinned Locked Moved Feature Requests
    8 Posts 2 Posters 1.6k 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

      Could you add an extra parameter to the volume fade function to set whether or not the voice is turned off after a fade? This will really only apply to notes that are faded out to -100 volume. It should be optional because there might be times when voices needed to be faded out to silence and then faded back in so it won't always be necessary to stop the voice.

      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

        IIRC it only kills the note if the value is exactly -100, so if you pass -99 there it remains active and you need supernatural hearing abilities to tell the difference :)

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

          Ah I didn't realise this feature should already be there. It doesn't seem to be working however:

          <?xml version="1.0" encoding="UTF-8"?>
          
          <Processor Type="SynthChain" ID="Master Chain" Bypassed="0" Gain="1" Balance="0"
                     VoiceLimit="128" KillFadeTime="20" IconColour="0" packageName=""
                     views="32.rk1bzA....DB.........LUYtQVL.vF.5.....B...." currentView="-1">
            <EditorStates BodyShown="0" Visible="1" Solo="0" Folded="0"/>
            <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="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="SineSynth" ID="Sine Wave Generator" Bypassed="0" Gain="0.25"
                         Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0"
                         OctaveTranspose="0" SemiTones="0" UseFreqRatio="0" CoarseFreqRatio="1"
                         FineFreqRatio="0" SaturationAmount="0">
                <EditorStates BodyShown="1" Visible="1" Solo="0" GainModulationShown="1"/>
                <ChildProcessors>
                  <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0">
                    <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/>
                    <ChildProcessors>
                      <Processor Type="ScriptProcessor" ID="Script Processor2" Bypassed="0" Script="function onNoteOn()&#10;{&#10;&#9;Synth.addVolumeFade(Message.getEventId(), 2000, -100);&#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;{&#10;&#9;&#10;}&#10;">
                        <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="0"
                                      onNoteOnOpen="1" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0"
                                      onControlOpen="0"/>
                        <ChildProcessors/>
                        <Content/>
                      </Processor>
                    </ChildProcessors>
                  </Processor>
                  <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1">
                    <EditorStates BodyShown="1" Visible="0" Solo="0"/>
                    <ChildProcessors>
                      <Processor Type="SimpleEnvelope" ID="DefaultEnvelope" Bypassed="0" Intensity="1"
                                 Attack="5" Release="10" LinearMode="1">
                        <EditorStates BodyShown="1" Visible="1" Solo="0"/>
                        <ChildProcessors>
                          <Processor Type="ModulatorChain" ID="Attack Time Modulation" Bypassed="0"
                                     Intensity="1">
                            <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/>
                            <ChildProcessors/>
                          </Processor>
                        </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>
                </ChildProcessors>
                <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/>
              </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>
          

          Also I noticed this produces an ID not found error which seems odd:

          <?xml version="1.0" encoding="UTF-8"?>
          
          <Processor Type="SynthChain" ID="Master Chain" Bypassed="0" Gain="1" Balance="0"
                     VoiceLimit="128" KillFadeTime="20" IconColour="0" packageName=""
                     views="32.rk1bzA.....nMzvGFK....KiW7gwB...vRk0eXr...." currentView="-1">
            <EditorStates BodyShown="0" Visible="1" Solo="0" Folded="0"/>
            <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="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="SineSynth" ID="Sine Wave Generator" Bypassed="0" Gain="0.25"
                         Balance="0" VoiceLimit="128" KillFadeTime="20" IconColour="0"
                         OctaveTranspose="0" SemiTones="0" UseFreqRatio="0" CoarseFreqRatio="1"
                         FineFreqRatio="0" SaturationAmount="0">
                <EditorStates BodyShown="1" Visible="1" Solo="0" GainModulationShown="1"/>
                <ChildProcessors>
                  <Processor Type="MidiProcessorChain" ID="Midi Processor" Bypassed="0">
                    <EditorStates BodyShown="1" Visible="1" Solo="0" Folded="0"/>
                    <ChildProcessors>
                      <Processor Type="ScriptProcessor" ID="Script Processor2" Bypassed="0" Script="function onNoteOn()&#10;{&#13;&#10;&#9;Synth.noteOffByEventId(Message.getEventId());&#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;{&#10;&#9;&#10;}&#10;">
                        <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="0"
                                      onNoteOnOpen="1" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0"
                                      onControlOpen="0"/>
                        <ChildProcessors/>
                        <Content/>
                      </Processor>
                    </ChildProcessors>
                  </Processor>
                  <Processor Type="ModulatorChain" ID="GainModulation" Bypassed="0" Intensity="1">
                    <EditorStates BodyShown="1" Visible="0" Solo="0"/>
                    <ChildProcessors>
                      <Processor Type="SimpleEnvelope" ID="DefaultEnvelope" Bypassed="0" Intensity="1"
                                 Attack="5" Release="10" LinearMode="1">
                        <EditorStates BodyShown="1" Visible="1" Solo="0"/>
                        <ChildProcessors>
                          <Processor Type="ModulatorChain" ID="Attack Time Modulation" Bypassed="0"
                                     Intensity="1">
                            <EditorStates BodyShown="1" Visible="0" Solo="0" Folded="1"/>
                            <ChildProcessors/>
                          </Processor>
                        </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>
                </ChildProcessors>
                <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/>
              </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

            Ah thanks, I think it worked, but you're right. I added this behavior (so -100 kills the note, -99 stays active).

            The second example is valid though: You are trying to create an artificial note off event for a "real" note on, which is not allowed. Adding Message.makeArtificial() before the Synth.noteOffByEventId() brings the desired result.

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

              Thanks Christoph :) Oh yeah I was forgetting about the real/artificial note thing!

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

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

                Don't suppose you could push this fix to github today or tommorrow? :D Really looking forward to making use of it.

                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

                  Ah sorry, there is a ton of stuff that I have committed but not pushed yet. I'll also do a new build version in the next days.

                  Now it's there :)

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

                    Thanks :D off to build now!

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

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

                    52

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    101.9k

                    Posts