HISE Logo Forum
    • Categories
    • Register
    • Login

    Make the Gain knob smooth the gain?

    Scheduled Pinned Locked Moved General Questions
    77 Posts 3 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.
    • ChazroxC
      Chazrox @CatABC
      last edited by Chazrox

      @CatABC I would script a UI button with 3 discrete stops. This knob will control your paramter knob from your scriptnode. Make sure the parameter knob in scriptnode is also set from 0-3 with stepsize 1.0. Changed the fader node to switch mode. Add a value ramp/smoothing node in between the faders mod outputs and the target gain knobs for each sampler. It should trigger the faders values either 1-2-3 to smoothly fade between one another. The part you have to script is what midi keys trigger each value of your parameter knob. Sorry if this is sloppy, this is off the top of my head without making a snippet example.

      • based on the example I gave you above.

      Honestly have a look at the scriptnode list in the documentation. You can really get crazy with the cheeze wiz if you see whats available.

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

        @d-healey I thought that if working between multiple generators, each generator should have separate controls, maybe I'm wrong?

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

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

          I need to rethink my thinking. What I want to do is to use KS to split a note.
          1.png

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

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

            @CatABC said in Make the Gain knob smooth the gain?:

            @d-healey I thought that if working between multiple generators, each generator should have separate controls, maybe I'm wrong?

            I don't think it's needed for this use case because we want to work with both as a single unit. You might even only need one sampler, depending on how many samples you have and how you want to map them.

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

            1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox @CatABC
              last edited by

              @CatABC said in Make the Gain knob smooth the gain?:

              I need to rethink my thinking

              I really think you do.

              And

              Link Preview Image
              HISE | Introduction

              An introduction to HISE

              favicon

              (docs.hise.dev)

              👍

              CatABCC 1 Reply Last reply Reply Quote 0
              • CatABCC
                CatABC @Chazrox
                last edited by

                @Chazrox Yes, I have searched the HISE documentation many times, but because I am a novice, I don’t know how to use many APIs, and I am crying because of my stupidity.😂

                //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 said in Make the Gain knob smooth the gain?:

                  crying because of my stupidity

                  You're not stupid. We all start at the beginning. Everything is hard until it becomes easy. Keep going.

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

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

                    @d-healey

                    Thanks for the encouragement David,Please teach me again, when I trigger the second C#0, how can I add a fade-out to the note that responded to the first time?

                    a0dfdeab-6679-4c8b-9e2c-14fb7881e3e3-QQ_1752058364900.png

                    //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 Replace the Synth.noteOff with Synth.addVolumeFade - set the volume to -100 and that will also turn the note off.

                      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 think I have it working. Next I need to move on to multiple generators to test!
                        Thank you so much for your teaching ,David, I love you😘

                        function onNoteOn()
                        {
                        	local n = Message.getNoteNumber();
                        	
                        	if (n == ks)
                        	{
                        		if (eventIds.getValue(lastNote) != -99)
                        		{
                        			 Synth.noteOffByEventId(eventIds.getValue(lastNote));
                        		}
                        	
                        		if (Synth.isKeyDown(lastNote))
                        			eventIds.setValue(lastNote, Synth.playNote(lastNote, Message.getVelocity()));		
                        		
                        	
                        		return Message.ignoreEvent(true);
                        	}
                        	if (n == 25)
                        		{	 
                        			if (eventIds.getValue(lastNote) != -99)
                        				{
                        					Synth.addVolumeFade(eventIds.getValue(lastNote), 500, -100);
                        				}
                        			return Message.ignoreEvent(true);
                        		}
                        	lastNote = n;
                        	eventIds.setValue(n, Message.makeArtificial());	
                        
                        }
                        

                        //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 Looks like it's almost there. But you have added that n == 25 block. If 25 is your keyswitch then you should be using the code I put already above that and just replace the noteOff with the volumeFade. No need for the extra block.

                          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 tried to replace it directly, but it brought some problems, such as the note received the new KS and the previous note could not be stopped.

                            //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 said in Make the Gain knob smooth the gain?:

                              I tried to replace it directly, but it brought some problems, such as the note received the new KS and the previous note could not be stopped.

                              Show me what you tried, we do it all one step at a time.

                              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

                                When I do this, there will be errors like this, addVolumeFade seems to be invalid on the second KS

                                function onNoteOn()
                                {
                                	local n = Message.getNoteNumber();
                                	
                                	if (n == ks)
                                	{
                                	
                                
                                		if (eventIds.getValue(lastNote) != -99)
                                		{
                                			 //Synth.noteOffByEventId(eventIds.getValue(lastNote));
                                			 Synth.addVolumeFade(eventIds.getValue(lastNote), 500, -100);
                                		}
                                	
                                		if (Synth.isKeyDown(lastNote))
                                			eventIds.setValue(lastNote, Synth.playNote(lastNote, Message.getVelocity()));		
                                		
                                	
                                		return Message.ignoreEvent(true);
                                	}
                                	
                                	lastNote = n;
                                	eventIds.setValue(n, Message.makeArtificial());	
                                
                                onNoteOn() - Line 12, column 24: NoteOn with ID173 wasn't found 
                                onNoteOn() - Line 12, column 24: NoteOn with ID178 wasn't found
                                

                                //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 Working here

                                  HiseSnippet 1152.3oc2W01aaaCDlJNZXxcqXcnXXeTCaevdHMvJwwMFAAMu4zYz3Fi3zz8sBVpS1DQhTihJaFC4+39oz+AaGk7KRItYoFqCqyevv73c7d38xCO2WIYPRhTQrpd93XfX8E1CFKziNbDkKHcOhX8P6dzDMnbyEcv3XZRB3Srrp7bi.KmUIYed2yNfFRELXtHB4BImAmvi354R6u2K3ggGS8gy4QEzt4dcYRwgxPYJhmJ1MHwT1kzgvKoF0Vwl7SzjQDqezdqM1j0z+o9arwVsawnsf1Azf.uM8a1r01s81rMs41sfFaQr9rN9bsTMPS0PBwZ0Cj9iGLR9qhbGbAOg+1PvrviL.8bt3ikg9lqnQJ4vQ7P+9SCTIDhkc+4gsJ4gsGa2i6ymIed36qx1vctEECfVqTFdUJAOuhvqQA3s.HYU.RqlCoGYOfo3w546XvyCr6JvrY.EySEgRttjU99J1GJQMD50inWBGqvEyrnVqFMVyE+p9NUqh4pDs6kIt65tQyYqgqPS65aj1QLjKf0YJ.uclnvI7DcMzzo5rd.VGT6IsaaNNELzMDqzdoTC6DjJXZtT3JEl0mJpUu5uW0ITxngtB7r6g2HrxX8gPlAuLM5sfxb1NUc3At0Pc1EwV8pNnYYRl4TzjKngoPsodqt62sqqAEnlFscx5.Vm56egLLMBLUp2k4q4tkIr7Dur3hiy0Um3x7ygm7BX7QXNctEFO4L6DSt4Itlatkwgzwl0E1nv89B.CGb83Z0qWeGGGiSUfNUIloDenPpfNF+TSqRAC5t1DglddXfTfxtMRDy8joJXeklGvYbZH5LyUr50UcuYNJH3CMIc6XpnPtvjJxiCh7i+fwcxMXgFle4JiKSkrRFFZ7pAZ2XaC8yh2Yhg0DYPdM2qLNYlhXKV49V62eeaQZEVdiUAEkhtBt9zXP79HaHS5Fwe8ptGQ0TSy9DYndw.lZLPv5H3JjpMu02w9HH4RsLFIauEu.xHI8SCo5xzTFx7IafwfRbCl9eQBVpUjr+eLtq6KDejcetlMZwXbkEfQLR8w.iSX7+R6NAA.SOGfqZe7O+wgdun6eXt6ef8.jbMq+Hy4eS1Z2WSuBbeNH.kI34cGOW+G22mqiu2OWeJSit+bEUjDKSJcvCfH94RgIJLW3qRv2Wfe4LS1rn7CkT0B25cO6X7RtPaFPQpurxh8ijoBcoxfJ20T.dK4T.q9eto.9DnYuzfJNSw3.dTbHzQbE9jFJwfwuFovBnog5oRKWK2SJjwijBNqXh9LPq3CGBphXegWn80Zb1x4Rd7dmAg.sXQ6Or2IXwFUgwIXIiEdevCssv702ZmCWWSCn6mtjzU9+MI8YxTMWLrGEKB+Mbn.bdmAH2HCPuKDPnYPAqUL7a4qaXVmSNJ7yV7m3mIa5YVaMYSuoa9uhOhnLk7Mr7QfL0oedlD7dKx9iXN3+HDW65QxFKpXtLBY4dCiU9ntkgarrFt4xZXyk0vsVVCasrF9zk0vs+6Mz7Hz9oZYTdqIgzqemrYJsr5HnXUdVGA4u.bWGmC
                                  

                                  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 After playing it once completely, the MIDI will start to display when you play it again.

                                     onNoteOn() - Line 9, column 23: NoteOn with ID5 wasn't found 
                                    

                                    5c3f5916-44de-468f-b62b-203be5d15b5f-QQ_1752248899919.png

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

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

                                      @d-healey However, this error does not seem to affect what happened

                                      //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 d.healey

                                        @CatABC Is there a reason you are triggering the keyswitch and E2 at the same time?

                                        We need to reset the stored event ID in note off.

                                        HiseSnippet 1160.3oc2W01aaaCDlJNZXxcqXcnXXeTCXevdHMvxwwMFAAMuXmNiFmXDmlsuUvRcxlHRjZRTYyXH+G2Ok9OX6njskThaVpw5v57GLLOdGuGdu7vyCijLHNVFQLpdwzPfX7ElilJTSNZBkKH86RLdr4.ZrBhryDc3zPZbL3RLLp7Rs.Cq0Ioed2KNj5SELHWDgbojyfS3AbUtzg6+Jtu+wTW3BdPAsaseelTbjzWlf3ohYCRHkcEcLbJUq1ZljejFOgX7Cla2bKVK2m61r41cZynsgNdTOOmsba0p8Ncb1pCs0NsgFaSL9rdtbkLZjhpfXhw5GJcmNZh7WEYN3RdL+s9fdgCYD54LwGK8c0WQsTxQS39tCmGnhIDCyg4gsJYgsmZNf6xWHOO78UoaXmaQw.nwZkgWkRvyoH7ZT.dKARFEfz5YP5IliXQ7PU9NZ77Hy9BLa5Qw7TQnjoKYstULORhZHTaFPuBNNBWrvhZsazXCa7q56VsJlqhU1WEaumcyVKVCWil12UKsmXLW.axh.71oiBmviU0PSmqyldXcPsm0oi93hfw19Xk1oREfF2XWuDASwkBaoPK6LQs5U+8pV9RF02VfpL.uUX0wligTiNMI3sPj97spZw8rqg5rGhu5UsPyRkrvwnIWR8SfZy8Xc6uaOaMRPM0Zak1ErI008RoeR.nqVuOy2vdacn4YNowFKqapNykYmCO9UvztXdM2BsmrVbhw29D2vNyxPe5T85BaT3deIfgCtZZs50quqkk1oQfJIRrPI9XgLB5o8SMUTBnQ2M5HTgXs.kcWjHx8jtR3fHE2iy3TezY5qX0apZe6bjm2GZR5twTQgbgNUjEGDYG+gS6kYvRMLEWK8ljUjg27xfVWpGI880PRi6assleZ46LyvZhz6yF1WqczBEwdvxM1lu+F6h7NrrNuBJJE8Eb0Ygf38wFQl0th+5086RUTMavLYndg.l2zPvnKbMxEmwMXY1EhuRICQ136PbfTVR2DeppLOllse1FXLnD4glfPDi0gEeM3eLxsGJDeh4PthMY4XbskfQLR8w.iydR3KM644ALUN.W273e9iC+eQ2+3L2+HyQH6aZySpy+lz01+D8Zv9kf.hzAOm6487+3g9dd3C987yXJz8WDQEwgx3RG7HHfegTniB4BecL9.D7KmqylEkejjFszsd2KNFujK0lQTjWLsr3f.YhPUpLnx8MlfyJNlv5+maLgOAZ1KMIi0bLNhGD5C8DWiu2gRzX7qQJLOZhuZtzx0xCjBY3DofyJlnOGTQ7wignhXeoWnCTJb3ybIOc+yAefVrn862+DrXiFgwIXEiENevS0sz702ZlAWacCn8mtjzU9+MI84xDEWLd.EKB+Mbn.bXnQH2HCPuKDfudPAi0z7aYqanWmQNJbSW7m3mYa5nWaLaSm4a9uhOBnrH4aXYi.oqS+7TI38Vj9O0rv+xHt11gjNVTwbY.xx8FFq7QcGCatpFt0pZXqU0vsWUCaupF97U0vc96MT+HzAIJYPVqIgLXXuzYJML5InXUdZGA4u.rTF5YI
                                        

                                        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 C0 will be a KeySwitch, and I will have many other keyswitch involved after this, so I need to trigger a KS first to ensure it is the articulation of C0

                                          //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 I see, that makes sense.

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

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

                                            27

                                            Online

                                            1.8k

                                            Users

                                            12.1k

                                            Topics

                                            105.8k

                                            Posts