[LAU] samplerate conversion targetting number of samples

Brent Busby brent at keycorner.org
Wed Nov 14 02:08:52 CET 2018


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"
----------------+ ===============================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 658 bytes
Desc: not available
URL: <https://lists.linuxaudio.org/archives/linux-audio-user/attachments/20181113/40b88d63/attachment.sig>


More information about the Linux-audio-user mailing list