You will find some examples of instruments for you to learn more how to write your own instrument.
Examples source code are available on GitHub.