I've done more experiment with your example code Steve using the one that has some assembly.
If I use Melanie's table to get my corresponding frequency of what SOUND 116 would produce I come up with 886.5 / 2 is 443 as my Avar (from your example). I used a cycle (from your example) of 1200 for the note length.
Doing this I can duplicate my orignal sound which is good.
Now, you may remember you gave me this little program bit a while back for something else. At that time the variables were all BYTE size, but to use the 443 and 1200 I needed WORD size. No problem, I changed that in my definitions.
Now I see that using WORD in place of BYTE actually distorts my other bit of sound code which used a cycle of 30 and a Avar of 255.
From this I can assuming that it takes the processor longer to deal with a WORD variable than a BYTE variable hence the distortion of my original code?
I can easily include two of these routines, one to deal with WORD and one for BYTE for the different sounds I need without distortion, but is my logic correct on the handling of different size variables?
Is there a way around including two routines that are identical except for the variable size?
Thanks.
Bart




Bookmarks