HISE Logo Forum
    • Categories
    • Register
    • Login

    How do you change FilterView floating til 'processorId' by script?

    Scheduled Pinned Locked Moved Solved Scripting
    13 Posts 3 Posters 66 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 @Chazrox
      last edited by

      @Chazrox said in How do you change FilterView floating til 'processorId' by script?:

      "processorId"

      ..should be ProcessorId <--those caps are a pain to deal with....

      HISE Development for hire.
      www.channelrobot.com

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

        @Lindon I actually tried both. Does it have anything to do with it being under 'Data' in property editor?

        Would I access them like this? This actually isnt working but its what im trying now...

        FilterViewMain.set(Data.ProcessorId, "Filter1");
        FilterViewMain.set(FilterViewMain.Data.ProcessorId, Filter1);
        
        // undefined parameter error with these lines...
        
        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Chazrox
          last edited by

          @Chazrox said in How do you change FilterView floating til 'processorId' by script?:

          Does it have anything to do with it being under 'Data' in property editor?

          Yes. You can change these properties dynamically but you might hit some weird issues.

          Convert the data property to an object by parsing the json. Then edit the properties in the object. Then convert the object back to a json string and assign it as the floating tile's Data property. There's a thread about this somewhere. Search for parse json.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

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

            @d-healey
            Can you help me? Been going in circles. I just cant access the 'Data' properly. I've tried a bunch of different ways but I keep getting 'undefined' or 'property doesnt exist'. Do you have an example of how to do this? Im just chaning processor Id's to keep one filter one the UI and have it change by the current trigger button (what is shown below is inside one of my button callbacks).

            I just need similar behavior that everything else is doing.

            Please. 🙏

            		if (value)
            		{
            			Synth.playNote(60, 80);
            			
            			AudioWaveform9.set("processorId", "Audio Loop Player1");
            			AudioWaveform9.sendRepaintMessage();
            			
            			AudioWaveform9.set("processorId", "Audio Loop Player1");
            			AudioWaveform9.sendRepaintMessage();
            	
            			knbAttack.set("processorId", "DefaultEnvelope1");
            			knbAttack.updateValueFromProcessorConnection();
            			
            			knbRelease.set("processorId", "DefaultEnvelope1");
            			knbRelease.updateValueFromProcessorConnection();
            			
            			cmbLoopModeTime.set("processorId", "Audio Loop Player1");
            			cmbLoopModeTime.updateValueFromProcessorConnection();
            			
            			btnReverse.set("processorId", "Audio Loop Player1");
            			btnReverse.updateValueFromProcessorConnection();
            			
            			btnLoop1.set("processorId", "Audio Loop Player1");
            			btnLoop1.updateValueFromProcessorConnection();
            			
            			// Change FilterViewMain here
            // I've tried a bunch of different methods but have not gotten it right yet. This is just trying to print...
            			Console.print(trace(FilterViewMain.Data.ProcessorId));
            			
            		}
            
            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Chazrox
              last edited by

              @Chazrox

              Something like this

              const data = myFloatingTile.get("data");
              
              const dataAsObj = data.parseAsJSON();
              
              Console.print(trace(dataAsObj));
              
              data.processorId = "whateverYouWant";
              
              myFloatingTile.set("data", trace(dataAsObj));
              

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

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

                @d-healey OK we got prints, but I get this error...am I missing something?

                // I moved the 'const' outside of the function....should I keep inside and make local?
                
                Console.print(trace(dataAsObj));
                
                data.processorId = "Filter1";
                
                FilterViewMain.set("Data", trace(dataAsObj));
                
                

                Screenshot 2025-11-17 at 1.48.15 PM.png

                Console.print(trace(dataAsObj));
                
                data.processorId = "Filter1";
                
                FilterViewMain.set("Data", trace(dataAsObj));
                
                
                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Chazrox
                  last edited by

                  @Chazrox said in How do you change FilterView floating til 'processorId' by script?:

                  data.processorId = "Filter1";

                  Aha, looks like I left you a typo mystery to solve.

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

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

                    @d-healey haha. I have been trying to use uppercase ProcessorId, ProcessorID, processorId.....

                    Those still same results..

                    Also, I know data is in property editor as "Data" not "data" so I already tried that too, but im getting all mixed up now. lol.

                    this is what prints good:

                    const Data = FilterViewMain.get("Data"); < ---- Prints Good
                    Console.print(Data);
                    
                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Chazrox
                      last edited by

                      @Chazrox said in How do you change FilterView floating til 'processorId' by script?:

                      I have been trying to use uppercase ProcessorId, ProcessorID, processorId.....

                      Won't help you here. Look at the error, it says it can't assign to this expression, that means the thing on the right of the = can't be assigned to the thing on the left.

                      In this case data is just the text we got from the floating tile.

                      What you should be assigning to (and where my typo comes in) is the object dataAsObj

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

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

                        @d-healey Can you show me please. Im confused now. 🙏

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

                          @Chazrox I'll let Dave of the past show you - https://forum.hise.audio/topic/7466/updating-floatingtile-content-data/2

                          Free HISE Bootcamp Full Course for beginners.
                          YouTube Channel - Public HISE tutorials
                          My Patreon - HISE tutorials

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

                            @d-healey
                            Well thats a new one!
                            It works!
                            Thank You! 🙏

                            via GIPHY

                            In case anyone needs this solution specifically:

                            const Data = FilterViewMain.get("Data"); // Declare this outside of your function
                            
                            // inside your function call: 
                            
                            			//THIS WORKS!
                            			local data = FilterViewMain.get("Data").parseAsJSON();				
                            			data.ProcessorId = "Filter1";	// We're changing FilterView connection dynamically 	
                            			FilterViewMain.set("Data", trace(data));
                            
                            1 Reply Last reply Reply Quote 0
                            • ChazroxC Chazrox has marked this topic as solved
                            • First post
                              Last post

                            16

                            Online

                            2.0k

                            Users

                            12.9k

                            Topics

                            111.6k

                            Posts