AIFC (Python and audio files.)

Discussion in 'Python' started by Kelvin Chu, Jul 14, 2003.

  1. Kelvin Chu

    Kelvin Chu Guest

    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

    --
    Kelvin Chu
    Department of Physics, Cook Building, 82 University Place
    University of Vermont, Burlington, VT 05405-0125
    802.656.0064, http://www.uvm.edu/~kchu/
    Kelvin Chu, Jul 14, 2003
    #1
    1. Advertising

  2. Kelvin Chu wrote:
    >
    > 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 (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..."
    Erik de Castro Lopo, Jul 14, 2003
    #2
    1. Advertising

  3. 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).

    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Bestiaria Home Page: http://www.beastie.dm.net/ <
    > Home Page: http://www.dm.net/~wulfraed/ <
    Dennis Lee Bieber, Jul 14, 2003
    #3
  4. 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...

    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Bestiaria Home Page: http://www.beastie.dm.net/ <
    > Home Page: http://www.dm.net/~wulfraed/ <
    Dennis Lee Bieber, Jul 16, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sj
    Replies:
    0
    Views:
    293
  2. Karthik
    Replies:
    1
    Views:
    310
    Thomas Tutone
    Oct 28, 2006
  3. aeonsun
    Replies:
    2
    Views:
    425
    Luc The Perverse
    Mar 11, 2007
  4. sick dick
    Replies:
    0
    Views:
    387
    sick dick
    Apr 3, 2006
  5. BGMaster
    Replies:
    1
    Views:
    328
    Miki Tebeka
    Apr 11, 2012
Loading...

Share This Page