I'm trying to write a program on my VIC that will play a song. The problem I'm having is that I don't know how to make the VIC play all 3 voices plus noise in the program. I've been using the S assignments (S1=36874 S2=36875 S3=36876 S4=36877). However, I am unsure how to assign specific note & duration values to different voices, as well as timing the voices so they play at the right times with each other.

The time durations are in jiffies (60ths of a second). The 'play' routine does the following:

* takes the current jiffie clock as a starting reference* looks at the current note, if the current jiffie time minus the start is greater than or equal to the note time then it sets the register to the value. Then it repeats for the next note* if the current time minus the start is less than the note time the routine returns

This routine is then repeatedly called unto the tune is complete. This also allows the program to manage other tasks, such as moving graphics, polling the keyboard etc.

hello everyone is ArmandoThese two music tracks arerealized by me with a program in BasicThe listed ones are available to those who have them.The notes and the value matchto the original score.I hope they are happy ......Greetings ...... Armando