Re: [stella] Good old Tune2600

Subject: Re: [stella] Good old Tune2600
From: "B. Watson" <atari@xxxxxxxxxxxxxx>
Date: Tue, 2 Aug 2005 20:50:43 -0400
> Sure, but it's a REAL mess (Turbo Pascal hack).

Wow, that brings back memories... haven't seen Pascal since high school :)

> It tries to find a set of notes with minimal distances, based on some
> very coarse formula. A musician will know how to improve it.

(Disclaimer: I'm a musician, but not a musical genius by any stretch of
the imagination...)

One possible improvement would be to have a parameter telling what key
the song is in. Each of the 11 notes (C through B, including accidentals)
could be assigned a weight, based on what scale degree that note is, in
the given key. The weight would be used to alter the distance calculation,
so less important notes could be allowed to be off by more than more
important ones.

Example: The flatted fifth (B flat in the key of E, for instance)
isn't used often, because it sounds dissonant. Allowing it to be a
little farther off from its ideal value wouldn't hurt the sound of a
piece anywhere near as much as it would for a perfect fifth (B in the
key of E). Of course, it only matters for notes that actually occur in
the piece (if there's no flat-5th, no time is wasted calculating what
it should be. The current code does that already, I think).

There could also be a bit for each note that tells whether we'd rather
have it sharp or flat, if we can't have it just right. A slightly sharp
third (third = G# in the key of E) will sound worse than a sightly flat
third, because in the well-tempered scale, thirds are already a bit
sharper than they "should" be. (I used to play with a violinist turned
guitarist who always thought her guitar was out of tune for that reason:
the violin has no frets, so she'd play a "natural" third by instinct
instead of a well-tempered third like you get from a guitar...)

For that matter, if the user provides all the notes plus the key, the
program could transpose the piece to another key, where the notes are
closer to perfect than the original key. It already kind-of does this as
a side effect of what it's doing, but proper transposition would allow
a lot more possibilities.

If I can find them again, I've got to look at the TIA frequency charts
and write some code to play with the numbers. I strongly suspect the
2600 is going to have a "natural" key, the one where the well-tempered
notes in the scale are all closest to their correct values...

> And it
> doesn't care for the correct base frequency, just the distances,
> because IMO it doesn't matter if the whole tune is played at a
> (slightly) higher or lower pitch.

Absolutely right. The only people who would notice if the whole tune is
slightly sharp or flat would be musicians with perfect pitch. They're
pretty rare... and even they would have to admit that having the whole
piece off by a bit is preferably to having only one or two notes off by
a lot.

(I've converted PAL video to NTSC before by slowing it down 4% (from
25fps to 24fps), then applying 3:2 pulldown to get 29.97fps. This slows
down the sound, too, which makes it lower-pitched. Exactly one person I
know ever noticed it, and he's got pitch so good you can tune your guitar
to him singing, then check with a digital tuner and you'll be spot on)

--
B.
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com

Current Thread