New Voxglitch module: Minimal Looper

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.

Right click to load a sample. It plays (in stereo) in a loop. That’s it!

I just submitted it to the library, so it should be available soon.

Bret

UPDATE

The newest version allows you to click anywhere on the waveform to load a sample, saving you the effort of the right-click menu.

20 Likes

Will have a go with this, I love looping sound then mangling it! How is the Graphic novel book module doing anywhere near completion?

Bret could you add an “adding folder” option and buttons like prev and next?)

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. :grinning:

Proper

@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.

1 Like

Thanks, I was going to hold my breath until it was ready but I can’t last that long, so I’ll have to wait patiently.

1 Like

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?

Hello!

In order to load .wav files, I’m using a library: GitHub - adamstark/AudioFile: A simple C++ library for reading and writing audio files.. It’s a bit picky about the file structure. Can you send over the files that you’re trying to load so that I can compare the bitrate, format, etc. with working files?

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.

Cheers, Bret

Sample load only working via menu, vcv 1.16 and OSX 10.13.6…

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.

1 Like

I used to use AudioFile for my modules and have had much better luck in terms of cross-platform compatibility with dr_libs for WAV support.

1 Like

There was something about dr_wav that I didn’t like, but I can’t recall right now what it was. If I remember, I’ll let you know!

1 Like

I feel your pain.

1 Like

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. :+1:t3:

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?