Resources to learn mml/ppmck

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Resources to learn mml/ppmck
by on (#115681)
Hi there. I'm interested in learning how to compose with mml/ppmck. What resources would people recommend to learn from? What I'm finding seems to be old/no-longer updated, like nullsleeps mml guide, and the ultimate ppmck reference, which still seems to be missing info, like doing hardware envelopes on the sunsoft 5b chip. Which clearly seems to be possible. I suspect doing translations of the docs included with ppmck might be helpful, but wondered if the works already been done by someone, or what other resources people have.
Re: Resources to learn mml/ppmck
by on (#115682)
There is also http://ppmck.wikidot.com/, though jrepage and me haven't put content in it for a while.

But I consider myself very knowledgeable about ppmck, having even studied the compiler and nsf driver a little and adding some hacks in the way. You can PM me or just reply with your questions.

EDIT: The "obsolete" resources are nevertheless mostly relevant, and you can use http://www.mmlshare.com/ to write/play ppmck mmls, and you can learn from other works if you like to learn that way.
Re: Resources to learn mml/ppmck
by on (#115683)
Hi there, thanks for the pointer to the wiki. It looks like a nice quick reference/memory jogger, but I did note some of the pages didn't exist. I'd be willing to update these, and that will probably also help and solidify my learning process. First things first, just doing a google search for ppmck, after a few links, turned up this site. http://ppmck.web.fc2.com/ppmck.html
Is that currently the latest version? The wiki mentions a ppmck9ex2, but that site only seems to refer to ppmck9A. a bit hard to tell since I'm working off translated Japanese.

I found the later version of ppmck, on github. just another couple of links more down the google results. lol
Re: Resources to learn mml/ppmck
by on (#115684)
There is also my version (which adds general text macros, tail optimization, and a few other things); I don't know what version is newer, though.
Re: Resources to learn mml/ppmck
by on (#115691)
@zzo38: I'd be interested in checking out your version too, and, hahaha. your gofar:// link that goes nowhere is funny. :d
Re: Resources to learn mml/ppmck
by on (#115693)
He actually does have a gopher server there. It just doesn't contain anything useful, as far as I can tell.
Re: Resources to learn mml/ppmck
by on (#115695)
lidnariq wrote:
He actually does have a gopher server there. It just doesn't contain anything useful, as far as I can tell.

Ah, my mistake. Turns out Firefox threw up an error when I clicked that link, saying it couldn't open the gofar address. I just assumed it was giving me the usual server not found message.
Re: Resources to learn mml/ppmck
by on (#115697)
arfy wrote:
@zzo38: I'd be interested in checking out your version too, and, hahaha. your gofar:// link that goes nowhere is funny. :d
http://zzo38computer.org/nes_program/ppmck.zip

Note: ppMCK does not appear to be suitable to make a music for a game, although it is good for making .NSF file. (If I make some NES/Famicom game and put music, I will probably write a different one meant for the music of the game, which is using hardware effects instead of software, far less RAM use, only up to one expansion audio, etc.)

I don't have a lot of documentation for ppMCK either; I have only used the existing ones, and looked a the source-codes, in order to figure it out. So, since I have done things with it I also know some things about ppMCK, and so does Jarhmander so you can write a question and someone who know answer can write the answer in here.

You can also look at example files. For example, http://2a03.free.fr/?p=pub&dir=zzo38 is examples using my modified version of ppMCK. If you look in other directories there you may find music with the ordinary ppMCK, too.
Re: Resources to learn mml/ppmck
by on (#115702)
Ok, so ran into my first problem. I'm trying to create some triangle-like drums using the looped noise of the nes, and Here's the code I'm using.

; let's try some drums...
@v2 = {15 8 8 8 7 7 7 6 6 6 5 5 5 4 3 2 1 }0 ; open triangle
@v3 = {12 6 5 4 2 1 0} ; mute triangle
D o1 l16 @1
D [[@v2 d8 @v3 d d ]4 ]8

the line with the @1 in it is flagged with an error, even though I thought @1 on the noise channel would change it to looped noise? If I removed the @1, it works fine, but of course I only get regular noise with that. any ideas?
this is with ppmck 9aEx5.3
Re: Resources to learn mml/ppmck
by on (#115708)
Hi.

You know, I'm not sure if that was fixed or changed in one of the recent versions of ppmck. It used to be that mck didn't like plain @# commands on the noise channel so I usually just accessed the looped noise with a simple @EP command like,

@EP0 = {5 0}

Hopefully that works =)

(or...perhaps it was ppmck that made the change. I just seem to recall having a similar issue when using a version of plain mck a long time back.)
Re: Resources to learn mml/ppmck
by on (#115723)
Cool! I got it working, by using another trick. use D16 on the noise channel, and presto., looped noise works. :)
now, back to composing for me. Oh, have people played with the 5b envelopes in ppmck? LIke how to get the cool basses/effects?
Re: Resources to learn mml/ppmck
by on (#115724)
You're going to be a bit constrained with using the envelope channel for pitches; the sunsoft 5b runs at (effectively) ≈½ the speed of e.g. the ZX Spectrum or Atari ST's sound.
In practice, you'll have something like the bottom octave or so of well-tuned notes.
Re: Resources to learn mml/ppmck
by on (#115725)
lidnariq wrote:
You're going to be a bit constrained with using the envelope channel for pitches; the sunsoft 5b runs at (effectively) ≈½ the speed of e.g. the ZX Spectrum or Atari ST's sound.
In practice, you'll have something like the bottom octave or so of well-tuned notes.

Yeah, that makes sense. So I think it goes something like this. 5b, has the slowest speed actually the same rate as the amstrad cpc, zx spectrum is twice as fast, and the st is just a little bit faster. I'll have a play anyway and see what neet fx I can come up with.
Re: Resources to learn mml/ppmck
by on (#115732)
The "speed" of the 5B is not the only issue: ppmck didn't think of the 5B envelope as a "melodic" device, so tuning the speed correctly will involve some math.

There're the 2 ppmck commands regarding the envelope: S<num> is the setting of the enveloppe and M<num> is its speed. S<num> requires a 4 bit number as an argument (that is, only the 4 lsb of the parameter are relevant) and is directly the envelope setting bits in the "AY". Look here for reference:
Image
Chances are you'll be interested in waveforms designated by even numbers from 8 to 14.
M<num> accepts a 16 bit parameter and it is directly the envelope speed in the harware, so to tune it to a specific frequency you'll do the following formula:
Code:
M value = round( (fc clock)/(512 * (desired F)) )

Here "fc clock" is 21.47727 MHz/12 ≃ 1.7897725 MHz. If you use triangular waveforms, further divide M by 2. Of course chances are high that for higher note it will nevertheless be out of tune, because of the limited period resolution.

On my specific ppmck hack, I added a MN<num> command that takes a "note number" (as in the n<num> command) and generates correctly the M<num> command tuned at that note.
Re: Resources to learn mml/ppmck
by on (#115735)
Most used envelope waveforms on AY when the envelope used as a melodic instrument are C (for sharp bass) and E (for soft bass). By some reason 9 and A, which are the same thing but inverted, used less often, I guess it is just a tradition.
Re: Resources to learn mml/ppmck
by on (#115756)
For those interested in editing the ppmck wiki, go to its main page and click the silly button "Join" at the top, just over the red warning. The password is "ppmck on FAMICOM", without the quotes but with the caps, they are necessary. You'll need a wikidot account, which you can create after joining.

Also, it's a great thing that ppmck is on GitHub. It seems that one of the latest additions is detection of overload―I suppose it detects when the engine takes more that one frame to run…
Re: Resources to learn mml/ppmck
by on (#115759)
Yep, I noticed that too. From what I can make of the Google-translated Japanese, it inserts rogue beeps into your song. Is there any other tools that are better than google translate that are free or relatively cheap? Yes, I know about sistran but that's something like a couple hundred dollars to get the document translation feature. I was caught out on that one when I got the basic home edition and oops, no document translation. :(
More native Japanese/English speakers, please. :d
Re: Resources to learn mml/ppmck
by on (#115760)
I've found that comparing both of bing's and google's translations often lets me puzzle out something reasonable.