|
TR123e - EMCT Computing Final Project Version 1.0
Research Project Translation from gen~ to embedded Moog synth
|
MIDI velocity analysis and note-on/note-off discrimination. More...
Go to the source code of this file.
Classes | |
| class | VelocityParser |
| MIDI velocity threshold processor for note-on/note-off discrimination. More... | |
MIDI velocity analysis and note-on/note-off discrimination.
This module implements intelligent MIDI velocity parsing to distinguish between note-on and note-off events based on configurable velocity thresholds. The system addresses ambiguities in MIDI protocol where velocity-zero note-on messages serve as note-off events, and provides hysteresis-based velocity discrimination for improved performance reliability with electronic controllers.
@midi_protocol_background The MIDI specification defines two methods for note termination:
Many MIDI controllers and software implementations use method 2 for efficiency, sending only note-on messages with velocity 0 for note release. Additionally, some controllers may send very low velocity values that should be interpreted as note-off events to prevent unwanted note triggering.
@threshold_DISCRIMINATION_THEORY Electronic keyboards and controllers often exhibit velocity sensing variations due to mechanical tolerances, sensor calibration, and playing technique. A configurable threshold provides:
@implementation_philosophy The implementation prioritizes simplicity and reliability over complex heuristics. A single threshold value provides effective discrimination while maintaining predictable behavior across diverse MIDI sources and performance styles.
@performance_characteristics
@license This source code is provided as is, without warranty. You may copy and distribute verbatim copies of this document. You may modify and use this source code to create binary code for your own purposes, free or commercial.