HISE Logo Forum
    • Categories
    • Register
    • Login

    What's the easiest way to do *simple* sample glide/legato?

    Scheduled Pinned Locked Moved Scripting
    13 Posts 5 Posters 3.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
      elanhickler
      last edited by

      There's a built in script called Legato with Retrigger, does that allow for gliding of sample pitches when the user is holding down notes?

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

        No. I've written a script and posted it in the snippets section that does this and more, there are some things I would like to add to it to do with timing but it works pretty well. The script is GPL so can only be incorporated in GPL libraries.

        Link Preview Image
        Synthetic Legato

        This is great for acoustic and woodwind sounds. I wonder how this would sound with traditional Synth lead and synth bass sounds. Could this be tweaked to acc...

        favicon

        Forum (forum.hise.audio)

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

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

          Not sure "No" is the answer I was hoping for. I think this should be built into HISE. A simple glide ability for monophonic synths/samples is a feature you will find on just about every audio plugin, software, and hardware synth /sampler ever created. A built in script would be fine for this.

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

            Or someone could explain the functions and HISE modules I should be looking at.

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

              It's actually pretty easy to write this using scripting (and I was asked to do this several times) so maybe I just do it :)

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

                If you can't wait, Synth.addPitchFade is your friend here...

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

                  I can wait for now. I'll check out Synth.addPitchFade needed.

                  Maybe I can provide my arpeggiator script for free in return for help received. The arpeggiator script will be highly portable, customizable, and easy to integrate, I made it so you only have to put in one or two lines of code per callback to have it running. Then you just build an interface around the arp "set" functions.

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

                    Yeah, sounds great. a nice arpeggiator always comes in handy.

                    Here is a simple monophonic glide:

                    HiseSnippet 1545.3oc6Xs0aaTDEd13rp0tjRKMBUdaHBjrEIo1IgKsQUYat3Rn4hacTJUHTYxtyFOp6NiY2YSqaUeDI9Kz2feIzG3Ed.IP8O.7Hpuvu.f4r22DmT6BMsfvxwYmu4bl46bly4Lyrs7DlTeegGR6Ta0qKEo8Z5s6wkcVpCgwQqtLR6z5qS7kTObDzh85R78oVHMsRWE.zJOJJ7yuuvhDGB2jlAgPaKXlz0XtLYFZKiqwbbZRrnawbyI8bFqZJ3KIbDAJ9TRuNpKw7NjcoaP.wFQGsGidWejVc8YmYZu6zXm6eko22m41dQE1tEwQlAddTtbak5HMcs+T8QSeEKlT30VRjT0XpunvpW6Nh6xgotAZalOaGGZTi1JNEwnlBGKv3gmWkqbK1DSZpZ0Qnk5vbrZk3V8QpQtUlStTjSdb80YVrT7Lm8YB6.moQd2s1HEo7nGNkq2WJ2nOzCkiciFwNEIDVANDYQlAq1wcvDECD.OA2mI6kOZ3kJcOqdKlzrS+46H8gupEpWz7MdweL8UrsolxLxNpdyO84ck9vBN6SfnVqCjseB8koNjdgrH447DIDAxRWiZmKC9LFocbC1tcx0yIMZRoV6nxayogwry9jERvyqPXGqItaK0D1zi9koiyW+DiOlc.TzxFqytWht+58+9E1h51UnJXYVHvqTQuWoAy60mEuaHBjL9tqSjdv7puQfaaUwISpZsiyoNPcCsQPfpgsqCsARzlxspmTpItyFPas3NajzY9.jyFsnbJ8aR1iFVFNbgY7v11BOW7UobpGDoeD0g+oAsN7WLv0g2zTpXvVdDteWgOsQ9Qde8MS99VlJC3oh+MO5Q+v2EAUPJv5ZprtF4CiR.mIOXKBOmP25wp145+V4hNTe9kCDHLf03KVnKm7Oi7qWFE5eNS+iKcdV81ldrtxrd.t8VpBpbQ2NBNyDeUGlEEGIVARFCMxSKoOVEO5tXAGeYb84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EuiP+kZRsJQ
                    
                    1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart
                      last edited by

                      Ah, I forgot to make them artificial, that's why the console is complaining:

                      Content.setWidth(200);
                      
                      
                      reg on = 0;
                      
                      reg lastId = 0;
                      reg lastNote = 0;
                      
                      const var GlideTime = Content.addKnob("GlideTime", 0, 0);
                      // [JSON GlideTime]
                      Content.setPropertiesFromJSON("GlideTime", {
                        "min": 10,
                        "max": 100,
                        "mode": "Time",
                        "stepSize": 1,
                        "suffix": " ms"
                      });
                      // [/JSON GlideTime]
                      
                      function onNoteOn()
                      {
                              // This is necessary because the volume fade kills the note
                              // (= adds a artificial note off after the fade)
                      	Message.makeArtificial();
                      	
                      	
                      	if(lastId != 0)
                      	{
                      		local delta = lastNote - Message.getNoteNumber();
                      			
                      		Synth.addPitchFade(lastId, GlideTime.getValue(), -delta, 0);
                      		Synth.addVolumeFade(lastId, GlideTime.getValue(), -100);
                      		
                      		Message.setCoarseDetune(delta);
                      		Message.setGain(-99); // -100 kills it :)
                      		Synth.addPitchFade(Message.getEventId(), GlideTime.getValue(), 0, 0);
                      		Synth.addVolumeFade(Message.getEventId(), GlideTime.getValue(), 0);
                      		
                      	}
                      	
                      	lastNote = Message.getNoteNumber();
                      	lastId = Message.getEventId();
                      }
                      function onNoteOff()
                      {
                      	Message.makeArtificial();
                      	
                      	
                      	if(Synth.getNumPressedKeys() == 0)
                      	{
                      		lastId = 0;
                      	}
                      }
                      function onController()
                      {
                      	
                      }
                      function onTimer()
                      {
                      	
                      }
                      function onControl(number, value)
                      {
                      	
                      }
                      
                      DanHD 1 Reply Last reply Reply Quote 0
                      • M
                        MIDIculous
                        last edited by

                        Need this soo bad. Without it, you can't do any solo instruments, lead synths, solo strings, or any synth soloing stuff at all....I literally have four products with graphics all done in Hise, but can't release without a decent Legato/Portamento/Glide script. @d-healey Seems like he did an amazing job, especially with the added formant functions, which makes it sound so realistic. Unfortunately, all of my apps are paid so the GPL license messes that up.

                        I would be willing to pay for this definitely!

                        1 Reply Last reply Reply Quote 0
                        • M
                          MIDIculous
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart
                            last edited by

                            Can't you use this script as starting point? For synths you don't need the advanced script from David (I think its purpose is to make sampled instrument glides more realistic).

                            1 Reply Last reply Reply Quote 1
                            • DanHD
                              DanH @Christoph Hart
                              last edited by

                              @Christoph-Hart said in What's the easiest way to do *simple* sample glide/legato?:

                              What would be a way to make this script work as is but with Legato + Retrigger? Kind of like merging this script with the hardcoded one in HISE. I've managed to dig out the Legato Hardcoded script from the HISE master files, but don't really know which bits I'd need to try and put together from each script!

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

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

                              46

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              101.9k

                              Posts