HISE Logo Forum
    • Categories
    • Register
    • Login

    Changing Hise Legato To only 2 Octaves???

    Scheduled Pinned Locked Moved Scripting
    52 Posts 4 Posters 2.5k 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.
    • lalalandsynthL
      lalalandsynth @Natan
      last edited by

      @natan Why do you need it legato for only 2 octaves , just curious ?

      https://lalalandaudio.com/

      https://lalalandsynth.com/

      https://www.facebook.com/lalalandsynth

      https://www.facebook.com/lalalandsynth

      1 Reply Last reply Reply Quote 0
      • ulrikU
        ulrik @Natan
        last edited by

        @natan like this?

        if (Message.getNoteNumber() > 47 && Message.getNoteNumber() < 73)
        	{
        		Message.makeArtificial();
        		
        		if (Synth.isLegatoInterval())
        		{
        			if (eventId != -99)
        			{
        				Synth.addVolumeFade(eventId, 10, -100);
        				heldNotes.push(lastNote);
        			}
        		}
        		
        		eventId = Message.getEventId();
        		lastNote = Message.getNoteNumber();
        	}
        

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

        NatanN lalalandsynthL 3 Replies Last reply Reply Quote 0
        • NatanN
          Natan @ulrik
          last edited by

          @ulrik
          Similar To This, Let me Check Yours Thanks Lagend <3

          1 Reply Last reply Reply Quote 0
          • lalalandsynthL
            lalalandsynth @ulrik
            last edited by lalalandsynth

            @ulrik I am being stupid and super rusty in HISE.
            .
            I am unsure of how to name the switch panel in the script processor interface when I dont have access to the component list interface ...that window will only show me the main interface.

            How can I name this panel and set it to allow all callbacks

            ceff5f80-2b74-4edc-9823-6e5e4e013784-image.png

            Can I not reach this window after I have created an interface ?
            4574c903-6a5e-4fc9-ad6d-a9bbc49bb15b-image.png

            https://lalalandaudio.com/

            https://lalalandsynth.com/

            https://www.facebook.com/lalalandsynth

            https://www.facebook.com/lalalandsynth

            ulrikU 1 Reply Last reply Reply Quote 0
            • NatanN
              Natan @ulrik
              last edited by Natan

              @ulrik said in Changing Hise Legato To only 2 Octaves???:

              if (Message.getNoteNumber() > 47 && Message.getNoteNumber() < 73)
              {
              Message.makeArtificial();

                if (Synth.isLegatoInterval())
                {
                	if (eventId != -99)
                	{
                		Synth.addVolumeFade(eventId, 10, -100);
                		heldNotes.push(lastNote);
                	}
                }
                
                eventId = Message.getEventId();
                lastNote = Message.getNoteNumber();
              

              }

              Perfect <3
              :Thanks

              Last Question:

              I Need The Rest Of Notes To Not Trigger The Legato Script.

              Let Say I Hold Note 60 ( Which is In Legato Range )
              and Press Not 24 ( Which is not in Legato Range )

              Note 24 Still Do the legato Thing, I Just Need it To act like Normal.
              And Getting Throw

              EDIT: It Looks LIke It Works :)
              Let Me Investigate More

              lalalandsynthL ulrikU 2 Replies Last reply Reply Quote 1
              • lalalandsynthL
                lalalandsynth @Natan
                last edited by

                @natan Is what is outside the range of your legato playing another sampler ?

                https://lalalandaudio.com/

                https://lalalandsynth.com/

                https://www.facebook.com/lalalandsynth

                https://www.facebook.com/lalalandsynth

                NatanN 1 Reply Last reply Reply Quote 0
                • NatanN
                  Natan @lalalandsynth
                  last edited by

                  @lalalandsynth
                  I Have an Idea to Use The Lower Octaves for Chords, and Bass Usage,

                  lalalandsynthL 1 Reply Last reply Reply Quote 0
                  • lalalandsynthL
                    lalalandsynth @Natan
                    last edited by

                    @natan I see , was just thinking if it is playin different samplers you could just set the range of the one that should be legato. THen it will not see the notes outside of the range

                    https://lalalandaudio.com/

                    https://lalalandsynth.com/

                    https://www.facebook.com/lalalandsynth

                    https://www.facebook.com/lalalandsynth

                    1 Reply Last reply Reply Quote 0
                    • ulrikU
                      ulrik @lalalandsynth
                      last edited by

                      @lalalandsynth you only need the SwitchPnl Callback, you can use a script slider with the the range from 0 - 2 so that you can switch between 0 - Last, 1 - Low and 2 - High

                      There is the paintroutine and mousecallback, you don't need that, just add a script slider and put the code from SwitchPnl inside the sliders callback.
                      Then you have to change all "SwitchPnl" names to the name you declare the slider to.
                      You'll find them in the switch code in Note On & Note Off callbacks

                      Hise Develop branch
                      MacOs 15.3.1, Xcode 16.2
                      http://musikboden.se

                      ulrikU 1 Reply Last reply Reply Quote 1
                      • ulrikU
                        ulrik @Natan
                        last edited by

                        @natan You have to have the same if statement

                        if (Message.getNoteNumber() > 47 && Message.getNoteNumber() < 73)
                        

                        in the Note Off callback as well, the notes are generated in there too

                        Hise Develop branch
                        MacOs 15.3.1, Xcode 16.2
                        http://musikboden.se

                        NatanN 1 Reply Last reply Reply Quote 1
                        • ulrikU
                          ulrik @ulrik
                          last edited by

                          @lalalandsynth here I deleted the panel, commented out the paint routine and mouse callback, added a knob in the legato script with exactly the same callback as the panel, and linked it to a knob in the interface

                          HiseSnippet 2431.3oc6Z0uaabbD+njNiP5zzl.ih9maIJJHcknHkTbbhhp021pVxVPT1o.BtAqtaIuE53tr2sTTrF5cqOB8e6aQdCZmY26SpiTLJxN.ok.Rh2ryr6LyNyuYtc0wARGVXnLvpT4SG0mYU5SsaORn71wixEVGrqUoGaeHqKUIIscB38UjgjWv65cnb3wAbY.WMh77AbxEB44VaOpOMLj4ZUpz7OGkuT4Erze9gmsM0mJbXojrrdqj6vNj2iqRod7luj66uO0kcJuWFtWayCbjhcj9xAftNucSq9TmKncYuhhrMmsUoGrmKWICZqnJVnUoE1V5Npsmbnvv+a4g7y8Y3CsrZCSjg79ReWTiwuasiG2283XeRnkUI6iS8Pya7POx9HtKOgdpm52nGfjJQV+Qo4xqdymS8ZMI0q.UpTFUZAiJ841lMmzQP84g1GHTrfNTvsmUUL7ZU5eZuiDXPnZzidAa+.3gDAp8jlMWj.+p95cFHbTbofHEuRpXuVTqdk2WobkqqPFenNcJbLbYBj99rfBGF2oCllf0DC5cNKXQxkT+ArDFAyOuO8AylO0wX0YXTJNPvUutOK54zfhVErCXE41v8hHMDXUo2I9rnch19bWVfEGljecNRsrzFQ17.q2bvtTEMd5fYFVs9r.EGMpR6xtDxSLazks2kEdgR1Wyau9RApGkd3Lu3WkMkZT1GFxcUdoD9aa5wf77L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qReg8afjUWVG5.eEI7BtvxmKtf4dpTy+Guq+Z9Y6NbtkycubrN1l2quOaOwkLeXqRqieAr2nsyXp4u4lijBYeOof6jcu+DF3s51kEjU2Kzf1Rof29Ikxi17DlOil8JZ9CadHWvnAfehcG8E+3uQ9B2u9c1F0kfIyjeYbsky++lWao4Pz6dDEBTgjbanSy1xAANLPSDBn5BPqzbHjn44l3ylqKT3pe3+.ehFrE9bonAaEO3Gk0nG0IP98NFvZLV9SzT.6Vn+Gqor8Q3yjj+sErsaZtpe9263ft6k.+SwxrxcPlUuCxr1cPlu7NHyStCx7U2AYd5TkAuassFnj8Loh.gi2SWnrTo8DTHRVG0a8eAoqjo7.
                          

                          Hise Develop branch
                          MacOs 15.3.1, Xcode 16.2
                          http://musikboden.se

                          lalalandsynthL 1 Reply Last reply Reply Quote 1
                          • NatanN
                            Natan @ulrik
                            last edited by

                            @ulrik said in Changing Hise Legato To only 2 Octaves???:

                            @natan You have to have the same if statement

                            if (Message.getNoteNumber() > 47 && Message.getNoteNumber() < 73)
                            

                            in the Note Off callback as well, the notes are generated in there too

                            Thank You Ulrik
                            Could you please Give me a Hint, I don't Have Confidence with Midi Scripts.
                            : thanks so Much

                            ulrikU 1 Reply Last reply Reply Quote 0
                            • lalalandsynthL
                              lalalandsynth @ulrik
                              last edited by lalalandsynth

                              @ulrik Thanks mate !

                              Now it works for setting it from the front panel.

                              Did you try this with a sampler ?
                              I get hanging notes on a sampler, looking to see if there is anything else that might cause this, bit of an old project.

                              EDIT: Tested the sample map in a fresh project ,when I play notes with the legato script enabled, I get hanging notes , works fine for the waveform Gen.

                              https://lalalandaudio.com/

                              https://lalalandsynth.com/

                              https://www.facebook.com/lalalandsynth

                              https://www.facebook.com/lalalandsynth

                              ulrikU 2 Replies Last reply Reply Quote 0
                              • ulrikU
                                ulrik @lalalandsynth
                                last edited by

                                @lalalandsynth said in Changing Hise Legato To only 2 Octaves???:

                                @ulrik Thanks mate !

                                Now it works for setting it from the front panel.

                                Did you try this with a sampler ?
                                I get hanging notes on a sampler, looking to see if there is anything else that might cause this, bit of an old project.

                                EDIT: Tested the sample map in a fresh project ,when I play notes with the legato script enabled, I get hanging notes , works fine for the waveform Gen.

                                No I've not tried it with a sampler, I don't understand the difference I think it should work the same.
                                It's the hierarchy the same?

                                Hise Develop branch
                                MacOs 15.3.1, Xcode 16.2
                                http://musikboden.se

                                1 Reply Last reply Reply Quote 0
                                • ulrikU
                                  ulrik @lalalandsynth
                                  last edited by ulrik

                                  @lalalandsynth I think I found the issue. 😀

                                  I had to go into the sampler settings and under "Retrigger", switch the "Kill Note" to what ever and then back to "Kill Note" again. 🤔
                                  I don't know why I had to do that, it's like not all settings are there from the beginning and you had to confirm it by toggling the "Retrigger"

                                  Maybe @d-healey or @Christoph-Hart or someone else, could explain that?

                                  Skärmavbild 2021-11-13 kl. 11.08.21.png

                                  and also you should check that the GUI switch is connected to the "PrioSwitch" in the legato script

                                  Skärmavbild 2021-11-13 kl. 11.10.30.png

                                  Anyway now it's working fine with a sampler as well 🎉

                                  Hise Develop branch
                                  MacOs 15.3.1, Xcode 16.2
                                  http://musikboden.se

                                  lalalandsynthL 1 Reply Last reply Reply Quote 1
                                  • ulrikU
                                    ulrik @Natan
                                    last edited by

                                    @natan can you show what you've tried so far?

                                    Hise Develop branch
                                    MacOs 15.3.1, Xcode 16.2
                                    http://musikboden.se

                                    1 Reply Last reply Reply Quote 0
                                    • lalalandsynthL
                                      lalalandsynth @ulrik
                                      last edited by lalalandsynth

                                      @ulrik Gamechanger ! Thanks !!!
                                      My Logan String Melody works now !

                                      Question 1: In some cases you would not want the retriggering to happen, I wonder if that is a sampler setting or needs any programming , i tried the playback settings and could not get it to stop the retrigger.

                                      For example on the Logan there are 2 monophonic bass sounds.
                                      On of them is sustained and needs the monophonic retriggering.
                                      But one of them has a short decay and should not retrigger ( at least that is what I think for the moment , would have to go to the shop and test ) Will do that in a couple of hours.

                                      Just thinking out loud as I can imagine that being needed for other analog emu´s.

                                      Question 2:

                                      When it does not play the sound the console throws up this error.
                                      "legato:! onNoteOff() - Line 7, column 32: NoteOn with ID1280 wasn't found "
                                      Thinking if that would cause any problems in an exported problem if its perceived as an error ?

                                      https://lalalandaudio.com/

                                      https://lalalandsynth.com/

                                      https://www.facebook.com/lalalandsynth

                                      https://www.facebook.com/lalalandsynth

                                      ulrikU 3 Replies Last reply Reply Quote 0
                                      • ulrikU
                                        ulrik @lalalandsynth
                                        last edited by

                                        @lalalandsynth said in Changing Hise Legato To only 2 Octaves???:

                                        When it does not play the sound the console throws up this error.
                                        "legato:! onNoteOff() - Line 7, column 32: NoteOn with ID1280 wasn't found "

                                        Hmm, I don't get that here, I'll investigate

                                        Hise Develop branch
                                        MacOs 15.3.1, Xcode 16.2
                                        http://musikboden.se

                                        1 Reply Last reply Reply Quote 0
                                        • ulrikU
                                          ulrik @lalalandsynth
                                          last edited by

                                          @lalalandsynth said in Changing Hise Legato To only 2 Octaves???:

                                          Question 1: In some cases you would not want the retriggering to happen, I wonder if that is a sampler setting or needs any programming , i tried the playback settings and could not get it to stop the retrigger.

                                          I think it would be scriptable, if you have a retrigger button and read its value inside all the cases in Note Off CB maybe?

                                          like this:

                                          case 2:
                                          				var highest = getHighestNote();	// highest held key
                                          				
                                          				if (highest == playedNote || !Retrigger.getValue())
                                          				{
                                          					Message.ignoreEvent(true);
                                          					break;
                                          				}
                                          				
                                          				var eventId = Synth.addNoteOn(1, highest, 64, 0);
                                          				midiList.setValue(highest, eventId);
                                          				playedNote = highest;
                                          				break;
                                          

                                          Hise Develop branch
                                          MacOs 15.3.1, Xcode 16.2
                                          http://musikboden.se

                                          1 Reply Last reply Reply Quote 0
                                          • ulrikU
                                            ulrik @lalalandsynth
                                            last edited by

                                            @lalalandsynth said in Changing Hise Legato To only 2 Octaves???:

                                            But one of them has a short decay and should not retrigger

                                            Could you describe how it's working, what will happen with held keys, what will happen when held keys (not sounding) is released?

                                            Hise Develop branch
                                            MacOs 15.3.1, Xcode 16.2
                                            http://musikboden.se

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

                                            30

                                            Online

                                            1.8k

                                            Users

                                            12.1k

                                            Topics

                                            105.7k

                                            Posts