AIFC (Python and audio files.)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kelvin Chu

    AIFC (Python and audio files.)

    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/
  • Erik de Castro Lopo

    #2
    Re: AIFC (Python and audio files.)

    Kelvin Chu wrote:[color=blue]
    >
    > 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?[/color]

    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 nospam@mega-nerd.com (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..."

    Comment

    • Dennis Lee Bieber

      #3
      Re: AIFC (Python and audio files.)

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

      [color=blue]
      > 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?
      >[/color]
      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 "synthesize rs" 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).

      --[color=blue]
      > =============== =============== =============== =============== == <
      > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
      > wulfraed@dm.net | Bestiaria Support Staff <
      > =============== =============== =============== =============== == <
      > Bestiaria Home Page: http://www.beastie.dm.net/ <
      > Home Page: http://www.dm.net/~wulfraed/ <[/color]

      Comment

      • Dennis Lee Bieber

        #4
        Re: AIFC (Python and audio files.)

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

        [color=blue]
        > So far as I know, aiff is raw waveforms... IE: each data point[/color]

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

        --[color=blue]
        > =============== =============== =============== =============== == <
        > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
        > wulfraed@dm.net | Bestiaria Support Staff <
        > =============== =============== =============== =============== == <
        > Bestiaria Home Page: http://www.beastie.dm.net/ <
        > Home Page: http://www.dm.net/~wulfraed/ <[/color]

        Comment

        Working...