Compress Music being played by the Sound command


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Post

    Quote Originally Posted by IAmTheAnswer View Post
    Songs for the sound command take up much space compared to the memory available in 16f628a microcontrollers. Is there a way to compress them?
    Hi,

    I do not see how to "compress" some more the Data for the SOUND Command ...

    I had an eye to the .asm generated by your program ( RRWine), [ Humour ON ] and it looks that command is not exactly optimized for long plays ... [Humour OFF]

    you Also could use the 16F648 ... which is a '628 with twice the Program memory space ...

    Using a music dedicated chip ( say ISD 4xxx ) appears to be a much better solution ...

    Also see here ... :
    http: //www.aplusinc.com.tw

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    What does you code look like?

    I never tried to make music with a pic, but my first thought is to use a lookup table full
    of frequencies and time lengths, and pass those to a single SOUND command routine.

    Now if you wanted to go further, time length values could probably be divided down to fit
    into 4 bits, and then expanded by the SOUND routine, so you could fit more than a singe value
    into each byte in the time length lookup table.

    It's all really difficult without seeing how you are playing music.
    Art.

  3. #3
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Look here

    http://www.picbasic.co.uk/forum/content.php?r=213

    or use a SD-card and play wav-files from it then you have plenty of space

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts