HISE Logo Forum
    • Categories
    • Register
    • Login

    User Preset Label - DAW Session

    Scheduled Pinned Locked Moved Presets / Scripts / Ideas
    5 Posts 2 Posters 314 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.
    • pelleP
      pelle
      last edited by

      Hi, I've created a custom user preset loader connected to a ScriptLabel, Save Button, and a Context Menu Panel, all set with savePreset = false. When I press the SavePreset button, I'll call these functions:

      inline function onSavePresetControl(component, value)
      {
      	if(value == 1)
      	{	
      		// Open the file system browser to select the name and save the preset
      		FileSystem.browse(FileSystem.getFolder(FileSystem.UserPresets).getChildFile("Presets"), true, "*.preset", save);			
      	}	
      	// save button off
      	SavePreset.setValue(0);		
      };
      Content.getComponent("SavePreset").setControlCallback(onSavePresetControl);
      
      
      function save(file)
      {
          // change the Label name according with the name typed on the file system browser	
          PresetLabel.set("text", Engine.getCurrentUserPresetName());   
          Engine.saveUserPreset(file);
      // refresh the dropdown menu on the UI
          refreshBrowser(true);
      }
      

      When I save my DAW project and reopen the session the ScriptLabel text is wrong.
      How I fix this?

      Thanks

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

        @pelle set your text display widget to SaveInPreset= true

        HISE Development for hire.
        www.channelrobot.com

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

          @Lindon Already tried, create another problem, saves the name of the old preset not the new one

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

            @pelle said in User Preset Label - DAW Session:

            @Lindon Already tried, create another problem, saves the name of the old preset not the new one

            post a snippet.

            HISE Development for hire.
            www.channelrobot.com

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

              @Lindon I've solved, I'll publish the solution tomorrow.
              Thanks for your help

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

              19

              Online

              1.7k

              Users

              11.8k

              Topics

              102.4k

              Posts