No announcement yet.

Wav conversion File

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wav conversion File

    Dear Colleague
    I would like to thank everyone who answered my question concerning
    a way to convert wav file into txt file.
    Thank you very much.
    I was really surprise of the involvement of Biomech community. This is
    showing that Biomechanics Community is alive and active.

    I did not provide the wav conversion program because I don't know
    if the authors want to distribute to all. If you want a copy just
    ask the authors themself.

    Mario Lamontagne PhD
    University of Ottawa
    Ottawa, Ontario
    Canada K1N 6N5
    tel: +1 613 564 9132
    FAx: +1 613 564 7689

    ================================================== ========================
    From: Akademia Wychowania Fizycznego
    Subject: Program WAV2TXT.PAS
    Content-Length: 1275

    Program wav2txt;
    this program transforms any file named NAME.* into a text file
    named NAME.TXT consisting of one column and sizeof(NAME.*) rows.
    Each row in NAME.TXT displays one integer giving the value of
    one byte from NAME.*.
    If NAME.* = NAME.WAV (8 bit, mono), the file NAME.TXT contains
    a short header, which can be skipped, and the values of the
    sampled analog signal. 128 corresponds to 0 in the analog
    File NAME.TXT can be read by EXCEL.
    Usage: wav2txt NAME.*
    Result: NAME.TXT

    ================================================== ======================
    Date: Sat, 11 Feb 1995 21:03:40 +0100
    From: Akademia Wychowania Fizycznego
    Subject: Re: File conversion
    Content-Length: 2422

    Dear Mario,
    I don't know if such a program exists but once I had the
    idea of using a Soundblaster card as a AD converter.
    A WAW file consists of a header and a part containing
    samples of the analog signal. At least in the 8 bit, mono
    mode the structure of the part containing samples is very
    simple. The 8 bit resolution means that samples are numbers
    from the range: 0-255. The zero level is 128 (or 80H),
    minimum is 0 and maximum is 255 (FFH).
    A conversion program could work as follows:
    1. Skip the header.
    2. Read byte by byte from the WAW file.
    3. Convert bytes to integers.
    4. Write the integers to a text file.
    As a result you would obtain a text file containing numbers
    corresponding to the samples from the WAW file. Such file
    can be easily read from Excel.

    Here is a pascal program corresponding to 2. to 4. above:

    Program wav2txt;

    This programs works well with 8 bit, mono WAV files.
    I checked it with the WAV files which come with WINDOWS.
    Diagrams displaying sound waves could be easily obtained
    using EXCEL.

    For 16 bit and/or stereo WAV files some minor modifications
    of the program would be necessary.

    Good luck!


    Adam Siemienski