Making a simple peak meter in HISE
-
@d-healey Thanks for the reply. Would I be able to measure 3 channels with this, and calculate and display the average of those values? Could I make the values persist, and be reset only when playback is started?
I just want to know that my goal is possible before spending the time it would take to learn how to do it.
-
@David-Kissam said in Making a simple peak meter in HISE:
Would I be able to measure 3 channels with this
Yes
@David-Kissam said in Making a simple peak meter in HISE:
and calculate and display the average of those values
Yes
@David-Kissam said in Making a simple peak meter in HISE:
Could I make the values persist, and be reset only when playback is started
Not sure, but if not you can use other functions in HISE to get the peaks and roll your own solution.
-
@d-healey Thank you; that is helpful. Would you make any recommendation to a novice such as myself on whether to learn HISE or JUCE?
-
@David-Kissam said in Making a simple peak meter in HISE:
novice
By novice do you mean no prior programming experience?
-
@d-healey My only experience is writing a script in Lua for Kontakt Creator Tools which can search my filesystem for certain keywords and map the files it find by tokens in the filenames.
-
@David-Kissam Learn HISE, if you need to go deeper you can learn C++/JUCE and modify HISE.
-
@David-Kissam I wrote a detailed tutorial on this topic - just search the forum.
-
@d-healey I just noticed that HISE has a filesystem class. Could I use HISE to make a batch-processing tool that would rename files with their peak levels? (I found a thread from 3 years ago where you said you didn't think it was suitable, but perhaps things have changed since then.)
-
@David-Kissam yeah probably, if you can get that data offline. But ffmpeg or sox would probably be more straightforward.
-
@David-Kissam You can get the peak level of any buffer with
Buffer.getMagnitude()
As for the batch processing, I'd say load your audio files into an AudioLoopPlayer (or something else maybe?), then
Engine.renderAudio()
. From here you can (I haven't tested in this configuration) get the magnitude of the buffer and use it as part of the file name.And for realtime audio recording I have published a snippet recently (but the search in the forum is somewhat painful currently). There's also a recorder example in the Snippet Browser