I'm away from my pc with all the picaxe stuff on it, trying to write the (hopefully) last piece of code while I have some time, but not able to compile/run/test it for a week or so, so this is probably going to be rubbish code anyway...
This should hopefully compute the value of b1, which gets used as the eeprom address to start from to look up 4 bytes of data, and use them with a pwm output.
Elabel:
b1 = b1 - 12: b1 = b1 / 2: b1 = b1 + 63: gosub playNote
playNote:
symbol Address = b1 'typical data would be m4,4,158,316
read Address,b10
Address = Address + 1
read Address,b11
Address = Address + 1
read Address,b12
Address = Address + 1
read Address,b13
setfreq b10: pwmout pwmdiv b11, C.2, b12, b13
etc
There must be a less clumsy way of reading 4 bytes of eeprom into variables? It looks awful!
I'm sure that 'pwmdiv b11' wouldnt work either.
Can anyone suggest the proper way to do this? I have a block of time off, but no access to my computer, and the flu. Not the best combination...
This should hopefully compute the value of b1, which gets used as the eeprom address to start from to look up 4 bytes of data, and use them with a pwm output.
Elabel:
b1 = b1 - 12: b1 = b1 / 2: b1 = b1 + 63: gosub playNote
playNote:
symbol Address = b1 'typical data would be m4,4,158,316
read Address,b10
Address = Address + 1
read Address,b11
Address = Address + 1
read Address,b12
Address = Address + 1
read Address,b13
setfreq b10: pwmout pwmdiv b11, C.2, b12, b13
etc
There must be a less clumsy way of reading 4 bytes of eeprom into variables? It looks awful!
I'm sure that 'pwmdiv b11' wouldnt work either.
Can anyone suggest the proper way to do this? I have a block of time off, but no access to my computer, and the flu. Not the best combination...