HISE Logo Forum
    • Categories
    • Register
    • Login

    Simultaneous RR Group Playback

    Scheduled Pinned Locked Moved General Questions
    22 Posts 4 Posters 1.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.
    • E
      ericchesek @d.healey
      last edited by ericchesek

      @d-healey Woops, I made too many quick changes during testing.

      I have the Sampler.enableRoundRobin(false) in the init callback. Then with the intended code below, the second RR group is the only one that plays. I experimented with adding breaks to each case as well, and that doesn't do anything.

      Is a separate note on callback called for each simultaneous note, or is there a priority of some sort?

      function onNoteOn()
      {
      	switch (Message.getNoteNumber())
      	{
      		case 36:
      			Message.setNoteNumber(Math.randInt(0, 5));
      			Sampler.setMultiGroupIndex(1, true);
      			Sampler.setMultiGroupIndex(2, false);
      		case 37:
      			Message.setNoteNumber(Math.randInt(0, 5));
      			Sampler.setMultiGroupIndex(1, false);
      			Sampler.setMultiGroupIndex(2, true);
      	}
      }
      
      
      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @ericchesek
        last edited by

        @ericchesek

        Why not enable all groups and put one sample in each group?

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

        1 Reply Last reply Reply Quote 0
        • E
          ericchesek
          last edited by

          @d-healey

          Doesn't that mean that all samples mapped to MIDI note 0 (for example) regardless of group will be played back if I write Message.setNoteNumber(0)? Ideally I would like to be able to map notes on any key in any group, then use scripting to determine which played key will trigger a single specific note and velocity in a single specific RR group where the sample is mapped.

          If it's not possible, then I suppose the next thing to do is use multiple samplers.

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

            @ericchesek I was assuming you only had 1 sample per note. If you have multiple then the group method is the way to go.

            So back to your code above. Since you're only enabling one group at a time I think you can just use the standard setActiveGroup function and forget about the multi group thing.

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

            E 1 Reply Last reply Reply Quote 0
            • E
              ericchesek @d.healey
              last edited by

              @d-healey

              Hmm this still isn't quite right. It works fine as long as no notes are played with simultaneous starts. As soon as two of those notes are played, only one of the groups plays back a sample. I simplified the code a bit below.

              function onNoteOn()
              {
              	switch (Message.getNoteNumber())
              	{
              		case 36:
              			Message.setNoteNumber(0);
              			Sampler.setActiveGroup(1);
              		case 38:
              			Message.setNoteNumber(0);
              			Sampler.setActiveGroup(2);
              	}
              }
              
              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @ericchesek
                last edited by

                @ericchesek Why are you setting the note number to 0?

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

                E 1 Reply Last reply Reply Quote 0
                • E
                  ericchesek @d.healey
                  last edited by

                  @d-healey

                  I have samples mapped on MIDI note 0 on RR Group 1 and RR Group 2. I want to take a user input note of 36 and play the sample mapped to note 0 in RR Group 1. I also want to take a user input note of 38 and play the sample mapped to note 0 in RR Group 2.
                  If 36 and 38 are played together, then both samples in both RR groups should play back at the same time.
                  Then if a user actually plays MIDI note 0, I don't want the sampler to play back anything.

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

                    @ericchesek I get it now. What about using the velocity levels to map the samples instead of groups?

                    Here's an example test.zip I'm using notes 60, 61, and 62 in this example. Samples are mapped to note 0.

                    You can still use velocity to trigger different layers and control volume. Also remember that in the end none of this note manipulation stuff should be in your UI script - but while you're just testing it's fine.

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

                    E 1 Reply Last reply Reply Quote 0
                    • E
                      ericchesek @d.healey
                      last edited by ericchesek

                      @d-healey
                      Thanks for the test.zip!
                      Using velocity levels may be the way to do it. Ultimately this is to try reducing CPU load where I can. I don't know how much extra CPU is used by stacking samplers. If the differences are negligible, using multiple samplers may result in less tricky scripting.

                      For example, something like Naughty Seal's Perfect drums is almost always <3% CPU on my MacBook Pro.
                      Handy Drums, which I believe was built with HISE, is down around 0.9% CPU.
                      Of course these numbers depend on the load each plugin is trying to pull, so these are just rough figures.

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

                        @ericchesek The CPU overhead is not very drastic so anything < 16 samplers is perfectly fine for a drum plugin and using one sampler per drum type is definitely the way to go as it also allows you to independently mix them.

                        However you definitely need to lower the voice count on each sampler (something like 32 should be plenty enough for most drum types and you can increase the voice count for cymbals or other drums which have a longer decay).

                        E 1 Reply Last reply Reply Quote 0
                        • E
                          ericchesek @Christoph Hart
                          last edited by ericchesek

                          @Christoph-Hart Okay, that's good news. Does voice count in HISE include multi mics? So a drum with 10 mics playing back once will have a voice count of 1, or 10?

                          Also, what happens if the sampler count increases above 16?

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

                            @ericchesek 10 mics = 10 voices. More samplers = more resources.

                            I did a test patch once with 60 samplers, all with a voice limit of 2, and it wasn't an issue but generally I like to have as few samplers as possible.

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

                            E 1 Reply Last reply Reply Quote 2
                            • E
                              ericchesek @d.healey
                              last edited by ericchesek

                              @d-healey

                              I'm more likely to need higher voice limits as opposed to more samplers, so perhaps I'll run a test of my own and report back.

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

                                That‘s not entirely correct - if you use 10 mic positions and play one note then the voice counter in the Performance meter shows 10 voices but if you set the voice limit to 32, you can play 32 notes before it starts killing voices (and not 3).

                                E 1 Reply Last reply Reply Quote 2
                                • E
                                  ericchesek @Christoph Hart
                                  last edited by

                                  @Christoph-Hart

                                  More good news! :beaming_face_with_smiling_eyes:

                                  1 Reply Last reply Reply Quote 0
                                  • LevitanusL
                                    Levitanus
                                    last edited by

                                    I faced the same problem with function setMultiGroupIndex: no matter, what I try ‒ I hear all RR groups, that are mapped to the key.

                                    And I'm sure this function is what I need: I have halftone trills in groups 1-2 and wholetone trills in groups 3-4, and, while playing legato I want to choose between half and whole tone, based on intervals being played. It will be huge logic overhead, if splitting all such articulations to different samplers.

                                    LevitanusL 1 Reply Last reply Reply Quote 0
                                    • LevitanusL
                                      Levitanus @Levitanus
                                      last edited by

                                      I've succeeded to do this with setMultiGroupIndex, but not with setMultiGroupIndexForEventID. But still looks fine. Maybe there is a sense to check the behavior of the last one?

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

                                      56

                                      Online

                                      1.7k

                                      Users

                                      11.7k

                                      Topics

                                      101.9k

                                      Posts