The code you have posted runs the fluxamsynth and you clearly have a library that will control that device, including examples of how to turn notes on and off and change performance parameters.
How you implement the interface to your instrument switches is really a matter of how your instrument works and what you are trying to achieve in the way of performance. Assuming that you have implemented the echanter according to the web site instructions, you have the inputs necessary to do what you need.
I have to say that I am still confused as to what you really need from the forum.