Skip to content

munshkr/gakuon

Repository files navigation

gakuon 楽音 Build Status

A Music Macro Language (MML) compiler for the C64 SID chip.

This repository contains only the MML compiler of Gakuon. For the visual editor, see here.

NOTE: This is still in pre-alpha stage. It doesn't work!

Right now I'm working on:

  • SID player routine
  • MML syntax
  • MML compiler
  • Tests
  • Documentation

Read the MML reference to know more about the syntax. It is inspired on ppmck, xpmck and MMLX compilers.

Chat with us at Gitter!

Usage

const gk = require('gakuon');

let source = "A l8 ccdd eeff\n";

// Parse string and compile into assembly code
let compiler = new gk.Compiler();
let asm = compiler.compile(source);

// You can get information about the MML document with the
// Document object:
let doc = new gk.Document(source);
console.log(doc.initialState.noteLength);  // 8

let codeGen = new gk.CodeGenerator(doc);
asm = codeGen.generate();

Development

After cloning repo, install all packages with npm install.

To run all tests, use make or make test.

You might need these other dependencies for some of them:

MML parser

Uses PEG.js to build a PEG parser for MML files.

Update grammar file lib/grammar.peg and execute make to compile and run unit tests.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/munshkr/gakuon.

License

Source code is released under Apache 2 license.

About

🎼 A Music Macro Language (MML) compiler for the Commodore 64 SID chip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published