10 minutes ago, Yazwho said:
Nice trick!
I don't know much about audio and the composition of it, but how bad would it sound by using the vsync? The reason I ask is that having an interrupt fire at 'random' time during the could break code that highly relies on line based interrupts.
Currently CommandTracker is using vsync with Concerto handling it's own timing. It's not bad, but yes that is something to worthy of note and something I was thinking of trying to see how much coarser it makes the envelope evaluation (since it will be about 50% slower). In the "final form" version of the tracker, I'd like to have this be controllable wherein you can select sync sources for both Concerto and CommandTracker and have these settings embedded in with the song file. So if you want very rich smooth envelopes, you can use tight timings with Concerto or using vsync; and/or if you want the tracker to run at, say, a MIDI clock pulse, you could.
MIDI clock or some sort of sync pulse (e.g. by way of the user or controller port) is a big desire of mine so I can sync Command Tracker to external MIDI and have proper timings. But I think due to the CPU issues, having these knobs to turn would be valuable in general.
For instance, right now the tracker is set to a fixed 25 channels, but Concerto has a concept of voices as well where an instrument could use more than 1 PSG voice. That means the number of channels in the tracker could, maybe eventually, be flexible and should reflect the needs. If you're using very rich instruments in Concerto, you might only want/need 4 tracker channels as an example. Or if you're game uses a lot of CPU, you might want to use coarse envelope timings in Concerto and may also want to limit channels in the tracker due to both song size and CPU consumed.
Those are all features that are pretty far down the list from where things are today but are definitely things I've thought about.