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!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — Adafruit interviews Dan Rasure, Managing Partner TechShop 2.0
Wearables — Simulate tattoos
Electronics — Heatsinks aren’t enough!
Biohacking — Getting More from Home DNA Testing
No comments yet.
Sorry, the comment form is closed at this time.