Jump to content

Recommended Posts

Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...