robinfawell Posted August 29, 2010 Report Share Posted August 29, 2010 I have attached a table showing the analysis of successive scans to determine the code for the electronic piano I am building. This relates to one piano note. The two switches are mechanically displaced to enable the velocity to be measured. This is not new information and is based on other peoples work. Once the 1st switch is made and the Xor becomes 1 the counter is set to say 127. Until the 2nd switch is closed and the Xor changes to 0 the count is decremented on each scan. At this point the Midi Note On is sent with the velocity parameter. The counter will also be stopped. The Midi Note Off will be generated when two successive scans produce zeros. Note that a flag is set to prevent spurious generation of Note Off signals. There may be flaws in the logic of this approach or it may be simplified. In any case please let me know. Regards Robin1st Sw 2nd Switch.doc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.