HISE Logo Forum
    • Categories
    • Register
    • Login

    AU won't load my pref file despite it VST3 does

    Scheduled Pinned Locked Moved General Questions
    5 Posts 2 Posters 54 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.
    • ustkU
      ustk
      last edited by ustk

      So at init, I have a basic function that reads and loads the pref file.

      The namespace where the oversampling function is:

      namespace Controls
      {
      	// ON/OFF
      	inline function onoversamplingBtnControl(component, value)
      	{
      		setOversampling(value, oversamplingKnb.getValue());
      		PreferenceFile.updatePrefFile();
      	};
      	oversamplingBtn.setControlCallback(onoversamplingBtnControl);
      	
      	
      	// Factor
      	inline function onoversamplingKnbControl(component, value)
      	{
      		setOversampling(oversamplingBtn.getValue(), value);
      		PreferenceFile.updatePrefFile();
      	};
      	oversamplingKnb.setControlCallback(onoversamplingKnbControl);
      	
      	
      	// setOversampling
      	inline function setOversampling(setOn, osFactor)
      	{
      		local oversampling = setOn ? osFactor : 0;
      		ExciterFX.setAttribute(ExciterFX.OS, oversampling);
      		
      		local LatencyTable = [0, 3, 4, 4, 5]; // the latency table in samples
      		Engine.setLatencySamples(LatencyTable[oversampling]);
      		
      		Console.print("> New latency: " + Engine.getLatencySamples());
      	}
      }
      

      The namespace that loads the pref file:

      namespace PreferenceFile
      {
      	const var prefFile = FileSystem.getFolder(FileSystem.AppData).getChildFile("pref.dat");
      	
      	load();
      	
      	//! LOAD PREF FILE
      	inline function load()
      	{
      		if (prefFile.isFile())
      		{
      			local prefs = prefFile.loadAsObject();
      			
      			if (isDefined(prefs.oversamplingOnOff) && isDefined(prefs.oversamplingValue))
      			{
      				oversamplingBtn.setValue(prefs.oversamplingOnOff);
      				oversamplingKnb.setValue(prefs.oversamplingValue);
      				
      				Controls.setOversampling(prefs.oversamplingOnOff, prefs.oversamplingValue);
      			}
      			
      			Console.print("> PREF FILE: loaded");
      		}
      		else
      			create();
      	}
      }
      

      For whatever reason, it works with VST3 but not with AU.
      I also tried to load the prefs after a 1sec timer, but it still doesn't load...

      • AU succeeds pluginval test with aggressive strictness set to 10
      • AU loads and works in LogicPro and PluginDoctor (except of course this issue)
      • I have tried to enable isMetaParameter despite it should be necessary here (and it does not fix the issue anyway...)
      • The two controls (OS on/off & value) are also calling the same function as you see, but there's a flag after init preventing updatePrefFile() to do it's job for 1sec as a double safety, that is not even necessary...
      • The controls are not saveInPreset enabled (so they are not calling setOversampling() at init)

      I'm lost here...

      While I'm here, @Christoph-Hart, would it be possible to have a Tools menu entry for checking if we miss a isMetaParameter before exporting?

      Can't help pressing F5 in the forum...

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

        @ustk Have you tried in Reaper to make sure it's an issue with the format and not the host?

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

        ustkU 1 Reply Last reply Reply Quote 1
        • ustkU
          ustk @d.healey
          last edited by ustk

          @d-healey Alright, I've found what happened, without understanding what happened...

          The export process was replacing the VST3 and AAX, but not the AU binary. So exports after exports, no update was applied despite I always delete the binary folder.

          The AU is however not and alias, so why the heck is it not being replaced?
          I was then living with a previous version in the appdata component folder while testing the latest export in the project's binary folder using PluginDoctor. It's when I deleted the version in the appdata folder and emptied the bin that suddenly the export was indeed exporting the latest version, or rather PluginDoctor could open the latest version while DAWs could...

          What is the theory I am not aware of behind this behaviour? A cache thingy?

          Can't help pressing F5 in the forum...

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

            @ustk said in AU won't load my pref file despite it VST3 does:

            What is the theory

            MacOS does weird stuff. I always clear the AU cache and manually move the plugin to the correct folder, and even that doesn't always work.

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

            ustkU 1 Reply Last reply Reply Quote 1
            • ustkU
              ustk @d.healey
              last edited by ustk

              @d-healey The very definition of a theory is that it's the better explanation we have until a better one replaces it... Well, I can live with this one for a while ☺
              Thanks Dave 👍

              Can't help pressing F5 in the forum...

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

              14

              Online

              1.7k

              Users

              11.8k

              Topics

              102.7k

              Posts