Getting started with MML (mck, ppmck)

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Getting started with MML (mck, ppmck)
by on (#178827)
Hello,

Just wondering if anyone here is using MML (Music Maco Language) for creating their NES(nsf) music instead of using a tracker like famitracker or perhaps a modern daw?

As a programmer myself, the idea of being able to create music through codes while staying in the comfort of my favorite editor is something that's very enticing.

Aside from the obvious differences in workflow and the representation of music notes (which one can perhaps get used to overtime) what are some of the things that you liked or didn't like about MML compared to trackers? What would you say are the advantages(strength) and disadvantages(weakness) of MML? Which area does it excel in? or did it ends up being overly tedious and un-intuitive for you?
----------------------------------------------------------------------------------------------

I searched a bit online, but there doesn't seem to be an over abundance of material on MML comapred to its counter part: famitracker, which, of course has a strong following in the community and a few fantastic and detailed youtube tutorials. However, for MML, these two seems to be the only available sources right?

Learning Materials:
1. http://www.nullsleep.com/treasure/mck_guide/
2. http://woolyss.com/chipmusic/chipmusic- ... _guide.php
* http://wikiwiki.jp/mck/?MML (now this one is very well made and contains a wealth of information, but sadly it's in Japanese so it's a bit hard to utilize even with google translate)

Does anyone know of any other materials by any chance?
------------------------------------------------------------------------------------------------------
Now, when it comes to setting up MML, the primary steps seems to be:

1. Obtaining VirtuaNSF、 NSFplay
2. Get ppmck. 09a being the latest pack I believe?
-unzip and extra the files and use them to set up the enviornment

That's pretty much it right? (are there any utilities that are essentials when it comes to mml, ppmck? hoot? syntax color scheme, analyzer? )
----------------------------------------------------------------------------------------------

*Lastly, all of these packages and software seems to be made for Windows, does anyone know if it's possible to set it all up in Linux? ^_^ If so, could someone perhaps show me how? Thanks in advance!*


By the way, I know a lot of the nes game's music were composed with MML in the past, but when it comes to modern chiptunes, what are some of the composers or musicians I can check out who use MML as their weapon of choice when it comes to music creation?
Re: Getting started with MML (mck, ppmck)
by on (#178828)
I use Pently, an NES music engine whose input format is based on MML and LilyPond. The tools are in Python, so they'll work on both Windows and Linux.

Otherwise, if you use Linux on x86 (or Linux on x86-64 with 32-bit libraries installed), you can use Windows tools in Wine.
Re: Getting started with MML (mck, ppmck)
by on (#178829)
There's this website:
https://www.mmlshare.com/

It has lots of examples to learn from, and a built-in web interface for building and listening to the resulting MML. (Also a good place to find people to talk to about it.)

As for what the advantages/disadvantages are...
  • It has a lot of extra flexibility if you want to do some very specific/specialized stuff, but for most music this isn't really much of an advantage.
  • Since it's all text you could potentially have a mouse-free working environment, if that's important to you.
  • The lack of immediate feedback is a huge disadvantage compared to Famitracker. Being able to hear a sound right away, and hear it in context of the rest of the music as you're working is so important. It speeds up composing tremendously (i.e. you make better music in less time). This is the single reason I don't really use MML unless I have to.

If you want some examples of very good PP/MCK MML, I think the very best work has been done by Robokabuto:
http://www.geocities.jp/robokabuto/
Re: Getting started with MML (mck, ppmck)
by on (#178851)
I could never really get into trackers so I'm more for MML. I'm no musician but I can read sheet music, and MML is basically like writing sheet music but with symbols easily typed on a PC keyboard rather than stripes and tadpoles.

One problem with MML is that there is no Famitone for it. PPMCK is feature-rich but it seems to be mainly for making NSFs rather than homebrew development, and also you are restricted to NESASM. NSDL seems good but with that you are restricted to CC65/CA65.

In the end I decided it was a good idea to learn how to make my own sound engine, and it was very worthwhile. It shouldn't be too hard to make an MML interpreter for it.
Re: Getting started with MML (mck, ppmck)
by on (#178852)
Pokun wrote:
One problem with MML is that there is no Famitone for it. PPMCK is feature-rich but it seems to be mainly for making NSFs rather than homebrew development, and also you are restricted to NESASM. NSDL seems good but with that you are restricted to CC65/CA65.

Pently also requires ca65 at the moment. Do you prefer ASM6? Others have asked me to add ASM6 support, but I haven't been able to work much on Pently due to other obligations. Or do you prefer a different assembler?
Re: Getting started with MML (mck, ppmck)
by on (#178863)
It is true ppMCK is meant for making .NSF and is not meant to make a game. But I think ppMCK can be compile on Linux it is a C code and is probably portable, although I have not tried it yet (try going into that directory and typing make and see if it compiles without errors). I have made some improvement of ppMCK, but have not tried it since I have this new computer (with Linux). I do not use syntax colours.

It is possible that many people will not want to use ca65 and will prefer ASM6; or in my case, I prefer NESASM.

I have also once made a music engine for a Famicom game and used Csound and CsoundMML, but that don't work so well. There is AmigaMML to make music output to .MOD/.XM formats, but that isn't actually suitable for NES/Famicom anyways. (But, possibly a program can be based on modified version of such things, to do something else.)
Re: Getting started with MML (mck, ppmck)
by on (#178873)
any idea why BouKiCHi's ppmck section has been taken down on github? :(

i found this http://deadbeef.sourceforge.net/portable.html
deadbeef is a popular linux music player and upon testing, it does seems to play nsf file so that's good, but when it comes music players for nsf, do accuracy matter? is that why custom players such as nsfplay was created? because it's able to more accurately play the nsf files than the commercial players and able to detect and accurately play all the pitches?

played a sing in both deadbeef in linux and NSFplay in windows.. NSFplay seems so much clearer.
is it possible to run NSFplay in linux via Wine?
Re: Getting started with MML (mck, ppmck)
by on (#178885)
MML is for music MACRO language, not micro, because it uses macro in order to register instrument sounds.

I like MML better than trackers. It's more flexible and all, and is basically platform independant. You'd in theory just need to change macros and you'll be ready to play the same song on another platform. Also, if you want say a channel to echo another channel (play the same melody with a delay), with MML it's trivial, but with a tracker... welcome to hell.

MML is also the sole format that allow you to compose with a different tempo for different tracks, or to have not all tracks looping at the same time. It also allow you to control more directly the memory of what's in the music replayer, much like programming in assembly.
Re: Getting started with MML (mck, ppmck)
by on (#178889)
Bregalad's points put Pently solidly in the MML camp.

By using named instruments in Pently, I've left the multi-platform option open. The prospect of a port to Super NES is why I pushed for a 65C02-style SPC700 instruction macro pack in ca65, so that I could share song and pattern interpretation code between NES and Super NES versions. But you'd still have to change channel names in arrangements of a piece for different sound chips.

A 2-channel echo in Pently looks like this:
Code:
at 9:1
play melody_a with flute on pulse2
at 9:1:3
play melody_a with quiet_flute on pulse1

This waits for measure 9 beat 1, starts a pattern on pulse channel 2, waits until 3 rows after the start of the beat, and starts the same pattern on pulse channel 1 with a different instrument.

A 1-channel echo looks like this:
Code:
at 9:1
attack on pulse2
play fanfare_b with staccato_horn on attack
at 9:1:3
play fanfare_b with echo_horn on pulse2


Independent looping per channel in Pently was inspired by the short drum track loops in the ground, Starman, and water themes of Super Mario Bros. And it saves a lot of space, which was important for the NROM-128 games for which I originally developed Pently. A loop can also be interrupted, which makes drum fills practical.

Bregalad wrote:
MML is also the sole format that allow you to compose with a different tempo for different tracks

How can tracks be kept in sync like this?
Re: Getting started with MML (mck, ppmck)
by on (#178890)
where are you getting your ppmck from?
https://github.com/BouKiCHi/ppmck is no longer available for some reason

there's this older ppmck09a.zip release from http://ppmck.web.fc2.com/installppmck.html#UNIX
but then all the future releases are unavaiable due to the missing section on his github page.

i do see 2-3 forks of his ppmck on github, is anyone using any of them? or has anyone found more updated versions from japanese web sites that he may have released to?
Re: Getting started with MML (mck, ppmck)
by on (#178891)
tepples wrote:
Pokun wrote:
One problem with MML is that there is no Famitone for it. PPMCK is feature-rich but it seems to be mainly for making NSFs rather than homebrew development, and also you are restricted to NESASM. NSDL seems good but with that you are restricted to CC65/CA65.

Pently also requires ca65 at the moment. Do you prefer ASM6? Others have asked me to add ASM6 support, but I haven't been able to work much on Pently due to other obligations. Or do you prefer a different assembler?

I'm an ASM6 guy. I have tried ca65 and don't really mind it at all, but since all my projects are in ASM6 I don't like to have to switch to different assemblers all the time. Also I like the simplicity of ASM6, and it's the one I'm most comfortable with.
Re: Getting started with MML (mck, ppmck)
by on (#178897)
rainwarrior wrote:

For some reason, a different site pops up for me using that URL... weird.

In any case, I managed to find http://boukichi.github.io/mckjs/

rainwarrior wrote:
The lack of immediate feedback is a huge disadvantage... Being able to hear a sound right away, and hear it in context of the rest of the music as you're working is so important. It speeds up composing tremendously (i.e. you make better music in less time). This is the single reason I don't really use MML unless I have to.


I'm going to second this, because you don't realize just HOW important it is until you don't have it.
Re: Getting started with MML (mck, ppmck)
by on (#178899)
Bregalad wrote:
How can tracks be kept in sync like this?

This feature is when you do not want to tracks to be kept in sync obviously. This happens rarely, but if you want to do it, you can. With a tracker you can't.

The most obvious use is to include sound effects such as birds tweet in a music, and you don't want your birds tweet exactly at the same place in music every loop for instance. Not useful on NES, but definitely useful on platform with more sound channels.
Re: Getting started with MML (mck, ppmck)
by on (#178902)
rainwarrior wrote:
There's this website:
https://www.mmlshare.com/

Do you know its administrator? If so, could you pass along this message:
Code:
www.mmlshare.com uses an invalid security certificate.

The certificate is only valid for the following names:
  app.fisiozero.pt, www.app.fisiozero.pt

Error code: SSL_ERROR_BAD_CERT_DOMAIN
Re: Getting started with MML (mck, ppmck)
by on (#178906)
rainwarrior wrote:
The lack of immediate feedback is a huge disadvantage compared to Famitracker. Being able to hear a sound right away, and hear it in context of the rest of the music as you're working is so important. It speeds up composing tremendously (i.e. you make better music in less time). This is the single reason I don't really use MML unless I have to.

I always wondered how well something like this could be worked into a text editor specifically customized for use with (a specific variant of) MML.
Re: Getting started with MML (mck, ppmck)
by on (#178909)
Using a different loop point for different tracks can sometimes be useful for such thing as ostinato, but I am not sure how useful it is to use a different tempo per tracks (although maybe some people do find it useful; I have seen sheet music that has multiple time signatures running simultaneously, although I am not sure what good that is). And it is true that things such as echo are easier with MML.

(Many of the advantages of using MML are why I wrote AmigaMML, since some game engines for modern computers, and some other programs, expect .MOD/.XM formats for music. AmigaMML does support different local loops per channels (all such loops are automatically unrolled), but does not support differing global loops per channel due to limitations in .MOD/.XM formats.)
Re: Getting started with MML (mck, ppmck)
by on (#178915)
Although separate tempo tracks could be used for BGSes a similar thing could be achieved if the sound engine allows multiple songs to be played at the same time. One BGM and one BGS.

thefox wrote:
rainwarrior wrote:
The lack of immediate feedback is a huge disadvantage compared to Famitracker. Being able to hear a sound right away, and hear it in context of the rest of the music as you're working is so important. It speeds up composing tremendously (i.e. you make better music in less time). This is the single reason I don't really use MML unless I have to.

I always wondered how well something like this could be worked into a text editor specifically customized for use with (a specific variant of) MML.

There's 3ML Editor that allows for immediate playback of the MML from a position you choose. 3ML Editor is for Mabinogi MML.
Re: Getting started with MML (mck, ppmck)
by on (#178938)
Bregalad wrote:
Also, if you want say a channel to echo another channel (play the same melody with a delay), with MML it's trivial, but with a tracker... welcome to hell.

Neil Baldwin's NTRQ NES tracker had a feature to do just that (called "auto echo").

In Famitracker, it involves a copy and paste for every pattern the effect spans. I wouldn't call it "hell", but sure, it's not automated in any way. I've done it hundreds of times in various trackers though (and so have a lot of people I know), doesn't generally take a significant amount of time if you know the relevant keyboard commands.

If the concern is data size, it's a feature that could be added to any music engine. Doesn't really have to do with whether it's from a tracker or not.
Re: Getting started with MML (mck, ppmck)
by on (#237193)
tepples wrote:
Pokun wrote:
One problem with MML is that there is no Famitone for it.\ NSDL seems good but with that you are restricted to CC65/CA65.

Pently also requires ca65 at the moment.

Not anymore. As of today, Pently supports ASM6, though it still requires Python to compile the score into assembly language.
Re: Getting started with MML (mck, ppmck)
by on (#237208)
I started with ppmck (was using mac terminal) 10 years ago and it was... difficult. you really get into the numerical guts with instrument creation and looping, but there's no edge here. it helped when coding early homebrews using metal slime's engine as it wasn't as daunting to just code in loops and such, but the kids these days are famitracker heavy and musicians probably don't even see a .db. It was an intellectual endeavor to approach how you write the notes compared to fami and metal slime's engine, and as a musician you should be comfortable working in various environments, so it can't hurt. unless you should be spending your time reading that book for your book club that meets Thursday. no, that's not a lot of time at all!