Skip to content

Releases: meenie/8bit.js

JSON Notation

25 Aug 00:15
Compare
Choose a tag to compare

This new version includes the ability to load a whole song with JSON. There is two ways of inputting note, verbose and shorthand. Below is example of doing both:

var gameMusic = new EightBit();

gameMusic.load({
    timeSignature: [4, 4],
    tempo: 100,
    instruments: {
        rightHand: 'square',
        leftHand: 'sawtooth'
    },
    notes: {
        // Shorthand notation
        rightHand: [
            'E5, F#4|quarter|tie',
            'rest|quarter',
            'E5, F#4|quarter',
            'rest|quarter'
        ],
        // Verbose notation
        leftHand: [
            {
                type: 'note',
                pitch: 'D3',
                rhythm: 'quarter'
            }
        ]
    }
});

gameMusic.play();

First Release

24 Aug 01:42
Compare
Choose a tag to compare
Updating the release file with the latest code and changing the packa…

…ge.json name to 8bit.js.