Forum

    • Register
    • Login
    • Search
    • Categories

    Tagging notes

    General Questions
    2
    7
    25
    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.
    • Lindon
      Lindon last edited by Lindon

      is there a way to "tag" a note with data (like there is in Kontakt) so I can interogate it later.

      Yes I know there's isArtificial() but I wanted something where I could add a value (or set of values) to a note to track which key-trigger note created it...

      HISE Development for hire.
      www.channelrobot.com

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

        @Lindon Can't you use an object for this?

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

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

          @d-healey said in Tagging notes:

          @Lindon Can't you use an object for this?

          in what way? - Im doing this:

          for(n = 0; n< 5; n++)
                      {
                          nid = Synth.addNoteOn(1, ChordPlayer.chordPadArray[pos].data.chord[n], Message.getVelocity(), ChordPlayer.chordPadArray[pos].data.strumLength * n);
                          ChordPlayer.playingEvents[pos].push(nid);
                      }
          

          So this generates a strum....by delaying each note creation by a fixed amount, but....

          If the note off event happens before the strum is complete I get hanging notes...

          So to be clear this strum could be any set of notes, and the note off has no idea if the note is part of the strum or not, and doesnt know what the trigger note was...

          HISE Development for hire.
          www.channelrobot.com

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

            @Lindon For my guitar engine I'm just using the standard Synth.playNote() within a timer. I store the note IDs in a 6 element array (one per string)

            I only allow one note per guitar string, so if a second note is triggered on the same string I turn off the old one.

            When the key is released I turn off all strummed notes.

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

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

              @d-healey said in Tagging notes:

              @Lindon For my guitar engine I'm just using the standard Synth.playNote() within a timer. I store the note IDs in a 6 element array (one per string)

              I only allow one note per guitar string, so if a second note is triggered on the same string I turn off the old one.

              When the key is released I turn off all strummed notes.

              Sounds good - for you. Im doing a chord player - with 12 trigger notes, each trigger has a chord assigned, each trigger can strum the chord - so there may well be a lot of notes passing downstream - all I want to do is attach the trigger value to each note - then later I can ignore it if the trigger note is no longer held.

              So with your solution I'd need 12 timers... very very messy.

              It's annoying because this is trivially simple in KSP...

              HISE Development for hire.
              www.channelrobot.com

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

                @Lindon

                So with your solution I'd need 12 timers... very very messy.

                You make a script that takes a trigger note and generates a strum. You insert 12 instances of that script and set each one to use a different trigger note.

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

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

                  @d-healey actually I thin k I have a solution - just do the same thing in reverse using Synth.addNoteOff

                   for (n=0; n < ChordPlayer.playingEvents[pos].length; n++)
                             {
                                 Synth.addNoteOff(1, ChordPlayer.chordPadArray[pos].data.chord[n], ChordPlayer.chordPadArray[pos].data.strumLength * n);
                                 ChordPlayer.playingEvents[pos][n] = -1;
                  
                             };
                  

                  HISE Development for hire.
                  www.channelrobot.com

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

                  14
                  Online

                  982
                  Users

                  6.6k
                  Topics

                  60.8k
                  Posts