HISE Logo Forum
    • Categories
    • Register
    • Login

    AllNotesOff and playnote

    Scheduled Pinned Locked Moved General Questions
    15 Posts 2 Posters 497 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.
    • d.healeyD
      d.healey @Lindon
      last edited by

      @Lindon I've brought the numPressedKeys issue up before. In my opinion it should be a counter of the number of keys that are pressed but it's not. My solution is to add my own counter as a global variable.

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

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

        @d-healey yeah but even that doesnt work in this case, the AlNotesOff seems to be firing EVERY note off callback - even ones further up the chain from it....massively frustrating...

        HISE Development for hire.
        www.channelrobot.com

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

          @Lindon All notes off has a global effect, it's a sledgehammer approach to turning off notes. I try to avoid it.

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

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

            @d-healey yeah I agree - but I'm trying to handle notes in the default arp script - and I dont seem to have a viable alternative...

            HISE Development for hire.
            www.channelrobot.com

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @Lindon
              last edited by

              @Lindon - except of course ------

              to handle NoteOff instructions in a graceful way I will need to make notes artificial.... and then the arp wont respond to them....sigh, this is never going to work.

              OK, look - this whole artificial notes, event id thing is not practical every time I want to do something realistic it breaks because of this...

              Here's my requirement:

              I want the arp to run in classic mode - I press and hold a series of notes and the arp plays them... - trivially simple

              I want the arp to run in latch mode - I press (and release) any number of notes and the arp continues to play them until I turn it off... - again trivially simple

              I want the arp to run in chained-latch mode where I press any number of notes (at the same time) and the arp plays them, however when I press a new set of notes (having taken my hands off the keyboard) the arp recognises this new group and stops playing grounp1 and starts playing group 2. -- impossible.

              In this last situation I need to collect the Event IDs of these "grouped" notes, look for no keys down (we've dealt with how this is broken, so instead I count and uncount key presses and execute my clean up when the pressedKeyz count == 1)

              So now only 1 key is being pressed , and I have a group of IDs of notes that are actually playing. So I need to end them - but to do this I need to ahve previously made them Artificial.... at which point the arp wont even play them...

              grrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

              HISE Development for hire.
              www.channelrobot.com

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

                I've not used the arp before but I'll give it a try now to see if I can find a solution.

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

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

                  For the chained latch I'm assuming that you can take your hands off the keyboard and the notes continue to play, is that correct?

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

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

                    @d-healey yes.. take your hands off it continues - and they end when you press a new note...

                    HISE Development for hire.
                    www.channelrobot.com

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

                      I figured out the problem! You're trying to get the arpeggiator to do something it can't do.

                      If you take a look at the arpeggiator source code you can see it generates its own notes. When you turn notes off in your script these only affect the notes your script has generated, not the notes created by the arp script.

                      Unless @Christoph-Hart has a solution, the only way to get it to do what you want that I can see is to write your own arpeggiator, then you'll have control over the notes it generates. The C++ code I linked to isn't that different from HISE script so it shouldn't be too difficult to take the relevant parts and put them together as your own chained-latching arp.

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

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

                        @d-healey said in AllNotesOff and playnote:

                        I figured out the problem! You're trying to get the arpeggiator to do something it can't do.

                        If you take a look at the arpeggiator source code you can see it generates its own notes. When you turn notes off in your script these only affect the notes your script has generated, not the notes created by the arp script.

                        Unless @Christoph-Hart has a solution, the only way to get it to do what you want that I can see is to write your own arpeggiator, then you'll have control over the notes it generates. The C++ code I linked to isn't that different from HISE script so it shouldn't be too difficult to take the relevant parts and put them together as your own chained-latching arp.

                        Yes.--- but no.

                        I'm trying t treat the arpeggiator as a back box - I send it note on and note off messages and it plays note sequences accordingly.

                        So under normal conditions - inbound note on and note off messages make the arp work (well huh..) normally.

                        To make the arpeggiator "latch" all I do is defer the note off messages - issuing a AllNotesOff message when the user turns the arp on or off and when they change between these modes...

                        To make it "chain latch" what I want to do is exactly the same as "latch" mode - i defer the note offs, but now, instead of a mode change, I want to use another note on (when note is the only note being pressed) to end the currently "held" notes.

                        So i collect the playing notes' EventIDs in a simple array - and issue a NoteOffByEventId instruction. Which of course fails - because its not been made artificial - so i make them artificial and it all works fine - except now the arpeggiator wont recognise artificial notes....

                        ..aaaaannnd we are back to the point about Artificial notes being what feels like a kludge - the usage and implementation breaks my required functionality...

                        HISE Development for hire.
                        www.channelrobot.com

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

                          @Lindon Yeah it will work with real on/offs because the arp uses these internally to generate its own notes. The only solution is to roll your own, or modify HISE to allow us to turn off real notes.

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

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

                          31

                          Online

                          1.7k

                          Users

                          11.8k

                          Topics

                          102.7k

                          Posts