Piano Practice Timer...using MIDI?
adamjhuber
Posts: 1
in BASIC Stamp
My daughter practices piano 30 minutes a day. She's really good at piano, has won awards for songwriting, etc. But an eight year old can get a little distracted sometimes. In 30 minutes of practice, there is quite a bit of page turning and other stalling behaviors that are just burning time on the timer.
So I got an app that listens and stops the clock when there is not playing. But she realizes if she sings or talks, the app will continue to count down. Little sneaky kid!
So I want to use a Basic Stamp to monitor the MIDI output (on this keyboard, MIDI goes out via USB). I want it to count down when she is playing, but stop the countdown if a note has not been pushed in X seconds.
Yes I know, she could fool this as well. I mainly want to do this just to see if it can be done.
Any ideas?
So I got an app that listens and stops the clock when there is not playing. But she realizes if she sings or talks, the app will continue to count down. Little sneaky kid!
So I want to use a Basic Stamp to monitor the MIDI output (on this keyboard, MIDI goes out via USB). I want it to count down when she is playing, but stop the countdown if a note has not been pushed in X seconds.
Yes I know, she could fool this as well. I mainly want to do this just to see if it can be done.
Any ideas?
Comments
That might not work - I think I remember at least one device that kept repeatedly sending $9x (note on) if you held a note down. I haven't used MIDI in a while, though, and it might have actually been sending $Ax (aftertouch), which seems more likely now that I think about it.
The main problem with using a Basic Stamp is that it can't really accurately measure time without an external RTC chip. SERIN has a timeout command, but I don't think there's any way to get how much time was left when the timeout happens.
I would go with an RTC chip. You'd only get one second granularity, but that would probably be perfect for music, since songs have rests where no notes are held down but where the song is still technically actively being played.
I just caught the bit about MIDI over USB; neither the Propeller nor the BASIC Stamp can be a USB master (which is what your keyboard expects). It doesn't have a traditional 5-pin MIDI connector too? If yes, you can connect to a micro.
-Phil
This nifty solution made me think about other ways to use cheap analog clock movements. The problem at hand might use one to good effect. Any output from MIDI or even audio out (re)triggers a 555 timer one-shot which turns the clock on for a second or two through a transistor.
Be sure to put the clock behind clear plastic or somewhere your daughter can't manually push the hands forward!