Jump to content
IGNORED

Pokey - triangle, sawtooth and other advanced stuff


Rybags

Recommended Posts

Continuing on from this old thread http://www.atariage.com/forums/index.php?showtopic=116835

 

I don't know if it's common knowledge, but this is how the Triangle waveform works on Atari...

 

We set voices 1 and 3 to 1.79 MHz mode, then put 2 similar values into AUDF1 and AUDF3. The actual triangle wave is produced thanks to the phasing effect/interaction between the two high frequencies playing on the two voices. Since the speaker has no chance of playing back two extremely high notes, instead we get a kind of "averaging" similar to the way PWM works.

 

Now... deducing what frequency is playing? Easy. With phasing, the frequency of the effect is deduced by ABS(Freq1 - Freq2)

or, in the case of our Triangle Wave, ABS(AUDF1-AUDF3)

 

The range of values we can use for our AUDF1/3 is kinda limited. Once we get around the mid 70s or so, the original high pitch of that sound becomes audible. Values below 20, well high-pitched triangle waves tend to sound almost identical to square waves of the same frequency, so why bother using 2 voices to produce what we can with one?

 

Also, this formula and table should work fine with the sawtooth waveform.

 

Anyhow, with a quick BASIC program, we can produce some data which I've imported into Excel and sorted by Frequency.

 

[b]
Audf1 Audf3  Freq	Audf equivalent in 8-bit 64 KHz mode[/b]
75	76	140.3	224.714207
74	75	143.9	219.071426
73	74	147.64	213.500014
72	73	151.52	208.000087
71	72	155.57	202.571331
70	71	159.77	197.214285
69	70	164.15	191.928642
68	69	168.71	186.714292
67	68	173.46	181.571442
66	67	178.42	176.499991
65	66	183.59	171.499949
64	65	188.99	166.571475
63	64	194.63	161.71423
62	63	200.53	156.928603
61	62	206.7	152.214251
60	61	213.15	147.571489
59	60	219.92	143.000001
58	59	227.02	138.499966
57	58	234.46	134.071419
56	57	242.27	129.714274
55	56	250.49	125.428603
54	55	259.12	121.214258
53	54	268.22	117.071439
75	77	277.14	113.267856
52	53	277.8	112.999992
74	76	284.21	110.428551
51	52	287.9	109.000015
73	75	291.54	107.625003
50	51	298.56	105.071428
72	74	299.16	104.857168
71	73	307.09	102.124996
49	50	309.83	101.214292
70	72	315.34	99.428547
48	49	321.74	97.4285482
69	71	323.92	96.7678752
68	70	332.85	94.1428761
47	48	334.36	93.7143122
67	69	342.17	91.5535767
46	47	347.73	90.0714038
66	68	351.87	89.0000011
45	46	361.93	86.5000142
65	67	362	86.4821275
64	66	372.57	83.9999997
44	45	377.01	82.9999978
63	65	383.61	81.5535685
43	44	393.05	79.5714278
62	64	395.15	79.1428519
61	63	407.22	76.7678562
42	43	410.14	76.2142817
75	78	410.65	76.1190441
60	62	419.85	74.4285789
74	77	421.05	74.2142849
41	42	428.37	72.9285783
73	76	431.85	72.3333265
59	61	433.08	72.1250152
72	75	443.07	70.476202
58	60	446.94	69.8571345
40	41	447.84	69.7142779
71	74	454.73	68.642857
57	59	461.47	67.6249894
70	73	466.86	66.8333317
39	40	468.67	66.5714322
56	58	476.73	65.4285664
69	72	479.48	65.0476171
38	39	490.99	63.5000053
68	71	492.62	63.2857229
55	57	492.76	63.2678629
67	70	506.31	61.5476289
54	56	509.61	61.1428579
37	38	514.94	60.4999943
66	69	520.58	59.8333345
53	55	527.34	59.0535676
65	68	535.46	58.1428516
36	37	540.69	57.5714242
75	79	540.93	57.5446361
52	54	546.01	57.0000007
64	67	550.99	56.4761894
74	78	554.55	56.1071407
51	53	565.69	54.982145
63	66	567.2	54.8333266
35	36	568.41	54.7142856
73	77	568.69	54.6875006
72	76	583.37	53.2857164
62	65	584.14	53.2142882
50	52	586.46	53.0000037
34	35	598.33	51.9285755
71	75	598.63	51.9017855
61	64	601.85	51.6190414
49	51	608.39	51.0535731
70	74	614.5	50.5357142
60	63	620.38	50.0476258
33	34	630.67	49.2142818
69	73	631.01	49.1875039
48	50	631.57	49.1428526
59	62	639.77	48.5000034
68	72	648.19	47.8571422
47	49	656.1	47.2678584
58	61	660.09	46.976193
32	33	665.71	46.5714309
67	71	666.08	46.5446485
75	80	668.12	46.399997
57	60	681.4	45.4761858
46	48	682.1	45.4285713
66	70	684.73	45.2500047
74	79	684.83	45.2428528
73	78	702.19	44.0999993
31	32	703.75	44.0000005
56	59	703.75	43.9999941
65	69	704.17	43.9732115
45	47	709.66	43.6249977
72	77	720.21	42.9714328
64	68	724.45	42.7142859
55	58	727.22	42.5476207
44	46	738.94	41.8571457
71	76	738.94	41.8571399
30	31	745.15	41.4999998
63	67	745.62	41.4732099
54	57	751.89	41.1190468
70	75	758.4	40.7571427
62	66	767.73	40.2499985
43	45	770.06	40.1249993
53	56	777.83	39.7142873
69	74	778.65	39.6714316
29	30	790.31	39.071431
61	65	790.83	39.0446419
75	81	792.31	38.9702342
68	73	799.71	38.6000027
42	44	803.19	38.4285702
52	55	805.14	38.3333308



74	80	812.02	37.9999979
60	64	815	37.8571436
67	72	821.65	37.5428574
73	79	832.47	37.0416642
51	54	833.91	36.9761926
41	43	838.51	36.767858
28	29	839.7	36.7142849
59	63	840.3	36.6875038
66	71	844.5	36.5000031
72	78	853.71	36.0952404
50	53	864.25	35.6428581
58	62	866.79	35.5357138
65	70	868.32	35.4714292
71	77	875.78	35.1607141
40	42	876.21	35.1428567
64	69	893.15	34.4571432
27	28	893.87	34.4285712
57	61	894.55	34.4017864
49	52	896.28	34.3333357
70	76	898.71	34.2380932
39	41	916.51	33.5535705
63	68	919.08	33.4571404
69	75	922.55	33.3273831
56	60	923.67	33.285711
48	51	930.13	33.047617
62	67	946.14	32.4714273
68	74	947.35	32.4285737
26	27	953.47	32.2142832
55	59	954.24	32.187499
38	40	959.66	32.0000022
47	50	965.93	31.7857155
67	73	973.17	31.5416689
61	66	974.42	31.4999975
54	58	986.34	31.1071418
66	72	1000.06	30.6666665
46	49	1003.84	30.5476166
60	65	1003.99	30.5428593
37	39	1005.93	30.4821426
25	26	1019.22	30.0714289
53	57	1020.1	30.0446431
65	71	1028.09	29.8035719
59	64	1034.92	29.6000005
45	48	1044.02	29.333335
36	38	1055.62	28.9999975
52	56	1055.62	29.0000003
64	70	1057.3	28.9523829
58	63	1067.31	28.6714294
44	47	1086.67	28.1428559
63	69	1087.78	28.1130937
24	25	1092.02	28.0000003
51	55	1093.03	27.9732139
57	62	1101.25	27.7571421
35	37	1109.1	27.5535703
62	68	1119.6	27.2857137
43	46	1131.99	26.9761916
50	54	1132.47	26.9642868
56	61	1136.83	26.8571428
61	67	1152.84	26.4702361
34	36	1166.74	26.1428582
23	24	1172.91	25.9999995
49	53	1174.08	25.9732152
55	60	1174.16	25.971428
42	45	1180.2	25.8333325
60	66	1187.58	25.666667
54	59	1213.36	25.0999981
48	52	1218.03	24.9999996
59	65	1223.91	24.8750015
33	35	1229	24.7678571
41	44	1231.56	24.714286
53	58	1254.56	24.242857
58	64	1261.94	24.0952373
22	23	1263.14	24.0714283
47	51	1264.49	24.0446436
40	43	1286.35	23.619047
32	34	1296.38	23.4285711
52	57	1297.9	23.3999998
57	63	1301.77	23.3273812
46	50	1313.66	23.1071418
51	56	1343.52	22.5714295
56	62	1343.52	22.5714277
39	42	1344.88	22.5476193
21	22	1364.19	22.2142856
45	49	1365.77	22.1874997
31	33	1369.46	22.1250007
55	61	1387.31	21.8273819
50	55	1391.59	21.7571426
38	41	1407.5	21.5000002
44	48	1421.03	21.285715
54	60	1433.28	21.0952368
49	54	1442.3	20.9571438
30	32	1448.89	20.8571429
37	40	1474.6	20.4761907
20	21	1477.87	20.4285714
43	47	1479.72	20.401785
53	59	1481.58	20.3749991
48	53	1495.82	20.1714281
52	58	1532.36	19.6666663
29	31	1535.45	19.6250006
42	46	1542.13	19.5357146
36	39	1546.61	19.4761898
47	52	1552.39	19.400001
51	57	1585.79	18.9702385
41	45	1608.57	18.6875
46	51	1612.22	18.6428564
35	38	1624.04	18.4999989
28	30	1630.01	18.4285718
50	56	1642.08	18.2857149
45	50	1675.59	17.9
40	44	1679.4	17.8571424
49	55	1701.42	17.6130953
34	37	1707.43	17.5476191
27	29	1733.57	17.2678569
44	49	1742.77	17.1714282
39	43	1755.02	17.0446428
48	54	1764.04	16.9523808
33	36	1797.41	16.6190476
43	48	1814.08	16.4571432
47	53	1830.18	16.303572
38	42	1835.87	16.2500005
26	28	1847.34	16.1428564
42	47	1889.86	15.7571422
32	35	1894.71	15.7142859
46	52	1900.12	15.6666665
37	41	1922.44	15.473214
41	46	1970.5	15.0714291
25	27	1972.69	15.0535709
45	51	1974.15	15.0416666
31	34	2000.13	14.8333332
36	40	2015.28	14.7142855
44	50	2052.6	14.4285713
40	45	2056.41	14.3999996
24	26	2111.25	14.0000001
30	33	2114.6	13.9761907
35	39	2115.02	13.9732139
43	49	2135.83	13.8273807
39	44	2148.07	13.742857
34	38	2222.36	13.2499997
42	48	2224.22	13.2380953
29	32	2239.2	13.1428574
38	43	2246.01	13.1000002
23	25	2264.94	12.9821428
41	47	2318.23	12.6607141
33	37	2338.1	12.5446426
37	42	2350.8	12.4714286
28	31	2375.15	12.3333335
40	46	2418.34	12.0952381
22	24	2436.05	11.9999998
32	36	2463.12	11.857143
36	41	2463.12	11.8571424
27	30	2523.88	11.5476191
39	45	2525.08	11.5416665
35	40	2583.69	11.2571427
31	35	2598.46	11.1875001
21	23	2627.33	11.0535713
38	44	2639.06	11.0000001
26	29	2687.04	10.7857138
34	39	2713.35	10.6714285
30	34	2745.27	10.5357142
37	43	2760.95	10.470238
20	22	2842.06	10.1428571
33	38	2853.04	10.0999996
25	28	2866.56	10.0476188
36	42	2891.49	9.95238084
29	33	2904.91	9.90178604
32	37	3003.81	9.54285711
35	41	3031.53	9.44642833
24	27	3064.71	9.33333318
28	32	3078.9	9.28571441
31	36	3166.87	9.00000012
34	40	3182.02	8.95238103
27	31	3269.03	8.68750007
23	26	3284.16	8.64285716
30	35	3343.6	8.47142867
33	39	3344.02	8.47023796
26	30	3477.35	8.10714274
32	38	3518.74	7.99999985
22	25	3528.08	7.97619043
29	34	3535.58	7.95714295
25	29	3706.26	7.54464267
31	37	3707.55	7.54166666
28	33	3744.61	7.45714301
21	24	3800.24	7.33333326
30	36	3912.02	7.09523817
24	28	3958.59	6.99999989
27	32	3972.78	6.97142863
20	23	4105.2	6.71428568
29	35	4133.91	6.66071444
26	31	4222.49	6.49999991
23	27	4237.63	6.47321417
28	34	4375.28	6.23809527
25	30	4496.57	6.04285709
22	26	4547.3	5.9642857
27	33	4638.48	5.82738105
24	29	4798.29	5.5999999
21	25	4892.27	5.47321426
26	32	4926.24	5.42857137
23	28	5131.5	5.17142848
25	31	5241.72	5.04166662
20	24	5278.12	4.99999996
22	27	5500.77	4.75714277
24	30	5588.59	4.66666664
21	26	5911.49	4.35714285
23	29	5971.2	4.30357135
20	25	6370.14	3.97142855
22	28	6394.64	3.95238088
21	27	6864.96	3.61309518
20	26	7389.36	3.28571428

 

I've generated values for differences in AUDF1/3 up to 6 - all that's needed really. By incorporating the values into table, we could have a nice sliding frequency scale, or by using selected values equivalent to musical notes, we can use triangle waves for music.

 

Proof of the formula? Pretty easy actually. The last column of values contains the AUDF value you need to approximate the same frequency if you're in normal 64 KHz mode.

 

By playing our triangle and a quiet normal pure tone on another voice, we can get a phasing effect which proves that the frequencies are close in value.

 

e.g. try this stuff in BASIC (real machine needed here). You can't use Sound commands because they always clear AUDCTL, and we don't want that:

 

POKE 53768,96:POKE 53775,3
POKE 53761,175:POKE 53765,175

POKE 53760,54:POKE53764,55
POKE 53766,121:POKE 53767,162

 

Try other values from rows in the table. The values to POKE are as follows:

AUDF1 into 53760

AUDF3 into 53764

Put the "Audf equivalent values" into 53766.

For the sawooth instead of triangle wave, POKE 53768,100

 

 

The program I used to generate the table is pretty short and simple. I directed the output to "P:" then imported into Excel and sorted by Frequency.

 

10 BASE=14187576/8
20 FOR DIFF=1 TO 6
30 FOR AUDF1=20 TO 75
40 AUDF3=AUDF1+DIFF
50 FR1=BASE/((AUDF1+4)*2):FR3=BASE/((AUDF3+4)*2)
70 FREQ=ABS(FR1-FR3)
80 F=INT(FREQ*100+0.5)/100
90 F64=BASE/56/FREQ-1
180 ? AUDF1;",";AUDF3;",";F;",";F64
190 NEXT AUDF1
290 NEXT DIFF

 

 

What next? Well, it'd be nice to work out what's going on in two-tone mode. Maybe we could get some formulas and tables for doing variable pulsewidth square waves.

Edited by Rybags
  • Like 1
Link to comment
Share on other sites

What next? Well, it'd be nice to work out what's going on in two-tone mode. Maybe we could get some formulas and tables for doing variable pulsewidth square waves.

 

 

I've been meaning to dig out my old 2-tone notes. Basically you can pick any freq. for a square wave, and then vary the duty-cycle from 50 to 75% in small increments. This allows you to slide from a "fat" to "thin" sounding tone and back again.

 

I also had done some work on getting the best performance from the triangle mode, but lost it all in a hard drive crash. There are two issues I was working on. The first one was getting the most output possible, and the second one was eliminating the 'pop' (DC offset) that tended to happen at the start of triangle notes.

 

I would very much like to go back and revisit these topics when I have the time.

Link to comment
Share on other sites

All calculations with sawtooth, triangles... whatever, are only useful, if we can grant the same pase shifting everytime when a note gets played.

POKEY starts at least the generators at the same time, when filter is used. So it is simply necessary in RMT to play both voices 2 times on the envelop at the highest pitch, to have them always in the same phase and same shift.

 

In 16 bit, we don't have the chance to do the same in RMT. Possibly, if doing something like using all 16 bit annd filters on and repeat the "initial" several times, until all fits together... but in practice this wouldn't be much useful.

 

btw: High pitched squarewaves. They clearly sound less "yelling" and with a different pitch of the filtervoice, you can get frequency steps between (higher than) the 8 bit resolution.

 

Lower pitched triangles and waves, you simply can create them by using a programmed phase offset in 15 and 64khz mode.... as I had shown in another thread:

http://www.atariage.com/forums/index.php?s...=complex+sounds

Link to comment
Share on other sites

Continuing on from this old thread http://www.atariage.com/forums/index.php?showtopic=116835

 

I don't know if it's common knowledge, but this is how the Triangle waveform works on Atari...

 

We set voices 1 and 3 to 1.79 MHz mode, then put 2 similar values into AUDF1 and AUDF3. The actual triangle wave is produced thanks to the phasing effect/interaction between the two high frequencies playing on the two voices. Since the speaker has no chance of playing back two extremely high notes, instead we get a kind of "averaging" similar to the way PWM works.

 

Not quite. If "averaging" would work as you call it, you wouldn't hear anything. Averaging is linear superposition, and a linear superposition of two high frequency waves is just that - two high frequency waves. The reason why you do hear something is that there is a nonlinearity in the path between the pokey output and the speaker, and it's not the speaker. (-; High frequencies are cut-off before they even reach it. It is a nonlinearity in Pokey's analog parts that creates this effect - it's a rather low-cost silicon device that wasn't designed for high-fidelity audio. If you pick this sound up with a scope, I bet you would also see something considerably different from triangle - but at least a symmetric shape - meaning only "odd harmonics" are present giving it a sound that is close to a triangle. The volume is much lower because the amplitude of the mixing depends on the degree of nonlinearity - and Pokey is only a bit, but not completely nonlinear. (-;

 

Computing the required frequencies should be simple: Nonlinear mixing creates the sum and the difference of the frequencies contained in the original signal, that is, if you want to play a sound with frequency f, then you need to find two frequencies a and b such that a-b = f (or b-a = f) and play "a" with one of the oscillators and "b" with the other. *How* that frequency is created doesn't really matter.

 

So long

Thomas

Link to comment
Share on other sites

Yeah, I didn't quite have the terminology right... I posted a sample in the other thread some time ago.

 

I think I looked at the sound with my 'scope too... if you scrunch the waveform (visually), you see that it's approximating a triangle.

Link to comment
Share on other sites

The triangles are created because the linear mid-point of an oscillating voice is not the voltage produced by two voice which are 180 degrees out of phase (canceling).

 

Here's how to think of it:

 

Amplitude 1:

 

A PWM DAC allows the generation of any voltage between an ON voltage and an OFF voltage by varying the duty-cycle of a high-frequency (super-audible) signal. Usually the output is run through a low-pass filter. What remains is the average voltage. We cannot hear the oscillation frequency, but changes to the duty-cycle cause lower-frequency oscillations in the average voltage. A fast Pokey square wave will produce a simple 50-50 duty cycle PWM with a level half-way between the two states (50%). Two Pokey voices running in phase with each other will have the same effect.

 

Amplitude 2:

 

When two Pokey voices are running out of phase with each other, their output cancels producing a mid-point voltage determined by the output resistors (currents) in the two Pokey channels. Due to the nature of Pokey's volume control circuit, this voltage is not the true 50% point (this is called non-linearity) but is instead offset by some amount. Let's call it a 70% point for this discussion.

 

Now, if two voices are set to run very fast (super-audible) but at slightly different frequencies, then we'll get the old phase-shift trick as the two channels add, then subtract from each other. However, because the frequency is very fast we will not hear them, but will instead hear the lower frequency shift from the PWM average (50%) to the cancellation average (70%) and back again. This creates a triangle, but at reduced volume.

  • Like 1
Link to comment
Share on other sites

Thanks Rybags for getting busy with this problem.

 

OK, tried something with it...

 

Here's table with notes and corresponding values to be put in AUDF1 and AUDF3.

 

Contains some "tradeoffs", because some notes tend to "whistle".

 

note  AUDF1   AUDF3		AUDF1(hex)AUDF3			   
=============================================================
C-3	37	38				25	26
C#3	52	54				34	36
D-3	50	52				32	34
D#3	33	34				21	22
E-3	47	49				2F	31
F-3	31	32				1F	20
F#3	44	46				2C	2E
G-3	43	45				2B	2D
G#3	51	54				33	36
A-3	40	42				28	2A
A#3	48	51				30	33
H-3	46	49				2E	31
C-4	36	38				24	26
C#4	24	25				18	19
D-4	23	24				17	18
D#4	47	51				2F	33
E-4	46	50				2E	32
F-4	31	33				1F	21
F#4	48	53				30	35
G-4	41	45				29	2D
G#4	45	50				2D	32
A-4	39	43				27	2B
A#4	26	28				1A	1C
H-4	45	51				2D	33
C-5	24	26				18	1A
C#5	23	25				17	19
D-5	22	24				16	18
D#5	38	44				26	2C
E-5	25	28				19	1C
F-5	31	36				1F	24
F#5	32	38				20	26
G-5	24	28				18	1C
G#5	22	26				16	1A
A-5	20	24				14	18
A#5	20	25				14	19
H-5	19	25				13	19

 

And two small tests i've done in MPT (sampled to WAVs).

Sorry for glitches. On real stuff it plays much-much cleaner.

The PC-machine just listens "too carefully". ;)

triang.zip

Link to comment
Share on other sites

Nice. Do you have an XEX of that second one?

 

From memory, on the real machine the low-pitched ones start to become undesirable when AUDF gets over the mid 60s or so.

High pitched... of course we get the normal problem that the frequencies are spaced too far apart.

 

Thing is though, we can live without the higher ones since they sound almost the same as square waves anyhow.

Link to comment
Share on other sites

Well - not all tradeoffs made here are really good...

 

G-4 note should consist of 51 and 57 (hex: 33 and 39) values instead of 41 and 45 (hex: 29 and 2D) as listed above, but then it may "whistle" so...

 

Welcome bad note! :D

 

but...

 

Transposing whole song can help a bit.

Link to comment
Share on other sites

Interesting. It seems, POKEY still has more "SAW" features than the emulation can rebuild. The tune doesn't play anything "Sawtooth" like in the emulator. But your wavs seem to work.

At least the emulation plays this sounds (an old mate ;) for a reminder )...

 

Btw. Sound precision. I realized that the emulation used in the SAP player somehow seems to be more accurate and sounding more like POKEY than the emulation used in the RMT and A8win+ . Eventhough many sounds do not work right now, the sounds the SAP plays (correctly) are more like the real hardware.

Perhaps we should approach something like RMT SAP cooperation?

aje2.zip

Edited by emkay
Link to comment
Share on other sites

Ok - made another WAV form that small Ninja cover. This time it plays cleaner. Removing some noiseusing Audacity did the job. Enjooy nice "tube" sound.

 

Yeah, i wonder as well, when SAP/emulation could play these sounds. For "sawtooth" ones - they are more or less accurate played by ASAP 0.1.0 (but you make give it SAP file; can be made with RMT modified in any way).

 

Also... Fox said that he contantly works on "new" features, so we can expect something new in ASAP "ASAP". ;)

ninja.zip

Link to comment
Share on other sites

Oh, sorry, forgot...

 

Exit menu by ESC, then press TAB if needed and once you are in patterns' window, press Ctrl+P and SPACE (to bring up the equalizer or any other key not to bring it up). The music will then play.

 

:)

Edited by miker
Link to comment
Share on other sites

  • 2 weeks later...

Thanks emkay. The link should now be http://www.atariage.com/forums/topic/116835-polycounter-reset-on-pokey/page__st__50__p__1414219entry1414219

 

Indeed, handling of sawtooth wave and triangle wave on pokey have much in common, see especially the following detail (also to be found in the post linked above):

Note: in case of the sawtooth waveform the resulting frequency (expressed as 1.79mhz divided by an integer) is related to the l.c.m. (least common multiple) of both signal frequencies F1+4 and F3+4. In case of F1=F3+1 then it coincides with the simpson relation, so when pitchdifference is 1 notationtables for both sawtooth waveform and triangle waveform are the same.

 

I've sorted this all out some time ago.

 

...thus to help you, miker,

It seems also that sawtooth effect doesn't love greater value-differencies in AUDFs. Sometimes it just plays wrong octaves, but some notes are really "out-of-hell".

 

We should be aware that the triangle wave is an interference effect, just by 'adding' two voice signals, with a slightly non-linear operation.

When adding two periodic functions, and the two periods differ by a rational factor, we obtain another periodic function. The period/wavelenght of the resulting function is just the result of the famous 'Simpson rule'.

 

For the sawtooth wave we are dealing with a different principle. The two signals won't get added, but rather 'multiplied', be it in a Boolean way.

When the two periods are again differing by a rational factor, which is always the case,

the resulting period/wavelength is the least common multiple of pitch1 and 3.

 

We then have two situations:

 

1) the ratio is prime, i.e. the two pitches (+4) have no common prime divisors. In this case the least common multiple of pitch1 & 3 is just their ordinairy product. In this case the relation coincides with the Simpson rule (up to a factor 2).

 

2) the ratio is not prime. Then there are common prime divisors.

 

In case pitch3=pitch1+1 they are always relatively prime.

In case pitch3=pitch1+2 they are only relatively prime when pitch1 is odd.

In case pitch3=pitch1+3 they are only relatively prime when pitch1 is not a multiple of 3...etc.

...

In case pitch3=pitch1+6 they are only relatively prime when pitch1 is not a multiple of 2 or 3...etc.

The more prime divisors pitch1 and 3 have in common, the more the resulting sound will differ from sawtooth.

So, when trying pitch3=pitch1+30 will give some 'noises from hell' ;)

 

...any more problems?

Link to comment
Share on other sites

...What next? Well, it'd be nice to work out what's going on in two-tone mode. Maybe we could get some formulas and tables for doing variable pulsewidth square waves.
More than a year ago I did some complete research for the 2-tone filter.

 

Here's a picture which should be self-explaining. It's from part of my personal 'Pokey research diary'.

Here F1 is just value in AUDF1 +1, F2 is AUDF2 +1.

(asssuming 64 or 15 khz mode)

 

The 2-tone filter at 1.79mhz and non-square distortions gives a whole jungle of weird instruments.

  • Like 1
Link to comment
Share on other sites

I think we need to revive the "Heavy Metal Atari" or whatever that document was called.

 

We have all this sound stuff, Interlaced graphics, and all manner of other stuff that could go in there.

 

Think of it as the "De Re" for the 21st Century.

 

I concur. I'm not a tech writer though. My writing ability only extends to certain pulp fantasy novels that fill the bargain bins of Wal-Mart.

 

Perhaps GoodByteXL could lend us his wordsmith skills on this matter? :ponder:

Edited by dwhyte
Link to comment
Share on other sites

Any chance of one day collecting all your successful research into a reference document?
It's one of my wishes to have some time to make such a document. Most likely a .pdf generated from LaTeX, and some figures/pictures included. Of course some scope pictures of certain waveforms, f.e. Bryan's pictures of the squarewave which is not square, would be nice.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...