Commit Graph

2235 Commits

Author SHA1 Message Date
Jeff Epler
1059c99f6e
synthio: Add tests of each varying lfo input
I looked at all the results and they pleased me
2023-05-22 10:45:28 -05:00
Jeff Epler
3790fd4117
synthio: Add tests of all synthio math blocks
I plotted and eyeballed these and they all looked plausible
2023-05-22 10:45:21 -05:00
Jeff Epler
78e75f6977
synthio: enable additional LFO test cases 2023-05-21 13:22:49 -05:00
Jeff Epler
823a02c0b7
synthio: Add a new test of synthio.LFO 2023-05-21 13:22:49 -05:00
Jeff Epler
4da32a7b86
Merge remote-tracking branch 'origin/main' into synthio-lfo-dag 2023-05-19 11:56:13 -05:00
Scott Shawcroft
9d11bda9e8
Fix memoryview.cast over sliced memoryview
Fixes #4758
2023-05-18 13:26:50 -07:00
Jeff Epler
c435c469f4
synthio: simplify block logic a bit by converting from float just once 2023-05-18 11:55:01 -05:00
Jeff Epler
391438102b
synthio: Finish implementing Math blocks 2023-05-17 16:32:20 -05:00
Jeff Epler
a682b42180
fir filtering demo 2023-05-17 11:13:15 -05:00
Jeff Epler
f83212314e
synthio: Add LFOs 2023-05-15 21:15:39 -05:00
Jeff Epler
91a5103910
synthio: add a host demo of all major features 2023-05-12 14:00:33 -05:00
Jeff Epler
f52bb65da6
synthio: add some new manual tests 2023-05-11 18:59:06 -05:00
Jeff Epler
9d8dcf7d33
synthio: endorse new test result 2023-05-11 18:59:02 -05:00
Jeff Epler
17df238145
synthio: doc fixes, rename BendType to BendMode 2023-05-11 15:23:54 -05:00
Jeff Epler
cbd02b74df
synthio: endorse updated test result 2023-05-11 10:22:55 -05:00
Jeff Epler
2062b2bfb7
synthio: add a noise program to the manual tests 2023-05-11 09:31:08 -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
91978522c5
synthio: Add adafruit_wave and use it in the manual test 2023-05-11 09:31:07 -05:00
Jeff Epler
c031bda5dd
synthio: implement a range compressor with hard knee
This really improves the loudness of the output with multiple notes
while being a nice simple algorithm to implement.
2023-05-08 09:22:42 -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
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
Jeff Epler
b33c9f6b4b
synthio: put license notice on copied files 2023-05-03 09:37:12 -05:00
Jeff Epler
d8550f4e7c
synthio: fix offset in default square waveform 2023-05-03 09:37:02 -05:00
Jeff Epler
b5c33a4c03
Add a manual test of synthio
this allows to test how the midi synthesizer is working, without access
to hardware. Run `micropython-coverage midi2wav.py` and it will create
`tune.wav` as an output.
2023-04-25 12:05:53 -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
Scott Shawcroft
e0a7edbe54
Merge pull request #7838 from jepler/more-aes-vectors
add more test vectors for aes
2023-04-06 09:54:57 -07:00
Jeff Epler
8c8ca3b810
endorse new test outputs 2023-04-06 10:21:27 -05:00
Jeff Epler
09bc8fbdc0
add more test vectors for aes 2023-04-05 14:55:41 -05:00
Jeff Epler
14637cd75a
update tests with new expected results 2023-04-05 12:00:05 -05:00
Jeff Epler
b011468251
Add synthio.Synthesizer
In contrast to MidiTrack, this can be controlled from Python code,
turning notes on/off as desired.

Not tested on real HW yet, just the acceptance test based on checking
which notes it thinks are held internally.
2023-04-02 20:37:23 -05:00
Jeff Epler
7bbb2ed898
add a basic acceptance test of MidiTrack 2023-04-02 13:48:23 -05:00
Jeff Epler
736af5b0c8
update expected result 2023-04-01 13:12:00 -05:00
Dan Halbert
b947605ab7
Touch up 2023-03-23 09:24:11 -04:00
hathach
8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
hathach
a8abe8e705
remove lib from exludes, fix all remaining typos 2023-03-23 13:59:08 +07:00
Jeff Epler
349dedca54
struct: Check that argument counts match, similar to cpython3
.. and test our struct module during the build-time tests

Closes #7771
2023-03-22 09:35:09 -05:00
Scott Shawcroft
bdf592089a
Fix .bin, .hex and .uf2 with new linker sections
Also, format perfbench output in table with reference timing from
the host.
2023-03-20 14:02:57 -07:00
hathach
ce2c3d7dc5
revert deque(s) 2023-03-20 12:12:30 +07:00
hathach
fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
Scott Shawcroft
5bb8a7a7c6
Improve iMX RT performance
* Enable dcache for OCRAM where the VM heap lives.
* Add CIRCUITPY_SWO_TRACE for pushing program counters out over the
  SWO pin via the ITM module in the CPU. Exempt some functions from
  instrumentation to reduce traffic and allow inlining.
* Place more functions in ITCM to handle errors using code in RAM-only
  and speed up CP.
* Use SET and CLEAR registers for digitalio. The SDK does read, mask
  and write.
* Switch to 2MiB reserved for CircuitPython code. Up from 1MiB.
* Run USB interrupts during flash erase and write.
* Allow storage writes from CP if the USB drive is disabled.
* Get perf bench tests running on CircuitPython and increase timeouts
  so it works when instrumentation is active.
2023-03-14 12:30:58 -07:00
Scott Shawcroft
144aed40e3
Rename flag. Turn on UTF-8 and flag on unix
Also added label portion to the test.
2023-02-24 12:23:59 -08:00
Scott Shawcroft
1197394a03
Add simple test 2023-02-23 15:53:59 -08:00
Mark
fa435468fa
Merge branch 'main' into gif_displayio_support 2023-02-13 18:30:51 -06:00
gamblor21
5c2bd38684 Removed gifio module from tests 2023-02-13 09:40:16 -06:00
MicroDev
d9d94eacca
run updated pre-commit 2023-02-01 13:38:41 +05:30
Jeff Epler
cc16bd3d53
do not chain exceptions to themselves
cpython actually makes sure the newly chained exception doesn't create
a cycle (even indirectly); see _PyErr_SetObject use of "Floyd's cycle
detection algo". We'll go for the simpler solution of just checking
one level deep until it's clear we need to do more.

Closes: #7414
2023-01-04 08:40:20 -06:00
Jeff Epler
2c46e785f6
update test results 2022-12-28 12:38:07 -06:00
Jeff Epler
83bbfd1815
Allow the tests to directly call the non-heap using _int and _str variants
.. of getenv. These can have their own special bugs.
2022-12-28 12:36:58 -06:00
Jeff Epler
edcb832661
These need to be double-blackslashed 2022-12-28 12:35:48 -06:00
Jeff Epler
337b1da143
Explicitly test \n and \r\n files
\r\n files must be working due to micropython's built in handling of
text-mode files, I didn't implement it.

\r-only (old mac text-mode files) are explicitly not supported by
the toml format.
2022-12-26 10:53:58 -06:00