Huby beeper music engine by Shiru (shiru@mail.ru) 04'11, 11'13


Features

This engine is very simple and limited. It has two tone channels without volume, global speed, and one drum sound which replaces note on the first channel. Main feature of the engine is small size, under 100 bytes of code (hence the name), and compact data format. It could be useful for games when there is not much free memory left for music.


How to make music

There is no dedicated editor for the engine. You can make music using any tracker with XM format support. You have to follow certain limitations. You can hear sound while editing using template module provided, it has sounds sampled from the engine, so the sound is somewhat similar to the end result, although not much. After you have made a song, you can convert it to an assembly source file with data in needed format.

You can use patterns with lengths of multiple of 8 in your song. Module should have no less than three channels. Loop is not supported, player stops when end of order list is reached. You can use both global tempo and BPM to change speed, but not Fxx effect. The speed will be recalculated as needed, to closest possible in the player.

You can use few octaves of notes, starting from A#1 and to highest octaves, but remember that high notes are detuned. If a note goes out of range, the converter warn you. You can also use effect E5x on the notes (finetune). x is 0..8..F, 8 means no change in the note frequency, 7 means a bit higher frequency, 9 means a bit lower frequency. This could be used to produce 'fat' sounds by putting the same note on two channels, and using E59 on every note of one of the channels. Be careful if you use E57 or lower on low notes, it could move frequency out of range. Converter will show you warning messages in this case.

You can put drum to any channel, only one drum can be played on a row. There is just one drum sound, when it plays, it replaces note on the first channel.


Music data format

16-bit speed
16-bit absolute address of patterns data-8
Order list, two bytes per position (pattern numbers), if first byte is 0, it is end of the song
Patterns data

Patterns are single channel, always 8 rows long. Bytes are 8-bit dividers, except #2c, which is drum.