Chat

Author Topic: A few questions about DefleMask!  (Read 2318 times)

Offline mihaelkyeah

  • Full Member
  • Posts: 316
  • Learn the best from all worlds
    • YouTube channel
    • Email
A few questions about DefleMask!
« on: November 13, 2016, 11:29:14 am »
Hello! So, I want to know some things about the way exported songs behave, what kind of optimisation they get, if they do get it, and some other issues. So here are some.

1) I've seen in trackers like FamiTracker that you can "mask" instruments; that is, you don't get a new instrument command every time you place a note, instead you just input it once and the rest of the notes are left with no instrument change commands. Does this really contribute to relieve CPU usage during gameplay, in a homebrew?
(I'm not counting DeadFish's ROMs because those are meant to only play music, so any extra CPU power required is always there at hand, it's not like having a whole game running)

2) In addition to the first question, how important is it to avoid repeating commands like pan settings, channel volume settings, LFO turning on or off (and/or its rate), enabling DAC output, etc.?
Particularly on the Genesis, I talked to Stef about some "bugs" that his XGM player did, and he told me that many of the sound glitches were caused because too many commands were placed at the same time in one frame; and it makes sense, because listening to some Genesis soundtracks you can notice that, for example, stereo pan settings or volume changes are sometimes placed after or before notes are triggered, resulting in maybe some undesired "glitches", but I can see that it could have been done to relieve CPU usage from having too many commands to be executed within a single frame.
So, I can understand that way too many commands in the same frame can saturate CPU usage, but does that also mean I should avoid "repeating" commands? (For example, if I just repeat the same pattern of a channel all over again despite it having a ton of initialisation controls)

I was going to write a third question but then I ended up writing down a massive paragraph and I realised it was meant for another topic.

Thanks in advance! Happy tracking!

Offline Delek

  • Sali para ver
  • Administrator
  • Hero Member
  • Posts: 1813
    • Delek's Website
    • Email
A few questions about DefleMask!
« Reply #1 on: November 14, 2016, 06:02:08 pm »
I decided to add the .vgm optimizer vgm_cmp to avoid "redundant register writes". This is, if you change an instrument, only the registers that change will be rewritten; btw, the same instrument will write 0 registers.

Offline mihaelkyeah

  • Full Member
  • Posts: 316
  • Learn the best from all worlds
    • YouTube channel
    • Email
A few questions about DefleMask!
« Reply #2 on: November 17, 2016, 10:11:24 am »
Oh I see. Thank you very much!