I might actually finish this one

Pagina 5/6
1 | 2 | 3 | 4 | | 6

Van Grauw

Ascended (9395)

afbeelding van Grauw

27-09-2020, 20:11

For reference Amiga MODs have 4 channels. Tho by PCM they can of course play multiple notes (a chord) on a single channel.l, but it's a little tricky.

Van Metalion

Paragon (1215)

afbeelding van Metalion

27-09-2020, 20:21

Metalion wrote:

I am currently writing a PSG/SCC/FM replayer (nothing fancy, MML type, no tracker) that takes maybe maximum 1000 cycles per FM voice on VBLANK (less for PSG). So with 7200 cycles that would let you 7 voices to play with. Size is about 3K at the moment, but work is still ongoing.

EDIT : I made some test today, and I was a little bit too optimistic. Full loading of 9 FM voices (first frame called on a song) takes 11102 cycles, thus it needs 1233 cycles per voice. 7200 cycles will buy you almost 6 voices.

But getting back to the topic : great game !!!
I hope you will finish it Smile

Van Bengalack

Master (222)

afbeelding van Bengalack

27-09-2020, 20:46

Grauw wrote:

My code uses a custom “stream of register writes” type format (similar to VGM). It’s very low level so fast but not very space-efficient.

Fast usually wins, where I come from Smile

Grauw wrote:

However you can also to stick to something well known, and adopt the MoonBlaster 1.4 replayer. I don’t know anything about its performance though.

I see that it can be downloaded here at msx.org, as well as some sample files, so I can probably test it for performance myself. What puzzles me is the name Moonblaster and Moonsound, two which I thought were tightly connected. I guess it's not? I can use Moonblaster.replayer for "normal" FM-MUSIC it seems. I think my SVI-738 got an FM-PAC chip soldered in by Henrik Gilvad back in the days, so that is my target HW.

Is tiletile supporting audio at the moment? Couldn't hear anything here. Or maybe I did something wrong?

Van ToriHino

Hero (602)

afbeelding van ToriHino

27-09-2020, 21:07

Bengalack wrote:

What puzzles me is the name Moonblaster and Moonsound, two which I thought were tightly connected. I guess it's not? I can use Moonblaster.replayer for "normal" FM-MUSIC it seems.

Indeed these names can get a bit confusing. In short:

  • Moonsound = Name of the first (original) OPL4 cartridge (now also a number of clones under different names exist)
  • MoonBlaster = Tracker software for MSX-MUSIC and MSX-AUDIO (which already existed before the Moonsound cartridge was released)
  • MoonBlaster FM = Tracker software for OPL4, FM + some wave channels
  • MoonBlaster Wave = Tracker software for OPL4, wave channels only[/code]

Van Grauw

Ascended (9395)

afbeelding van Grauw

27-09-2020, 21:33

And it was all made by MoonSoft and published by Sunrise who also published the MoonSound.

MoonBlaster dethroned FAC Soundtracker soon after it was released.

Basically the name of the MoonSound was inspired by the popularity of their MoonBlaster tracker.

Grauw wrote:

Is tiletile supporting audio at the moment? Couldn't hear anything here.

It does, but the default “song” it plays is that silent performance test song which gives me stable worst-case performance characteristics in the profiler. Handy for testing, and I haven’t made any proper music yet anyway. You can provide the build script with any arbitrary VGM for MSX-MUSIC and/or PSG in res/resources.json, although it must currently be a small one, < 8K in compiled form.

p.s. I uploaded a build to the above link with the Final Fantasy Corneria Castle track. Temp of course. (Note: link was changed because mapper type changed to ASCII8.)

Van Bengalack

Master (222)

afbeelding van Bengalack

27-09-2020, 21:45

Thank you guys, very enlightening!

Finally I get what this VGM is too. Soo cool!

Grauw wrote:

p.s. I uploaded a build to the above link with the Final Fantasy Corneria Castle track. Temp of course. (Note: link was changed because mapper type changed to ASCII8.)

I can't get the link to work now Question Does it work?

Van Grauw

Ascended (9395)

afbeelding van Grauw

27-09-2020, 21:47

I updated the link I quoted above, but here it is again (ROM_FORMAT was changed to ASCII8).

Van santiontanon

Paragon (1105)

afbeelding van santiontanon

27-09-2020, 21:51

lol, I'm still surprised when you say a "small song" is "less than 8K". The LARGEST song in the Menace from Triton is 341 bytes! hahaha

But anyway, about the amount of CPU and size of the music player, it depends on how complex/fancy you want your music to be, and how easy you want to make it for the musician to compose. If you want flexibility, I think the best options are what people were recommending above.

However, if that amount of CPU usage is too much for the engine, I think there is still hope! For example, the sound player used in The Menace from Triton is just 711 bytes in size and uses an average of 700 CPU cycles per game frame (with peaks of at most 4000 cycles here and there). However, it is PSG-only and extremely limited: no chance to compose songs using a tracker for example! (they were encoded by hand by myself to minimize space).

Of course, something as custom-made as my player is probably a nightmare to use by a musician. But I'm sure there is some middle ground that would work! For example, Grauw's idea of converting the file format of some popular tracker to some optimized custom format seems very promising if space is not an issue!

Van Grauw

Ascended (9395)

afbeelding van Grauw

27-09-2020, 22:22

A plain “stream of register writes” type of music storage is definitely the most efficient but also the least space efficient for music. Only suitable for MegaROM and disk games, and even then you have to worry about space. I still need to implement a compression scheme of sorts (find repeated data), because I want to keep the songs under 8K but not be too restrictive on the creative freedom or track length. I think once I do that the file sizes will become more reasonable without losing flexibility or performance.

About performance, those 5700 cycles I mentioned are the absolute maximum, average is also under 1000 cycles. I’m coding my game to be guaranteed to not have frame drops, so I worry about the big O.

The size also depends a lot on the complexity of the music. Micro Cabin’s music is quite complex so takes up a lot of space per minute. Whereas all the Ghosts n Goblins music together fits in 64K, and all individual tracks remain under 8K. That code is here btw if anyone’s curious.

Van Bengalack

Master (222)

afbeelding van Bengalack

27-09-2020, 22:20

Grauw wrote:

I updated the link I quoted above, but here it is again (ROM_FORMAT was changed to ASCII8).

I had to press Shift-Ctrl-R and force reload to get it to work.

Nice. Works like a charm!

Pagina 5/6
1 | 2 | 3 | 4 | | 6