Here’s some example codes from Shiru’s website…(the link near the top that says “these small example programs” ).
I have a copy that works with the version I’ve been using for the past 2 years, cc65 version 2.15
You can import a MIDI file to famitracker (an older version). I discussed it on this post.
You can download the famitracker here (4.2 is the last version that imported MIDI)
Other projects in C.
I wrote 2 unofficial updates to the famitone music driver. NOTE. I fixed the bugs (I think).
famitone3.3, which adds all notes and a volume column (sacrifices some efficiency in size and speed).
And famitone4.1, which adds 1xx, 2xx, and 4xx effect support.
I have used these in some of my games. Jammin Honey and Flappy Jack, for example.
I added some other features and bug fixes, which I put in the original version also…
-added song names to file output
-added command line switch -allin prevents removal of unused instruments
-added command line switch -Wno suppresses warnings about unsupported effects
-multiple D00 effects (different channels) incorrect pattern length
-Bxx below D00 effect (different channels) incorrect pattern length
-Bxx loop back causing wrong instrument inserted at loop point
example of new switches:
text2vol filename.txt -ca65 -allin -Wno