Rename Monolith Files?
-
@Chazrox said in Rename Monolith Files?:
How do I rename a samplemap that I already compiled as a monolith? Im tempted to just delete it but I think I caused some crashes last time I did that so I want to make sure before I do anything. I accidentally misnamed something and I just want to fix the name if possible.
Thanks!
Well basically you cant - the monolith is a compressed item if I remember correctly - I dont use them any more,...
One work around that might work is to rename your preset(s) to whatever you want in your UI, and in the sample map load process look up the bad name associated with your nice new name and load that...
{ "RemappingCollection": [ { "nastyOldName": "UglyUgly", "niceNewName": "HappyAsLarry" }, { "nastyOldName": "DumbDumbDumb", "niceNewName": "SmartyPants" } ] }
-
@Lindon ah man, I knew it. lol. I think im just gonna resort to deleting the sample map and redo it. Is deleting the .xml and the file in the samples folder a good way to do this?
-
@Chazrox delete the .ch file then rename your sample map and recompress it
-
@d-healey delete the .ch file and rename the .xml? Then resave it as monolith or recompile? Im just making sure, I dont wanna mess anything up rn. lol.
-
@Chazrox said in Rename Monolith Files?:
Then resave it as monolith
This.
@Chazrox said in Rename Monolith Files?:
or recompile
And this
-
@d-healey after deleting it looks like this. The samples disappeared and it says I have to reconvert it to single files to edit. Do I change the save mode in the xml file? To be clear, I already converted these to monolith files, then decided I need to rename.
-
@Chazrox yes change the save mode to 0
-
@d-healey I didnt know deleting the .ch1 file would delete the samples in the sample map. I just wanted to rename it. Im pretty much redoing from scratch now.
deleted my samples in samplemaps for like 5 sample maps....
Samples gone, still doesnt release it from "Monolith" mode even after changing the save mode...So I just deleted the samplemap and the sample .ch1 files thinking that would just give me a clean slate but now I get errors saying that its looking and cant find the files that I deleted.....
its still looking for the old one....
-
@Chazrox here's a way I renamed them with code, basically what Lindon suggested above :)
// Create a Script Reference for the Sampler Module const var s = Synth.getSampler("Sampler1"); // get the list off all SampleMaps that are saved in the SampleMaps project folder const var list = Sampler.getSampleMapList(); // A remapping table const var RemappingCollection = [ { "nastyOldName": "OldStupidName", "niceNewName": "HappyAsLarry" }, { "nastyOldName": "DumbDumbDumb", "niceNewName": "SmartyPants" } ]; // Make a display list based on the new mapping const var displayNames = []; for (i = 0; i < list.length; i++) { reg original = list[i]; reg friendly = original; // fallback if not found // Check mapping collection for (j = 0; j < RemappingCollection.length; j++) { if (original == RemappingCollection[j].nastyOldName) { friendly = RemappingCollection[j].niceNewName; break; } } displayNames.push(friendly); }
I'm then using .set("items", displayNames.join("\n")); attached to a combobox which is getting the sample map list via s.loadSampleMap(component.getItemText());
-
@Chazrox said in Rename Monolith Files?:
didnt know deleting the .ch1 file would delete the samples in the sample map
It doesn't, what did you do?
@Chazrox said in Rename Monolith Files?:
Samples gone, still doesnt release it from "Monolith" mode even after changing the save mode..
Something strange going on.
-
@d-healey I didnt completely figure it out what I may have done wrong. I just started those from scratch and left it alone. ha. I'll let you know if I figure out what I did.