Repository navigation
Conversation
Contributor
Author
|
Replaced by #31 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ElectronicDrums5, a five-channel electronic drum kit with swept tones, inspired by the Simmons SDS-V. Stacked on #19 (Rhythm78), which stacks on #18, #17 and #16. Review the commits after
inst/rhythm78, and merge those four first.Each channel (bass drum, snare and three toms) is one
ElectronicDrums5Voiceon the shared swept-oscillator drum core: a tone that bends down from the strike, a filtered noise and a click. Every channel has its own pitch, bend, decay, tone, noise, click and filter, and a sensitivity trim sets how far velocity moves its level and bend.SweptOscillatorDrumCoregains a tone mix level and a configurable noise filter. Its defaults are pinned by a test, so the Rhythm909 is unchanged. There are five patches. The Rhythm808, Rhythm606, Rhythm909 and Rhythm78 traits stay at 0 moved.Local proof:
Tests: scoped pytest (the five machines, the drums cores, the kit, the adapter, allocation) has 509 passed, and
test_traits -k "rhythm or electronic_drums5"has 5 passed. MicroPythontests/mpy/run.pyruns 230 tests with 0 failures; its ElectronicDrums5 tests check each channel's tone, noise, click and decay, velocity and sensitivity, volume and the tom macros. Ruff check and format are clean.Traits: 152, accepted in
tests/traits/electronic_drums5.json.Parity: CPython and MicroPython agree within 0.03 dB on the kick and toms, and within 0.25 dB on the snare, whose noise comes from a different generator on each interpreter.
DC: 0.0 at every pad's tail.
Real time, all five sounds struck and re-struck:
Fixed in review:
t1_bendandt1_decaywrote one value to all three toms. They now set tom 1 to the knob's value and move the other two by the same amount, so a patch's per-tom offsets survive; a tom that reaches 0 or 10 stops there and returns to its offset when the knob comes back. No current patch has such offsets, so the traits stay at 0 moved.Planted faults, each caught by a test: a control ignored (tone, noise, click, filter, pitch, decay, volume), the bend inverted, sensitivity or velocity ignored, the noise decay bug, an allocation in the voice's block, an oscillator reset on re-strike,
t1_decaymoving one tom, the tom macros writing one value to every tom (on both interpreters), volume ignored on MicroPython, and a change to the shared core's defaults.Demo:
examples/electronic_drums5_demo.pyruns 55 s over five sections, with 0 clipped samples and a section RMS spread of 4.9 dB.Limitations.
Leave this open until CI can run it.