Commit Graph

7 Commits

Author SHA1 Message Date
792758f2a5 Merge branch 'main' of https://git.pinkduck.xyz/adam/libGravity into euclidean 2025-06-28 09:48:40 -07:00
6d0a9f9f7f additional refactoring, small memory reduction. 2025-06-28 09:46:50 -07:00
362b6baa05 initial commit, not working 2025-06-28 08:18:51 -07:00
6fa5674909 Display memory usage reduction (#8)
Convert all string references from const char* to String/F() to store values in flash instead of ram.

Memory usage from `main`:

```
Sketch uses 27878 bytes (90%) of program storage space. Maximum is 30720 bytes.
Global variables use 1755 bytes (85%) of dynamic memory, leaving 293 bytes for local variables. Maximum is 2048 bytes.
```

Memory usage after these changes:
```
Sketch uses 28054 bytes (91%) of program storage space. Maximum is 30720 bytes.
Global variables use 1445 bytes (70%) of dynamic memory, leaving 603 bytes for local variables. Maximum is 2048 bytes.
```

This provides a dynamic memory savings of 310 bytes!

Reviewed-on: https://git.pinkduck.xyz/adam/libGravity/pulls/8
Co-authored-by: Adam Wonak <adam.wonak@gmail.com>
Co-committed-by: Adam Wonak <adam.wonak@gmail.com>
2025-06-22 18:44:01 +00:00
973c13b8ef Add per-channel Swing configuration (#7)
Select swing amount from a percentage range of the beat starting a 50% (unchanged) to a max swing amount of 95% (about 1/32nd note before end of period). Swing percentage shows an indicator marker when the percentage lines up with a quantized note on the grid.

This is probably going to be the last feature because it is pushing up against the limits of available dynamic memory.

Out of scope changes:
- selecting parameters / values no longer wraps
- reduce dynamic memory used in processClockTick
- various readability formatting

Reviewed-on: https://git.pinkduck.xyz/adam/libGravity/pulls/7
Co-authored-by: Adam Wonak <adam.wonak@gmail.com>
Co-committed-by: Adam Wonak <adam.wonak@gmail.com>
2025-06-22 18:38:51 +00:00
c8e42c7448 use appropriate string width method. 2025-06-21 15:45:11 -07:00
54999d6525 Separate display into its own file. 2025-06-17 20:40:51 -07:00