HISE Logo Forum
    • Categories
    • Register
    • Login

    How to play a specified RR group based on the distance between two notes?

    Scheduled Pinned Locked Moved General Questions
    30 Posts 5 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.
    • CatABCC
      CatABC
      last edited by

      How to play a specified RR group based on the distance between two notes?
      When the tail of the first note overlaps the beginning of the second note,Trigger the specified Sampler,
      and,ex.C to #C , play RR1; CtoD,play RR2; C to #D ,play RR3……
      3fe235a3-16e5-4c06-853a-c405ec1cbf56-image.png

      //I am a new student at HISE._
      //Windows11 & MacOS Ventura 13.6.7_

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

        You can use the Synth.isLegatoInterval() function in the on note on callback to check if two notes are overlapping. If you want to differentiate between legato and chords though you will need to script a more sophisticated system, using the time between notes.

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

        CatABCC 1 Reply Last reply Reply Quote 0
        • CatABCC
          CatABC @d.healey
          last edited by

          @d-healey I want to use it to make legato, without distinguishing chords, but I'm a novice and this is very tricky for me. I don't know how to write the code. Can you give me a code snippet? Please help me, I'll be very grateful

          //I am a new student at HISE._
          //Windows11 & MacOS Ventura 13.6.7_

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

            @CatABC You can get pretty far with a minimal amount of scripting (at least for the basic functionality of legato intervals).

            Basically what I would do is set the amount of RR groups to 127, then put the legato interval samples to the note number of the target note and in the RR Group of the start note. Example: If you have a legato transition sample from C2 to D2, you'll map it to the note number D2 and the RRGroup 48 (C2 = 48). Proceed with every legato sample like that.

            Now in the script, all you need to do is to check if you're playing a legato interval, and if it's the case set the group index to the start note:

            reg lastNote = 0;
            Sampler.enableRoundRobin(false);
            
            function onNoteOn()
            {
                if(Synth.isLegatoInterval())
                {
                    Sampler.setActiveGroup(lastNote);
                }
                else
                {
                    Sampler.setActiveGroup(-1);
                }
            
                activeGroup = Message.getNoteNumber();
            }
            
            d.healeyD CatABCC 4 Replies Last reply Reply Quote 0
            • d.healeyD
              d.healey @Christoph Hart
              last edited by

              @Christoph-Hart said in How to play a specified RR group based on the distance between two notes?:

              I would do is set the amount of RR groups to 127,

              Have you seen the sampler UI with 127 groups :) Go on, give us a nice table view..

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

              ustkU Christoph HartC 2 Replies Last reply Reply Quote 0
              • CatABCC
                CatABC @Christoph Hart
                last edited by

                @Christoph-Hart My idea is to only need 24 RR groups, and put the upward minor second --> octave in the first 12 groups, and the downward minor second --> octave in the last 12 groups.

                //I am a new student at HISE._
                //Windows11 & MacOS Ventura 13.6.7_

                1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @d.healey
                  last edited by

                  @d-healey You fool... Chris doesn't need any UI, I'm sure he's developing blindfolded and barefoot...

                  Can't help pressing F5 in the forum...

                  1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @d.healey
                    last edited by

                    @d-healey said in How to play a specified RR group based on the distance between two notes?:

                    Have you seen the sampler UI with 127 groups

                    Yeah I fixed that a few weeks ago:

                    064042c7-4049-486e-8c38-f54fa205110e-image.png

                    My idea is to only need 24 RR groups, and put the upward minor second --> octave in the first 12 groups, and the downward minor second --> octave in the last 12 groups.

                    Do whatever floats your boat, but with my suggestion you get the most simple script because you don't need to do any calculations of which group to enable. And using 128 groups instead of 24 has no performance impact at all, it's just an index.

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

                      @Christoph-Hart said in How to play a specified RR group based on the distance between two notes?:

                      Yeah I fixed that a few weeks ago:

                      It's better than it was, but it's not really any better for 127 groups (how do I view all the samples in groups 90-100 at the same time for example?). At least the indexes are correct now :)

                      Guess which group I have selected here?

                      e285c44c-77cf-45b9-90c5-2e1bea9aa422-image.png

                      Yep, number 99 :)

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

                      Christoph HartC 1 Reply Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart @d.healey
                        last edited by

                        @d-healey hmm ok, I just tried to "unglitch" the UI. What would be your suggestion for a proper solution? Maybe once the RR group count exceeds the number that can be shown properly, make a popup button with a bigger UI element that shows every group? Any ideas of how this should look?

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

                          @Christoph-Hart said in How to play a specified RR group based on the distance between two notes?:

                          What would be your suggestion for a proper solution?

                          I think we should do what Kontak does (but better), have a table view. Additional features such as renaming and colour coding groups would be nice, also if we could see with a little indicator of which group is triggering (Kontakt shows a speaker icon). But just a simple table with multi-select would suffice.

                          Maybe this discussion could be separated into another thread as I've derailed this one?

                          8261abdd-e0c6-4f70-afe0-2c81867c8373-image.png

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

                          Christoph HartC 1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart @d.healey
                            last edited by

                            @d-healey yeah I‘ll definitely don‘t want to add the ability to name groups or other organisational tools as this will encourage the wrong usage of tucking too much into a single sampler.

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

                              @Christoph-Hart said in How to play a specified RR group based on the distance between two notes?:

                              this will encourage the wrong usage of tucking too much into a single sampler

                              What would be your approach for an instrument that has a lot of articulations and a modulation chain that is the same for all the articulations. In this scenario is there an advantage to using 1 sampler per articulation?

                              My thought is that I would use a single sampler and separate the articulations into groups (with or without round robin), and switch the active group(s) for the desired articulation. In this scenario it would be helpful to label the groups so I know which one contains which articulation.

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

                              CatABCC 1 Reply Last reply Reply Quote 0
                              • CatABCC
                                CatABC @d.healey
                                last edited by

                                @d-healey Using one Sampler for each articulation feels clearer and safer

                                //I am a new student at HISE._
                                //Windows11 & MacOS Ventura 13.6.7_

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

                                  @CatABC But you'd have so much duplication. Imagine there are 10 articulations, and they all need the same modulation and effects.

                                  With one sampler per articulation everything would be repeated 10x. It seems to add unnecessary complexity and performance overhead.

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

                                  Christoph HartC 1 Reply Last reply Reply Quote 0
                                  • Christoph HartC
                                    Christoph Hart @d.healey
                                    last edited by

                                    @d-healey yes I'm not arguing that there is a use case where it might make sense. My argument is that I don't want to incentivize people to cram everything in a single sampler by giving them the impression that this is a recommended workflow by adding convenience tools for this. Because then the next thing people will ask is how to make a FX chain per group or limit certain modulators to a range of RR groups and BAM we're back in Kontaktland.

                                    If you realize as a power user that this is the best architecture for your project, then there's nothing against it, but then you have to live with the mild inconvenience of going a little path outside the recommended path.

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

                                      @Christoph-Hart said in How to play a specified RR group based on the distance between two notes?:

                                      the next thing people will ask is how to make a FX chain per group or limit certain modulators to a range of RR groups

                                      Pretty sure I already asked for this too :beaming_face_with_smiling_eyes:

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

                                      Christoph HartC 1 Reply Last reply Reply Quote 0
                                      • Christoph HartC
                                        Christoph Hart @d.healey
                                        last edited by

                                        I rest my case your honor.

                                        1 Reply Last reply Reply Quote 1
                                        • A
                                          aaronventure
                                          last edited by

                                          I think it's better to use one sample per one velocity for dealing with true legato, that way everything is in one group instead of having to deal with 127 groups, managing them an populating them.

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

                                            @aaronventure ah so just use setVelocity(targetNoteNumber) instead of setActiveGroup()? Yeah that could work and I also don't need to think about a solution for the UI problem of RR groups, so I guess everybody's happy now :)

                                            d.healeyD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            52

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.9k

                                            Posts