Commit Graph

1326 Commits

Author SHA1 Message Date
Jeff Epler bd9aca2526
Merge pull request #7862 from jepler/synthio-envelope
Synthio envelope
2023-05-03 12:42:56 -05:00
Jeff Epler dd262258e0
synthio: Add `MidiTrack.error_location` to record errors
.. instead of just printing the unraiseable error on the repl
2023-05-03 09:37:02 -05:00
Jeff Epler d8550f4e7c
synthio: fix offset in default square waveform 2023-05-03 09:37:02 -05:00
Dan Halbert 34f565dd89
Merge pull request #7891 from tannewt/fix_epd_uc
Add address_little_endian and fix display memory reuse
2023-04-26 00:27:59 -04:00
Scott Shawcroft 75046b3a58
Save space with consolidated errors 2023-04-25 13:26:48 -07:00
Scott Shawcroft eab202aa53
Fix SH110x 2023-04-25 10:36:34 -07: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 87fc5eff26
Re-enable partial updates when available 2023-04-24 16:24:33 -07:00
Scott Shawcroft 3ee8d0b5cb
Merge pull request #7878 from gamblor21/gifio_palettes
Palettes for OnDiskGif
2023-04-24 12:44:53 -07:00
foamyguy 01197a96d1 remove abs() from radius 2023-04-21 16:54:46 -05:00
Scott Shawcroft b16037859c
Fix native epd boards 2023-04-21 14:36:35 -07:00
Scott Shawcroft 7089ea4d65
Add address_little_endian for displayio
Add address_little_endian for epaper displays with little endian
(low byte first) addresses.

Also clears allocated display and display bus memory so it has a
known state. The acep member wasn't always set so it varied
accidentally.

Fixes #7560. May fix #7778. Fixes #5119.
2023-04-21 12:19:29 -07:00
gamblor21 afae39765f PR review fixups 2023-04-20 18:26:04 -05:00
Scott Shawcroft 66edcf5d03
Add PicoDVI support
PicoDVI in CP support 640x480 and 800x480 on Feather DVI, Pico and
Pico W. 1 and 2 bit grayscale are full resolution. 8 and 16 bit
color are half resolution.

Memory layout is modified to give the top most 4k of ram to the
second core. Its MPU is used to prevent flash access after startup.

The port saved word is moved to a watchdog scratch register so that
it doesn't get overwritten by other things in RAM.

Right align status bar and scroll area. This normally gives a few
pixels of padding on the left hand side and improves the odds it is
readable in a case. Fixes #7562

Fixes c stack checking. The length was correct but the top was being
set to the current stack pointer instead of the correct top.
Fixes #7643

This makes Bitmap subscr raise IndexError instead of ValueError
when the index arguments are wrong.
2023-04-19 15:14:02 -07:00
gamblor21 403ea89d57 Initial paletts for OnDiskGif 2023-04-18 19:44:03 -05:00
CanyonCasa 61f868a14e
Update shared-module/onewireio/OneWire.c
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2023-04-17 12:02:45 -06:00
Debian 8927e41180 Reset stuck low detection 2023-04-15 17:05:12 -06:00
Jeff Epler 79d093d957
tweak max envelope calculation vs number of active notes 2023-04-05 17:43:03 -05:00
Jeff Epler 9993b4b01c
Prevent playing the same note on 2 channels 2023-04-05 16:53:08 -05:00
Scott Shawcroft 6df88ac948
Merge pull request #7825 from jepler/better-synthio
Better synthio
2023-04-05 12:23:10 -07:00
Jeff Epler f2e26e8bde
get the cmsis macros the right way 2023-04-05 13:37:18 -05:00
Jeff Epler 04f4092e11
synthio: support audio outputs that need double buffering
closes #7837

tested on rp2040 pico w on pico dv shield
2023-04-05 11:57:13 -05:00
Jeff Epler b9dea05dbf
Enable audiomixer on unix port, for testing 2023-04-05 09:02:03 -05:00
foamyguy 8bf94d03e4 try to fix multi-display reset 2023-04-04 20:31:42 -05:00
foamyguy 60e12c5c1d only add circuitpython_splash to display if it's not already in another group 2023-04-03 15:43:29 -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 e0984fa195
Factor out the synthesizer from midi track 2023-04-02 18:54:07 -05:00
Jeff Epler e728a0c1b9
switch to 16.16 fixed point for synthesis 2023-04-01 11:47:27 -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
Jeff Epler 13e17e6dcd
Make synthio debuggable in unix coverage port 2023-04-01 11:46:36 -05:00
Jeff Epler db1e01c462
Don't require huge buffers for long-held notes 2023-04-01 11:46:36 -05:00
Jeff Epler 7f73ff1b2d
hold accumulator phase across span
this fixes grunk in held notes
2023-04-01 11:46:35 -05:00
Jeff Epler 02f8a45dfa
synthio: allow increasing number of channels
12 channels works well on metro m7
2023-04-01 11:46:27 -05:00
jposada202020 1931b6c042 fixing algorithm and MAX 2023-03-30 18:08:17 -04:00
jposada202020 4986ad6d6b
Update shared-module/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:43:57 -04:00
jposada202020 f6a0fb20f2
Update shared-module/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:29:39 -04:00
jposada202020 533f532ff2
Update shared-module/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:29:18 -04:00
jposada202020 6ad053e403 correcting feedback 2023-03-30 08:51:52 -04:00
jposada202020 f3d85d6932 Merge branch 'main' into adding_circle_bitmaptools 2023-03-30 07:44:07 -04:00
Dan Halbert 5909ceacc6
Merge pull request #7806 from dhalbert/no-report-id-out-reports
Handle HID OUT reports with no report ID
2023-03-29 15:33:36 -04:00
Dan Halbert 81482a6f66 Merge remote-tracking branch 'adafruit/8.0.x' into merge-8.0.x-to-main 2023-03-29 14:52:49 -04:00
Jeff Epler a8bbb21eeb
Use short-circuiting or (also may save some code size)
Co-authored-by: Dan Halbert <halbert@adafruit.com>
2023-03-29 10:09:01 -05:00
Jeff Epler cc3d0f6fa1
getenv: treat a read error like eof
Otherwise, the following would occur:
 * settings.toml is in the process of being written by host computer
 * soft-reset begins
 * web workflow tries to grab CIRCUITPY_WIFI_SSID, but loops forever
   because FAT filesystem is in inconsistent state and file reads error
 * settings.toml write by host computer never completes and the filesystem
   remains corrupt
 * restarting yields a soft-bricked device, because startup reads
   CIRCUITPY_WIFI_SSID again
2023-03-29 10:04:06 -05:00
Dan Halbert d289329344 Handle HID OUT reports with no report ID 2023-03-28 11:38:38 -04:00
Neradoc 1fad969389 add unsigned ints and 64 bit types to msgpack
change msgpack error message when format invalid
2023-03-27 19:37:23 +02:00
Dan Halbert 0639c0850f
Merge pull request #7751 from hathach/add-codespell
Add codespell to pre-commit to scan and fix typo
2023-03-23 13:26:24 -04:00
Dan Halbert db76fbd55f
Merge pull request #7712 from gamblor21/ondiskgif_freemem_fix
Add deinit to OnDiskGif
2023-03-23 09:03:07 -04:00
hathach 8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
gamblor21 e993d0f3c3 Missing brace 2023-03-22 20:19:09 -05:00
gamblor21 3020893ba2 Tweak to try to reduce low space builds 2023-03-22 19:20:20 -05:00