8000 fix(notes): keep note-on pitch and velocity in the MIDI range by shauneccles · Pull Request #451 · aubio/aubio · GitHub
[go: up one dir, main page]

Skip to content

fix(notes): keep note-on pitch and velocity in the MIDI range - #451

Open
shauneccles wants to merge 1 commit into
aubio:masterfrom
LedFx:fix/notes-midi-range
Open

shauneccles wants to merge 1 commit into
aubio:masterfrom
LedFx:fix/notes-midi-range

Conversation

@shauneccles
Copy link
Copy Markdown

aubio_notes_do emitted the detected pitch as is (above 127 for anything
over about 12.5kHz) and a velocity of 127 + floor(level), which goes to
zero or below once the silence threshold is under -126dB: a 440Hz tone
at 1e-7 with set_silence(-200) produced velocity -16. Both note-on paths
now clamp pitch to 0..127 and velocity to 1..127 (a velocity of 0 is a
note-off in MIDI).

Closes #357.

Split out of #432. Checked together with the other small fixes on top of master plus #447: meson test 52/52 ok, and pytest python/tests on the setup.py build 600 passed, 51 skipped.

🤖 Generated with Claude Code

)

aubio_notes_do emitted the detected pitch as is (above 127 for anything
over about 12.5kHz) and a velocity of 127 + floor(level), which goes to
zero or below once the silence threshold is under -126dB: a 440Hz tone
at 1e-7 with set_silence(-200) produced velocity -16. Both note-on paths
now clamp pitch to 0..127 and velocity to 1..127 (a velocity of 0 is a
note-off in MIDI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python/demos/demo_wav2midi.py raise ValueError('data byte must be in range 0..127')

2 participants

0