stunning new music & engine

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

I thought my music engine was pretty damn good. It has/had quite sophisticated priority system, a "programmable" sequencing capability, could play tracks at arbitrary speed, had instrument envelopes, and could fade the sounds in and out.

The only limitation, so I thought, was my ability to compose. You see I'm rather limited in my capability to hear things well, and have no musical training or even understanding.  The engine, such a it is, I developed a few years ago from "first principles"; first finding an 2600-register to frequency table online, and building up a system that could play 1/4, 1/2 and full notes. And then I whacked together a few "tunes" to run off that.

The internet went wild. "Horrible music!"... "I'd rather kill myself than listen to 5 minutes of this!"  I know, I know.

So I always knew I'd need to find someone capable of assisting with composing some decent sound/effects.  Much to my delight, recently @jadsi on YouTube asked if I would like some assistance, to which I said "of course!"

When I originally designed this sound engine, I made some "arbitrary" decisions about the implementation. Specifically I figured I'd only be able to update the '2600 sound registers once per frame (60Hz), that I would have envelopes (volume adjustments on notes) to try and simulate various instruments, that I would support 1/4, 1/2 and whole notes, and that I'd have a "loudest thing gets heard" kind of dynamic system that would allow multiple sounds to play at once, at least virtually, with the most prominent being heard on any frame.

So, I wrote that, and that's what I've been showing up to this point.

Now @jadsi and I had to figure out how to work together. He sent along some demo tracks in the tool he uses, called Furnace - a chiptune editor. Now, I know next to nothing about chiptunes in general or Furnace in particular. But I figured I'd try and be compatible with whatever a music guy would use.  The goal being that I'd write the conversion tools to my format - but also ask the music providers to at least be compatible with some of the design of my system.

So it turns out @jadsi is using 60Hz (yay!) and also the same basic AUDC/AUDF values for notes -- only a whole whack more of them.  He is, basically, doing '2600 music already but doing this on Furnace and not hearing it on actual hardware. But Furnace is pretty sophisticated and allows really interesting "things" to be applied to the sounds. I needed to either support these in my engine, or write a conversion tool that could change the Furnace data into my engine data.

I ended up doing both, but the first step was to export the Furnace ".fur" data into something I could start to understand. Fortunately it had a JSON export, so I went with that.  And it was full of everything I needed to be able to "emulate" Furnace capability with my engine.

In particular, the engine and/or conversion tool now supports sophisticated envelopes, legato, arpeggio, note delays, and more. And the results are incredible. Now @jadsi shoots me a Furnace ".fur" file, I extract the JSON and run it through the converter, and it's ready to play on the engine pretty much within a few seconds.

In this video I'm just going through some of the early music tracks that @jadsi has composed. I've lucked out stumbling into collaboration with someone who is extremely skilled and top of his game. But also, in stumbling onto using the Furnace tool as a pathway to getting music from a non-'2600 composition environment, so to speak, to an identical (and I mean per-register frame-accurate copy) piece of music playing in my engine.

Can't wait for some actual made-for-this-game tracks.

In the video, I just cycle through a few of the themes. The theme name is at the top, and the timer shows progression. I press RESET to restart a theme, SELECT to move on to the next. Call me biased, but I think it's awesome stuff.





Propane13

The Taxi theme is impressive.

Overall, this is a great step and a welcome collaboration.  As we know, the 2600 has a huge limitation-- the TIA has notes that are just simply out of tune.  Because of this, I might suggest finding any rough-sounding bits and maybe trying to find a different path using other sections or different higher notes.

For example, I'd recommend changing some of "Booster".  Section 0:47 to 0:52 is way out of tune, but 0:53 to 0:57 well makes up for it.  I would probably drop the 0:47 to 0:52 segments entirely (or take them an octave or half-octave up or down) and replace them with a bit more iteration / mixing of 0:53 to 0:57.  That's really quality stuff.  0:53 to 0:57 is the strongest part here and very well in tune.

"TIA's Lament" opens well, but at 2:48 to 3:06. some of the low notes start hitting wrong and it's a little jarring.  But, then 3:25 and beyond become a real banger for a while.

Overall-- this is very, very good.  I'd just maybe suggest making a "naughty list" of certain notes that are too far out of spec and maybe see if there are alternatives that could be used instead.

Again, good stuff.

Andrew Davie

Quote from: Propane13 on 01 Oct 2026, 10:51 PMThe Taxi theme is impressive.

Overall, this is a great step and a welcome collaboration.  As we know, the 2600 has a huge limitation-- the TIA has notes that are just simply out of tune.  Because of this, I might suggest finding any rough-sounding bits and maybe trying to find a different path using other sections or different higher notes.

For example, I'd recommend changing some of "Booster".  Section 0:47 to 0:52 is way out of tune, but 0:53 to 0:57 well makes up for it.  I would probably drop the 0:47 to 0:52 segments entirely (or take them an octave or half-octave up or down) and replace them with a bit more iteration / mixing of 0:53 to 0:57.  That's really quality stuff.  0:53 to 0:57 is the strongest part here and very well in tune.

"TIA's Lament" opens well, but at 2:48 to 3:06. some of the low notes start hitting wrong and it's a little jarring.  But, then 3:25 and beyond become a real banger for a while.

Overall-- this is very, very good.  I'd just maybe suggest making a "naughty list" of certain notes that are too far out of spec and maybe see if there are alternatives that could be used instead.

Again, good stuff.

Thanks for the feedback/review.  These tunes are not for WenHop -- just examples of what the engine is capable of. Also of note, I am using Gopher to render the video; the real test of this music should be on actual hardware.

Andrew Davie

#3
Quote from: Propane13 on 01 Oct 2026, 10:51 PMOverall, this is a great step and a welcome collaboration.  As we know, the 2600 has a huge limitation-- the TIA has notes that are just simply out of tune.  Because of this, I might suggest finding any rough-sounding bits and maybe trying to find a different path using other sections or different higher notes.

The engine can arpeggiate bewteen different notes on alternate frames. So the out-of-tune notes can apparently be somewhat improved by doing this.  D6-sharp is defined thus:

#define d6_SHARP TRACK_DITHER, X(C4, 12), X(C4, 11),

whereas a "normal" note is defined just as...

#define d6 X(C4, 12),
So there's some scope, if this works as advertised, to "tune" some of those out-of-tune notes - at least somewhat better than the non-arpeggiated version.  I'm not a sound guy - just following what's happening on the Furnace implementation.

Andrew Davie

#4
Here's an analogy of what I think is an issue composing '2600 music on Furnace...

Let's say there's this great guitarist, and he composes this wonderful tune on his favourite guitar - the one his grandfather left to him. This particular guitar is strange in that it CANNOT be tuned. He plays the song by ear, and chooses each note carefully based on what he's hearing. Beautiful!

He then writes down the sheet music for the notes he played. And he gives it to someone else to play. That person plays the sheet music rendition on a properly-tuned guitar, and it sounds... horrible. The problem is, the original guitarist composed the tune so it sounded great on his grandfather's guitar, which was woefully out of tune. It was a tune intrinsically tied to the specific instrument it was played on.

The song sounded great, played on that out of tune instrument. But the notes he was playing weren't the notes he was writing down. Well, they were the same physical *notes*, but the sound of those notes was totally different.

THAT's what I think composing music on Furnace is like. You have a selection of "almost correct" notes. Actually it's provable that they are the "most correct" for the available hardware register values from the '2600, for any single moment. But they're not the only "correct notes". If you allow dithering by the engine, you can refine the correctness, to some degree.  Or, for example, with perfect pitch in the CDFJ (which I am still to get my code working), you can in fact have truly correct notes. For one channel, anyway.

But we get back to the problem that the sheet music (the note annotations passed from Furnace through my tools to my engine) and the actual *sound* of the music... can be different things. In short, I have to have my guitar (the '2600 engine) exactly as out of tune (the same frequency, C-value) as the Furnace "guitar".  If I don't do that, then the music sounds differently in the engine.

It's a real dilemma, because/if I can improve the accuracy of the notes on the engine, but this is not the proper thing to do (or is it) because the composers will have written their tunes to sound nice on the Furnace playback.  For example, the buzzing notes are significantly louder than other notes. I'd prefer for all notes to have a consistent volume, regardless of pitch. But that's not how Furnace is setup.

So, I'm stuck with a badly tuned guitar, effectively - and the saving grace is that lovely songs can still be played on it. But it irks me; I would like to have a properly tuned guitar!


Andrew Davie

Some thoughts on tuning.

The correspondence between '2600 audio frequencies and actual notes is "loose" at best. Whereas scientific notation notes (A2, B4 etc) have specific frequencies that our ears (well, your ears) are very good at distinguishing, it's actually impossible for the '2600 hardware to "hit" most of these notes accurately.  Ignoring the AUDC values (the waveform type, essentially), the AUDF values give the frequency that plays for any waveform type.

This game's new sound system has the ability to "dither" notes. That is, the note D6_SHARP (which very poorly maps to the desired frequency) can be dithered between two different frequencies to provide a sort of "blended" sound that perceptually appears closer to the desired frequency.

#define d6_SHARP TRACK_DITHER, X(C4, 12), X(C4, 11),

The correct frequency for D6_SHARP is 2489.016 Hz. The original definition (C4,12) had a frequency error of 18.66Hz. The dithered definition has a frequency of 2488.540 Hz. Error reduced to -0.33Hz.  A remarkable difference.

In the video released so far, the dithering happened once per frame (that is, the hardware registers written once per frame).  SO the dithering was at 60Hz -- and it was basically a very noticeable warbling sound. But still, arguably better than the plain off-note.

In the new system I've just implemented an alternate dithering which can dither at about 480Hz -- in other words, as the screen is being displayed.  I can go much higher; it's all experimental and some things just don't sound right to me.  But basically I now change between the two dither frequencies 8 times per frame.

I'm waiting on feedback as to how it sounds; my previous efforts at playing with "improvements" to the sound system have not been well received.  But if this one is acceptable, then I can go through all the notes and offer dithered versions for all of them, significantly reducing error on all. At the cost of the 480Hz warble.

We shall see.

Andrew Davie

#6
I'm learning about audio all the time.

With the new system I'm toggling AUDF 101 times per frame - an effective rate of 6 kHz.  This is well above the limit required to resolve dithered frequencies at the desired target frequency cleanly. I asked Claude to explain to me what's happening with the ear using this system. I told it I'm toggling AUDF 101 times per frame, and that I'm using paired frequencies with an offset of +/-1

As an aside, I no longer enforce the "about the same" duty time. I allow the selection of dithering options to be essentially arbitrary to achieve the "perfect" pitch.


## Pitch resolution (frequency difference limen)

These figures are for steady tones of 200 ms or longer, heard by a trained listener:

|----------------|----------------------------|
|Frequency       | Smallest detectable change |
|----------------|----------------------------|
| ~100–500 Hz    | ~1–3 Hz (≈0.5–1%)          |
| ~1–2 kHz       | ~0.2–0.3% (≈3–5 cents)     |
| above ~4–5 kHz | gets much worse, because   |
|                | neural phase-locking fades |
|----------------|----------------------------|


An untrained listener needs roughly 2–5× those changes. Resolution also degrades on short tones: below about 100 ms, the detectable difference grows quickly as the tone gets shorter.

## Toggling between two pitches

The blend you're after isn't the ear averaging anything. The signal itself really contains the in-between frequency.

If you alternate between f₁ and f₂ at rate R, that's square-wave FM. Its modulation index is β ≈ (Δf/2)/R.

- **Fast toggle relative to the spacing (β well below 1):** most of the energy sits on a carrier at the **time-weighted mean frequency in Hz**. Weak sidebands appear at ±R, ±3R and so on. An analyser would show the same thing, so this is physics, not perception.
- **Slow toggle (β well above 1):** the energy really is at f₁ and f₂, and you hear two notes.

There's also a hard limit from the uncertainty principle. To tell f₁ from f₂ inside one segment, the segment has to last at least about **1/Δf**. Two tones 10 Hz apart need around 100 ms each. No ear or analyser beats that.

## What you hear as the switching rate goes up

These ranges are approximate and shift with the frequency gap and the register:

|---------------------|-------------------------------------------------------------------------|
| Alternation rate    | Percept                                                                 |
|---------------------|-------------------------------------------------------------------------|
| < ~8–10 Hz          | Clear trill: two distinct pitches                                       |
| ~10–20 Hz           | Transitional: a warble, and the pitch starts collapsing toward the mean |
| ~20–150 Hz          | One pitch at the mean, plus **roughness**/buzz from the sidebands       |
|                     | (strongest around 50–80 Hz at mid frequencies)                          |
| > ~100 Hz at 500 Hz | Sidebands become resolved separately. If β is small they're faint, and  |
| > ~160 Hz at 1 kHz   | you get a clean tone at the mean                                       |
|---------------------|-------------------------------------------------------------------------|

So the "integration time" for pitch movement is roughly **50–100 ms**. The ear follows frequency changes slower than about 10 Hz as pitch motion. Faster changes get folded into timbre (roughness) instead of pitch.

## Practical consequences (e.g. TIA AUDF dithering)

- **Duty cycle sets the pitch.** Spending 25% of the time on f₂ gives about 0.75·f₁ + 0.25·f₂. That lets you build fractional steps between the coarse divider values.
- **Switching once per frame is too slow.** Alternating every frame at 60 Hz is a 30 Hz modulation, right in the roughness band, so you'll get a pitched growl. It gets worse higher up, where adjacent divider steps are further apart (bigger Δf, so bigger β).
- **Switch much faster for a clean result.** Writing AUDF several times per frame, ideally pushing R into the hundreds of Hz, keeps β small and moves the sidebands where they're both weak and resolved. Spreading the f₂ slots evenly rather than bunching them helps for the same reason. It's the frequency-domain version of PWM, with the same logic as noise-shaping a 1-bit DAC.
- **Phase continuity matters.** Hard resets of the waveform at switch points add clicks: broadband junk at the switching rate.

Assuming NTSC (60 Hz), 101 writes per frame is about **6060 writes/s**, or 5050/s on PAL. That's well into the clean regime, so the ear won't hear the toggling. What matters now is the pattern of values and any gaps in the writes, not the write rate.

**Even 50/50 alternation**

- The modulation rate is about 3 kHz.
- The spacing between adjacent AUDF steps is at most a few hundred Hz, even at the top of the range. That gives β ≈ (Δf/2)/3030, on the order of 0.01–0.05.
- The sidebands sit about 3 kHz either side of the carrier and roughly 30–45 dB down.
- Result: a clean tone at the mean, with nothing in the roughness band.

**Arbitrary duty (k of 101 slots on f₂)**

- You get about 1% steps of the gap between two adjacent dividers, which is far finer than the ear can resolve (the difference limen).
- How the slots are spread decides what you hear:
  - **Bunched** (all the f₂ writes together): the modulation repeats once per frame, so its fundamental is **60 Hz**, right in the roughness band. You'd hear a buzz, worse on high notes where Δf is large.
  - **Spread evenly** (Bresenham or first-order sigma-delta accumulator: add k each slot, emit f₂ on overflow): the error energy moves up near the slot rate and becomes inaudible. Do this.

**Gaps (VBLANK/overscan)**

If the 101 writes all happen in the kernel, AUDF sits on one value through VBLANK/overscan, roughly 60–70 lines or 4–4.5 ms per frame. That's a once-per-frame deviation, so it reintroduces a 60 Hz component. How audible it is depends on Δf and how long the hold lasts.

**Divider behaviour when AUDF changes (check in Stella source or on hardware)**

- The TIA divider keeps running when you write AUDF, so the waveform stays phase-continuous. You get no clicks, just periods of intermediate length. That's good.
- Possible glitch: if the divider resets on an *equality* compare, a write that lowers AUDF when the counter is already past the new value would let it run on to 31 and wrap. That gives one long period: a pop, plus a pitch error.
- With adjacent values the chance is roughly 1/(AUDF+1) per downward write, so it would be fairly common on high notes.



Given all that, I'm happy that I've basically made the right choices in choosing two close-frequencies in order to achieve a closer match to the desired frequency using dithering, that I'm correct in deciding to dither 101 times per frame, that my 2nd dithering application in terms of the duty cycle of each is also correct.  To my ear - and granted this is not a good test of sound - it seems pretty good.

Here's a complex table showing the results of all the tests and the final implementation.  Comparing the prior and current error values shows the improvement on each note.  Also look at the similarity on the achieved frequency vs. the correct frequency. It looks pretty awesome, too.

note       target Hz   orig Hz    new Hz  oAUDC oAUDF orig err  nAUDC  AUDF1/2 duty    new err
---------------------------------------------------------------------------------------------------------
a0             55.00     56.27     55.00     14    11    39.57     14  11/12   12:5      -0.05
a1            110.00    108.04    110.00      3    19   -31.10      3  18/19   10:19      0.03
a1_SHARP      116.54    119.16    116.56      6    16    38.52      6  16/17   17:11      0.32
a2            220.00    220.35    220.00      1    18     2.73      1  18/19   31:1       0.03
a2_SHARP      233.08    232.59    233.08      1    17    -3.66      1  16/17   1:27      -0.03
a3            440.00    436.10    440.03     12    23   -15.40     12  22/23   6:23       0.11
a3_SHARP      466.16    465.18    465.18      1     8    -3.66      1  8       single    -3.66
a4            880.00    872.21    879.88     12    11   -15.40     12  10/11   3:28      -0.23
a4_SHARP      932.33    951.50    932.36     12    10    35.24     12  10/11   22:7       0.06
a5           1760.00   1744.42   1759.81      4    17   -15.40      4  16/17   3:17      -0.19
a5_SHARP     1864.66   1847.03   1864.79      4    16   -16.44      4  15/16   2:11       0.13
a6           3520.00   3488.84   3519.99      4     8   -15.40      4  7/8     1:13      -0.01
b0             61.74     61.39     61.73     14    10    -9.79     14  9/10    1:17      -0.20
b1            123.47    126.61    123.48      6    15    43.48      6  15/16   11:8       0.06
b2            246.94    246.27    246.94      1    16    -4.71      1  15/16   1:22      -0.01
b3            493.88    498.41    493.87     12    20    15.78     12  20/21   4:1       -0.03
b4            987.77    981.24    987.78      4    31   -11.49      4  30/31   6:23       0.03
b5           1975.53   1962.47   1975.55      4    15   -11.49      4  14/15   1:9        0.02
b6           3951.07   3924.94   3951.64      4     7   -11.49      4  6/7     1:20       0.25
b7           7902.13   7849.88   7931.65      4     3   -11.49      4  2/3     1:31       6.45
b8          15804.27  15699.76  15699.76      4     1   -11.49      4  1       single   -11.49
b9          31608.53  31399.52  31399.52      4     0   -11.49      4  0       single   -11.49
c0             32.70     32.16     32.71     14    20   -29.26     14  19/20   11:21      0.25
c0_SHARP       34.65     35.54     34.65     14    18    44.01     14  18/19   1:1        0.18
c1             65.41     65.35     65.42      6    30    -1.56      6  29/30   1:31       0.25
c1_SHARP       69.30     69.85     69.30      6    28    13.90      6  28/29   19:6      -0.00
c2            130.81    130.83    130.83      1    31     0.25      1  31      single     0.25
c2_SHARP      138.59    139.55    138.59      1    29    11.98      1  29/30   11:3      -0.03
c3            261.63    261.66    261.66      1    15     0.25      1  15      single     0.25
c3_SHARP      277.18    279.11    277.17      1    14    11.98      1  14/15   8:1       -0.09
c4            523.25    523.33    523.33     12    19     0.25     12  19      single     0.25
c4_SHARP      554.37    550.87    554.40     12    18   -10.95     12  17/18   3:23       0.11
c5           1046.50   1046.65   1046.65      4    29     0.25      4  29      single     0.25
c5_SHARP     1108.73   1121.41   1108.94      4    27    19.69      4  27/28   21:10      0.32
c6           2093.00   2093.30   2093.30      4    14     0.25      4  14      single     0.25
c6_SHARP     2217.46   2242.82   2217.04      4    13    19.69      4  13/14   24:5      -0.33
c7           4186.01   4186.60   4186.60      1     0     0.25      1  0       single     0.25
c7_SHARP     4434.92   4485.65   4434.67      4     6    19.69      4  6/7     10:1      -0.10
d0             36.71     37.51     36.71     14    17    37.61     14  17/18   13:9      -0.07
d0_SHARP       38.89     39.72     38.89     14    16    36.57     14  16/17   5:3        0.12
d1             73.42     72.35     73.42      6    27   -25.35      6  26/27   2:3        0.11
d1_SHARP       77.78     77.91     77.78      6    25     2.95      6  25/26   21:1       0.03
d2            146.83    144.70    146.84      6    13   -25.35      6  12/13   5:21       0.08
d2_SHARP      155.56    155.83    155.48      6    12     2.95      6  12/13   31:1      -0.92
d3            293.66    289.40    293.59      6     6   -25.35      6  5/6     2:21      -0.44
d3_SHARP      311.13    308.69    311.14      3     6   -13.62      3  5/6     1:20       0.07
d4            587.33    581.47    587.37     12    17   -17.35     12  16/17   5:24       0.12
d4_SHARP      622.25    615.68    622.31     12    16   -18.40     12  15/16   5:24       0.16
d5           1174.66   1162.95   1174.61      4    26   -17.35      4  25/26   6:17      -0.07
d5_SHARP     1244.51   1255.98   1244.48      4    24    15.89      4  24/25   16:5      -0.04
d6           2349.32   2415.35   2349.62      4    12    47.99      4  12/13   13:8       0.23
d6_SHARP     2489.02   2415.35   2489.15      4    12   -52.01      4  11/12   11:19      0.09
e0             41.20     42.20     41.21     14    15    41.52     14  15/16   3:2        0.30
e1             82.41     83.11     82.41      3    25    14.68      3  25/26   17:5       0.05
e2            164.81    166.22    164.82      3    12    14.68      3  12/13   15:2       0.07
e3            329.63    327.08    329.63     12    31   -13.44     12  30/31   7:22      -0.01
e4            659.26    654.16    659.29     12    15   -13.44     12  14/15   2:15       0.08
e5           1318.51   1308.31   1318.47      4    23   -13.44      4  22/23   5:23      -0.05
e6           2637.02   2616.63   2637.31      4    11   -13.44      4  10/11   2:21       0.19
e7           5274.04   5233.25   5273.51      4     5   -13.44      4  4/5     1:25      -0.17
e8          10548.08  10466.51  10466.51      4     2   -13.44      4  2       single   -13.44
f0             43.65     45.02     43.66     14    14    53.26     14  14/15   16:15      0.09
f1             87.31     88.08     87.30      6    22    15.20      6  22/23   15:4      -0.05
f1_SHARP       92.50     92.08     92.50      6    21    -7.84      6  20/21   2:19      -0.01
f2            174.61    174.44    174.68      1    23    -1.71      1  22/23   1:31       0.64
f2_SHARP      185.00    184.16    185.00      6    10    -7.84      6  9/10    1:21       0.01
f3            349.23    348.88    349.26     12    29    -1.71     12  28/29   1:31       0.16
f3_SHARP      369.99    373.80    369.98     12    27    17.73     12  27/28   19:8      -0.05
f4            698.46    697.77    697.77     12    14    -1.71     12  14      single    -1.71
f4_SHARP      739.99    747.61    739.94     12    13    17.73     12  13/14   11:2      -0.11
f5           1396.91   1427.25   1397.22      4    21    37.20      4  21/22   16:15      0.39
f5_SHARP     1479.98   1495.22   1479.87      4    20    17.73      4  20/21   24:7      -0.13
f6           2793.83   2854.50   2793.11      4    10    37.20      4  10/11   23:8      -0.44
g0             49.00     48.23     49.00     14    13   -27.30     14  12/13   6:23       0.03
g0_SHARP       51.91     51.94     51.94     14    12     1.00     14  12      single     1.00
g1             98.00     98.22     97.99      3    21     3.89      3  21/22   18:1      -0.07
g1_SHARP      103.83    102.90    103.83      3    20   -15.57      3  19/20   2:9        0.10
g2            196.00    196.44    195.93      3    10     3.89      3  10/11   31:1      -0.62
g2_SHARP      207.65    209.33    207.67      1    19    13.93      1  19/20   5:1        0.14
g3            392.00    387.65    392.00     12    26   -19.31     12  25/26   7:17       0.01
g3_SHARP      415.30    418.66    415.31     12    24    13.93     12  24/25   19:5       0.00
g4            783.99    805.12    784.03     12    12    46.03     12  12/13   19:11      0.09
g4_SHARP      830.61    805.12    830.57     12    12   -53.97     12  11/12   11:18     -0.09
g5           1567.98   1569.98   1567.64      4    19     2.20      4  19/20   31:1      -0.38
g5_SHARP     1661.22   1652.61   1661.21      4    18    -9.00      4  17/18   3:29      -0.01
g6           3135.96   3139.95   3139.95      4     9     2.20      4  9       single     2.20
g7           6271.93   6279.90   6279.90      4     4     2.20      4  4       single     2.20

Andrew Davie

Here's a video with the new 6kHz dithered "ideal" notes.

The dilemma here is that the tracks being played were designed with the non-dithered - and audibly worse - notes that the Furnace sound system provides. My new 6 kHz dithering changes things; when it works properly (and I hope it does, but can't be sure), then the notes are much much more in-tune.  The dilemma is that the original compositions by @jadsiboi were designed and carefully hand-tuned to sound good with the out-of-tune notes. By changing the notes themselves (albeit more correct), I change the composer's work.

I may very well have a flag to say "play as is (i.e., exactly as heard on Furnace - out of tune notes and all", and the other option being "play with in-tune notes".  Anyway, this video goes through the worst option for the available compositions; that is, in-tune notes playing tracks which were designed for out-of-tune notes.


Andrew Davie

#8
This is the third instalment of the new sound system.

In this one I present the result of a LOT of work trying to get the notes "pitch perfect".  Impossible on the '2600, probably, but I've made a good stab at it.

Now in the rather boring part of the video I just go through the note scale, so we can hear all of the notes available.

Then, alas, we get to the tracks that  @jadsi  composed - and which are somewhat *incompatible* with the current notes being presented to it by the sound system. The tracks were designed very much with "out of tune" instrument in mind, and were finely hand-crafted so they sounded good in that "limited" '2600 soundscape.  I will in future support that by not applying these new notes to those original soundtracks.

But, for now, and just briefly until I fix things, you get to hear the new "pitch perfect" notes being played in those original music themes. I know it's broken them - but things will get better I promise.

I have spent many many hours on this sound system, and I want the fundamentals to be as perfectish as possible.



NOTE  CLASS  AUDFA  AUDFB      DUTY  TARGET Hz  ORIGINAL Hz    NEW Hz  ORIG ERR  NEW ERR
----  -----  -----  -----  --------  ---------  -----------  --------  --------  -------
C0      C14     19     20  11:21/32   16.35160     16.07758  16.35392    -29.26    +0.25
C0#     C14     19     18     1:1/2   17.32391     17.76996  17.32571    +44.01    +0.18
D0      C14     18     17   9:13/22   18.35405     18.75718  18.35332    +37.61    -0.07
D0#     C14     17     16     3:5/8   19.44544     19.86054  19.44678    +36.57    +0.12
E0      C14     16     15     2:3/5   20.60172     21.10183  20.60532    +41.52    +0.30
F0      C14     15     14  15:16/31   21.82676     22.50862  21.82791    +53.26    +0.09
G0      C14     12     13   6:23/29   24.49971     24.11638  24.50019    -27.30    +0.03
G0#     C14     12     --        --   25.95654     25.97148  25.97148     +1.00    +1.00
A0      C14     12     11   5:12/17   27.50000     28.13577  27.49922    +39.57    -0.05
B0      C14      9     10   1:17/18   30.86771     30.69357  30.86409     -9.79    -0.20
C1       C6     29     30   1:31/32   32.70320     32.67380  32.70783     -1.56    +0.25
C1#      C6     29     28   6:19/25   34.64783     34.92717  34.64775    +13.90    -0.00
D1       C6     26     27     2:3/5   36.70810     36.17456  36.71048    -25.35    +0.11
D1#      C6     26     25   1:21/22   38.89087     38.95722  38.89164     +2.95    +0.03
E1       C3     26     25   5:17/22   41.20344     41.55437  41.20459    +14.68    +0.05
F1       C6     23     22   4:15/19   43.65353     44.03860  43.65230    +15.20    -0.05
F1#      C6     20     21   2:19/21   46.24930     46.04035  46.24915     -7.84    -0.01
G1       C3     22     21   1:18/19   48.99943     49.10971  48.99733     +3.89    -0.07
G1#      C3     19     20    2:9/11   51.91309     51.44827  51.91598    -15.57    +0.10
A1       C3     18     19  10:19/29   55.00000     54.02068  55.00109    -31.10    +0.03
A1#      C6     17     16  11:17/28   58.27047     59.58163  58.28124    +38.52    +0.32
B1       C6     16     15   8:11/19   61.73541     63.30549  61.73755    +43.48    +0.06
C2       C1     31     --        --   65.40639     65.41567  65.41567     +0.25    +0.25
C2#      C1     30     29   3:11/14   69.29566     69.77671  69.29439    +11.98    -0.03
D2       C6     12     13   5:21/26   73.41619     72.34913  73.41938    -25.35    +0.08
D2#      C6     13     12   1:31/32   77.78175     77.91445  77.74053     +2.95    -0.92
E2       C3     13     12   2:15/17   82.40689     83.10874  82.41035    +14.68    +0.07
F2       C1     22     23   1:31/32   87.30706     87.22089  87.33940     -1.71    +0.64
F2#      C6      9     10   1:21/22   92.49861     92.08071  92.49926     -7.84    +0.01
G2       C3     11     10   1:31/32   97.99886     98.21942  97.96364     +3.89    -0.62
G2#      C1     20     19     1:5/6   103.8262     104.6651  103.8344    +13.93    +0.14
A2       C1     19     18   1:31/32   110.0000     110.1738  110.0016     +2.73    +0.03
A2#      C1     16     17   1:27/28   116.5409     116.2945  116.5388     -3.66    -0.03
B2       C1     15     16   1:22/23   123.4708     123.1354  123.4700     -4.71    -0.01
C3       C1     15     --        --   130.8128     130.8313  130.8313     +0.25    +0.25
C3#      C1     15     14     1:8/9   138.5913     139.5534  138.5843    +11.98    -0.09
D3       C6      5      6   2:21/23   146.8324     144.6983  146.7953    -25.35    -0.44
D3#      C3      5      6   1:20/21   155.5635     154.3448  155.5698    -13.62    +0.07
E3      C12     30     31   7:22/29   164.8138     163.5392  164.8126    -13.44    -0.01
F3      C12     28     29   1:31/32   174.6141     174.4418  174.6298     -1.71    +0.16
F3#     C12     28     27   8:19/27   184.9972     186.9019  184.9923    +17.73    -0.05
G3      C12     25     26   7:17/24   195.9977     193.8242  195.9985    -19.31    +0.01
G3#     C12     25     24   5:19/24   207.6523     209.3301  207.6528    +13.93    +0.00
A3      C12     22     23   6:23/29   220.0000     218.0522  220.0137    -15.40    +0.11
A3#      C1      8     --        --   233.0819     232.5890  232.5890     -3.66    -3.66
B3      C12     21     20     1:4/5   246.9417     249.2026  246.9371    +15.78    -0.03
C4      C12     19     --        --   261.6256     261.6627  261.6627     +0.25    +0.25
C4#     C12     17     18   3:23/26   277.1826     275.4344  277.2000    -10.95    +0.11
D4      C12     16     17   5:24/29   293.6648     290.7363  293.6850    -17.35    +0.12
D4#     C12     15     16   5:24/29   311.1270     307.8384  311.1557    -18.40    +0.16
E4      C12     14     15   2:15/17   329.6276     327.0783  329.6437    -13.44    +0.08
F4      C12     14     --        --   349.2282     348.8836  348.8836     -1.71    -1.71
F4#     C12     14     13   2:11/13   369.9944     373.8038  369.9699    +17.73    -0.11
G4      C12     13     12  11:19/30   391.9954     402.5580  392.0148    +46.03    +0.09
G4#     C12     11     12  11:18/29   415.3047     418.6603  415.2825    +13.93    -0.09
A4      C12     10     11   3:28/31   440.0000     436.1045  439.9412    -15.40    -0.23
A4#     C12     11     10   7:22/29   466.1638     475.7503  466.1806    +35.24    +0.06
B4       C4     30     31   6:23/29   493.8833     490.6175  493.8919    -11.49    +0.03
C5       C4     29     --        --   523.2511     523.3254  523.3254     +0.25    +0.25
C5#      C4     28     27  10:21/31   554.3653     560.7057  554.4687    +19.69    +0.32
D5       C4     25     26   6:17/23   587.3295     581.4726  587.3068    -17.35    -0.07
D5#      C4     25     24   5:16/21   622.2540     627.9904  622.2396    +15.89    -0.04
E5       C4     22     23   5:23/28   659.2551     654.1567  659.2356    -13.44    -0.05
F5       C4     22     21  15:16/31   698.4565     713.6255  698.6123    +37.20    +0.39
F5#      C4     21     20   7:24/31   739.9888     747.6077  739.9343    +17.73    -0.13
G5       C4     20     19   1:31/32   783.9909     784.9880  783.8199     +2.20    -0.38
G5#      C4     17     18   3:29/32   830.6094     826.3032  830.6069     -9.00    -0.01
A5       C4     16     17   3:17/20   880.0000     872.2089  879.9049    -15.40    -0.19
A5#      C4     15     16   2:11/13   932.3275     923.5153  932.3953    -16.44    +0.13
B5       C4     14     15    1:9/10   987.7666     981.2350  987.7766    -11.49    +0.02
C6       C4     14     --        --   1046.502     1046.651  1046.651     +0.25    +0.25
C6#      C4     14     13   5:24/29   1108.731     1121.411  1108.522    +19.69    -0.33
D6       C4     13     12   8:13/21   1174.659     1207.674  1174.812    +47.99    +0.23
D6#      C4     11     12  11:19/30   1244.508     1207.674  1244.575    -52.01    +0.09
E6       C4     10     11   2:21/23   1318.510     1308.313  1318.656    -13.44    +0.19
F6       C4     11     10   8:23/31   1396.913     1427.251  1396.557    +37.20    -0.44
G6       C4      9     --        --   1567.982     1569.976  1569.976     +2.20    +2.20
A6       C4      7      8   1:13/14   1760.000     1744.418  1759.993    -15.40    -0.01
B6       C4      6      7   1:20/21   1975.533     1962.470  1975.820    -11.49    +0.25
C7       C1      0     --        --   2093.005     2093.301  2093.301     +0.25    +0.25
C7#      C4      7      6   1:10/11   2217.461     2242.823  2217.336    +19.69    -0.10
E7       C4      4      5   1:25/26   2637.020     2616.627  2636.755    -13.44    -0.17
G7       C4      4     --        --   3135.963     3139.952  3139.952     +2.20    +2.20
B7       C4      2      3   1:31/32   3951.066     3924.940  3965.825    -11.49    +6.45
E8       C4      2     --        --   5274.041     5233.254  5233.254    -13.44   -13.44
B8       C4      1     --        --   7902.133     7849.880  7849.880    -11.49   -11.49
B9       C4      0     --        --   15804.27     15699.76  15699.76    -11.49   -11.49

Bomberman94

That's "the missing link" to your great game - a great sound. Very excited where it ends (hopefully a physical release).

Andrew Davie

#10
The WenHop sound system
Furnace, dithering, and the scanline-level kernel


Two authoring paths, one playback engine

Music in this engine comes from two distinct sources that share the same runtime playback code.

The simpler path is hand-authored: a composer writes note names directly in C (`c4`, `g5_SHARP`, etc.), each one a macro expanding to a single byte — 3 bits selecting an AUDC waveform class, 5 bits selecting an AUDF divisor. Most of the game's melodies are written this way.

The richer path goes through Furnace, a multi-system chiptune tracker. A composer writes a song in Furnace targeting the Atari TIA chip specifically, with per-instrument volume envelopes, arpeggio macros, duty-cycle macros, and pitch macros all authored by hand in the tracker. A conversion tool then translates a Furnace project export into this engine's format: it replays Furnace's own frequency formula tick-by-tick, carries each instrument's volume macro into a `WideEnvelope` table, and reproduces per-tick arpeggio/duty changes via `TRACK_NOTE_CYCLE`. This path only works from an actual Furnace-composed project — the expressiveness comes from a human programming those macros in the tracker, not from any particular file format, so there's no way to derive Furnace-level macro richness from a generic MIDI or audio source.

The hardware constraint: discrete divisors, not continuous pitch

TIA's AUDF register is a 5-bit integer — only 32 possible divisor values per channel, per AUDC class. Output frequency is roughly `clock / (class_multiplier × (AUDF + 1))`, where the multiplier depends entirely on which waveform/distortion type (AUDC) is selected — pure-tone classes and "poly" (noise-gated) classes scale completely differently. Once a class is chosen for a note, that fixes a ladder of exactly 32 achievable frequencies, with nothing available in between.

Equal-tempered musical pitch is continuous, so most named notes want a frequency that doesn't land exactly on one of those 32 rungs. The gap to the nearest rung is measured in cents — a logarithmic pitch unit, 1200 per octave, 100 per semitone. Human pitch discrimination (the "just noticeable difference") sits around 5–10 cents for an isolated tone: below that, the deviation is inaudible; past roughly 15–20 cents most ears register it as flat or sharp; into the tens of cents it reads as clearly out of tune. Picking the single nearest divisor for every named note leaves errors scattered across that whole range — some notes landing within a few cents by luck, others 15, 25, even 50+ cents off, simply because the nearest available rung happens to sit awkwardly relative to the target.

Dithering: splitting the difference between two rungs

Most named notes (73 of 87) use a pitch-domain analogue of dithering: rather than committing to one divisor, the engine alternates rapidly between the two adjacent achievable divisors that bracket the true target, in a ratio chosen so the time-averaged perceived pitch sits far closer to the target than either rung alone.

That ratio comes from a direct search: compute the real output frequency of both bracketing divisors, then search integer weight pairs (e.g. 23 parts to 8, out of a 31-step cycle) for whichever combination's weighted average lands closest to the equal-tempered target. The alternation is spread evenly across the cycle (Bresenham-style interleaving) rather than grouped into blocks, so the ear perceives a single wavering pitch instead of two notes taking visible turns.

The payoff: single-divisor errors that were often 15–50+ cents drop to well under 1 cent for nearly every dithered note — effectively perceptually perfect, far below the ~5 cent audibility floor.

Where dithering hits a hard limit

Dithering only works when the two alternating pitches are close enough together that blending them reads as one note rather than two. Near the extreme top of the pitch range the divisor count gets very small (AUDF = 0, 1, 2, 3...), and because frequency is inversely proportional to the divisor, the relative gap between adjacent divisors grows rapidly as the divisor shrinks. In the middle of the range, stepping one AUDF value typically costs a few cents; at the very top it can cost hundreds.

One high note's dithered blend alternates between two divisors roughly 513 cents apart — nearly a musical fourth — with the rare value landing only once every 32 frames. Rare in time is not the same as rare enough in pitch distance: every occurrence is audible as a sharp, clearly-pitched interruption rather than a blend, closer to a morse-code blip than a wavering tone. No ratio fixes this, because there is no achievable divisor between the two — dithering interpolates between rungs that are already close together, and at that register no two rungs are close. The resolution for a note in that position is to drop back to its single best divisor and accept an ordinary, inaudible residual error rather than force a blend that can't sound smooth at any ratio.

A related hardware constraint: TIA has only two real audio channels, and only a handful of distinct AUDC distortion types, which aren't equally loud at the same volume setting — the "poly"/noise classes read noticeably louder and buzzier than the "pure tone" classes at an identical volume register, which is compensated separately via a per-class volume-scaling table.

From once-per-frame to once-per-32-scanlines

The dither ratio only has as much resolution as how often the AUDF register can actually be re-chosen. Updating it once per frame (~60 times per second) limits how precisely any searched ratio can be reproduced, since only a handful of alternation events occur per second to approximate a split like 23:8.

The game's kernels draw the display scanline by scanline — 198 visible scanlines per frame — which supplies a much finer natural clock to drive the dither from. The audio-buffer-fill routine decides, for every 2nd scanline in a frame (per AUDF -- i.e., staggered writes on alternate lines for AUDF0 and AUDF1), which of the two blended AUDF values that scanline's write should use, so the ratio is reproduced far more precisely within a single frame than a once-per-frame choice could manage.

The kernels are effectively 1-line kernels for all graphics, and 2-line kernels for the AUDF writes (again, staggered -- so an actual AUDF* write happens on every scanline). AUDF0 and AUDF1 are written (and potentially changed) on every alternate scanline.

The settling constraint: why 32 lines, not 1

Choosing a potentially new AUDF value on *every 2nd scanline* is too fast for TIA's own internal audio frequency divider to settle — changing the divisor doesn't retune the output instantaneously; the hardware circuit apparently needs some minimum number of clock cycles to stabilize after a change (or maybe it's the emulators?). Re-settling it every scanline produces genuine audible dropouts: not a wrong pitch, but brief gaps of near-silence, even though the register writes themselves are entirely correct (right values, right ratio) — the fault lies in how often the sound hardware is asked to re-settle, not in what gets written.

The design instead only chooses a (possibly new) AUDF value fore each channel once every 32 scanlines, holding it steady for the 31 scanlines in between. This gives the hardware roughly 16x longer to settle after each real change, while still switching often enough per frame to reproduce the dither ratio with far better precision than a once-per-frame approach.

One detail is load-bearing here: the accumulator deciding when each 32-line boundary falls, and which value wins at that boundary, persists across frames rather than reset at the start of each one. Resetting that phase every frame reintroduces a small discontinuity at each frame boundary, which accumulates into an audible, slowly growing ripple over time — a shorter hold interval with per-frame-reset state doesn't avoid this on its own. Persisting the accumulator across frames, combined with the 32-line hold interval, eliminates both the settling-related dropouts and that secondary ripple.

Overview

This pushes TIA audio past what's normally considered a fixed hardware ceiling. The 2600's sound chip has always been notorious for having only 32 coarse frequency steps per channel per waveform type, which leaves many musical pitches stuck noticeably out of tune with no software fix available — composers have traditionally just accepted the nearest available note and lived with the detuning. Driving the AUDF register at scanline rate rather than frame rate turns that fixed divisor ladder into something closer to continuous: by rapidly alternating between the two real hardware frequencies that bracket a target pitch, in a precisely searched ratio, the ear perceives a single blended tone that lands within a fraction of a cent of true pitch — far below what anyone could actually hear as wrong — for the overwhelming majority of notes in the chromatic range. That's a genuine expansion of what the chip can do musically, though it has real edges: the technique only works where the two bracketing frequencies are close enough to blend into one note rather than read as two, and the TIA's own internal divider needs enough real time between register changes to settle, which is why the switching rate is tuned to scanline-groups rather than pushed to the theoretical per-scanline maximum. Within those bounds, though, a sound chip generally regarded as incapable of accurate tuning across most of its range now plays essentially in tune everywhere except a handful of extreme-register notes where the hardware simply has no adjacent frequency close enough to borrow from.

In the comparison table below, "Original Hz" is the frequency the game would actually output for that note using its single best-matching hardware divisor — no dithering, no blend between two values, just whichever one AUDF setting (for that note's AUDC class) lands closest to the target pitch. It's the "before" measurement in the table: what the note sounded like prior to any frequency-dithering work. For the 73 dithered notes, comparing "Original Hz"/"Orig Err" against "New Hz"/"New Err" is exactly what shows how much the alternating-divisor technique improved on just picking the single nearest hardware frequency.

It's been a tricky project with lots of dead-end experiments. I've learned a LOT about sound, and I am quite pleased with the results!

NOTE  CLASS  AUDFA  AUDFB      DUTY  TARGET Hz  ORIGINAL Hz    NEW Hz  ORIG ERR  NEW ERR
----  -----  -----  -----  --------  ---------  -----------  --------  --------  -------
C0      C14     19     20  11:21/32   16.35160     16.07758  16.35392    -29.26    +0.25
C0#     C14     19     18     1:1/2   17.32391     17.76996  17.32571    +44.01    +0.18
D0      C14     18     17   9:13/22   18.35405     18.75718  18.35332    +37.61    -0.07
D0#     C14     17     16     3:5/8   19.44544     19.86054  19.44678    +36.57    +0.12
E0      C14     16     15     2:3/5   20.60172     21.10183  20.60532    +41.52    +0.30
F0      C14     15     14  15:16/31   21.82676     22.50862  21.82791    +53.26    +0.09
G0      C14     12     13   6:23/29   24.49971     24.11638  24.50019    -27.30    +0.03
G0#     C14     12     --        --   25.95654     25.97148  25.97148     +1.00    +1.00
A0      C14     12     11   5:12/17   27.50000     28.13577  27.49922    +39.57    -0.05
B0      C14      9     10   1:17/18   30.86771     30.69357  30.86409     -9.79    -0.20
C1       C6     29     30   1:31/32   32.70320     32.67380  32.70783     -1.56    +0.25
C1#      C6     29     28   6:19/25   34.64783     34.92717  34.64775    +13.90    -0.00
D1       C6     26     27     2:3/5   36.70810     36.17456  36.71048    -25.35    +0.11
D1#      C6     26     25   1:21/22   38.89087     38.95722  38.89164     +2.95    +0.03
E1       C3     26     25   5:17/22   41.20344     41.55437  41.20459    +14.68    +0.05
F1       C6     23     22   4:15/19   43.65353     44.03860  43.65230    +15.20    -0.05
F1#      C6     20     21   2:19/21   46.24930     46.04035  46.24915     -7.84    -0.01
G1       C3     22     21   1:18/19   48.99943     49.10971  48.99733     +3.89    -0.07
G1#      C3     19     20    2:9/11   51.91309     51.44827  51.91598    -15.57    +0.10
A1       C3     18     19  10:19/29   55.00000     54.02068  55.00109    -31.10    +0.03
A1#      C6     17     16  11:17/28   58.27047     59.58163  58.28124    +38.52    +0.32
B1       C6     16     15   8:11/19   61.73541     63.30549  61.73755    +43.48    +0.06
C2       C1     31     --        --   65.40639     65.41567  65.41567     +0.25    +0.25
C2#      C1     30     29   3:11/14   69.29566     69.77671  69.29439    +11.98    -0.03
D2       C6     12     13   5:21/26   73.41619     72.34913  73.41938    -25.35    +0.08
D2#      C6     13     12   1:31/32   77.78175     77.91445  77.74053     +2.95    -0.92
E2       C3     13     12   2:15/17   82.40689     83.10874  82.41035    +14.68    +0.07
F2       C1     22     23   1:31/32   87.30706     87.22089  87.33940     -1.71    +0.64
F2#      C6      9     10   1:21/22   92.49861     92.08071  92.49926     -7.84    +0.01
G2       C3     11     10   1:31/32   97.99886     98.21942  97.96364     +3.89    -0.62
G2#      C1     20     19     1:5/6   103.8262     104.6651  103.8344    +13.93    +0.14
A2       C1     19     18   1:31/32   110.0000     110.1738  110.0016     +2.73    +0.03
A2#      C1     16     17   1:27/28   116.5409     116.2945  116.5388     -3.66    -0.03
B2       C1     15     16   1:22/23   123.4708     123.1354  123.4700     -4.71    -0.01
C3       C1     15     --        --   130.8128     130.8313  130.8313     +0.25    +0.25
C3#      C1     15     14     1:8/9   138.5913     139.5534  138.5843    +11.98    -0.09
D3       C6      5      6   2:21/23   146.8324     144.6983  146.7953    -25.35    -0.44
D3#      C3      5      6   1:20/21   155.5635     154.3448  155.5698    -13.62    +0.07
E3      C12     30     31   7:22/29   164.8138     163.5392  164.8126    -13.44    -0.01
F3      C12     28     29   1:31/32   174.6141     174.4418  174.6298     -1.71    +0.16
F3#     C12     28     27   8:19/27   184.9972     186.9019  184.9923    +17.73    -0.05
G3      C12     25     26   7:17/24   195.9977     193.8242  195.9985    -19.31    +0.01
G3#     C12     25     24   5:19/24   207.6523     209.3301  207.6528    +13.93    +0.00
A3      C12     22     23   6:23/29   220.0000     218.0522  220.0137    -15.40    +0.11
A3#      C1      8     --        --   233.0819     232.5890  232.5890     -3.66    -3.66
B3      C12     21     20     1:4/5   246.9417     249.2026  246.9371    +15.78    -0.03
C4      C12     19     --        --   261.6256     261.6627  261.6627     +0.25    +0.25
C4#     C12     17     18   3:23/26   277.1826     275.4344  277.2000    -10.95    +0.11
D4      C12     16     17   5:24/29   293.6648     290.7363  293.6850    -17.35    +0.12
D4#     C12     15     16   5:24/29   311.1270     307.8384  311.1557    -18.40    +0.16
E4      C12     14     15   2:15/17   329.6276     327.0783  329.6437    -13.44    +0.08
F4      C12     14     --        --   349.2282     348.8836  348.8836     -1.71    -1.71
F4#     C12     14     13   2:11/13   369.9944     373.8038  369.9699    +17.73    -0.11
G4      C12     13     12  11:19/30   391.9954     402.5580  392.0148    +46.03    +0.09
G4#     C12     11     12  11:18/29   415.3047     418.6603  415.2825    +13.93    -0.09
A4      C12     10     11   3:28/31   440.0000     436.1045  439.9412    -15.40    -0.23
A4#     C12     11     10   7:22/29   466.1638     475.7503  466.1806    +35.24    +0.06
B4       C4     30     31   6:23/29   493.8833     490.6175  493.8919    -11.49    +0.03
C5       C4     29     --        --   523.2511     523.3254  523.3254     +0.25    +0.25
C5#      C4     28     27  10:21/31   554.3653     560.7057  554.4687    +19.69    +0.32
D5       C4     25     26   6:17/23   587.3295     581.4726  587.3068    -17.35    -0.07
D5#      C4     25     24   5:16/21   622.2540     627.9904  622.2396    +15.89    -0.04
E5       C4     22     23   5:23/28   659.2551     654.1567  659.2356    -13.44    -0.05
F5       C4     22     21  15:16/31   698.4565     713.6255  698.6123    +37.20    +0.39
F5#      C4     21     20   7:24/31   739.9888     747.6077  739.9343    +17.73    -0.13
G5       C4     20     19   1:31/32   783.9909     784.9880  783.8199     +2.20    -0.38
G5#      C4     17     18   3:29/32   830.6094     826.3032  830.6069     -9.00    -0.01
A5       C4     16     17   3:17/20   880.0000     872.2089  879.9049    -15.40    -0.19
A5#      C4     15     16   2:11/13   932.3275     923.5153  932.3953    -16.44    +0.13
B5       C4     14     15    1:9/10   987.7666     981.2350  987.7766    -11.49    +0.02
C6       C4     14     --        --   1046.502     1046.651  1046.651     +0.25    +0.25
C6#      C4     14     13   5:24/29   1108.731     1121.411  1108.522    +19.69    -0.33
D6       C4     13     12   8:13/21   1174.659     1207.674  1174.812    +47.99    +0.23
D6#      C4     11     12  11:19/30   1244.508     1207.674  1244.575    -52.01    +0.09
E6       C4     10     11   2:21/23   1318.510     1308.313  1318.656    -13.44    +0.19
F6       C4     11     10   8:23/31   1396.913     1427.251  1396.557    +37.20    -0.44
G6       C4      9     --        --   1567.982     1569.976  1569.976     +2.20    +2.20
A6       C4      7      8   1:13/14   1760.000     1744.418  1759.993    -15.40    -0.01
B6       C4      6      7   1:20/21   1975.533     1962.470  1975.820    -11.49    +0.25
C7       C1      0     --        --   2093.005     2093.301  2093.301     +0.25    +0.25
C7#      C4      7      6   1:10/11   2217.461     2242.823  2217.336    +19.69    -0.10
E7       C4      4      5   1:25/26   2637.020     2616.627  2636.755    -13.44    -0.17
G7       C4      4     --        --   3135.963     3139.952  3139.952     +2.20    +2.20
B7       C4      3     --        --   3951.066     3924.940  3924.940    -11.49   -11.49
E8       C4      2     --        --   5274.041     5233.254  5233.254    -13.44   -13.44
B8       C4      1     --        --   7902.133     7849.880  7849.880    -11.49   -11.49
B9       C4      0     --        --   15804.27     15699.76  15699.76    -11.49   -11.49