In my previous post I showed how to use Raspberry Pi to automatically record MIDI files from digital piano whenever you turn it on. However, if you sit down and play for an hour, and get one big MIDI file, it is not very useful. So what to do?
Pianoteq has a feature that splits your playing session based on breaks you take between playing notes. So I decided to mimick this feature with a simple Python script that:
- Keeps tab on keys and pedals pressed
- Whenever X seconds elapse without any keys or pedals down, a new MIDI file is started
- Additionally, if user presses and releases sustain pedal several times in the end, filename for that MIDI is altered to “highlight” that file
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Maker Business — Prototyping PCBs with Particle, a guide from a pro in the field #makerbusiness
Wearables — From mat to hat
Electronics — Even lower power!
Biohacking — Nectome’s Brain Preservation and Backup Service Plan
No comments yet.
Sorry, the comment form is closed at this time.