I’ve implemented the readTrackstep() functionality of the program. It simply reads through the trackstep of a song line by line and checks for either commands or pattern numbers. When it finds a pattern number, it passes on the handling to a separate readPattern function. The trackstep commands still need some work. There is a total of five commands where one is a simple stop command and another is not used in Monkey Island. The remaining three commands either play a selection, set the tempo, or start a volume slide. These three functions will be developed as the track handling structure evolves. The trackstep is handled via an 8 member array of track structures. The requirements of this structure is still changing as I refine the design. I still need to develop a method for handling the tempo/speed settings at which tracks are updated. I’m still not quite sure how to do this.
The readPattern function is also partially implemented with work in progress. Reading patterns involves identifying either commands or notes. The notes are handled by a separate function, leaving the command handling to be taken care of. The pattern commands are very much linked to the trackstep so developing the command reading functionality will help refine the required track structure. As the commands are implemented, I will go back to make the necessary changes and updates to the readTrackstep function.