HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. CatABC
    3. Posts
    • Profile
    • Following 2
    • Followers 0
    • Topics 77
    • Posts 261
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Make the Gain knob smooth the gain?

      @d-healey
      I used something like this to prevent lastNote from being triggered when only ks is pressed. Now, I tried adding VolumeFade to the old events, but this doesn't seem to work

      function onNoteOn()
      {
      	local n = Message.getNoteNumber();
      	
      	if (n == ks)
      	{
      	
      
      		if (Synth.getNumPressedKeys() > 1 && lastNote >= 0 && eventIds.getValue(lastNote) != -99)
      		{
      			//Synth.noteOffByEventId(eventIds.getValue(lastNote));
      			Synth.addVolumeFade(eventIds.getValue(lastNote), 2000, -99);
      			
      			eventIds.setValue(lastNote, Synth.playNote(lastNote, Message.getVelocity()));
      		}
      	
      		return Message.ignoreEvent(true);
      	}
      	
      	lastNote = n;
      			
      	eventIds.setValue(n, Message.makeArtificial());	
      
      
      }	
      
      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey This seems to be back to the HISE snippet I provided at the beginning😲

      function onNoteOn()
      {
      	local n = Message.getNoteNumber();
      	
      	local v = Message.getVelocity();
      
      	Message.ignoreEvent(true);
      	
      	for (i = 0; i < 127; i++) {
      			
      	       // turn off previous event
      	       local e = eventIds.getValue(i);
      	       	       
      	       if (e != -1)
      	           Synth.noteOffByEventId(e);
      		//Synth.addVolumeFade(e, 2000, -90);
      	       // play new note if key is down
      	       if (Synth.isKeyDown(i)) {
      		       
      	           local newNote = Synth.addNoteOn(1, i, v, 0);
      	           eventIds.setValue(i, newNote);
      	       }
      	       
      	   }
      
      }
      

      I don't know where to put Synth.addVolumeFade(); to make it succeed

      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @Chazrox This looks like a good choice. I tried it, but there is a problem. When KeySwitch is triggered, it requires the Fade knob to automatically and smoothly go from 0 to 1. How can I control it?

      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey
      I tested your snippet, but in this case the second C0 triggers the playing of C2 again, is it possible to not trigger the playing note when there is no note above?

      a148739a-fa1d-45fb-b89f-0de9484836c3-image.png

      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey

      Synth.playNote(60, 20);
      

      The 60 here should be the note that was pressed before,

      Synth.playNote("eventIds's note", 20);
      

      I can't stop the artificial notes

      
      function onNoteOn()
      {
      	
      	if(eventIds != -1)
      	{
      		Synth.noteOffByEventId(eventIds);
      	}	
      	eventIds = Message.getEventId();
      
      	if (Message.getNoteNumber() == 36)
      	{
      		
      		Message.ignoreEvent(true);	
      		
      		Synth.playNote(60, 20);
      		
      	}
      
      }
      
      function onNoteOff()
      {
      
      
      	if(Message.getEventId() == eventIds || Message.getEventId() == Message.makeArtificial())
      	{
      		eventIds = -1;
      	}
      	
      	
      }
       
       
      

      5505e20b-18d0-4802-82b3-4495df412210-image.png
      In this case, the D3 note cannot be turned off

      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey
      When I use Message.getEventId();, and play two different notes, the previous note does not close.And I don't know how to convert the events into notes🤡

      function onNoteOn()
      {
      	if(eventIds != -1)
      	{
      		Synth.noteOffByEventId(eventIds);
      	}	
      	eventIds = Message.makeArtificial();
      
      	if (Message.getNoteNumber() == 36)
      	{
      		
      		Message.ignoreEvent(true);	
      		Synth.playNote(60, 20);
      	}
      	
      }
      function onNoteOff()
      {
      	if(Message.makeArtificial() == eventIds)
      	{
      		eventIds = -1;
      	}
      
      	if(Message.makeArtificial() == 0)
      	{
      		Engine.allNotesOff();
      	}
      	
      }
      
      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey
      This is my method using only one Sampler, I used artificial notes

      HiseSnippet 1352.3oc4Ws0aaTDEdVaOHrSnkhpP73REOjhJQdcb7EPQ04hcZTqaCYcaAwCUS1cV6QY8LK6NaRrphTE+R3m.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aycy36ZktBlJ7FMvfVmB2Xvky1OUM0IU.TOMSSLUiJdDSNJ6To4axVX4Zx91mArrv8V3iUiMWLdys.7BUf+Si2zQVeBtsmG7ZOErEvc9g257o26P4FZnrF1lwoICBR.xmmPa9bnRx7PJmFpBpVW2tGl+zu+aK6tGAK8tG5B4dPQWTfHZlC1lNj0CZ6Ekkop7Hj9yI0hY4uOTWrPQu99cfK4BswlHiCSRW1cnHlKmI8H+R+l7NrRSg+cuRS9w4IJO2MFVGIAIqOkd1ri4CR4WtfzaaBoQtz41fp5Qc2HcT2dwRITXqFxcCLqOWDRSYkLYO6iGZINiah8XWZKicNSs+RzBNjOXsJe+73UbLFsYCC7os4mS8gcKRv3mgSmvMl6ruicEbQv.Am4jM.bBUFx52mFlE6K7BsqTBiHmx41sNg5SIYKm+pVOBJCIgpAjqXrv5cd27E9d8EXMbMUslL+uwHt7++bD2IhX0ltcIPhJrnKF1GzFlr3PS25QsVuQNU+.McYEsdzB2Mg3OguTgVJZiTgViE9AwGCINghW3naZoxk+3DNv8lm7axKh6pnMsdytTCgNyuvwY1i5MLrxpZ3VqpgUWUC2dUMr1pZX8U0vF+8FpFbtaL7yNzkrHDrUdxOxwvnMm.Y7IUGn+Bn0aimN
      
      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey When I only use one Sampler, it can achieve that when the second note appears, the previous note will no longer sound, but when I add a second Sampler, it needs to be triggered at the same time with the KeySwitch below, which makes the script completely illogical and gives me a headache.

      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey
      Thanks David, I tried a lot and I'm now clueless again,
      I think my logic is very confusing now. I hope to complete the KeySwitch switching on an uninterrupted note. When the new KeySwitch enters, fade out the sample of the previous Sampler and fade in the sample of the new Sampler. I hope that the faded-in sample is played from the beginning.
      Keyswitch.png

      so I made a snippet, could you help me with this?

      HiseSnippet 2326.3oc6aszaajbDdFJM1lzO1GYQPPNDzQHGnhYnHodGkEV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UGseQjiBZ5KT6DvvRU0DAMO7Oh5yLyPfSTv72rIw0CnzJ55qVPDnjMSWWGlkIruGOBEzvpJiVRH1PWdQVvbG1QrjOZ+B5hjheTUFwUE3rdu5J6TTgb3SJ3gbIIb5oDr+nQOl1iv7I1PnY5ISYVlOvAaSPIfF0pMwLq.OXMzaG8ZIPMZgd+pkHLnpHUoboFYzh0OZwVpugR12yvsF3a3K3G.+CpLv9FavEBd1PpBrPXXAOcXQxJUg5OGly8BaVb7Eoxew0EGABppv2SUcZ7tppyQkbZrpt68GWrIxFghK4UVy2GiMXcbcn04m.oP.IHF+TivRp5KMcltcEbgaaAmYkLQ5ynROVqVTujXefKn0jRnlrXIe1pOiBY9RxW3Wr5NPxRSucC31OV9hpY2WLp8qehgBtjf2K65AG5I9vjC8yDcwGTYWSHPEJAy.xL1.ntZQCKyFyunmCyDnZWAaq3txsCZfu+QnxpXa8PkU6qbb4oWaX7z+c+1m+29PgmNbjYhwJc+P4oeIjhuVwYu1O.3r+lG88Mm8ZCjy9+MmA4JRZmbAV6C4O1wkxWOegQwWejz0ggdUIqmUt5CjpdFYpmBVijj9kyQeroneEXnGSPOev2i3u1x6UZ12vw9CHN10tgi8Mbrugi8Uii8cTK2aa7TAyu+AqfeOCuAN4k+i+56dt0uq4vt2ITuSXzS+PhK6r2vkMCbYmcfbYm3cv6OO9u870Npr3aNeckMaFe13qLi1a3zdCm1.oydCm1qSbZycCm1uq3z99XN5XZ4I9FKUlSLV9NARf0MO3+sB4M1EaSpdQVJc.9BeikUZScgAVabG3ri6.mabG37i6.WXbG3hi6.W5xGHRmastRQG0QVMsc2udvUQ5504HWofSGZ+OhPWPzA
      
      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey Emmm, forgive my stupidity, I don't know how to use it. Should it be in the ScriptProcessor of Sampler1 or in the ScriptProcessor of Sampler2? How can it fade out the samples of Sampler1?

      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey Or is there any other way to Xfade?

      posted in General Questions
      CatABCC
      CatABC
    • RE: Make the Gain knob smooth the gain?

      @d-healey
      I use code control. When the keyswitch is triggered, I need to slowly decay the volume of Sampler1 to -100 and slowly increase the volume of Sampler2 to 0.

      function onNoteOn()
      {
      for (i = 0; i < 4; i++)
      	{	
      	       ksGain[i].setAttribute(ksGain[i].Gain, -100);
      	}
      ksGain[0].setAttribute(ksGain[0].Gain, 0);	
      }
      
      posted in General Questions
      CatABCC
      CatABC
    • Make the Gain knob smooth the gain?

      hey guys, i want to make the value of this knob smoothly gain from -100 to 0 (-100, -99, -98...-2,-1,0) instead of going directly from -100 to 0, how should i do it?

      4032ac6c-a12c-4f14-94b8-b30f3d75243b-image.png

      posted in General Questions
      CatABCC
      CatABC
    • RE: How to use KeySwitch to trigger sampling?

      @dannytaurus Thanks for paying attention to my question. I am still working on it. I will break down my logic:

      1. I mapped KeySwitch to C0-B0, default key position (such as C0 Sustain)
      2. Write a note C3 in the MIDI track
      3. Start playing C3 of Sustain
      4. The C3 note continues, and I write a KeySwitch on D0 (D0 is Tremolo)
      5. The sample of Sustain fades out, and the sample of Tremolo enters
      6. All MIDI ends, and the KeySwitch stays at Tremolo of D0. When there is no new KeySwitch trigger, the notes written afterwards are all "Tremolo"
      posted in General Questions
      CatABCC
      CatABC
    • RE: How to use KeySwitch to trigger sampling?

      @d-healey
      Can I set it, set it to 0 in onNoteOn, but I don't know how
      e1428a85-9cb3-4f7a-9851-f6ed76621609-image.png

      posted in General Questions
      CatABCC
      CatABC
    • RE: How to use KeySwitch to trigger sampling?

      @d-healey Yes, I want each articulation to start from 0

      posted in General Questions
      CatABCC
      CatABC
    • RE: How to use KeySwitch to trigger sampling?

      @d-healey Yes, I mean when I switch to the second articulation, the sample of the second articulation does not start playing from the beginning

      posted in General Questions
      CatABCC
      CatABC
    • RE: How to use KeySwitch to trigger sampling?

      @Chazrox Ah, I don't quite understand what you mean. I'm making a bowed string instrument and I want to be able to use KeySwitch to transition between multiple articulations on a single MIDI note.

      posted in General Questions
      CatABCC
      CatABC
    • RE: How to use KeySwitch to trigger sampling?

      @d-healey I tried this, but when I switch to the second Sampler, the sample does not start playing from the beginning. What do I need to do to make the sample I switch to play from the beginning?

      posted in General Questions
      CatABCC
      CatABC
    • RE: Sampling multiple velocity layers, how to evenly drop the velocity?

      @Orvillain yes,I already understand the design of HISE, it is more free than Kontakt!😻

      posted in General Questions
      CatABCC
      CatABC