Hello everyone,
As far as MML goes, I have seen nesmus, and I've seen mck and its relatives. For FamiTone, the admonition is to use FamiTracker.
I've been working on a command-line tool to translate MML to assembly which is compatible with FamiTone. It's written in Lua, and I currently have it under a BSD 2-clause license here. It is a WIP and not ready to use in production, but I'd be happy to have some help with it.
Demo:
It supports ca65, but all assembly output is in a Lua table, so this is easily expandable to other assemblers. The -a option allows for that, and more assembler output can be added into the code over time.
Currently, I'm only beginning to do the actual assembly output. (I've been fighting with an interactive mode for a couple days, which I decided to throw away.)
Notes:
* I don't like the name all that much. "Famml". Any suggestions?
* Of course, in the demonstration, I'm typing in lua52. On Unix, a quick cp famml.lua famml; chmod +x famml should do the trick just fine.
* AFAIK, it is compatible with Lua 5.0+, and I'm most certainly using it with Lua 5.2. It shouldn't be that difficult to change it so it'll work with previous versions of Lua, if you really must use one of them.
* HALP?
Thank you everybody.
As far as MML goes, I have seen nesmus, and I've seen mck and its relatives. For FamiTone, the admonition is to use FamiTracker.
I've been working on a command-line tool to translate MML to assembly which is compatible with FamiTone. It's written in Lua, and I currently have it under a BSD 2-clause license here. It is a WIP and not ready to use in production, but I'd be happy to have some help with it.
Demo:
Code:
$ lua52 famml.lua
Famml! - Convert MML to assembly compatible with NES and FamiTone
-h See this help screen
-o Redirect output to a file, as opposed to standard output
-p Accept input from a pipe
-a Load assembler settings from a file (default is ca65)
-s Output sfx
-m Output music (default)
$ cat foobar
@v0 = {12 1 2 2 3 3}
$ lua52 famml.lua foobar
@v0: .byte $CC
.byte $C1
.byte $C2
.byte $C2
.byte $C3
.byte $C3
.byte $7F
$ cat foobar | lua52 famml.lua -p
@v0: .byte $CC
.byte $C1
.byte $C2
.byte $C2
.byte $C3
.byte $C3
.byte $7F
$ cat foobar | lua52 famml.lua -p -o output.s
$ cat output.s
@v0: .byte $CC
.byte $C1
.byte $C2
.byte $C2
.byte $C3
.byte $C3
.byte $7F
Famml! - Convert MML to assembly compatible with NES and FamiTone
-h See this help screen
-o Redirect output to a file, as opposed to standard output
-p Accept input from a pipe
-a Load assembler settings from a file (default is ca65)
-s Output sfx
-m Output music (default)
$ cat foobar
@v0 = {12 1 2 2 3 3}
$ lua52 famml.lua foobar
@v0: .byte $CC
.byte $C1
.byte $C2
.byte $C2
.byte $C3
.byte $C3
.byte $7F
$ cat foobar | lua52 famml.lua -p
@v0: .byte $CC
.byte $C1
.byte $C2
.byte $C2
.byte $C3
.byte $C3
.byte $7F
$ cat foobar | lua52 famml.lua -p -o output.s
$ cat output.s
@v0: .byte $CC
.byte $C1
.byte $C2
.byte $C2
.byte $C3
.byte $C3
.byte $7F
It supports ca65, but all assembly output is in a Lua table, so this is easily expandable to other assemblers. The -a option allows for that, and more assembler output can be added into the code over time.
Currently, I'm only beginning to do the actual assembly output. (I've been fighting with an interactive mode for a couple days, which I decided to throw away.)
Notes:
* I don't like the name all that much. "Famml". Any suggestions?
* Of course, in the demonstration, I'm typing in lua52. On Unix, a quick cp famml.lua famml; chmod +x famml should do the trick just fine.
* AFAIK, it is compatible with Lua 5.0+, and I'm most certainly using it with Lua 5.2. It shouldn't be that difficult to change it so it'll work with previous versions of Lua, if you really must use one of them.
* HALP?
Thank you everybody.