Tune

picnut

New Member
I can see how duration , octave and note get encoded into a byte. The example I chose was minim, middle octave, note C.

However I fail to get from there to the hex value, probably old age and a lack of lubricant.

Anyone able to enlighten this old man ?. Cheers ...

picnut
 

Technical

Technical Support
Staff member
See the Tune command in part 2 of the manual for the bit encoding method

minim = 11
middle octave = 00
note C = 0000

11 00 0000 in binary is C0 in hex
 
Last edited:

picnut

New Member
Yes, I also got 11000000 but the Windows calculator maintains that is C0 in Hex, when according to page 151 of "Programming and customising etc" ... I read it, that middle C should be $00. Something is amiss ......
 

Technical

Technical Support
Staff member
$C0 is correct for octave 6, C, minim (corrected above!)

For $00 it would be crochet C 6, not minim C 6, so it sounds like the book is wrong.
 

westaust55

Moderator
Yes, I also got 11000000 but the Windows calculator maintains that is C0 in Hex, when according to page 151 of "Programming and customising etc" ... I read it, that middle C should be $00. Something is amiss ......
Unfortunately that book you reference is known to have a number of typos.
Pity no errata sheet is available.

PICAXE Manual 2 (currently Rev 6.9) page 207 onwards should be used as your reference.
 

AndyGadget

Senior Member
Tune Spreadsheet

No explaination - no time as I'm just off with the family for the weekend, but this spreadsheet I put together may come in useful. (Change the extension to .XLS.)
 

Attachments

Top