MML (MS Basic) in machine language

By wimpie3

Champion (285)

wimpie3's picture

25-10-2018, 14:21

Is there a possibility to play MML music in machine code (without using an audio library)? Is the MML interpreter part of MSX Basic? If so, can you call MSX Basic to interprete the MML code in machine language from a ROM?

Login or register to post comments

By wolf_

Ambassador_ (9793)

wolf_'s picture

25-10-2018, 14:52

Well, technically, MSX BASIC is converted to ML on the fly. So I guess it's somehow possible. But ask an ASM expert about this. I'd think that NYYRIKKI is kind of the ultimate master of ceremonies when BASIC and ASM are at the altar. Hannibal
However, this MML is a BASIC concept afaik. I bet that ASM PSG-players are merely writing to PSG registers to create 'high level' note ons, note offs, pitchbends etc.

You can do the same in BASIC with an INTERVAL timer and sound registers. But that requires you to actually make a complete player in BASIC. Wink

By wimpie3

Champion (285)

wimpie3's picture

25-10-2018, 15:11

Why re-invent the wheel when you could re-use the existing MML interpreter...

By wolf_

Ambassador_ (9793)

wolf_'s picture

25-10-2018, 15:49

Because you could improve the wheel! To name a few examples: there's no MML-command for vibrato, pitchbend and custom volume-envelopes, and convincing PSG-drums in MML are a major PITA as well. So, musically speaking: MML is limited.

By Meits

Scribe (5737)

Meits's picture

25-10-2018, 15:58

Jan van Valburg used a tool to convert MIDI to an MML dialect and injected it into Vampire Killer. He also released (some/the) needed sources to show how he did it here.