Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synthio: Add LFOs #7985

Merged
merged 36 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f832123
synthio: Add LFOs
jepler May 15, 2023
b2c6f9b
synthio: add Synthesizer.lfo, retrigger option
jepler May 16, 2023
e6c5e83
synthio: remove more dead code
jepler May 16, 2023
0b926f8
synthio: improve release/press/change
jepler May 16, 2023
d4294de
synthio: Allow bends of more than one octave
jepler May 16, 2023
32e5d9e
update ulab to 6.0.12 w/sinc function
jepler May 17, 2023
a682b42
fir filtering demo
jepler May 17, 2023
3d2db5d
synthio: improve documentation, simplify synthio_lfo_obj_tick_scaled
jepler May 17, 2023
5de4d19
synthio: start generalizing LFO to Block
jepler May 17, 2023
3914381
synthio: Finish implementing Math blocks
jepler May 17, 2023
bd2a153
synthio: there is a midi note 0
jepler May 17, 2023
4901bdc
synthio: disable on more boards where it stopped fitting
jepler May 17, 2023
c435c46
synthio: simplify block logic a bit by converting from float just once
jepler May 18, 2023
4da32a7
Merge remote-tracking branch 'origin/main' into synthio-lfo-dag
jepler May 19, 2023
e259f8d
synthio: Move some divide-by-twos to get_buffer
jepler May 20, 2023
e0cfae1
synthio: add (untested) phase offset
jepler May 21, 2023
e6c4d12
synthio: doc improvement
jepler May 21, 2023
4ff08e0
synthio: lfo: bugfixes & improvements
jepler May 21, 2023
76101c0
core: Allow `enum` types to specify additional fields in the object
jepler May 21, 2023
c084ab9
synthio: Enable `synthio.MathOperation.SUM(3,4,5)`
jepler May 21, 2023
11c110e
synthio: remove 'none' case from lfo_tick
jepler May 21, 2023
823a02c
synthio: Add a new test of synthio.LFO
jepler May 21, 2023
c561599
synthio: fix docstring
jepler May 21, 2023
78e75f6
synthio: enable additional LFO test cases
jepler May 21, 2023
ac02a26
synthio: avoid exceptions inside get_buffer
jepler May 21, 2023
4d60c46
synthio: doc fixes
jepler May 21, 2023
4f671da
synthio: one more doc fix
jepler May 22, 2023
3790fd4
synthio: Add tests of all synthio math blocks
jepler May 22, 2023
1059c99
synthio: Add tests of each varying lfo input
jepler May 22, 2023
8626130
synthio: Add default triangle waveform to LFO, improve docs
jepler May 22, 2023
167aa30
synthio: remove if0'd code
jepler May 23, 2023
5b4d621
synthio: explicitly cast away const to satisfy compiler
jepler May 23, 2023
1b174f8
synthio: remove "1-octave" caveat, is false now
jepler May 23, 2023
af40a17
synthio: midi_to_hz: remove arbitrary note number limitation
jepler May 23, 2023
122e00b
document ring arguments to constructor
jepler May 23, 2023
2b42783
Apply suggestions from code review
jepler May 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
synthio: Add tests of all synthio math blocks
I plotted and eyeballed these and they all looked plausible
  • Loading branch information
jepler committed May 22, 2023
commit 3790fd4117cadd0496cedf9c102e9241bfdd86d4
3 changes: 3 additions & 0 deletions tests/circuitpython/synth_block_abs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from synthblockhelper import *

mathop_test(MathOperation.ABS)
188 changes: 188 additions & 0 deletions tests/circuitpython/synth_block_abs.py.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
-1.978606282552083 1.978606282552083 3.0 2.0
-1.957273600260416 1.957273600260416 3.0 2.0
-1.93594091796875 1.93594091796875 3.0 2.0
-1.914608235677083 1.914608235677083 3.0 2.0
-1.893275553385417 1.893275553385417 3.0 2.0
-1.87194287109375 1.87194287109375 3.0 2.0
-1.850610188802083 1.850610188802083 3.0 2.0
-1.829277506510417 1.829277506510417 3.0 2.0
-1.80794482421875 1.80794482421875 3.0 2.0
-1.786612141927083 1.786612141927083 3.0 2.0
-1.765279459635417 1.765279459635417 3.0 2.0
-1.74394677734375 1.74394677734375 3.0 2.0
-1.722614095052083 1.722614095052083 3.0 2.0
-1.701281412760417 1.701281412760417 3.0 2.0
-1.67994873046875 1.67994873046875 3.0 2.0
-1.658616048177083 1.658616048177083 3.0 2.0
-1.637283365885417 1.637283365885417 3.0 2.0
-1.61595068359375 1.61595068359375 3.0 2.0
-1.594618001302083 1.594618001302083 3.0 2.0
-1.573285319010417 1.573285319010417 3.0 2.0
-1.55195263671875 1.55195263671875 3.0 2.0
-1.530619954427083 1.530619954427083 3.0 2.0
-1.509287272135417 1.509287272135417 3.0 2.0
-1.48795458984375 1.48795458984375 3.0 2.0
-1.466621907552084 1.466621907552084 3.0 2.0
-1.445289225260417 1.445289225260417 3.0 2.0
-1.42395654296875 1.42395654296875 3.0 2.0
-1.402623860677084 1.402623860677084 3.0 2.0
-1.381291178385417 1.381291178385417 3.0 2.0
-1.35995849609375 1.35995849609375 3.0 2.0
-1.338625813802083 1.338625813802083 3.0 2.0
-1.317293131510417 1.317293131510417 3.0 2.0
-1.29596044921875 1.29596044921875 3.0 2.0
-1.274627766927084 1.274627766927084 3.0 2.0
-1.253295084635417 1.253295084635417 3.0 2.0
-1.23196240234375 1.23196240234375 3.0 2.0
-1.210629720052084 1.210629720052084 3.0 2.0
-1.189297037760417 1.189297037760417 3.0 2.0
-1.16796435546875 1.16796435546875 3.0 2.0
-1.146631673177084 1.146631673177084 3.0 2.0
-1.125298990885417 1.125298990885417 3.0 2.0
-1.10396630859375 1.10396630859375 3.0 2.0
-1.082633626302084 1.082633626302084 3.0 2.0
-1.061300944010417 1.061300944010417 3.0 2.0
-1.039968261718751 1.039968261718751 3.0 2.0
-1.018635579427084 1.018635579427084 3.0 2.0
-0.9973028971354172 0.9973028971354172 3.0 2.0
-0.9759702148437505 0.9759702148437505 3.0 2.0
-0.9546375325520838 0.9546375325520838 3.0 2.0
-0.9333048502604168 0.9333048502604168 3.0 2.0
-0.9119721679687501 0.9119721679687501 3.0 2.0
-0.8906394856770833 0.8906394856770833 3.0 2.0
-0.8693068033854166 0.8693068033854166 3.0 2.0
-0.8479741210937499 0.8479741210937499 3.0 2.0
-0.8266414388020831 0.8266414388020831 3.0 2.0
-0.8053087565104164 0.8053087565104164 3.0 2.0
-0.7839760742187497 0.7839760742187497 3.0 2.0
-0.7626433919270829 0.7626433919270829 3.0 2.0
-0.7413107096354159 0.7413107096354159 3.0 2.0
-0.7199780273437493 0.7199780273437493 3.0 2.0
-0.6986453450520828 0.6986453450520828 3.0 2.0
-0.6773126627604157 0.6773126627604157 3.0 2.0
-0.6559799804687488 0.6559799804687488 3.0 2.0
-0.6346472981770823 0.6346472981770823 3.0 2.0
-0.6133146158854156 0.6133146158854156 3.0 2.0
-0.5919819335937487 0.5919819335937487 3.0 2.0
-0.5706492513020819 0.5706492513020819 3.0 2.0
-0.5493165690104153 0.5493165690104153 3.0 2.0
-0.5279838867187485 0.5279838867187485 3.0 2.0
-0.5066512044270817 0.5066512044270817 3.0 2.0
-0.4853185221354149 0.4853185221354149 3.0 2.0
-0.4639858398437481 0.4639858398437481 3.0 2.0
-0.4426531575520815 0.4426531575520815 3.0 2.0
-0.4213204752604147 0.4213204752604147 3.0 2.0
-0.3999877929687479 0.3999877929687479 3.0 2.0
-0.3786551106770811 0.3786551106770811 3.0 2.0
-0.3573224283854145 0.3573224283854145 3.0 2.0
-0.3359897460937477 0.3359897460937477 3.0 2.0
-0.3146570638020807 0.3146570638020807 3.0 2.0
-0.2933243815104141 0.2933243815104141 3.0 2.0
-0.2719916992187476 0.2719916992187476 3.0 2.0
-0.2506590169270807 0.2506590169270807 3.0 2.0
-0.2293263346354136 0.2293263346354136 3.0 2.0
-0.2079936523437471 0.2079936523437471 3.0 2.0
-0.1866609700520805 0.1866609700520805 3.0 2.0
-0.1653282877604135 0.1653282877604135 3.0 2.0
-0.1439956054687467 0.1439956054687467 3.0 2.0
-0.1226629231770801 0.1226629231770801 3.0 2.0
-0.1013302408854133 0.1013302408854133 3.0 2.0
-0.07999755859374647 0.07999755859374647 3.0 2.0
-0.05866487630207972 0.05866487630207972 3.0 2.0
-0.0373321940104131 0.0373321940104131 3.0 2.0
-0.01599951171874625 0.01599951171874625 3.0 2.0
0.005333170572920487 0.005333170572920487 3.0 2.0
0.026665852864587 0.026665852864587 3.0 2.0
0.04799853515625363 0.04799853515625363 3.0 2.0
0.06933121744792015 0.06933121744792015 3.0 2.0
0.09066389973958666 0.09066389973958666 3.0 2.0
0.1119965820312533 0.1119965820312533 3.0 2.0
0.1333292643229198 0.1333292643229198 3.0 2.0
0.1546619466145862 0.1546619466145862 3.0 2.0
0.1759946289062527 0.1759946289062527 3.0 2.0
0.1973273111979195 0.1973273111979195 3.0 2.0
0.2186599934895859 0.2186599934895859 3.0 2.0
0.2399926757812524 0.2399926757812524 3.0 2.0
0.261325358072919 0.261325358072919 3.0 2.0
0.2826580403645855 0.2826580403645855 3.0 2.0
0.303990722656252 0.303990722656252 3.0 2.0
0.3253234049479187 0.3253234049479187 3.0 2.0
0.3466560872395852 0.3466560872395852 3.0 2.0
0.3679887695312516 0.3679887695312516 3.0 2.0
0.3893214518229181 0.3893214518229181 3.0 2.0
0.4106541341145848 0.4106541341145848 3.0 2.0
0.4319868164062513 0.4319868164062513 3.0 2.0
0.4533194986979177 0.4533194986979177 3.0 2.0
0.4746521809895844 0.4746521809895844 3.0 2.0
0.4959848632812509 0.4959848632812509 3.0 2.0
0.5173175455729173 0.5173175455729173 3.0 2.0
0.5386502278645841 0.5386502278645841 3.0 2.0
0.5599829101562506 0.5599829101562506 3.0 2.0
0.581315592447917 0.581315592447917 3.0 2.0
0.6026482747395835 0.6026482747395835 3.0 2.0
0.6239809570312501 0.6239809570312501 3.0 2.0
0.6453136393229166 0.6453136393229166 3.0 2.0
0.6666463216145831 0.6666463216145831 3.0 2.0
0.6879790039062498 0.6879790039062498 3.0 2.0
0.7093116861979163 0.7093116861979163 3.0 2.0
0.7306443684895827 0.7306443684895827 3.0 2.0
0.7519770507812495 0.7519770507812495 3.0 2.0
0.773309733072916 0.773309733072916 3.0 2.0
0.7946424153645824 0.7946424153645824 3.0 2.0
0.8159750976562488 0.8159750976562488 3.0 2.0
0.8373077799479155 0.8373077799479155 3.0 2.0
0.858640462239582 0.858640462239582 3.0 2.0
0.8799731445312485 0.8799731445312485 3.0 2.0
0.9013058268229152 0.9013058268229152 3.0 2.0
0.9226385091145817 0.9226385091145817 3.0 2.0
0.9439711914062482 0.9439711914062482 3.0 2.0
0.9653038736979148 0.9653038736979148 3.0 2.0
0.9866365559895813 0.9866365559895813 3.0 2.0
1.007969238281248 1.007969238281248 3.0 2.0
1.029301920572914 1.029301920572914 3.0 2.0
1.050634602864581 1.050634602864581 3.0 2.0
1.071967285156247 1.071967285156247 3.0 2.0
1.093299967447914 1.093299967447914 3.0 2.0
1.114632649739581 1.114632649739581 3.0 2.0
1.135965332031247 1.135965332031247 3.0 2.0
1.157298014322913 1.157298014322913 3.0 2.0
1.17863069661458 1.17863069661458 3.0 2.0
1.199963378906247 1.199963378906247 3.0 2.0
1.221296061197913 1.221296061197913 3.0 2.0
1.24262874348958 1.24262874348958 3.0 2.0
1.263961425781246 1.263961425781246 3.0 2.0
1.285294108072913 1.285294108072913 3.0 2.0
1.306626790364579 1.306626790364579 3.0 2.0
1.327959472656246 1.327959472656246 3.0 2.0
1.349292154947912 1.349292154947912 3.0 2.0
1.370624837239579 1.370624837239579 3.0 2.0
1.391957519531245 1.391957519531245 3.0 2.0
1.413290201822912 1.413290201822912 3.0 2.0
1.434622884114579 1.434622884114579 3.0 2.0
1.455955566406245 1.455955566406245 3.0 2.0
1.477288248697912 1.477288248697912 3.0 2.0
1.498620930989578 1.498620930989578 3.0 2.0
1.519953613281245 1.519953613281245 3.0 2.0
1.541286295572911 1.541286295572911 3.0 2.0
1.562618977864578 1.562618977864578 3.0 2.0
1.583951660156244 1.583951660156244 3.0 2.0
1.605284342447911 1.605284342447911 3.0 2.0
1.626617024739577 1.626617024739577 3.0 2.0
1.647949707031244 1.647949707031244 3.0 2.0
1.66928238932291 1.66928238932291 3.0 2.0
1.690615071614577 1.690615071614577 3.0 2.0
1.711947753906244 1.711947753906244 3.0 2.0
1.73328043619791 1.73328043619791 3.0 2.0
1.754613118489577 1.754613118489577 3.0 2.0
1.775945800781243 1.775945800781243 3.0 2.0
1.79727848307291 1.79727848307291 3.0 2.0
1.818611165364576 1.818611165364576 3.0 2.0
1.839943847656243 1.839943847656243 3.0 2.0
1.861276529947909 1.861276529947909 3.0 2.0
1.882609212239576 1.882609212239576 3.0 2.0
1.903941894531243 1.903941894531243 3.0 2.0
1.925274576822909 1.925274576822909 3.0 2.0
1.946607259114575 1.946607259114575 3.0 2.0
1.967939941406242 1.967939941406242 3.0 2.0
1.989272623697909 1.989272623697909 3.0 2.0
1.99981689825654 1.99981689825654 3.0 2.0
3 changes: 3 additions & 0 deletions tests/circuitpython/synth_block_add_div.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from synthblockhelper import *

mathop_test(MathOperation.ADD_DIV)
Loading