HISE Logo Forum
    • Categories
    • Register
    • Login

    Synth.addNotePan(EventID)

    Scheduled Pinned Locked Moved General Questions
    12 Posts 3 Posters 289 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.
    • LindonL
      Lindon
      last edited by Lindon

      I was sure this existed - but now I cant find it, am I just delusional?

      If I am how hard would it be to add?

      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 Is the goal to pan individual events?

        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 Lindon

          @d-healey said in Synth.addNotePan(EventID):

          @Lindon Is the goal to pan individual events?

          yes - sorry just modified the title to be clearer - yes thats what I want to do: pan individual notes...

          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 Search the forum, someone called Lindon has asked about this before, and others before him :)

            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 Synth.addNotePan(EventID):

              @Lindon Search the forum, someone called Lindon has asked about this before, and others before him :)

              well I couldn't find anything that Lindon bloke asked, but I found this

              Link Preview Image
              Note panning

              Hello, would you know if this is possible or push me to the right direction: Is it possible to change pan of currently played note? I am thinking of randomiz...

              favicon

              Forum (forum.hise.audio)

              • and yes obviously I can use a Simple gain and pan - but:

              Im here in my Arp - which is not at the sound source level (so in the master chain) - and its capable of routing arpeggiated notes to one or more sound modules - theres more than one arp as well- by using the MIDI channel its sending on, thus the Arp has no idea about which sound sources are "listening" to the arp - and I'd like to keep it that way - the arp de-coupled from the sound generation. But using a Simple Gain I will have to have the arp "know" who's listening to modify their gain pan positions... which is not so clean...

              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 https://forum.hise.audio/post/37136

                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 Lindon

                  @d-healey said in Synth.addNotePan(EventID):

                  @Lindon https://forum.hise.audio/post/37136

                  Yeah as I say I know all about these - but if you read my last entry I need the arp to set the pan position on a note by note basis, and this position is an attribute of a step in the arp - so it can be dynamically changed - so the Array Modulator is a nightmare solution...and again these require the Arp to "know" which voice's Stereo FX to "fiddle with" = bad code. design.

                  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 I agree a per event solution is much easier to work with

                    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 Lindon

                      @d-healey yeah -m I think I will have to go with my backup solution:

                      Each arp has its own assigned CC (100, 101, etc.) that it uses to issue "Pan commands" - and the "listening" modules will have to :

                      1. listen for Notes with their Arps channel number, so they know to play or not.
                      2. Listen for CC "pan command" for that Arp and set their own pan positions
                      • I was already going to have to do this sort of thing for any Arp-based send amounts etc.

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 0
                      • A
                        aaronventure
                        last edited by

                        My solution for this was to add a Stereo FX and apply a script voice start modulator.

                        I have a global for note events which is a modified class that Christoph provided in a topic I'll link below.

                        namespace MessageCustom
                        {
                            const var NUM_SLOTS = 512;
                            const var NUM_PER_SLOT = 16;
                        
                            if(!isDefined(MessageCustomObject))
                            {
                                global MessageCustomObject = [];
                                MessageCustomObject.reserve(512);
                        
                                for(i = 0; i < NUM_SLOTS; i++)
                                {
                                    MessageCustomObject[i] = [];
                                    //for(j = 0; j < NUM_PER_SLOT; j++)
                                    //    MessageCustomObject[i][j] = 0;
                                    MessageCustomObject[i].reserve(NUM_PER_SLOT);
                                }
                            }
                            
                            inline function clear()
                            {
                                MessageCustomObject[Message.getEventId() % NUM_SLOTS].clear();
                            }
                            
                            inline function clearForId(id)
                            {
                                MessageCustomObject[id % NUM_SLOTS].clear();
                            }
                        
                            inline function setCustomValue(index, value)
                            {
                                MessageCustomObject[Message.getEventId() % NUM_SLOTS][index] = value;
                            }
                        
                            inline function setCustomValueForId(id, index, value)
                            {
                                MessageCustomObject[id % NUM_SLOTS][index] = value;
                            }
                        
                            inline function getCustomValue(index)
                            {
                                return MessageCustomObject[Message.getEventId() % NUM_SLOTS][index];
                            }
                        
                            inline function getCustomValueForId(id, index)
                            {
                                return MessageCustomObject[id % NUM_SLOTS][index];
                            }
                        }
                        

                        Usage is to call MessageCustom.clearForId() first and then setCustomValue or setCustomValueForId() which depends whether youre setting it for the current message or for the one you launched with Synth.play in a previous line of code.

                        Then, anywhere in your project where you can query events, you can retrieve a value from this storage related to that event. So you store your panning info as you would with Message.setPan, and then in the script of the voice start modulator for Stereo FX, you simply call MessageCustom.getCustomValue(index) where the index is the same one you used to store the pan value.

                        It's as simple as it gets right now, as all you have to do before storing and recalling is>

                        • inlcude the external script wherever you want to use it
                        • clear for Id before setting values, to make

                        Clearing is mandatory when you have events which store different amounts of data and your get setup downstream always looks for everything (you can create some really cool stuff just by checking whether certain indexes are defined), as you don't want to apply values from different indexes for events that didn't use them.

                        Now that I put all of this in writing it occurs to me this can all be simplified with a single function that you can feed with an object and it clears for ID first and then sets indexes according to the object setup, though this might have additional overhead which could be of importance to your arp, depending on how many events youre launching

                        https://forum.hise.audio/topic/8497/message-setpan
                        https://forum.hise.audio//post/72831

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

                          @aaronventure yeah, unless I'm wrong (often occurs), that's almost the same as my fall back work around - except its tying the data we want to exchange to a global array and reading it on a note based event in a script voice start modulator.

                          Cant see the advantage here, as I can use my system to send arbitrary "pan instructions" at arbitrary times - that have nothing to do with note events, whereas voice start modulator requires some sort of note based event to function...

                          HISE Development for hire.
                          www.channelrobot.com

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

                            @Lindon what you do with the data is entirely up to you, you can still change the values by index even post-launch, but yes, the question is where and how would this be used other than for the voice start as script envelope doesn't care for event ID i.e. there's no code callback.

                            Would be great if the script envelope had some sort of process block callback where we can override the scriptnode part and return anything like with the voice start, except if we could query for note id, it opens up control over polyphonic modulation over time.

                            But yeah, back on topic, in your case sounds like you don't need polyphony so you can just pass artificial CC and control pan that way on your separate modules.

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

                            46

                            Online

                            1.7k

                            Users

                            11.7k

                            Topics

                            101.8k

                            Posts