Closed whocano closed 1 year ago
I agree, I'll fix this soon!
Done!
Thank you @timothyschoen , but using the nightly now I see another issue: I use a custom json file and linker and these are not remembered, so while it still says "custom json", it will try to compile and then not find the controls. So I have to select another Target Board, go back to custom and then select the file. Can this be amended please?
@whocano hmm are you sure? I added the linker specifically with storing the settings in mind and have tested this myself several times (turning off plugdata, then trying the flash again, etc.):
https://github.com/plugdata-team/plugdata/blob/main/Source/Heavy/DaisyExporter.h#L79
Sorry you are right about the linker. But the JSON does get lost.
This should also get stored in the state file: https://github.com/plugdata-team/plugdata/blob/main/Source/Heavy/DaisyExporter.h#L72
Hmm well in the nightly I installed earlier today, it certainly doesn't work:
--> Generating Daisy module
1) [91mError[0m c2daisy: Unknown parameter "fs1"
Please check the settingsfile. I see the full path to my custom json there when the state is saved:
<HeavyState>
<HeavySelect listBox="1"/>
<CPP inputPatchValue="1" projectNameValue="" projectCopyrightValue=""/>
<Daisy inputPatchValue="1" projectNameValue="helloworld" projectCopyrightValue=""
customBoardDefinitionValue="/home/dreamer/Sources/_audio/_electro-smith/pd2dsy/field.json"
targetBoardValue="8" exportTypeValue="3" usbMidiValue="0" debugPrintValue="1"
patchSizeValue="4" appTypeValue="2" customLinkerValue="/home/dreamer/Downloads/_bin/pd2dsyGUI/data/util/qspi_linker_sdram.lds"/>
<DPF inputPatchValue="1" projectNameValue="helloworld" projectCopyrightValue=""
midiinEnableValue="0" lv2EnableValue="0" vst2EnableValue="0"
vst3EnableValue="0" clapEnableValue="0" jackEnableValue="1" exportTypeValue="2"
pluginTypeValue="1"/>
<PdExt inputPatchValue="1" projectNameValue="lorenztest" projectCopyrightValue=""
exportTypeValue="2" copyToPath="1"/>
</HeavyState>
However maybe the problem is with this line? -> https://github.com/plugdata-team/plugdata/blob/main/Source/Heavy/DaisyExporter.h#L145
Maybe this entire else
clause needs to be removed. It looks like the value gets overwritten with an empty File()
instance.
Yeah the path is correct in the settings file. It just doesn't seem to use it.
Interesting, what OS are you using? Maybe we need to replace some "\" with "/" somewhere, if you're on Windows that is.
@timothyschoen they explained on Discord that they are on macOS. Was also wondering if that is part of the issue.
The linker path being restored correctly, but not the board.json is really odd. The get/set is exactly the same afaict.
So I had another look. After running compile with newly selecting JSON and linker files, the relevant part of the settings file looks like this:
<HeavyState>
<HeavySelect listBox="1"/>
<CPP inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""/>
<Daisy inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""
customBoardDefinitionValue="/Users/XYZ/Documents/Puredata/terrarium.json"
targetBoardValue="8" exportTypeValue="3" usbMidiValue="0" debugPrintValue="0"
patchSizeValue="4" appTypeValue="2" customLinkerValue="/Users/XYZ/Documents/GitHub/pd2dsy/util/sram_linker_sdram.lds"/>
<DPF inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""
midiinEnableValue="0" lv2EnableValue="1" vst2EnableValue="1"
vst3EnableValue="1" clapEnableValue="1" jackEnableValue="0" exportTypeValue="2"
pluginTypeValue="1"/>
<PdExt inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""
exportTypeValue="2" copyToPath="0"/>
</HeavyState>
whereas after reopening and rerunning it (without changing any values or files) it looks like this:
<HeavyState>
<HeavySelect listBox="1"/>
<CPP inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""/>
<Daisy inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""
customBoardDefinitionValue="" targetBoardValue="8" exportTypeValue="3"
usbMidiValue="0" debugPrintValue="0" patchSizeValue="4" appTypeValue="2"
customLinkerValue="/Users/XYZ/Documents/GitHub/pd2dsy/util/sram_linker_sdram.lds"/>
<DPF inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""
midiinEnableValue="0" lv2EnableValue="1" vst2EnableValue="1"
vst3EnableValue="1" clapEnableValue="1" jackEnableValue="0" exportTypeValue="2"
pluginTypeValue="1"/>
<PdExt inputPatchValue="1" projectNameValue="terrarium_delay" projectCopyrightValue=""
exportTypeValue="2" copyToPath="0"/>
</HeavyState>
So you can see that it is saved, but then somehow lost during the restoration of the data.
I can confirm this behavior!
The setting is there, then I do an export (can even be just source-code) and then this field in the settings is empty.
Still no clue why though ..
Removing the else
clause as I pointed to before seems to solve this issue. I'm not sure why it gets triggered, but I don't see a reason to have this else
there in the first place
Would be handy if Plugdata could remember the last settings in the compile window at least while it is open. Or ideally it would store the last used settings for each of the recently opened patches.