bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
607 stars 282 forks source link

Audio API documentation is incomplete #646

Open Flowdeeps opened 5 years ago

Flowdeeps commented 5 years ago

I've been trying to work out the kinks in a simple sequencer and after reading the Audio docs have realised that it mentions a module that is never spoken of again.

https://microbit-micropython.readthedocs.io/en/latest/audio.html

Using audio

You will need a sound source, as input to the play function. You can generate your own, like in examples/waveforms.py or you can use the sound sources provided by modules like synth.

Synth is nowhere to be found.

Also please add an example of AudioFrames from a file and steps to produce them if possible. I think PyDub might be capable of converting 8 bit mono wavefiles as AudioFrames.

dpgeorge commented 5 years ago

Synth is nowhere to be found.

synth was a work-in-progress that never got merged. I've removed this reference from the docs in 2ed95e150be0216ccd0bf91bc467e538f8f187ea

Also please add an example of AudioFrames from a file and steps to produce them if possible

Please have a look at examples/play_file.py, it provides some hints how to do this.