Question about the MSX Basic PLAY command

Page 1/3
| 2 | 3

By Samor

Paragon (2030)

Samor's picture

25-07-2017, 21:23

I was messing around a bit in MSX basic...

10 PLAY"t200l16o4cdco3b",t200l16o4efed","t200l16o4gbgf"
20 PLAY"t200l16o4cdco3b",t200l16o4efed","t200l16o4gbgf"

When running that, there's a small pause between line 10 and 20.
Is there any way to reduce or eliminate that effect?

Further more, changing it to t255l64 or something does not speed up anymore. I guess we are at the limit of how fast BASIC does things.. or are there ways to make it faster? E.G. it would be nice to do a chord on a single channel by rapidly playing 3 notes (often used technique).

Login or register to post comments

By Meits

Scribe (5647)

Meits's picture

25-07-2017, 21:51

It got me puzzled as well. A pause between each and every string. Unless you have an MSX-Music inserted and call music... PSG plays strings without pauses then.

By Manuel

Ascended (15815)

Manuel's picture

25-07-2017, 22:25

Does it help to define the MML in a string and then play them? I've seen that in many music basic programs. But it could also be that they only did it to be able to repeat these parts more easily.

By Samor

Paragon (2030)

Samor's picture

25-07-2017, 22:55

@meits .... just noticed it also plays faster with "call music" activated, and upping the tempo even more has effect; I can make a melody go super fast that way.
...but why?

By Meits

Scribe (5647)

Meits's picture

25-07-2017, 23:20

Manuel wrote:

Does it help to define the MML in a string and then play them? I've seen that in many music basic programs. But it could also be that they only did it to be able to repeat these parts more easily.

Strings. As good as it gets, but easily noticeable where one string ends and the next starts.

Samor wrote:

@meits .... just noticed it also plays faster with "call music" activated, and upping the tempo even more has effect; I can make a melody go super fast that way.
...but why?

I'm clueless. I remember I once asked this question to someone (honestly I don't remember who, either BiFi of Nyyrikki). I don't remember the answer as it probably wasn't a satisfying one. Or I didn't understand it

By Samor

Paragon (2030)

Samor's picture

25-07-2017, 23:20

I also used "Bronski" as a reference and I noticed it there as well.
As I only have emulators to use, are we sure it's not an emulator issue? I think not since I used different ones for verification, but I'd like to make sure.

By Meits

Scribe (5647)

Meits's picture

25-07-2017, 23:21

I noticed when calibrating MIDI-PAC2 on a real turbo R in R800 mode.

By Grauw

Ascended (8508)

Grauw's picture

25-07-2017, 23:25

It is not an emulator issue for 100% sure.

By Samor

Paragon (2030)

Samor's picture

25-07-2017, 23:39

Ok, nice to have those confirmations. Thanks Smile

For fun, run "bronski" after entering "call music"... it's messy, but some delays are indeed gone.

By NYYRIKKI

Enlighted (5396)

NYYRIKKI's picture

25-07-2017, 23:44

Samor wrote:

@meits .... just noticed it also plays faster with "call music" activated, and upping the tempo even more has effect; I can make a melody go super fast that way.
...but why?

I think we just need to accept that the default MML handler is not very good. It is old and practically ported from PC that had even more simple music capabilities. When you type CALL MUSIC the whole PLAY-command handler as well as MML-handler changes... as you already noticed the result changes as well. After CALL MUSIC you can ie. type PLAY "CDC< B >" that would cause illegal function call without it as this feature is part of the new handler. It seems that the buffering routine is just better in MSX-MUSIC version although you can get it to lag as well with complex enough strings while running on 3.5Mhz.

By JohnHassink

Ambassador (5417)

JohnHassink's picture

26-07-2017, 19:02

Would putting all the music data in DATA rules and READ them on the fly make any difference, or would that cause extra delay?

Page 1/3
| 2 | 3