[LAU] samplerate conversion targetting number of samples

From: Brent Busby <brent@email-addr-hidden>
Date: Wed Nov 14 2018 - 03:08:52 EET

Anyone know some Linux CLI tools that would be good to batch convert a
folder of 24/96 samples, mostly small waveform clips about two to four
wavecycles long each, down to 8-bit...<drumroll>...and the nearest
number of samples that's a multiple of 256 by stretching/squeezing, not
by truncation (so as not to ruin looping)?

You can see why I don't want to do this to a large number of files with
a mouse in Audacity... :) Though if you did do it in Audicity, you can
achieve what I'm trying to do by selecting the whole clip, selecting
Effect -> Change Speed from pulldowns, plugging in a new length that's a
multiple of 256 under New Length (with unit set to samples), and
exporting the new file. Except, I really don't want to do that hundreds
of times myself, so a scriptable CLI method would be better.

Basically, I have some Multimoog waveforms that I've sampled with a good
interface, but I'd like to bring them into an Ensoniq Mirage (8-bit),
which likes everything to be on 256-sample page boundaries. I'm hoping
to do some interesting hybrid/wavetable synthesis if I can get the waves
into the machine.

The target samplerate is unimportant, because the Mirage is going to
adjust it up and down itself anyway because of the way its playback
works. Only the length of the clips is important, which should be a
multiple of 256 samples, and it can be downconverted by any amount that
will achieve the length.

Most samplerate conversion seems to target a desired frequency, but I'm
targetting the number of samples, and I'm flexible on whatever
frequency/resolution conversion is needed.

-- 
- Brent Busby	+ ===============================================
		+ "The introduction of a new kind of music must
-- Studio    --	+  be shunned as imperiling the whole state, for
-- Amadeus/  --	+  styles of music are never disturbed without
-- Keycorner --	+  without affecting the most important political
-- Recording --	+  institutions."    --Plato, "Republic"
----------------+ ===============================================

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user

Received on Wed Nov 14 04:15:01 2018

This archive was generated by hypermail 2.1.8 : Wed Nov 14 2018 - 04:15:01 EET