sampling dilemma
9 messages in this thread
How Do! My name's Charlie Rey. This is my first ever message on Compuserve
so bear with me. I'd like to ask a pretty serious question in the hopes
that someone out there knows what I'm talking about. That question is: Does
anyone know how to convert digital sound samples from 16-bit resolution to
12-bits? I'm working on a program to dump IFF sound files into a Roland
S-50 sampler. It seems that just dropping the 4 least significant bits is
moderately successful, but that can't be the proper way. I'd like to
maintain the integrity of the samples if at all possible. Pretty serious
stuff for a first message, eh? Be seeing you!
Nope, dropping those bits is a pretty good way to do it. Think about it:
you're just scaling the data from 0..64K (with 16 bits) to 0..4096, or +-
half those values… dropping the four bits is the same as dividing by 16.
I don't follow, standard Amiga IFF files are 8 bit samples, the Roland is a
12 bit sampler, what 16 bit files are you converting?
I have a program called Synthia Pro which generates 16 bit Audio IFF
samples which can be saved to disk or dumped to certain samplers.
Unfortunately, the S-50 isn't one of them. The program will dump to
Roland's S-550/S-330 sample modules, though. I know the S-50 is a 12 bit
sampler. I've already had limited success transferring samples ( both 8 bit
and 16 bit, with appropriate scaling applied ) with a BASIC program I wrote
to test the feasibility of the concept. Now I'm trying to work it up into a
C program to try and increase the speed of converting the individual
samples into the correct MIDI format. Anyway, it would be nice just to have
access to any type of sample data and know that it could be ported over to
the S-50 and used as a patch in the sampler. Thanks for the feedback, by
the way. 16 bit samples are allowed in the IFF spec ( in fact, resolution
can go up to 32 bits! ) Be Seeing You.
Charles, Thanks for the info, I didn't know the IFF spec covered 16-32 bit
samples. I have a Roland S-220, this is also a 12 bit machine with sampling
rates at 15K & 30K. I have a shareware program from a fellow in Germany
that supports sample conversion from the S-220 to Amiga 8 bit, does a great
job. Keep posting, I'm interested in your progress.
Howard
– via Whap!
What's happening! Yeah, the specs for IFF are getting a bit hard to keep up
with. When I started this sometime last year, I contacted The Other Guys,
who wrote Synthia Pro, and they sent me all the relevant docs for their IFF
file spec. Form AIFF was their ( and , I think, Apple's ) proposal for
sample resolutions up to 32 bits. The new release of the Amiga ROM Kernal
manuals show that it's now a registered form for IFF. Always something to
learn, eh? By the way, have you ever tried to do any SYSEX programming for
that S-220? I'd be interested to find out what other people think about
trying to " decode " Roland's data sheets!
Thanks for the info. I thought that might work, but since I started this
project, it seems that there must have been some exotic conversion process
you're supposed to use. Especially after it took just about a month to
"decode" Roland's MIDI specs for the S-50. What a lesson in reading
Japanese English! By the way, since it sounds like you know what's
happening, will multiplying by four work to bring 8 bit samples up to 12
bits? It seems like I'll " lose something in the translation ". I've tried
dumping 8 bit samples with four zero pad bits tagged on at the end, and the
sampler doesn't seem to mind much. That was just an experiment, though.
Thanks again. Be seeing you.
Yes, you're right, you can't re-create those lost bits when you go from 8
bits to 12 bits. There is a trick you can use, though: replicate the four
most-significant bits in the four least-significant bits. This insures
that the maximum value stays the same in when you translate from 8 bits to
12 bits. The other intermediate values will be reasonable, and zero stays
zero, too.
John, thanks a million for the info! Now, if I can just find the time to
write the code!!