Announcement

Collapse
No announcement yet.

sound files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sound files

    What am I missing about file_PlayWAV? I tried to have an
    LCD-32032 play a short sound file from the card, just a simple
    cash register cha-ching sort of thing, and the unit made this
    AWFUL high-pitched screeching that not only didn't sound like
    my otherwise perfectly playable file, it didn't STOP even after
    the program had ended.
    .
    And that seems to be another call that only accepts fixed-string
    filenames, instead of variables...
    .
    _H*

  • #2


    Reposted from elsewhere:-

    Wave files should be mono to keep data bandwidth to a minimum, and should be 'canonic' format. Lots of windows formats wont work. Use something like ‘Cool Edit’ or similar to tailor the wav files to a suitable format. Stick with 22khz max else you will notice the system bogging down, around 16khz max and mono is ideal, below 12khz and you will hear the pwm 'whistle' and get some aliasing (filtering is a bare minimum) . The 'loudspeaker' is designed to project into a audio cavity and is not very loud by itself. The audio amp can drive up to 0.7W so you may wish to add an external speaker. If you only hear noise or random snippets of sound remember, the Speed and Capacity of the uSD card are important, most 2Gb cards should be fine, 64mb cards fail all but the most simple sounds.

    So, select the properties of the file in Windows , Summary, then Advanced. The 'Sudio format' should be 'PCM' and the other details as per above.

    file_PlayWAV certainly did not accept variables prior to PmmC 1.07, but it works fine with str_Ptr in 1.07
    Mark

    Comment


    • #3


      I had "sox" generate a file supposedly in "ms-adpcm" format, mono,
      16000 hz, and that doesn't work either. Where the original ".wav"
      I grabbed off the net causes the horrible screeching, this new one
      doesn't make any noise at all.

      The unix "file" utility has this to say about the two files I have:

      HTML Code:
      cash_orig.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 11025 Hz
      cash2.wav: RIFF (little-endian) data, WAVE audio, Microsoft ADPCM, mono 16000 Hz
      There are numerous other formats and variants possible. Rather than me
      spend the rest of my week trying all the permutations, can someone
      there actually tell me exactly what format is accepted by your .wav
      playing function, and maybe point to an example file that works so
      I can reverse-engineer enough of the header to be able to generate
      something similar?

      _H*

      Comment


      • #4


        The poor old RIFF file format has had a lot of bits added to it since its inception, but here is the accepted format. http://www.lightlink.com/tjweber/StripWav/Canon.html
        Regards,
        Dave

        Comment


        • #5


          From what I said below I think you want "sox" to generate straight PCM (I think they call it 'signed') and up the rate to 16khz on you original file
          Mark

          Comment


          • #6


            I cannot determine how to upload files to this board; the
            "manage attachments" link seems hopelessly broken and/or
            script-based. Please look at

            http://netbusters.com/~hobbit/random/cash3.wav

            and tell me why it doesn't play right despite being
            "canonical" per the reference you cited, and then why
            your very own Resource/Wav/ding.wav and others *do* play
            despite NOT being in that "canonical" format. [e.g. what
            is the fact tag which is never mentioned in tjweber's
            rundown...]

            _H*

            Comment


            • #7


              Hi _H*

              cash3.wav works fine here on 1.07, however, there were issues with certain FAT16 partition formats on v1.07. We are just about to release PmmC v1.08 which fixes this. Also, There is a program which is handy for testing / displaying wav files and formats here http://www.4dsystems.com.au/code/index.php?node=24&id=52.
              BTW if you want to upload anything other than bmp doc gif jpe jpeg jpg pdf png rtf txt 4dg it must be in zip format.
              Regards,
              Dave

              Comment

              Working...
              X