Commit Graph

9 Commits

Author SHA1 Message Date
Jeff Epler
dd262258e0
synthio: Add MidiTrack.error_location to record errors
.. instead of just printing the unraiseable error on the repl
2023-05-03 09:37:02 -05:00
Jeff Epler
12c1a72f03
synthio: implement envelope
This works for me (tested playing midi to raw files on host computer, as
well as a variant of the nunchuk instrument on pygamer)

it has to re-factor how/when MIDI reading occurs, because reasons.

endorse new test results

.. and allow `-1` to specify a note with no sustain (plucked)
2023-04-25 12:05:53 -05:00
Jeff Epler
e0984fa195
Factor out the synthesizer from midi track 2023-04-02 18:54:07 -05:00
Jeff Epler
e9e4ce9546
add waveform support in synthio
a waveform object (array of 'h') can be passed in, replacing the
standard square wave. This waveform must be a 'single cycle waveform'
and some obvious things to pass in are sine, triangle or sawtooth waves,
but you can construct whatever you like.
2023-04-01 11:46:38 -05:00
Jeff Epler
db1e01c462
Don't require huge buffers for long-held notes 2023-04-01 11:46:36 -05:00
Jeff Epler
7f73ff1b2d
hold accumulator phase across span
this fixes grunk in held notes
2023-04-01 11:46:35 -05:00
Jeff Epler
02f8a45dfa
synthio: allow increasing number of channels
12 channels works well on metro m7
2023-04-01 11:46:27 -05:00
Dan Halbert
33bbb8b1f4 RP2040 PWMAudioOut: Release DMA channels after play has finished. 2021-07-01 17:36:29 -04:00
Artyom Skrobov
8056af8648 [synthio] add a simple MidiTrack implementation 2021-03-26 16:38:10 -04:00