Commit Graph

21 Commits

Author SHA1 Message Date
Jeff Epler
c92ad33a9c
synthio: allow negative amplitudes
Previously, negative amplitudes were clamped to zero.
Now, they are allowed to range from -ALMOST_ONE to +ALMOST_ONE.
This is useful in certain circumstances, such as using synthio
to create CV-like outputs that can be positive or negative, by
using the amplitude property of the note.
2023-11-21 08:54:07 -06:00
dcooperdalrymple
55db6b7947 Added SYNTHIO_WAVEFORM_SIZE definition, renamed 'loop_...' to 'waveform_loop_...', added 'ring_waveform_loop_...` parameters, and updated docstrings. 2023-11-20 09:50:03 -06:00
dcooperdalrymple
785ef5abd2 Add loop_start and loop_end properties to synthio.Note for waveshaping and sampling capabilities. 2023-11-17 17:41:49 -06:00
Jeff Epler
3151656f4b synthio: more fir-filter removal; fix biquad logic errors 2023-05-30 09:24:26 -05:00
Jeff Epler
51027974e5
synthio: apply biquad filters during synthesis 2023-05-29 10:53:48 -05:00
Jeff Epler
5de4d197a2
synthio: start generalizing LFO to Block 2023-05-17 15:05:34 -05:00
Jeff Epler
3d2db5dbe0
synthio: improve documentation, simplify synthio_lfo_obj_tick_scaled 2023-05-17 11:13:15 -05:00
Jeff Epler
d4294de62b
synthio: Allow bends of more than one octave
up to +-12 sounds good, right?
2023-05-16 16:58:04 -05:00
Jeff Epler
f83212314e
synthio: Add LFOs 2023-05-15 21:15:39 -05:00
Jeff Epler
03abc623ef
synthio: note: fix assigning bend & tremolo coefficients dynamically 2023-05-12 14:00:31 -05:00
Jeff Epler
585b1c23b5
synthio: Fix sweep-type pitch bends
The accumulator saturate logic was wrong, and the sweep was never restarted
either
2023-05-11 19:13:11 -05:00
Jeff Epler
7845a1b13b
synthio: Add filter boolean property to Note objects 2023-05-11 17:58:09 -05:00
Jeff Epler
53e13f15a3
synthio: Finish ading SWEEP_IN 2023-05-11 16:53:40 -05:00
Jeff Epler
ec30963731
synthio: fix a -Warray-parameter diagnostic 2023-05-11 10:21:56 -05:00
Jeff Epler
095e020809
synthio: Add ring modulation 2023-05-11 09:31:18 -05:00
Jeff Epler
e87e7ee54f
synthio: add stereo & Note.panning
A note can be placed in the center (panning=0) or moved to just the left
(panning=1) or right (panning=-1) channels. Fractional panning values
place it partially in both channels.
2023-05-11 09:31:18 -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
9a9f3229fa
synthio: Perform vibrato in pitch, not as frequency ratio
Now the vibrato 'units' are 1.0 = one octave, 1/12 = one semitone,
1/1200 = one cent. Before, the units were somewhat arbitrary and were not
perceptually "symmetrical" around the base frequency.

For vibrato_depth = 1/12 and base frequency of 440,

before: pitch from 403.33 to 476.67Hz, not corresponding to any notes
after: pitch from 415.30 to 466.16Hz, corresponding to G# and A#
2023-05-06 21:35:20 -05:00
Jeff Epler
d2aca7eba0
synthio: fix per-note envelope & envelope modification
.. and simplify the envelope advance logic by handling
'instant' values more intelligently.
2023-05-04 12:23:45 -05:00
Jeff Epler
021aaa4599
synthio: remove unused 'phase' from Note objects 2023-05-04 07:23:50 -05:00
Jeff Epler
a7da245ad0
synthio: Add synthio.Note
This class allows much more expressive sound synthesis:
 * tremolo & vibrato
 * arbitrary frequency
 * different evelope & waveform per note
 * all properties dynamically settable from Python code
2023-05-04 07:23:49 -05:00