el_supremo
Well-known member
@Paul:
I might as well make my current flash code available to you and everyone.
It has been in this state for a couple of weeks because I've got a new toy to play
with that has seriously distracted me from this.
The basic library code in flash_spi.cpp is just a collection of C functions rather
than a proper library object but perhaps it would work for you as the basis of a proper library.
I've uploaded the current version of my library for flash and some examples to:
http://members.shaw.ca/el_supremo/flash_distrib.zip
It works with the most recent version of Audiomaster on Paul's github site.
https://github.com/PaulStoffregen/Audio
There is a "samples" directory in the archive which contains the list of WAV
files that I've been using. The files which have _11 in them are sampled at
11025Hz instead of 44100Hz and won't play (haven't figured out why
yet) but they are included just in case I figure them out. All of them were
downloaded from free websites.
Copy them to the root directory of a uSD card.
The example sketches, in the order that you should try them, are:
flash_test
- this just tests access to the chip through the library. If this fails, you've got
problems
flash_wav_write_file_list
- this ERASES the entire chip and then writes a list of named WAV files from
the uSD card to the flash chip. The list of files in this example are all in
the root directory of the uSD but they don't have to be.
Each file is written to the flash and then one more block containing only the
file's name is added on the end. This is how flash_wav_play_file finds the files
by name.
flash_wav_play_file
- this plays one named file from the flash. At the moment it must be a stereo
file recorded at 44100Hz (so the files with _11 in them won't play)
flash_wav_dump_flash_header
- dumps a list of the files in flash that were written by flash_wav_write_file_list
with their start and ending page numbers
record_flash_linein
- records the line input in stereo as a WAV file for a specified period of time and writes the
given file name at the end so that it can be played by name with flash_wav_play_file
Gimme a yell if you have any questions.
Pete
I might as well make my current flash code available to you and everyone.
It has been in this state for a couple of weeks because I've got a new toy to play
with that has seriously distracted me from this.
The basic library code in flash_spi.cpp is just a collection of C functions rather
than a proper library object but perhaps it would work for you as the basis of a proper library.
I've uploaded the current version of my library for flash and some examples to:
http://members.shaw.ca/el_supremo/flash_distrib.zip
It works with the most recent version of Audiomaster on Paul's github site.
https://github.com/PaulStoffregen/Audio
There is a "samples" directory in the archive which contains the list of WAV
files that I've been using. The files which have _11 in them are sampled at
11025Hz instead of 44100Hz and won't play (haven't figured out why
yet) but they are included just in case I figure them out. All of them were
downloaded from free websites.
Copy them to the root directory of a uSD card.
The example sketches, in the order that you should try them, are:
flash_test
- this just tests access to the chip through the library. If this fails, you've got
problems
flash_wav_write_file_list
- this ERASES the entire chip and then writes a list of named WAV files from
the uSD card to the flash chip. The list of files in this example are all in
the root directory of the uSD but they don't have to be.
Each file is written to the flash and then one more block containing only the
file's name is added on the end. This is how flash_wav_play_file finds the files
by name.
flash_wav_play_file
- this plays one named file from the flash. At the moment it must be a stereo
file recorded at 44100Hz (so the files with _11 in them won't play)
flash_wav_dump_flash_header
- dumps a list of the files in flash that were written by flash_wav_write_file_list
with their start and ending page numbers
record_flash_linein
- records the line input in stereo as a WAV file for a specified period of time and writes the
given file name at the end so that it can be played by name with flash_wav_play_file
Gimme a yell if you have any questions.
Pete