Commit graph

47 commits

Author SHA1 Message Date
21ebcad778 Add notch filter to BlockBiquad 2024-10-24 21:02:40 -05:00
e891bce129 Rename FilterType -> FilterMode 2024-10-24 20:53:31 -05:00
ce0c1c77a4 Add BlockBiquad
BlockBiquad takes kind, f0 (center frequency) & Q (sharpness)
block type arguments and calculates the actual filter coefficients
every frame.

This allows the filter characteristics f0 and Q to be changed dynamically
from LFOs & arithmetic blocks.

A new manual test demonstrates this on a host computer, playing a simple
tone that is dynamically filtered.
2024-10-24 11:39:23 -05:00
Scott Shawcroft
612bf209b5
Merge pull request #9421 from timchinowsky/rawsample-doublebuffer
Add double buffering to RawSample
2024-07-22 13:24:30 -07:00
Tim
e8a7700af4 add looping to rp2040 analogbufio.BufferedIn 2024-07-18 12:03:15 -07:00
Tim
a1fe288ab8 make loop=True required for constant play, add test code 2024-07-16 13:47:09 -07:00
Tim
6c1227efdd add tests of pwm extremes 2024-07-03 10:21:34 -07:00
Tim
8a1b3e7cfc disallow duty cycle rounding to 0 2024-07-03 09:37:55 -07:00
Dan Halbert
d35c2e34b0 tests/circuitpython-manual/pwmio: shrink png images 2024-06-21 14:16:59 -04:00
Tim
59e604c783 move pwm test to tests/circuitpython-manual 2024-06-20 09:58:37 -07:00
Dan Halbert
dc69c29dac rename ports/nrf to ports/nordic 2024-03-19 17:36:57 -04:00
Scott Shawcroft
0cf3a66c81
Provide language code to string descriptors
This improves #8885 but doesn't fix the read error.
2024-02-23 15:51:12 -08:00
David Zurow
37809d7033
Fix typo in TCP server test readme.md 2023-10-26 02:33:10 -04:00
Dan Halbert
88c22d5052 remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
30b69a821e
synthio: update ring mod manual test 2023-05-30 19:32:24 -05:00
8a564602a1
synthio: this modified biquad test lets me hear what I'm hunting 2023-05-30 19:21:13 -05:00
f5388e12af
synthio: add manual filter frequency sweeping to standalone test
.. by assigning a new band pass filter to the note every 2 frames
2023-05-29 11:23:45 -05:00
51027974e5
synthio: apply biquad filters during synthesis 2023-05-29 10:53:48 -05:00
a682b42180
fir filtering demo 2023-05-17 11:13:15 -05:00
f83212314e
synthio: Add LFOs 2023-05-15 21:15:39 -05:00
91a5103910
synthio: add a host demo of all major features 2023-05-12 14:00:33 -05:00
f52bb65da6
synthio: add some new manual tests 2023-05-11 18:59:06 -05:00
17df238145
synthio: doc fixes, rename BendType to BendMode 2023-05-11 15:23:54 -05:00
2062b2bfb7
synthio: add a noise program to the manual tests 2023-05-11 09:31:08 -05:00
1d1907b98b
synthio: Generalize vibrato into bend
bend can be static, sweep, or vibrato
2023-05-11 09:31:07 -05:00
91978522c5
synthio: Add adafruit_wave and use it in the manual test 2023-05-11 09:31:07 -05:00
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
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
b33c9f6b4b
synthio: put license notice on copied files 2023-05-03 09:37:12 -05:00
d8550f4e7c
synthio: fix offset in default square waveform 2023-05-03 09:37:02 -05:00
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
52bca95208
Refactor dotenv module so that it can be tested on host
.. it needs to operate on a FILE* rather than FIL depending on
the build.

Note that this is comparing output to expected, not to cpython dotenv
package. Because run-tests.py starts the CPython interpreter with the
'-S' (skip site initialization) flag, pip-installed packages are
not available for import inside a test file. Instead, the exp
file is generated manually:
```
circuitpython/tests$ python3 circuitpython/dotenv_test.py > circuitpython/dotenv_test.py.exp
```

Unfortunately, the test fails on test e15:
```diff
FAILURE /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py
--- /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py.exp	2022-10-04 09:48:16.307703128 -0500
+++ /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py.out	2022-10-04 09:48:16.307703128 -0500
@@ -14,7 +14,7 @@
 line
 e13 e13value
 e14 None
-e15 e15value
+e15 None
 e16 #
 e17 def
 e18 #has a hash
```
2022-10-04 09:51:27 -05:00
Dan Halbert
6dc03ae3ce fix some dotenv parsing 2022-10-03 21:56:11 -04:00
Scott Shawcroft
00dcf6bd03
Tweaks from review 2022-03-11 10:51:50 -08:00
Scott Shawcroft
96f5eec2ee
Add Teensy 4.1 power pin and fix SWD for DEBUG=1 2022-03-08 17:17:07 -08:00
Scott Shawcroft
83593a1558
Start of USB host API
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)

Related to #5986
2022-03-07 18:07:25 -08:00
Dan Halbert
748834c6ba update to py tests and scripts due to black 22.1.0 2022-01-29 17:14:01 -05:00
ddf24772c3
tests: move bitmaptools files to their own directory 2021-11-24 09:53:19 -06:00
492402f23f
these must be treated as manual tests for now 2021-11-20 21:14:31 -05:00
Kattni Rembor
a63af1d04a Update D13 to LED, add PWM example. 2021-10-28 13:30:51 -04:00
Lucian Copeland
a23c659eda Add alarm tests 2021-06-20 18:09:18 -04:00
Artyom Skrobov
8056af8648 [synthio] add a simple MidiTrack implementation 2021-03-26 16:38:10 -04:00
microDev
a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Scott Shawcroft
3f08cb47b8
Merge remote-tracking branch 'adafruit/main' into busio-uart-rp 2021-02-25 16:59:15 -08:00
Scott Shawcroft
360475e266
Implement audiobusio and enhance PIO for it
This adds I2SOut and PDMIn support via PIO.

StateMachines can now:
 * read and read while writing
 * transfer in 1, 2 or 4 byte increments
 * init pins based on expected defaults automatically
 * be stopped and restarted
 * rxfifo can be cleared and rxstalls detected (good for tracking when
   the reading code isn't keeping up)

Fixes #4162
2021-02-23 15:50:00 -08:00
Lucian Copeland
e77981f86e Fix file ends for CI 2021-02-18 16:26:14 -05:00
Lucian Copeland
59429cdcbe Move manual tests and rename 2021-02-17 11:43:45 -05:00