Command Tracker Dev Log

All aspects of programming on the Commander X16.
m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Command Tracker Dev Log

Post by m00dawg »


Whew! Finally, loading and saving now works!





I have no doubt there's bugs all over the place. And of note I'm not sanitizing inputs in all cases, etc., etc. but basic loading and saving does work, which will make it much easier for me to start working some of the important core features finally!

Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Command Tracker Dev Log

Post by m00dawg »


I haz no video today alas as I haven't done quite enough to make it show-worthy yet, but I have managed to interface with @kliepatsch's Concerto! Basically channels 0-15 are now being handled by Concerto and playing a song plays through Concerto. While instruments are working (I think), I haven't configured anything but the default so I haven't tested that yet. Volume doesn't work. Effects don't work ? But note-release works! That one is currently mapped to noteoff and noterel as I was having some issues with note-off and I'm not quite sure why.

My Bad Apple demotune plays well enough - I still have the rendering pause bug and since I haven't setup any instruments the drums don't sound so amazing ? So that's partly why I also have no video. Once I get some basic instruments setup to play with I'll likely show off a bit more, as well as test more things.

Though there is no video, the codebase has been updated - currently the Concerto integration lives in a branch:

https://gitlab.com/m00dawg/command-tracker/-/tree/concerto-integration

The branch also fixes some core tracker bugs as well but for now I was keeping the mainline as-is since it works and I have more work to do with Concerto before I merge it all in.

 

Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
User avatar
kliepatsch
Posts: 247
Joined: Thu Oct 08, 2020 9:54 pm

Command Tracker Dev Log

Post by kliepatsch »


It is on, guys! ?

User avatar
Yazwho
Posts: 172
Joined: Fri Feb 19, 2021 2:59 pm
Contact:

Command Tracker Dev Log

Post by Yazwho »


Looks awesome!

It's all PCM right? Do you have a feel for how much CPU the playback takes? I'm going to guess quite a lot?

User avatar
kliepatsch
Posts: 247
Joined: Thu Oct 08, 2020 9:54 pm

Command Tracker Dev Log

Post by kliepatsch »


Up until now, it's all the PSG (programmable sound generators) in the VERA. No samples so far.

CPU, wise it depends really on what you are doing. If you are using the tracker with the UI, playback will use significantly more CPU power than if you are "just" playing back without any visual feedback. And how much CPU is taken up by playback itself also depends on how much of the sound engine's capabilities you are using. That includes, how many voices are playing and especially if the sounds are using a lot of modulation and effects.

In other words, it should be possible to compose songs that are pretty lightweight, e.g. with 3 or 4 voices and not too much modulation going on. The 8 MHz of the X16 help quite a lot with this kind of stuff.

 

Edit: I should mention that at the moment, as far as I know, the tracker exists only in conjunction with the UI. But maybe later a player-only version could be made that could be used inside other applications.

User avatar
Yazwho
Posts: 172
Joined: Fri Feb 19, 2021 2:59 pm
Contact:

Command Tracker Dev Log

Post by Yazwho »


Wow, that's very impressive! I've only been able to get basic sounds from the PSG.

m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Command Tracker Dev Log

Post by m00dawg »



52 minutes ago, kliepatsch said:




CPU, wise it depends really on what you are doing. If you are using the tracker with the UI, playback will use significantly more CPU power than if you are "just" playing back without any visual feedback. And how much CPU is taken up by playback itself also depends on how much of the sound engine's capabilities you are using. That includes, how many voices are playing and especially if the sounds are using a lot of modulation and effects.



Yep this is correct. Actually the UI update on playback is very lightweight - it just scrolls the lower layer and does some small character updates (like the row #). The stalls come from updating the pattern layer in VERA all at once. I know how I'm going to fix that, but for now I'll likely make a simpler UI when playing the full song until I implement a better solution there. Otherwise the main lift on the tracker side is stepping through a pattern via a timed interrupt (currently a multiple of vsync - that's the song speed) and evaluating the row. I haven't measured it but I think that part is pretty lightweight.


55 minutes ago, kliepatsch said:




Edit: I should mention that at the moment, as far as I know, the tracker exists only in conjunction with the UI. But maybe later a player-only version could be made that could be used inside other applications.



This is also correct, however I *do* plan on a decoupled "tracker engine" that can playback songs, ideally in a sparse/streaming format. Currently the songs are comparatively HUGE in RAM because all uncompressed patterns are being read to high RAM and with 25 channels, it's a lot! But in reality the amount of data for most songs will be much much smaller. I have a sparse file format idea in the docs in the project. It's based on a combination of Ron Hubbard's solution and GoatTracker. It's probably not the most compact though - a VGM file might be even better, though the sparse format would be convenient as it would be compatible with both the tracker itself and an embedded playback engine (for games and such). I won't be tackling this for a while though. It will be after the tracker itself is mature enough to make some sensible music with it ?

Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Command Tracker Dev Log

Post by m00dawg »



31 minutes ago, Yazwho said:




Wow, that's very impressive! I've only been able to get basic sounds from the PSG.



That's how I started doing it (the videos from previous posts use my own sound implementation before I started work to integrate Concerto). Concerto is a wonderful sound engine though so yep I recommend taking a look! I'm using it for the tracker, but it could be used for lots of things or at least serves as one good example of how you might want to handle modulation of various things using a more musical (ADSR envelopes) approach. It sounds really nice too and likely the next thing I'll be doing in the tracker is setting up some static instruments so I can start testing out pattern effects and things (and bring back the Bad Apple demo song).

Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
m00dawg
Posts: 346
Joined: Wed Jul 08, 2020 12:41 am
Contact:

Command Tracker Dev Log

Post by m00dawg »



2 hours ago, Yazwho said:




Looks awesome!



It's all PCM right? Do you have a feel for how much CPU the playback takes? I'm going to guess quite a lot?



Kliepatsch answered this on the contact of Command Tracker and Concerto but to elaborate on this, yes DPCM takes a ton of CPU power. Though it is "stereo" as far as I'm aware it doesn't approach it as independent channels - the data buffer either is a stereo or mono sample. Concerto uses the DPCM to do some really clever timing tricks but otherwise there's no DPCM used.

Though it's out of scope today, I've been passing thoughts about a GUS style soundcard for the X16 to enable "hardware accelerated" sample playback. I'd bet someone is going to come up with this and while it won't be part of the core X16 that could enable some really interesting things. I think something like this would be required in order to create something akin to MODs and sample based PC trackers (like FastTracker, ImpulseTracker, etc.). It might be possible to use some low resolution samples with the tracker for NES like sounds - maybe. At this point I'm thinking we won't have the CPU headroom to do it but it's a bit too soon to say I think. It'd be nice to have some NES drums for sure!

Author of Dreamtracker (https://www.dreamtracker.org/)
Check Out My Band: https://music.victimcache.com/
User avatar
Yazwho
Posts: 172
Joined: Fri Feb 19, 2021 2:59 pm
Contact:

Command Tracker Dev Log

Post by Yazwho »



48 minutes ago, m00dawg said:




Concerto uses the DPCM to do some really clever timing tricks but otherwise there's no DPCM used.



Ah ok, that would make sense, so you can make changes to the wave for periods lower than the vsync provides?

 

Post Reply