AIFC (Python and audio files.)

K

Kelvin Chu

Hello, Python Wizards...

I'm trying to use Python to write an aiff file. I've used the aifc module
and I've set the parameters (# of channels, encoding rate, compression,
etc.)

What does raw audio data look like? Is each word of the raw audio data a
frequency? If I encode 440 for each of the frames, will I get concert A?

Thanks for any advice you can give on this subject.

Best,

-k
 
E

Erik de Castro Lopo

Kelvin said:
Hello, Python Wizards...

I'm trying to use Python to write an aiff file. I've used the aifc module
and I've set the parameters (# of channels, encoding rate, compression,
etc.)

What does raw audio data look like? Is each word of the raw audio data a
frequency? If I encode 440 for each of the frames, will I get concert A?

AIFC files contain digitally sampled sound, much like the data
stored on a CDROM.

Try looking up PCM (Pulse Code Modulation) on Google for a deeper
explanation.

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo (e-mail address removed) (Yes it's valid)
+-----------------------------------------------------------+
The word "Windows" is a word out of an old dialect of the
Apaches. It means: "White man staring through glass-screen
onto an hourglass..."
 
D

Dennis Lee Bieber

Kelvin Chu fed this fish to the penguins on Sunday 13 July 2003 06:34
pm:

What does raw audio data look like? Is each word of the raw audio
data a
frequency? If I encode 440 for each of the frames, will I get concert
A?
So far as I know, aiff is raw waveforms... IE: each data point varies
from -127(8) to +127 (well, actually I think they may use 16bit data
rather than 8bit, you should understand the concept). To get one second
of pure A you will have to encode a sine wave (-1.0..+1.0) scaled to
(-127..+127) into one second's worth of data. Figure out the
samples/second, and work out the relationship to the frequency of the
A...

Of course, you do have the options of using other wave forms -- a sine
wave is rather pure... Maybe you want a square wave?

One of the earliest "synthesizers" I had was a D/A converter on my
TRS-80 Mod III/4 (Orchestra 90, as I recall). The software defined
instruments in terms of relative strengths of harmonics -- a sine wave
was something like F0000000 (full level on primary, 0 on all harmonics).

--
 
D

Dennis Lee Bieber

Dennis Lee Bieber fed this fish to the penguins on Sunday 13 July 2003
08:52 pm:

So far as I know, aiff is raw waveforms... IE: each data point

Whoops, misread your subject... Not sure what aifc differences might
be...

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top