As promised, I've uploaded a simple "longwave.py" to GitHub:
https://github.com/MattMatic/micropython-longwave/
It allows you to play much longer WAV files than memory can allow. I've tested it with 32kHz mono WAV files, happily playing many minutes of audio.
Just added simple restart mechanisms so I can hook in events (e.g. the accelerometer's tilt detection) to trigger audio events
Ideally I'd like this to work from a DAC or DMA callback, rather than a linked timer. Additionally, it would be excellent to be able to vary the rate of DMA playback without having to restart or work out where we've got to. With both those facilities you can link the accelerometer into speed of playback - for engine noises etc
To do:
* Add circular playback of the whole file
* Add additional status info to know how much has been played.
Please excuse any poor Python coding... am new to Python (but not coding!) So any recommended restructuring gratefully accepted!
Matt
Long duration WAV player
Re: Long duration WAV player
MattMatic, this is 3rd or so your post I move around - please select sub-forums for your posts better. In particular "MicroPython Development" subforum is only for development of MicroPython interpreter and core libraries, nothing else. It's important to use right subforum, so people who look for information you post, could actually find it.
Otherwise, great project! (To be posted in "Projects" forum of course.)
Otherwise, great project! (To be posted in "Projects" forum of course.)
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: Long duration WAV player
pfalcon: first post I knew of Didn't seem related to "Projects" as just a library rather than a project per-se. Wasn't immediately obvious TBH.
Will think twice before posting.
Will think twice before posting.