HISE Logo Forum
    • Categories
    • Register
    • Login

    Adventures in broadcaster: attachToComponentMouseEvents

    Scheduled Pinned Locked Moved General Questions
    23 Posts 4 Posters 1.1k 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.
    • NatanN
      Natan @Lindon
      last edited by

      @Lindon Mate, did you figure this out?
      Just tried the code by Christoph, and Cant understand how to add another set of Loop player here!

      @Lindon said in Adventures in broadcaster: attachToComponentMouseEvents:

      @Christoph-Hart -- Okay this works fine , but I dont (yet) understand how I can have a "simple" function call on the drop...instead of using addComponentPropertyListener

      or how I extend this example to allow me to have Audio Loop Player 1, with its associated label1 and Audio Loop Player 2 with its associated label 2

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

        @Natan said in Adventures in broadcaster: attachToComponentMouseEvents:

        @Lindon Mate, did you figure this out?
        Just tried the code by Christoph, and Cant understand how to add another set of Loop player here!

        @Lindon said in Adventures in broadcaster: attachToComponentMouseEvents:

        @Christoph-Hart -- Okay this works fine , but I dont (yet) understand how I can have a "simple" function call on the drop...instead of using addComponentPropertyListener

        or how I extend this example to allow me to have Audio Loop Player 1, with its associated label1 and Audio Loop Player 2 with its associated label 2

        Im afraid I cant give you any clearer description of what to do than @Christoph-Hart's post above...

        HISE Development for hire.
        www.channelrobot.com

        1 Reply Last reply Reply Quote 0
        • NatanN
          Natan
          last edited by Natan

          Hey folks, I'm trying to remove the .wav extension too, any help?

          Below only removes the Project folder Path

          if(value.indexOf("{PROJECT_FOLDER}") != -1)
          	{
          		return value.replace("{PROJECT_FOLDER}", "");
          	}
          

          @d-healey @Christoph-Hart @ulrik

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

            @Natan said in Adventures in broadcaster: attachToComponentMouseEvents:

            if(value.indexOf("{PROJECT_FOLDER}") != -1)
            {
            return value.replace("{PROJECT_FOLDER}", "");
            }

            try:

            if(value.indexOf("{PROJECT_FOLDER}") != -1)
            	{
            		return value.replace(".wav", "");
            	}
            

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon said in Adventures in broadcaster: attachToComponentMouseEvents:

              if(value.indexOf("{PROJECT_FOLDER}") != -1)
              {
              return value.replace(".wav", "");
              }

              Hey Lindon, Thanks mate, This does the Job, But need to Remove the Project Path aswell

              Also We need to Add a couple of Extension Like .Wav .Flac .Mp3 so the Label stand cleaner

              Any Idea?

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

                @Natan

                reg tempValue;
                if(value.indexOf("{PROJECT_FOLDER}") != -1)
                	{
                		tempValue =  value.replace(".wav", "");
                               Console.print(tempValue);  //<-- now think what you might do to this?
                	}
                

                Perhaps also read up about substring:

                https://www.w3schools.com/jsref/jsref_substring.asp

                HISE Development for hire.
                www.channelrobot.com

                NatanN 1 Reply Last reply Reply Quote 1
                • NatanN
                  Natan @Lindon
                  last edited by Natan

                  @Lindon Thanks, man, Just need to Remove the {PROJECT_FOLDER} as well!

                  	if(value.indexOf("{PROJECT_FOLDER}") != -1) // This does not Work !!!
                  	{
                  		return value.replace("{PROJECT_FOLDER}", "");
                  	}
                  	
                  	
                  	reg tempValue;	
                  	
                  	if(value.indexOf("{PROJECT_FOLDER}") != -1)
                  		{
                  			tempValue =  value.replace(".wav", "");
                              Console.print(tempValue);  //<-- now think what you might do to this?
                  	        return tempValue;
                  		}
                  
                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @Natan
                    last edited by

                    @Natan said in Adventures in broadcaster: attachToComponentMouseEvents:

                    @Lindon Thanks, man, Just need to Remove the {PROJECT_FOLDER} as well!

                    	if(value.indexOf("{PROJECT_FOLDER}") != -1) // This does not Work !!!
                    	{
                    		return value.replace("{PROJECT_FOLDER}", "");
                    	}
                    	
                    	
                    	reg tempValue;	
                    	
                    	if(value.indexOf("{PROJECT_FOLDER}") != -1)
                    		{
                    			tempValue =  value.replace(".wav", "");
                                Console.print(tempValue);  //<-- now think what you might do to this?
                    	        return tempValue;
                    		}
                    

                    nearly...

                    if(value.indexOf("{PROJECT_FOLDER}") != -1)
                    {
                         tempValue =  value.replace(".wav", "");
                         tempValue = tempValue.replace("{PROJECT_FOLDER}","");
                         return tempValue;
                    }		
                    

                    There is a better way tho...go read up about substring

                    https://www.w3schools.com/jsref/jsref_substring.asp

                    HISE Development for hire.
                    www.channelrobot.com

                    NatanN 1 Reply Last reply Reply Quote 1
                    • NatanN
                      Natan @Lindon
                      last edited by

                      @Lindon said in Adventures in broadcaster: attachToComponentMouseEvents:

                      reg tempValue;

                      Brilliant, Thanks a Lot mate, You're the BEST <3
                      Cheers 🙏

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

                        @Natan read up about substring...

                        HISE Development for hire.
                        www.channelrobot.com

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

                        28

                        Online

                        2.0k

                        Users

                        12.7k

                        Topics

                        110.1k

                        Posts