Commit Graph
14 Commits
Author SHA1 Message Date
Martin-Laclaustra 9ffb8a503a Do not compile AudioGeneratorMIDI if GCC is 8 (compiler bug) (#502) 2022-03-10 09:14:10 -08:00
Earle F. Philhower, III 86a1818da5 Add codespell to CI checks (#450) 2021-11-28 10:52:33 -08:00
Wouter van der Put f9a78e7ef5 Fix typo in comment (#444) 2021-11-28 10:29:24 -08:00
Wouter van der Put 701ca39669 Fix typo in comment (#445) 2021-11-28 10:29:06 -08:00
Wouter van der Put 84593933e5 Fix typo in comment (#446) 2021-11-28 10:28:40 -08:00
Earle F. Philhower, III 0d1d849f91 Fix factor-of-2-off MIDI velocity parsing (#290)
Velocity in the MIDI format goes from 1...127, so scale the volume of
the note generator by /128 instead of /256.   Increases volume of all
notes by 2x linearly (3dB).

Found by Marc Madaule
2020-08-09 19:01:16 -07:00
david gauchard 4fed6a230f install and use a global audioLogger instead of Serial (#198)
* use of global audioLogger-> instead of Serial.

* default to silence

* initialize logger in examples
2019-07-24 10:02:21 -07:00
Maigre 87fbcadd80 Call output->stop() when stopping generators (#174)
* Fix hanging sound on WAV stop for ESP32

* Fix hanging sound on AAC stop for ESP32

* Fix hanging sound on MIDI stop for ESP32

* Fix hanging sound on MOD stop for ESP32

* Fix hanging sound on MP3a stop for ESP32

* Fix hanging sound on RTTTL stop for ESP32
2019-04-12 16:17:10 -07:00
Earle F. Philhower, III 9c120a777a Add callbacks for metadata and status reports
All objects can have a metadata and/or status report callback once created.
They will call the source program with the parsed ID3 tag, ICY StreamTitle,
or text and numeric error ID of any interesting event.  It is up to the end
application to figure out what to do with this.  Normally, you'd just print
it to the LCD or Serial port.  But it is possible to detect, say, a buffer
overflow and then switch to a lower bitrate stream for example.
2017-12-06 21:11:23 -08:00
Earle F. Philhower, III 8c6bb549f1 Fix crash on ::loop in MIDI generator
Forgot to save the passed in *AudioFileSource, since it was not needed
in the MIDI playback engine (it's encapsulated in a buffered object).  Now
with ::loop in every object, it's needed and we were calling a garbage
object causing a random crash.
2017-12-04 10:51:20 -08:00
Earle F. Philhower, III fece88a9be Add loop method to all input and outputs
Adds a virtual loop() method to the file input and audio output objects.
By default does nothing, but it can be used to prefill buffers/etc. in the
case of a buffered input, or to update a volume meter on an output, etc.

The AudioGenerators all now call it as part of their own loop()s, so there
is no user intervention required to make it work.

Thanks to @armSeb for the idea with his SPI RAM code.
2017-11-24 10:35:20 -08:00
Earle F. Philhower, III f61fcb80f8 Call StopMIDI on ::stop() invocation to free mem 2017-10-30 20:58:54 -07:00
Earle F. Philhower, III 4b52ce7397 Fix meta_len MIDI entry parsing
meta_length is a varlen, not a single byte.  Use get_varlen() to handle
>127 byte entries automatically.
2017-10-30 20:08:23 -07:00
Earle F. Philhower, III e11da8c325 MIDI + Soundfont wavetable synthesis capability
AudioGeneratorMIDI plays a .MID file using any Soundfont2 wavetable
synthesis file.  This is a highly hacked combination of TinySoundFont
and MIDITONES, and requires the FastROMFS to run at real-time in most
cases.
2017-10-29 17:43:00 -07:00