HISE Logo Forum
    • Categories
    • Register
    • Login

    fix idea for poly glide script? (it holds this note only)

    Scheduled Pinned Locked Moved General Questions
    5 Posts 2 Posters 425 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.
    • StraticahS
      Straticah
      last edited by

      The bug or unwanted behaviour is that only when MIDI notes of same pitch overlap - it holds the note for infinite. (freezes it)

      Hey there i am using a MIDI-Processor script that bends MIDI notes.
      Simmilar to a pitch Envelope.

      reg midiList = Engine.createMidiList();
      
      const time = Content.addKnob("time", 0, 0);
      const amount = Content.addKnob("amount", 130, 0);
      
      time.setMode("Time");
      amount.set("min", -12);
      amount.set("max", 12);
      amount.set("stepSize", 1.0);
      amount.set("suffix", "st");
      

      fb18b81e-bcf6-4995-a74c-b26f661d372d-image.png

      Any ideas are welcome - i am not experienced using the MIDI-Processor!

      creating user interfaces: www.vst-design.com
      founder @prototype.audio https://www.prototype.audio/

      HISEnbergH 1 Reply Last reply Reply Quote 0
      • HISEnbergH
        HISEnberg @Straticah
        last edited by

        @Straticah What does your NoteOff look like? It probably doesn't have enough time to register before hitting your NoteOn again. You may need to write some type of exception:

        // Pseudo Code
        if (lastNote == currentNote)
        {
             triggnerNoteOff
        }
        
        StraticahS 1 Reply Last reply Reply Quote 1
        • StraticahS
          Straticah @HISEnberg
          last edited by

          @HISEnberg both look like this:

          function onNoteOn()
          {
          	Message.ignoreEvent(true);
          
          	local nn = Message.getNoteNumber();
          	
          	local id = Synth.addNoteOn(1, time.getValue() ? nn + amount.getValue() : nn, Message.getVelocity(), 0);
          	midiList.setValue(nn, id);
          	
          	if (time.getValue())
          		Synth.addPitchFade(id, time.getValue(), - amount.getValue(), 0);
          }
          
          function onNoteOff()
          {
          	Synth.noteOffByEventId(midiList.getValue(Message.getNoteNumber()));
          }
          
          // Should i try like this?
          
          if (lastNote == currentNote)
          {
               triggnerNoteOff
          }
          

          creating user interfaces: www.vst-design.com
          founder @prototype.audio https://www.prototype.audio/

          HISEnbergH 1 Reply Last reply Reply Quote 0
          • HISEnbergH
            HISEnberg @Straticah
            last edited by

            @Straticah Ah I see. Is this the whole script? It would be easier to test a snippet.

            I think the issue may be in the NoteOn actually. What happens in your example is when the second chord plays G5 it overwrites the first G5's event ID. So when the first chord releases, it can't find the original G5 eventID to turn off (and plays forever).

            So you might need another variable like existingId and use it to kill any notes that already exist.

            Do you have a minimal snippet?

            StraticahS 1 Reply Last reply Reply Quote 1
            • StraticahS
              Straticah @HISEnberg
              last edited by

              @HISEnberg Yes, here is the script in a minimal setup :)

              HiseSnippet 1442.3oc4X07baSDEWxNalX2RmVlxTNpIvAYHjwxIMIPGl3lDm1LstwTGR4VYszJ6cpztZjVGpggYX3D23OI5QNxL7O.24BG3N7VsR1RNJNdb+fAvGxn8su2t+1euO12lNgbaRTDOTSu5IiBHZ5WE0cDSLX+AXJS6nCzzuFpMNRPBMTh1aT.NJh3noqW9dRA5UVRK92er6dXOLylLQjl1obpM4gTepXhzNMe.0y6PrC4DpeFs2r4Q1b19bO9P.OkQ00Bv1OC2m7HrTsRHs6iiFno+AHRO7lttMZr0l02BS1YidMrrcI81hrs8NaX+w81d6FN8buMXzxsbnBdXWAVPhzzWZOtyntC3eESsAmRin87HxAVZcgcVI9Ptmi7HJ+Va+ATOmNoDUjllNpyDZqrh1tIpM0gNV9D565wSXLwhrDndo7vqbN3YcQvq.HUJCjVRAoaf5ZGRCDSlQhmqfNhAdSWL3mxBEktZ5u.sOGTfIV2G+LxggvfwFXtU85qY.+o1cbGxrETNyfydDWPNlYVq52TsR0uspwzS45V3bxsIj64QBKbZYnQ3rLzjMzuGIbMiyvdCIiUDN944zkmON0VcpynHmcDiJNNfjLdRPgUAd.sDZC95yO5.r.CNE8DYfdAjPAUBG8CHmAoDJWTEzAjnmI3APRwb5+VAcOOpCwpHmWITYTHougODw8PZjv3SMZw5SYj0sCI.azNQtYs6TsJbfAMD.MCpk5ywNNO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3isC4O0V8tAYAiUhk.maV7+trJn1xwFVS+dg3V2oO01N+RcNCarnFtwhZ3lKpg2dQMbqE0vsWTC24xMT1YvcGJ39p7DncoNsheemttpSo3TFs+FfzGtmB
              

              creating user interfaces: www.vst-design.com
              founder @prototype.audio https://www.prototype.audio/

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

              18

              Online

              2.0k

              Users

              12.7k

              Topics

              109.9k

              Posts