I have some exciting modules in the queue, but this module… well, it’s not all that exciting. Ha ha ha. But it’s something that I often need, so I whipped up a module for it.
What is it? It’s a sample looper with no bells nor whistles.
Thanks for the idea. That’s what my “wav bank” module was supposed to accomplish. The only issue with the wav bank module was that it attempts to load all of the samples into memory at once so that there’s no delay in switching between them.
However, let me think it over. Maybe there’s some trick I can do to incorporate that feature into the looper without adding bulk to the front panel.
The “Satanonaut” module is still under construction! The good news is that all of the knobs, and jacks are working. There are currently 6 different internal effects. Some of them are simple delays, which others use bytebeat equations to effect audio. I’m hoping to provide around 12 different effects before releasing the first version, and it’s taking me some time to explore different ideas. If I would guess, it might be 1 to 2 months away.
@VCVRackIdeas I just realized why you were probably requesting that feature. It does take a lot of effort to right click, select the sample slot, then select the sample. If you’re trying out 40 different samples, it is painful! I’ll figure something out for sure. At the very least, maybe clicking on the waveform area can open a file selector directly.
I added the ability to click on the waveform area to quickly select a new sample, and it’s working great. Thanks for the suggestion! I’ll work on implementing similar shortcuts into my other samplers!
Hello Bret, I have just tried the Looper and it does not seem to work on my own created wavs but on other sourced wavs it does, is there a size limit to the file that can be used? Or bit size?
I just checked, and it looks like I’m using a slightly older version of the AudioFile.h library. There’s not a huge amount of updates, but maybe it fixed what you’re up against. I’ll update to the newest version over this weekend and get a patch submitted to the VCV library soon. But still, if you could send over that file, I’ll take a peek! Maybe there’s another bug in the AudioFile.h library that I can track down and submit to the author.
Thanks Bret, I have lost the file or at least can’t remember which one it was! I have tried other ones today that I have created in Audacity and so far [only tried 3 so far mind]. The looper is loading them. Also can I post wavs on here, yesterday it said I couldn’t .
Anyway I will keep trying out different wavs I have created/converted in Audacity and see what happens. Thanks for your time.
I just noticed that the vertical scrolling display changes according to the sample being played, without actually being a representation of the audio. Short loops (eg. 10 Hz into Reset) produces a string of dots, silence produces blank spaces, etc.
Handy for visual confirmation that it’s actually doing something.
It is roughly visualizing the sample, but not exactly. I’m only outputting the last 40 values and spacing them out to fill the space. This is to save on resources. In fact, I hope to eventually add an option to turn off the display. Additionally, I’m only using the left stereo signal for the visualization.
Here’s the code behind the scenes:
waveform_array.push_front(module->left_audio);
if(waveform_array.size() > 40) waveform_array.pop_back();
for (unsigned int i = 0; i < waveform_array.size(); i++)
{
nvgBeginPath(vg);
nvgStrokeWidth(vg, 3);
nvgStrokeColor(vg, nvgRGBA(97, 143, 170, 200));
nvgMoveTo(vg, (DRAW_AREA_WIDTH / 2), i * 4.3);
nvgLineTo(vg, (DRAW_AREA_WIDTH / 2) + (DRAW_AREA_WIDTH * waveform_array[i]), i * 4.3);
nvgStroke(vg);
}
I hope that I’m doing it right!
==== UPDATE ====
Maybe I should only be pushing values on to the array less often? Like, every 10 frames? I might try and play with that.
Shifting the entire array every sample like that isn’t efficient. Not that it should really matter here. Why not measure how much time you are spending in draw code? Also, reading the module audio from draw code like that isn’t well defined, since they are on different threads.
Are you sure that it doesn’t matter? I didn’t look further than what’s posted here but isn’t it essentially coping the whole audio of the left channel on every screen frame?