Resources to learn mml/ppmck
Moderator: Moderators
Resources to learn mml/ppmck
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.
- Jarhmander
- Formerly ~J-@D!~
- Posts: 521
- Joined: Sun Mar 12, 2006 12:36 am
- Location: Rive nord de Montréal
Re: Resources to learn mml/ppmck
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.
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.
((λ (x) (x x)) (λ (x) (x x)))
Re: Resources to learn mml/ppmck
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
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
Last edited by arfy on Fri Jul 26, 2013 2:38 pm, edited 1 time in total.
Re: Resources to learn mml/ppmck
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.
[url=gopher://zzo38computer.org/].[/url]
Re: Resources to learn mml/ppmck
@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
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
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.lidnariq wrote: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
http://zzo38computer.org/nes_program/ppmck.ziparfy wrote:@zzo38: I'd be interested in checking out your version too, and, hahaha. your gofar:// link that goes nowhere is funny. :d
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.
[url=gopher://zzo38computer.org/].[/url]
Re: Resources to learn mml/ppmck
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
; 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
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.)
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
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?
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
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.
In practice, you'll have something like the bottom octave or so of well-tuned notes.
Re: Resources to learn mml/ppmck
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.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.
- Jarhmander
- Formerly ~J-@D!~
- Posts: 521
- Joined: Sun Mar 12, 2006 12:36 am
- Location: Rive nord de Montréal
Re: Resources to learn mml/ppmck
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:

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:
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.
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:

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: Select all
M value = round( (fc clock)/(512 * (desired F)) )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.
((λ (x) (x x)) (λ (x) (x x)))
Re: Resources to learn mml/ppmck
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.