Oldskooler Ramblings

the unlikely child born of the home computer wars

Scope Creep

Posted by Trixter on February 11, 2008


One of the side effects of designing a tracker completely from scratch, using the best software design I can muster, is that everything is virtualized. A song is an object; the player engine is an object; the output device is an object. I’m probably going to make the editor an object itself, if just to keep the source consistent.  The nice thing about objects is that they can be abstracted and used as “parents” for descendant objects. So I have done just that for the internal speaker output. So that leads to some good news and bad news:

The good news is that the tracker will probably come with basic support for the Tandy/PCjr sound chip, and Adlib, and heck probably the CMS as well, out of the box, all in addition to the internal speaker.  This is because once the parent object is done, it’s easy to create a descendant for each output device.  And it will make it easier to add more complex internal speaker support in the future, such as mixing 3 or 4 voices realtime for “true” multichannel output from the speaker.  Just don’t expect the Adlib to sound better than the rest — I have a common denominator to target, and it ain’t 9-channel FM instruments.

The bad news about all this is that the tracker is still mostly in my head and not on paper. Which means I may only have a tracker to enter into the wild compo at Block Party instead of a demo. Or neither, considering that the presentation I’m giving takes precedence over compos :)

If I were never releasing the code, I could’ve hacked something together by this time already.  But I am, and I want people to be impressed by the code as much as music (democoder background, remember?  Both form and function are equally important :-)

Advertisements

4 Responses to “Scope Creep”

  1. spoulson said

    Could you clarify a bit on how you’re going to render digital audio on the PC speaker? I’ve seen it done, but I wouldn’t say it were voice quality audio.

  2. Trixter said

    One of the most basic ideas is to use registers as period counters; fill them with numbers that represent a certain frequency, and whenever one hits zero, flip the speaker bit. A variation on that is to use the frequency to add to a register count, and then flip the speaker using the most significant bit of that count.

    That’s music only; digitized audio is a different story. For that, some clever use of the one-shot timer can be done to pulse the speaker faster than it can actually respond, leading to the speaker being in up to 64 different positions for 6-bit sound. It’s fairly quiet but accurate.

  3. Matthew K said

    Hi there Trixter!

    It’s been a long time since I contacted you. I was inspired today because I just learned that Dosbox 0.72 plays my old Tandy 1000 version of Darwin’s Arena almost perfectly!! I had given up on ever expecting to see those old sprites wriggling on my new HD clearview (or whatever) LCD screen. I am very pleased to see how well the Tandy emulation works with the GRAFIX routines. I had installed Dosbox a few months ago but only got around to checking the Tandy emulation today. I can hardly wait to start messing old DOS classics like Sopwith, Nitefire etc.

    Hope you are doing well these days!

  4. Trixter said

    Glad you discovered DOSBox — they worked very hard on esoteric stuff like composite color and Tandy sound/graphics, hope you enjoy it!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: