← D568 Play the next note of the active tune Map D605 → Game-over tune
D5A5: Note period/duration table
The playable pitches, an equal-tempered chromatic ladder with one semitone per slot.
Two bytes per slot: the period first, then the duration. A lower period gives a higher pitch, and the duration counts the speaker half-cycles the note is held for.
Down the table the period falls as the duration rises, so a note lasts about one frame whatever its pitch. The 8-bit period runs out of resolution toward the top of the table. The top two slots sound about a semitone above the notes they name.
note_table D5A5 DEFB $FF,$0A C4, middle C
D5A7 DEFB $F0,$0B D♭4
D5A9 DEFB $E3,$0C D4
D5AB DEFB $D6,$0C E♭4
D5AD DEFB $CA,$0D E4
D5AF DEFB $BE,$0E F4
D5B1 DEFB $B3,$0F G♭4
D5B3 DEFB $A9,$10 G4
D5B5 DEFB $9F,$11 A♭4
D5B7 DEFB $96,$12 A4
D5B9 DEFB $8E,$13 B♭4
D5BB DEFB $86,$14 B4
D5BD DEFB $7E,$15 C5
D5BF DEFB $77,$16 D♭5
D5C1 DEFB $70,$17 D5
D5C3 DEFB $6A,$19 E♭5
D5C5 DEFB $64,$1A E5
D5C7 DEFB $5E,$1C F5
D5C9 DEFB $58,$1E G♭5
D5CB DEFB $53,$1F G5
D5CD DEFB $4E,$21 A♭5
D5CF DEFB $4A,$23 A5
D5D1 DEFB $46,$25 B♭5
D5D3 DEFB $42,$27 B5
D5D5 DEFB $3E,$2A C6
D5D7 DEFB $3A,$2C D♭6
D5D9 DEFB $37,$2F D6
D5DB DEFB $34,$31 E♭6
D5DD DEFB $30,$35 E6
D5DF DEFB $2E,$37 F6
D5E1 DEFB $2B,$3B G♭6
D5E3 DEFB $28,$3F G6
D5E5 DEFB $26,$42 A♭6
D5E7 DEFB $24,$46 A6
D5E9 DEFB $22,$49 B♭6
D5EB DEFB $1F,$50 B6
D5ED DEFB $1E,$53 C7
D5EF DEFB $1C,$58 D♭7
D5F1 DEFB $1A,$5E D7
D5F3 DEFB $18,$65 E♭7
D5F5 DEFB $17,$69 E7
D5F7 DEFB $16,$6D F7
D5F9 DEFB $14,$77 G♭7
D5FB DEFB $13,$7D G7
D5FD DEFB $12,$83 A♭7
D5FF DEFB $11,$89 A7
D601 DEFB $0F,$99 B♭7
D603 DEFB $0E,$A2 B7 – the top slot
← D568 Play the next note of the active tune Map D605 → Game-over tune
Fork me on GitHub