Load/Save Table(envelope) shapes
-
@DanH You forgot to put
data
in front oftableData
in line 78. Remember thatdata
is the object you're loading from the preset, so you need to refer to that when restoring the values.Should read:
tableProcessor.restoreFromBase64(0, data.tableData);
-
@Lunacy-Audio Amazing thank you!! Is it possible to save these presets to a different folder and as a different type of file than .preset? For example save a .lfo into a folder called 'LFO'? When I change the path and extensions I get errors....
-
@DanH Yup, you should just need to change a few lines.
Note: This might not work unless the subfolder "LFO" already exists, so you'll need to set that up with the installer.Line 85
return FileSystem.getFolder(FileSystem.UserPresets).getChildFile("LFO");
Change all instances of
.preset
to.lfo
.This works fine here:
HiseSnippet 2740.3oc4Z07aabbEeVIsFhLVt1NFEEEs.KzIpZUFRaY6JajZZIaYqX8Aiorh+ntwK2cn3FsbGlcVJYFCgZfdnWBPQ.5odp.EnEAnnH+ITf1domJPOzK8P9SH28A027wt6rePpUBwEInDvFZm4Mu42u26Mu4MytM8IVXJk3izJs0v9Xj1o0aMzKn6xcMc7Pqdaj1z5M8wTb.Zog8MoTrMRSax6x5UqzTH9uu5lKY5Z5YgiaBg1l3XgWyomSPbqMabeGW2ULswa4zSQ5EZrpEwaYhKY.fjI0qg5aZsq4N3MLYhMgNR6T2w1If32JvL.SQZSsDwdXqtj88DxusC0osKl8PcTKPQhlWg3ZyPLqUzxccbsaFxXJBoo2Ll+SJ3+EzW2w1Ip8X6vY4cXDOBU6g1DiCd0UgWshCOME3Mk.dmSukkuS+f3dXX6szW0K.62wDbApvRHKZB5Y0Wl.R3ETsm4t3U7gGhFQkqVq17FWoVs4twLkmo767NFLY8ItTi.hQarA0bOrsgimQedfvLkAeEMvXOSeiVtNV6B+mM123cMBmicvAKS50m3AOTYVEYlkMEwidIr4f.mNCbWZPP.wajZHkbozRfIXYirGfR3AvLUrUhdpL6ZqrY87F7sMCLgwkTQUwunOwO3VzkLo3qtPkXyyswcb7vTCSWWCqPSkomsgEzRaHvkZzA.hvZYz1mrOE6OSYOHVlBw0XCwBpkDcX7xYJa.+hwjn60b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NT7AO3yecV5r6t+9CkEyld6oBUUrhqYKEF8E6czL59ElQ25V+47Xz68d+pbxD73G+4cB4IKKVDhMjPFUj71mMBIYqiaAEh9UexIpNNEhJv4OPY9H7a4yXUuv5QNpx4l9HO+wHWAMVnkpDirqtHM5GdJsUgo6T5r2.KBk80ZeV80I1rqTM4abm8YFH6.Rij3Uayd80dTmfgpeFBuQdM7EEtmSuoSfU27w6D4fWHIwaZ7J+nFlQ+Nc5fsBhA6T5q7n27eACpPYZAT99520kz1zM1.BQS.pvhujgenrain9MhDn9X9DT9mE8SPoeg+DTzlrvVjiwmbxTei9SNonw5ucF2D83u5bxhg3i3Ci4LBXpyxsvwlLKyQBmU7we7.rmUhUjr.iUiiqZ7qa7APt1ND+dx6uPJ42qwZ3c.dqpvsvPRxVC8rTarUOBIf81hSFtcgFqQH8uiGK8qsp7M6ZRYWUGuxnXbs7.Z.oWHV9VyMC0J.2me0PZOU+pKTMtel7WdyuddFcLBrpO9.qIJb7ODiYDEVwVF7M7cmDHNJl+aAHdr6mN4+ete5CHPspd6rtYfuCTyl9FC50B1vxBCHwCNYD6Z1gyOwFJ+4ZrmYVlVXOa9CGB+jcVm8rlry5gc9+j4nmokO4CC+34.G2z7V.d6w+hOKouN6YinaFWWuV0Zndv1genkEyb+iA6S9i4Rmfwb4SvXV3DLlqbBFyUOAi4Zmfw7SF6XXUhbqAvdPhkhPCMuiHytVztXZSh9u.HM5g6A
-
@Lunacy-Audio said in Load/Save Table(envelope) shapes:
Thank you :) So this is all working nicely in the snippet. However..... In my project, the LFO shape that I load into the table now overrides the shapes that I had previously saved in my presets.
Just to be clear, because this might get confusing, my 'presets' are all the presets I've made to save settings across the entire instrument, and were made before I started implementing this table shape menu system, including saving the shape of the table in question! So now, rather than loading up the shape I had saved in my presets, it loads up whatever the last shape was in the table.
Let me know if that doesn't make sense!
-
@DanH Ah, think I found it, had to switch off 'Save In Preset' on all the new buttons and viewport. Fingers crossed!
-
Yup that's why. If
Save In Preset
is on, it'll always restore the last value when you recompile. -
@Lunacy-Audio Thanks loads for your help!
-
@DanH Ok last question before christmas! If I want this to apply to a SliderPack rather than a Table, what should I be scripting in its place? As in instead of tableData....