HISE Logo Forum
    • Categories
    • Register
    • Login

    Mono Sampler

    Scheduled Pinned Locked Moved General Questions
    21 Posts 2 Posters 1.0k 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.
    • CasmatC
      Casmat
      last edited by

      Hey!

      I found Voice amount and voice limit in the sampler settings, what’s the difference and do I set the same numbers to both, I tried but getting some vary results and I want to know what you guys put as values to get a mono mode

      Thanks!

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

        Drop this script in your module tree and you get mono mode (with a glide feature too) https://github.com/davidhealey/HiseUtilityScripts/blob/master/modules/MonoMode.js

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

        CasmatC 2 Replies Last reply Reply Quote 1
        • CasmatC
          Casmat @d.healey
          last edited by

          @d-healey just implemented it and I am shook, the script is perrrrrrfecttt for my use case and feels amazing! Man, I need your hiseing skills!

          1 Reply Last reply Reply Quote 1
          • CasmatC
            Casmat @d.healey
            last edited by

            @d-healey Bug! I found this weird thing that happens with the mono script. You have to turn the glide time knob above 0 (try putting at 0.01) then hold down two notes, while holding two notes down, press another note and let go, then press another note and a weird pitch effect occurs. Tried fixing it, but I couldnt find a way to fix it.. here’s a video showing that pitch effect: monoissue.mp4

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

              @Casmat I don't know what I'm looking for in your video. Make a simple example with a sinewave generator, post the snippet and give me the steps to reproduce the issue (or a MIDI file).

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

              CasmatC 1 Reply Last reply Reply Quote 0
              • CasmatC
                Casmat @d.healey
                last edited by Casmat

                @d-healey Hold down two notes at the same time, lets say C and E. Then while holding those two down, hold another key, lets say G, and then let go of G, but not C and E. Then Repress G and there should be a pitch difference in the note

                Edit: oops for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+PXbIG3BTW1jeZAr0c80vFMSVWXZqiNr.O0B728YxlEw05S1r3zMeuHigT2PwW6lz.OVv3NJHfcGn9Af2vnNtlTbZq6FFE1p.1xK+qccwb5u.7OKmlsuAz7KtAz7na.Me4MflctAz73a.MO4JoAuwuTrTLLI+G.zxRMBktdRGPpiBZ+aPUbLSM
                
                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Casmat
                  last edited by

                  @Casmat Ha that's weird. The solution is simple, don't hold down two notes, in a mono script, use one note only :)

                  The glide works by pitch shifting the first note of the glide, the second note is never actually played. So if you glide between C and E, what you are hearing is the C being triggered and retuned up to E. The E itself never plays, so when you then press G it is still retuning the original C but now up to the G, and when you release the G it's going to go back down to the C.

                  You should increase the glide time and you will hear what is going on more clearly.

                  With the time set to 0.01, if you press C and E you will only hear one of those note, but that means the first note that was triggered is the other one and it's been retuned to the one that you hear. For example if you hear the C, that means it was the E that was triggered and has been retuned to the C. When you increase the glide time you will hear this.

                  So now it should make more sense. We are hearing the C at first but actually that's the E tuned down. When we play the G that is the E tuned up, when we release the G it goes back to the original note (E).

                  Now why it then jumps up to the B when you press G again I don't know, but it's related to the fact you're hold down a 3rd between the C and the E and it gets added to the G for some reason. You can test this by hold B instead of C and indeed it will increase by a 4th on top of the G.

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

                  CasmatC 1 Reply Last reply Reply Quote 0
                  • CasmatC
                    Casmat @d.healey
                    last edited by

                    @d-healey ahh, that makes sense! thing is, It had been stumbled upon when playing notes fast, so if im understanding correctly, this is a problem with the pitch fade function itself, right?

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

                      @Casmat

                      this is a problem with the pitch fade function itself, right?

                      No it's a user issue :) one note only.

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

                      CasmatC 2 Replies Last reply Reply Quote 0
                      • CasmatC
                        Casmat @d.healey
                        last edited by

                        @d-healey aye-aye!

                        1 Reply Last reply Reply Quote 1
                        • CasmatC
                          Casmat @d.healey
                          last edited by

                          @d-healey hey again! I noticed another thing which I was wondering how to implement, when the glide time is set to anything above 0, when you hold on one note, let’s say C, then press E while holding C, then release E, it causes the note to go back to the C and retrigger it, causing a trill like effect. However when you set the glide time to 0, causing retrigger mode, the same doesn’t happen, and instead holding the C, then pressing E while holding C, then letting go of E while holding C causes E to continue playing, what modifications to the script should I make to get that effect?

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

                            @Casmat Have you tried using the hardcoded legato script that comes with HISE? That might do what you need without using my mono script.

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

                            CasmatC 3 Replies Last reply Reply Quote 0
                            • CasmatC
                              Casmat @d.healey
                              last edited by

                              @d-healey not yet.. where can I find that?

                              1 Reply Last reply Reply Quote 0
                              • CasmatC
                                Casmat @d.healey
                                last edited by

                                @d-healey just found it!

                                1 Reply Last reply Reply Quote 0
                                • CasmatC
                                  Casmat @d.healey
                                  last edited by

                                  @d-healey hm, this legato script in hise seems to continue playing notes even when I let them go, if I tap a note, it just plays on even when let go. And having a glide time setting is something I wanted, which the script in hise doesn’t have, or am I missing something, I can’t find any parameters for it

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

                                    @Casmat If the note continues playing that makes me think you have a long release time or the sampler is in one shot mode. The legato script doesn't have a glide setting, and as you've found, the one in my script needs some work for real-world use.

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

                                    CasmatC 2 Replies Last reply Reply Quote 0
                                    • CasmatC
                                      Casmat @d.healey
                                      last edited by Casmat

                                      @d-healey Woohoo!! After some long fought trial and error, I got the retriggering working for when the glide time is below zero:

                                      /*
                                      The MIT License (MIT)
                                      
                                      Copyright © 2017, 2018, 2019, 2020, 2021, 2022 David Healey
                                      
                                      Permission is hereby granted, free of charge, to any person obtaining
                                      a copy of this file (the “Software”), to deal in the Software without
                                      restriction, including without limitation the rights to use, copy,
                                      modify, merge, publish, distribute, sublicense, and/or sell copies of
                                      the Software, and to permit persons to whom the Software is furnished
                                      to do so, subject to the following conditions:
                                      
                                      The above copyright notice and this permission notice shall be included
                                      in all copies or substantial portions of the Software.
                                      
                                      THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
                                      OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
                                      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
                                      THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
                                      LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
                                      OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
                                      */
                                      
                                      Content.setWidth(650);
                                      Content.setHeight(50);
                                      
                                      reg lastNote = -1;
                                      reg retrigger = -1;
                                      reg eventId;
                                      reg lastTuning = 0;
                                      reg vel;
                                      reg retriggerHold;
                                      
                                      //GUI
                                      const var bypass = Content.addButton("Bypass", 10, 10);
                                      
                                      const var time = Content.addKnob("Time", 160, 0);
                                      time.setRange(0, 2000, 0.01);
                                      function onNoteOn()
                                      {
                                      	vel = Message.getVelocity();
                                      	
                                          if (!bypass.getValue())
                                          {
                                              if (lastNote == -1)
                                              {
                                                  lastNote = Message.getNoteNumber();
                                                  eventId = Message.makeArtificial();
                                              }
                                              else
                                              {
                                                  if (time.getValue() > 0 && eventId != -1)
                                                  {
                                                      Message.ignoreEvent(true);                
                                                      Synth.addPitchFade(eventId, time.getValue(), lastTuning + Message.getNoteNumber()-lastNote, 0);                    
                                                      lastTuning = lastTuning + Message.getNoteNumber()-lastNote;
                                                  }
                                                  else
                                                  {
                                                      if (eventId != -1) Synth.noteOffByEventId(eventId);
                                                          
                                                      eventId = Message.makeArtificial();
                                                  }
                                                  retrigger = lastNote;
                                                  lastNote = Message.getNoteNumber();
                                              }
                                          }
                                      }
                                      function onNoteOff()
                                      {
                                          if (!bypass.getValue())
                                          {
                                              Message.ignoreEvent(true);
                                      
                                              if (eventId != -1 && Message.getNoteNumber() == lastNote)
                                              {
                                                if (Synth.isKeyDown(retrigger))
                                                {
                                                    if(time.getValue() == 0)
                                                    {
                                      	              Synth.noteOffByEventId(eventId);
                                      	              Synth.addNoteOn(1, retrigger, vel, 0);
                                      	              lastTuning = 0;
                                      	              retriggerHold = retrigger;
                                      	              lastNote = retrigger;
                                      	              retrigger = -2;
                                      			  }
                                      			  else
                                      			  {
                                      	              Synth.addPitchFade(eventId, time.getValue(), 0, 0);
                                      	              lastTuning = 0;
                                      	              lastNote = retrigger;
                                      	              retrigger = -1;
                                                    };
                                                }
                                                else
                                                {
                                                    Synth.noteOffByEventId(eventId);
                                                    if (retrigger == -2)
                                                    {
                                                    	Synth.addNoteOff(1, retriggerHold, 0);
                                                    }
                                                    eventId = -1; 
                                                }
                                              }
                                      
                                              if (!Synth.getNumPressedKeys())
                                              {
                                                  lastNote = -1;
                                                  lastTuning = 0;
                                              }
                                          }
                                          else if (eventId != -1 && eventId != undefined)
                                          {
                                              Synth.noteOffByEventId(eventId);
                                              eventId = -1;
                                              lastNote = -1;
                                              lastTuning = 0;
                                          }
                                      }
                                      
                                      function onController()
                                      {
                                      	
                                      }
                                       function onTimer()
                                      {
                                      	
                                      }
                                       function onControl(number, value)
                                      {
                                      	
                                      }
                                       
                                      

                                      I definitely feel like I overcomplicated things and is not the most efficient way haha

                                      If the note continues playing that makes me think you have a long release time or the sampler is in one shot mode.

                                      Yup, the oneshot mode was the problem, the script still is very buggy and needs work as the retrig pitch shifts an octave lower and whatnot

                                      1 Reply Last reply Reply Quote 1
                                      • CasmatC
                                        Casmat @d.healey
                                        last edited by

                                        @d-healey scratch that, the retrig thing only works for “one pass through” if you continue “trilling” and let go of all the notes, the retrigger note still continues playing even when no notes are pressed. I had only accounted for one pass through. I was thinking I could make the retrigger note into an eventId, but I couldn’t find a way to do that from the addnoteon function. Is there a way to detect an anchor note (retrigger note) and then play that note when all others are let go except the original retrigger note?

                                        Thanks!

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

                                          @Casmat If you're not using the glide feature just use the hardcoded legato effect (if you turn off one shot mode).

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

                                          CasmatC 2 Replies Last reply Reply Quote 0
                                          • CasmatC
                                            Casmat @d.healey
                                            last edited by

                                            This post is deleted!
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            24

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.3k

                                            Posts