Commit Graph

8 Commits

Author SHA1 Message Date
Jeff Epler 53e13f15a3
synthio: Finish ading SWEEP_IN 2023-05-11 16:53:40 -05:00
Jeff Epler 1d1907b98b
synthio: Generalize vibrato into bend
bend can be static, sweep, or vibrato
2023-05-11 09:31:07 -05:00
Jeff Epler c48d385e94
synthio: Add `synthio.BendType` 2023-05-11 09:31:07 -05:00
Jeff Epler a53c0ed066
synthio: add onevo_to_hz, implement midi_to_hz in terms of it
this has the side effect of making some notes more accurate, the new
frequency= value in the test is closer to the true midi frequency of
830.609...Hz.
2023-05-06 21:35:19 -05:00
Jeff Epler 5514e3065d
synthio: add midi_to_hz
to convert notes in the MIDI 1-127 note scale to floating point Hz
2023-05-04 07:23:48 -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 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
Artyom Skrobov 8056af8648 [synthio] add a simple MidiTrack implementation 2021-03-26 16:38:10 -04:00