Audio Quantisation..?

Hi there,

I just purchased Renoise, because I’ve fallen madly in love with it after about 6 months of use.
One thing hit me, though: Is there a feature for audio quantisation? With waveforms, not MIDI data.
I saw a thread about it from 2003, but that’s all I could find.

Sorry if this has been posted before.
Also, if it’s totally out of the question, does anyone know of a Linux program that will do it? Maybe a LADSPA plugin?
Open source and/or freeware is not a must, but definitely preferred.

Thanks in advance.
Looking forward to my new membership here :)

I don’t understand. You want to quantize a sample? Maybe try the Rubberband Timestretch tool:

http://tools.renoise.com/tools/rubberband-timestretchpitch-shift

It’s a wrapper around the opens source Rubberband.

Optionally try the Akaizer tool:

Is this what you mean?

That has to be it. I can’t imagine he means 16/24-bits quantization or pulse code modulation :lol:

Well, there’s still one possibility. Kinda what the tools mentioned do, but on a beat-level. Meaning that for example if a person records audio of some sloppy instrumentwork, the whole audio can be quantized per beat. The rubberband, as far as i know, does it just by fitting entire audio into the desired total length. The tool I think jampe might have meant (and btw. Would probably be totally scriptable on top of rubberband) takes the transients as guides and tries to figure out things from there, making multiple timestretchs on the audio.

Thanks a lot, I’ll look into the Rubberband Tool.

That’s exactly what I mean, maybe I should have made that a little more clear.
What I’ve got is an acapella song. The tempo is inconsistent, so I want to make it match the beat in Renoise.
So like KMaki says, it’s “time stretching” I’m after, but on a beat level.

Do you know of a page somewhere that will teach me how to do the script?
I’ve been a programmer for about 8 years, so I won’t need a complete beginner’s guide.

The first stop you should make would be at the xrnx scripting mini-site.
What I’d do would be to study the current rubber band tool for renoise. Maybe try and contact the author for additional help on this. I’d also be using the inbuilt transient detection that works when slicing samples.

Having said all this, I’m afraid there was a fair amount of speculation on my post. Mainly because a)I’ve never used rubberband myself and b)Using inbuilt transient detection (with slices) the script would not be completely automatic. But maybe that’s not an issue, as It would actually make the script more flexible in use.

Definitely, I think that’s an advantage.

I would like to get involved in xrnx scripting, but it really surprises me that this functionality isn’t more in demand.
People went bananas when it came to Ableton Live and Logic respectively.

I’ll dig into this when I have the time, and of course make sure to make it publicly available if I make it work.

Thanks for your advice.

jampe, welcome to the Renoise community! More tool coders are always welcome!

As you will be starting with the Renoise API may I suggest something like the following method to quantize audio in Renoise (it should avoid some known issues):

  • Base the tool off the existing Rubberband time-stretch tool
  • Assume the slice markers are where the beats should be (push the responsibility to the user)
  • Iterate over the slice markers and store their sample frame positions (in a table) and a running total of how many there are
  • Find the total sample length in frames and divide by the number of beats to give the required sample frames per slice (we keep the same overall sample length)
  • Iterate over your table of slices and divide the original number of frames by the required number of frames to give your stretch ratio
  • Scale your stretch ratio so that 1.0 = 100% = no change for use with Rubberband
  • Iterate over each slice, save the associated sample to a temporary file and store the filename in memory.
  • Store the sample mappings in memory
  • Delete the slice markers and all the samples (because we cannot load in a sample slice as slices are read only)
  • Execute rubber band on your temporary files and reload in order by adding new samples to the instrument and reassign the sample mappings
  • Beware of off by one errors (things in the GUI start from 0, but in the API from 1)

Ask any questions in the forum as there are a lot of knowledgeable people in here.

Hope this helps!

Wow, that’s very specific. Thanks a bunch!

It does, but honestly, it sounds like you’ve got it pretty much covered there :D
How come you haven’t done it?

One question about your advice:
Assuming I store the filename and the sample mappings in memory, won’t that information be lost if I reboot Renoise?

Don’t get me wrong, I’m excited about Renoise scripting, but if this one is on me, it’s going to take a while.
I’m moving to Hong Kong soon, so I’ll be quite preoccupied.

I had to be specific because you might get caught in one of the API ‘traps’ such as not being able to reload a slice with a stretched version. Anyway, a more detailed plan always makes coding easier :)

To be honest, I haven’t done it because it’s never something I’ve thought of. I’m not very good at ideas usually, but I can do the heavy lifting code-wise. :P

When I say in memory I mean in a variable in your script. Presumably a user wouldn’t restart Renoise while it’s time-stretching!

Personally I would store all the data for a single slice (= beat) in a table and then have another table which contains those tables.

For example a ‘slice’ table may look like {32051, 48, 48} where I store original number of sample frames, note mapping low note, note mapping high note.

Then, by placing those in another table you can use the index of the wrapper table for your slice numbers

e.g. slices = {{32051, 48, 48}, {32125, 49, 49}, {31943, 50, 50}}

Your iterators would then be slices[slice_number][param_number]

If I wasn’t so busy on Cells! then I would do it myself.

Hope you have a good move and feel free to ask any questions.

lol @ mxb for throwing in a Cells! plug in every post he does :wink: .

Understandable, it looks like a legitimate alternative to the Ableton Live session view.

OK, I really will get on this as soon as I have the time.
Seems very doable.