Looping the audio waveform playhead
-
Hello- I'm feeding an audio sample from a UI audio waveform to a RNBO buffer (in a hardcoded master fx). Even though the audio is not being played back(it is sent to the RNBO buffer instead), is there a way I can get the playhead to move? I want the playhead to repeatedly move across the specified range because the audio is also continuously looping.
Perhaps using an audio loop player? But without needing to trigger a midi note.
-
@mmprod You can add a modulation output from RNBO which is the playhead position and use a panel paint routine in HISE to show the current position.
You can also use a AudioLoopPlayer, load the same sample and set the same loop points but mute its output. However it is not so efficient and when you do more advanced looping in RNBO it might not be possible in the AudioLoopPlayer and the graphics will not match.
I would use the modulation approach.
-
@oskarsh aha- that’s a good idea. Thanks!
-
hi @oskarsh - I'm reading https://docs.hise.dev/glossary/rnbo.html under the Enable modulation output heading
Do I simply add an "outport @mod" object? Then because I'm reading a buffer~, do I take the value of playback position from the groove~ object that I'm using to read it? How do I connect this value to the outport? How do I use this within HISE? Thanks!
-
@mmprod You can read directly from the buffer using a counter. You would then use the same counter as the playhead. You can think about normalizing this value in case your buffer size changes.
You simply output this as a signal to the outport @mod. When compiled this will show up in HISE. Load your RNBO object in a scriptnode network to use it.
-
This is cool I didn't realize this was possible with RNBO. Have you implemented this before @oskarsh ?
-
@HISEnberg I implemented this a while back ago but did not end up releasing the project. Onto the pile of unfinished stuff :) You will need to wrap the RNBO stuff into a scriptnode to make use of the modulation.
-
@oskarsh said in Looping the audio waveform playhead:
@mmprod You can read directly from the buffer using a counter.
How do you do this? You take a value directly from the buffer~ object?
@oskarsh said in Looping the audio waveform playhead:
@HISEnberg You will need to wrap the RNBO stuff into a scriptnode to make use of the modulation.
So you put the RNBO in a scriptnode node(is that even possible)? Is this different from compiling as DLL and using a hardcoded master fx?
-
@mmprod For the second part it's very easy. Compile the RNBO node. Then in scriptnode, when you load in a new node, go to "projects" and you should see the RNBO node there. It will work like any other node in scriptnode after that.
@oskarsh that is really awesome, it seems like a simple workaround for creating a ring buffer.
-
@HISEnberg ahh good to know