HISE Logo Forum
    • Categories
    • Register
    • Login

    Multi-channel volume and pan control

    Scheduled Pinned Locked Moved General Questions
    22 Posts 2 Posters 4.3k 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

      Ah yes that makes sense.

      How do you set more than one group to active at the same time? I'm sure I've done this before but now I can't seem to figure it out.

      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

        I've set the groups to use XFade, I've added a modulator, I've called Synth.enableRoundRobin(false) but only on of the groups play back so the crossfade doesn't really do much. I tried using setActiveGroup() in a loop but still only one group is enabled. What am I missing?

        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 Christoph Hart

          This should work:

          <?xml version="1.0" encoding="UTF-8"?>
          
          <Processor Type="StreamingSampler" ID="Sampler" Bypassed="0" Gain="1" Balance="0"
                     VoiceLimit="128" KillFadeTime="20" IconColour="0" PreloadSize="8192"
                     BufferSize="4096" VoiceAmount="128" SamplerRepeatMode="0" RRGroupAmount="3"
                     PitchTracking="1" OneShot="0" CrossfadeGroups="1" Purged="0"
                     NumChannels="1" Group0Table="36..........9C...vOKfJ.+.........vO...f+.........vO"
                     Group1Table="36...............vOKfJ.+....9C...vO...f+.........vO"
                     Group2Table="36...............vOKfJ.+.........vO...f+....9C...vO"
                     Group3Table="24...............vO...f+....9C...vO" Group4Table="24...............vO...f+....9C...vO"
                     Group5Table="24...............vO...f+....9C...vO" Group6Table="24...............vO...f+....9C...vO"
                     Group7Table="24...............vO...f+....9C...vO" SampleMap="">
            <EditorStates BodyShown="1" Visible="1" Solo="0" MapPanelShown="1" BigSampleMap="1"
                          GainModulationShown="1" CrossfadeTableShown="0" SettingsShown="1"
                          WaveformShown="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="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>
              <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="1" Solo="0" Folded="0"/>
                <ChildProcessors>
                  <Processor Type="MidiController" ID="Midi Controller" Bypassed="0" Intensity="1"
                             UseTable="0" Inverted="0" ControllerNumber="1" SmoothTime="200"
                             DefaultValue="0">
                    <EditorStates BodyShown="1" Visible="1" Solo="0"/>
                    <ChildProcessors/>
                  </Processor>
                </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="3" MicPositions=";"/>
          </Processor>
          

          You don't have to call Synth.enableRoundRobin(). Just set the RR Group Amount to your dynamic layer amount and set Group XF to enabled. This automatically deactivates the round robin behaviour and plays back all groups simlultaneuosly). You can then setup the crossfade curves for up to 8 layers by setting the table values for each group (you can choose different layer tables with the Edit XF drop down in the sampler settings.

          The example uses three dynamic layers (take a look at the tables 1 - 3).

          You can now use any modulator to morph between the dynamic layers (even polyphonic ones). The modulation output 0...1 will be the input for each table.

          I might make this easier though - and I don't know why I chose this ugly colour for the modulator chain :)

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

            Thanks Christoph I'll give it a whirl

            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

              I tried dropping samples into the sampler you've set up but even though I have samples mapped to the same keys in all three groups it's only playing one voice from group 1.

              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

                Just wanted to give this a little bump. I've still not managed to get more than one sample triggered with the built in x-fade behavior.

                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

                  This is an example project which uses a LFO to morph between two sustained samples (in this case, just a sine wave and a triangle).

                  Crossfade Test Project

                  Beware what you post next, it will be the 1000th post :)

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

                    Thanks, I made a new build from github to try your example and it worked perfectly so then I retried my own project and it worked, so I'm thinking I just needed to update my build :)

                    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

                      Weird, I haven't touched that code since ages.

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

                        Strange, maybe I derped somewhere else then :p

                        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

                          Ok there is definitely an issue with this. I think I might have found the trigger for it. If there is already a sampler in the instrument and then you add another and try and setup the group xfades on the new sampler it won't work. If you only have one sampler though, or the group xfade sampler was the first sampler you added then it works. It also works if you duplicate a sampler that has the xfades already set up.

                          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

                            You were right. Although the problem was a more generic one: If you activate the KillNote retrigger behavior, it kills also samples that are just started and leaves only the last sample in the crossfade list alive. My example (and every time I used this feature) magically had the KillNote property disabled so I didn't notice it.

                            This is of course highly counterintuitive so I added a check that doesn't fire the retrigger behaviour if the voice was started with the same event. It's on GitHub now.

                            This also fixes the velocity X-Fade behavior and actually all cases where one event starts multiple samples (excluding multimic samples) so nice catch!

                            But it has nothing to do with another sampler and it would highly violate our precious encapsulation principle, so please make sure this problem does not persist.

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

                              Excellent, glad it wasn't just me being mad

                              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

                              57

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              101.8k

                              Posts