batch editing XML sample maps
-
@Lindon It depends, can you give more details on exactly which values need to be changed, is it a different set of values for every sample or is it the same for all?
-
@d-healey well if it was the same for all then it would be trivial - I'd just use Notepad++
no sadly, each SampleMap has its own layout - and there are round robins in there too, and thus the lowest zone(s) are different from sample map to sample map
So psudo code I'd need it to:
- find what the lowest value for LoKey is across all zones
- for each zone that has a LoKey= this value, then set it to some defined value
-
@Lindon In that case I'd use HISE itself.
There's some info here (read the comments too) https://forum.hise.audio/topic/64/fun-with-regex
-
@Lindon if I were you, I'd ask chatgpt to write a shell script for the scenario you described.
I had a bunch of seemingly random tasks like this that it was able to write a shell for in 1/2/3 attempts.
-
@d-healey well that looks fun but as usual its documented like not at all..
so i did this:const var Sampler1 = Synth.getSampler("Sampler1"); for(sample in Sampler1.createSelection(".*")) { Console.print(sample); };
and get nothing back...
-
@Lindon oh hold on I have to load each sample map in turn...
-
Works here
-
@Lindon said in batch editing XML sample maps:
@Lindon oh hold on I have to load each sample map in turn...
Yes, but you can do that programatically.
-
@d-healey yep - working here too - thanks that should save some time...
-
@Lindon now all I need is a way to programatically save the altered samplemap....
-
-
@d-healey wow you just and only just beat me to it...