Hi, I’m working at trying to make the Disk Browser a bit faster to use for loading samples. This leads me to wanting to be able to normalize with a lua script (so can normalize a loaded-in-sample while cursor focus is on the disk browser).
What is the process of normalizing the currently_selected_/visible_sample in the sample editor, please?
i suppose undo should be somehow taken into consideration. uhh.
It has been suggested that the LUA api can invoke methods from the sample editor. But, currently the script would have to process the sample, frame-by-frame. The code would be simple enough - iterate through samples, find the peak, apply this to all frames… But this approach is not exactly fast - on short samples, you might not notice, but long ones…:urgh:
Also, it’s a bit tricky to trigger lua when a sample has loaded - there’s no apparent “a sample has been loaded” event.
But you can of course perform educated guesses - name has changed, sample data has arrived, buffer length changed, etc…
So, what you’re suggesting could be done, but it would require tackling quite a bunch of obstacles first.