GSoC 2016 - Week 10 - Raw input timings
This was my 10th week working on note entry with MuseScore for Google Summer of Code. This week I started work on a new way of storing and handling user input internally that should result in more accurate notation.
This week’s summary:
- Started new internal representation of user input:
- Storing of raw input times
- Adjust times to cope with tempo changes
- Convert to ticks and quantise to beat
Still to do:
- Instant note entry in automatic Real-time mode
- Test user feedback
New internal representation
The “semi-realtime” approach is pretty straightforward: a note is inserted for each key that is being pressed at the instant a beat is received. At low input tempos this works pretty well, but at higher tempos it becomes increasingly likely that notes will be missed because the user pressed or released the key slightly too late or too early. My plan for overcoming this limitation is to store the time at which the NOTE_ON and NOTE_OFF events were received, and decide whether a note coincides with a beat based on these. The initial implementation is quite crude, but with the raw timings available it should be possible to provide a certain amount of correction for slight tempo changes or other inaccuracies, and to support more complicated rhythmical features such as tuplets.