Page 4 of 5

CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Mon Jan 25, 2021 3:56 am
by m00dawg

Some updates of how far I am. The notes are real, though the rest of the pattern is generated at the moment. I was going to add volume but ended up spending a ton of time working on the UI frame and working on scrolling. You can see in the second picture how well scrolling actually went ?

I don't think I can do a pattern scroll until I convert all my output routines to use the VERA. Some still use CHROUT. I also don't quiiitttee get the layers yet. It's not super clear what memory is tile data and what is data I can mess with. I also noticed the scroll routine seems to slow down on the first half of the scroll, then gets faster on the second (as in the vsync seems to be firing inconsistently?). I'm not out of CPU power or anything as I can speed the song up and it definitely plays it faster and the slowdown is a multiple of the speed increase.

Obviously TONS of work yet. But it does play notes!

Forgot to add, I moved the repo to its own project now so it's now here:

https://gitlab.com/m00dawg/command-tracker

Screenshot from 2021-01-24 21-53-58.png

Screenshot from 2021-01-24 21-52-13.png


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Mon Jan 25, 2021 5:50 am
by JimmyDansbo

Looks like, maybe you could benefit from using both layer0 and layer1?

If you use layer1 to display the (more or less static) content, then you can use layer0 to show the actual channel data and scroll that around beneath layer1. Just remember that color #0 (black) is always transparent.


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Mon Jan 25, 2021 9:57 am
by kliepatsch


4 hours ago, JimmyDansbo said:




Looks like, maybe you could benefit from using both layer0 and layer1?



If you use layer1 to display the (more or less static) content, then you can use layer0 to show the actual channel data and scroll that around beneath layer1. Just remember that color #0 (black) is always transparent.



I think that's the plan ?



BTW I like the blue arrow to the right. Nice little touch.


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Mon Jan 25, 2021 2:34 pm
by m00dawg

Yep in terms of scrolling, that's what the second screenshot is. It was getting late so I didn't record a video (so you could also hear the short pattern playing) but it is scrolling using the second layer. It's just the data that is being scrolled is random uninitialized VRAM  ? The routine that draws the pattern is still using CHROUT so I'll need to swap that out with vera routines where I can write to the map data the second layer is pointing to (I also need to write a routine to clear out the VRAM too). 've been sort of guessing where I can put things in VRAM.


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Tue Jan 26, 2021 5:43 am
by m00dawg

Fixed the scrolling! The pattern gets generated on the lower layer and on playback (which currently starts immediately) I scroll backwards so that pattern starts in the middle of the pattern view like most trackers do. I also added a functional volume column! But I also at some point removed the instrument column and never noticed...heh, whoops! Really tiny steps since it's easy to get stuck in the weeds with stuff like indirect addressing but it's coming along!

I'm basically trying to make it lay the foundation and having basic playback of the file-format working. If I can get that far, then I can start working on a functional UI with the very first step being able top stop/start the song, and edit a pattern.

I'm not focusing too much on actual sound since other folks are working on doing fancy things with the PSG (notably kliepatsch's Concerto) and the tracker could perhaps interface with one of them as I think was discussed earlier in this thread. So it's worth not doing too much there too soon.

It's coming along! LONG way to go but nice thing about assembly, a lot of it is focusing on just a few things. I guess a bit like trying to build an entire house with LEGOs ? Or death by a-thousand cuts ?

 

1005158530_Screenshotfrom2021-01-2523-15-15.thumb.png.31cb0b72ed32da8747a6cfe36411182d.pngand zero 6502 until the X16 came along.

 


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Tue Jan 26, 2021 6:21 am
by JimmyDansbo

Looks great, please keep us posted on your updates. I am hoping that following along here will help me actually learn to use a tracker ?

 


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Tue Jan 26, 2021 2:17 pm
by m00dawg


7 hours ago, JimmyDansbo said:




Looks great, please keep us posted on your updates. I am hoping that following along here will help me actually learn to use a tracker ?



You can use Deflemask today if you want to write music for the FM2151 chip. It's a "FastTracker" style tracker of which many modern trackers seem to be though mine is shaping up to be a bit more like ScreamTracker/ImpusleTracker. The difference are mostly in how you manage the UI. I will probably have several configuration screens access from the F-keys whereas the FastTracker derived trackers tend to try and cram everything into fewer screens with more mouse and keyboard shortcuts. They are probably more efficient but I found ImpulseTracker a bit more intuitive.

The other major difference is I will be using a single pattern for all channels. Deflemask, FamiTracker (for makin NES musics), and Renoise (a modern fully featured tracker) all have patterns split out by channels.

That probably doesn't make much sense if you've never used a tracker ? At it's core, a tracker is sort of light a piano roll in a player piano. A pattern is comprised of notes, volume, and effects for each channels. Channels go across, notes go downward. So an example:




00 C-4 01 3F 0A37
01 ... .. .. ....
02 C-4 02 3F 0A47
03 ... .. .. ....
04 D#4 01 3F 0D05
...


Not a very musical example but good enough for explanation. The far left column is the row number. Next column is the note, then the instrument, volume, and effects. So here I'm playing note C, octave 4 with instrument 01 at full volume (3F) and using an arpeggio (0A) which results in a C-minor chord (3 and 7 are semitones). Row 01 is a rest. 02 I'm now playing a major chord but this time with instrument 2. 03 is again a rest and 04 is playing a D# back to instrument 1 at full volume but using a volume slide down as the effect. The effect numbers are arbitrary here - on CommandTracker '00' might be the arp effect or what have you and I may map these to letters rather than hex values - I'm not sure about that yet as I plan on having macros as part of the effects (that is how I plan on solving the ability to potentially have more than one effect).

Effects modify but channel and global things. You can use an effect to change the song speed, end the pattern (for if you are doing a fill for instance and only need 2 bars instead of 4), add a note slide, use portamento, arpeggio (as noted above), change instrument parameters (in the case of the PSG, pulse-width for example) and, as teased up above, macros (something I think AdlibTracker uses) for being able to define multiple effects (maybe ? - I don't quite know how I'll handle macros yet).

Instruments are where you define default parameters and optionally further automation. In the case of the x16, PSG instruments would define the waveform, PWM, default panning and volume, and very likely various automation envelopes. See Concerto for a great example of how ADSR envelopes work. For FM, the instruments would configure the operators and set their defaults. Many of these parameters can then be modified in the patterns by way of effects.

A typical pattern length is 64 rows which I tend to think of as 4 bars worth of music (or one line across sheet music there-abouts). This sets up a sort of 4/4 time where the shortest note is a 16th note. However, patterns do not have to be 64 rows so you can use other time signatures (6/8 time for instance, which usually involves 48 or 96 row patterns). Likewise, you can run the song much faster to get effectively higher precision if you want, say, 32nd or 64th notes. You can also use a note-delay effect to do things like trills or compose a very fluid sort of melody.

64 rows doesn't make much of a song so the next concept is the order list. The order list is just a list of patterns to comprise the song. Patterns can repeat in the order list. An example of an order list might be something like:


00: 00
01: 02
02: 0F
03: 02
...


Some of the FastTracker derived trackers (such as Deflemask) have a per-channel order list as well where each channel has its own set of patterns. So if you want to repeat something on channel 1, but do something new on channel 2, you can do that with the orderlist. I find this concept efficient, in theory, but it can be super confusing and I find I can mess things up. For Command Tracker, I will be using a simple order list (like the above example) at least initially.

At it's core, that's all there is to a tracker. They are mostly a UI and storage construct at the core. Granted, I didn't go too far into effects or some higher level concepts, but that's basically the gist. I say "basically" but I guess I ended up writing a lot haha. Anyways hopefully it was helpful!

 


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Tue Jan 26, 2021 6:55 pm
by JimmyDansbo

Thank you, that is a very though explanation. Unfortunately I am afraid it is my lack of knowledge about music theory that is holding me back.

Learning curve seems quite steep when I don't even exactly know arpeggio, portamento or ADSR is.

A more general question... How did everyone else learn this stuff, have you all read music theory or have you just been playing around with synth's and trackers until you figured it out?


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Tue Jan 26, 2021 7:10 pm
by m00dawg


7 minutes ago, JimmyDansbo said:




Thank you, that is a very though explanation. Unfortunately I am afraid it is my lack of knowledge about music theory that is holding me back.



Learning curve seems quite steep when I don't even exactly know arpeggio, portamento or ADSR is.



A more general question... How did everyone else learn this stuff, have you all read music theory or have you just been playing around with synth's and trackers until you figured it out?



arpeggio in this case is when you play a sequence of notes (say C, D#, G) really fast to sort of simulate a chord. SID music uses this a ton so you've heard it surely though I might not be explaining it well. In a more general sense, an argpeggio can be any sequence of notes and it doesn't have to be "as fast as possible". Arps are used on hardware synths (and software VSTs) usually with several options for playing the notes (such as play from low note to high, high to note, back and forth, etc.). Portamento is node bending. So if you play a C and then play a G, the pitch slides up to the node over a period of time. Like sliding your fingers on a fretless guitar, or a trombone. The key point is portamento is "slide to node" rather than just sliding the pitch arbitrarily up or down (which is also a common effect in trackers and other music programs). The latter can be useful for doing some cool things, such as simulating drums.

Hmm trying to remember how the learning curve was when I first started using trackers...it helps to have content to look at. So if I get this thing finished and have some songs to share (or better yet if other folks start using it and write their own), you can open up the songs, play them, and experiment around that way instead of starting with a clean slate. You could do this now using Deflemask as it has numerous example tunes with it.

General question - I did both. I have some music theory (mostly piano, some guitar) from taking lessons and from high school jazz band. I'm not a professional musician by day or anything though and a lot of what I've done it trackers is playing around, albeit with some fundamentals. I cut my teeth on trackers then moved to modern DAWs (like Ableton Live). I think DAWs might be a bit steeper if you don't have any musical experience, but not impossible by any means.


CommandTracker: Mostly ideas for a music tracker sparse file format

Posted: Tue Jan 26, 2021 7:15 pm
by JimmyDansbo


2 minutes ago, m00dawg said:




I get this thing finished and have some songs to share



Looking forward to playing around with the finished tracker... I took a quick look at Deflemask several months ago, but was overwhelmed by all the options.

While waiting for CommandTracker, I will read up a bit on the music theory ?