Showing posts with label tuning. Show all posts
Showing posts with label tuning. Show all posts

Monday, August 17, 2015

The First 100 Pairs of Just Perfect Fourths

Thursday, July 23, 2015

10 Hours of a Perfect Fifth

Tuesday, July 21, 2015

The First 106 Fifths Derived from a 3/2 Ratio

Saturday, February 09, 2013

Table for MIDI Note, Frequency, Octave and Pitch Identity

Every now and then I find a table like this one useful.





Pitch ID Octave Number Frequency
C 0 0 8.1757989156
C# 0 1 8.661957218
D 0 2 9.1770239974
D# 0 3 9.7227182413
E 0 4 10.3008611535
F 0 5 10.9133822323
F# 0 6 11.5623257097
G 0 7 12.2498573744
G# 0 8 12.9782717994
A 0 9 13.75
A# 0 10 14.5676175474
B 0 11 15.4338531643
C 1 12 16.3515978313
C# 1 13 17.3239144361
D 1 14 18.3540479948
D# 1 15 19.4454364826
E 1 16 20.6017223071
F 1 17 21.8267644646
F# 1 18 23.1246514195
G 1 19 24.4997147489
G# 1 20 25.9565435987
A 1 21 27.5
A# 1 22 29.1352350949
B 1 23 30.8677063285
C 2 24 32.7031956626
C# 2 25 34.6478288721
D 2 26 36.7080959897
D# 2 27 38.8908729653
E 2 28 41.2034446141
F 2 29 43.6535289291
F# 2 30 46.249302839
G 2 31 48.9994294977
G# 2 32 51.9130871975
A 2 33 55
A# 2 34 58.2704701898
B 2 35 61.735412657
C 3 36 65.4063913251
C# 3 37 69.2956577442
D 3 38 73.4161919794
D# 3 39 77.7817459305
E 3 40 82.4068892282
F 3 41 87.3070578583
F# 3 42 92.4986056779
G 3 43 97.9988589954
G# 3 44 103.826174395
A 3 45 110
A# 3 46 116.5409403795
B 3 47 123.470825314
C 4 48 130.8127826503
C# 4 49 138.5913154884
D 4 50 146.8323839587
D# 4 51 155.563491861
E 4 52 164.8137784564
F 4 53 174.6141157165
F# 4 54 184.9972113558
G 4 55 195.9977179909
G# 4 56 207.65234879
A 4 57 220
A# 4 58 233.081880759
B 4 59 246.9416506281
C 5 60 261.6255653006
C# 5 61 277.1826309769
D 5 62 293.6647679174
D# 5 63 311.1269837221
E 5 64 329.6275569129
F 5 65 349.228231433
F# 5 66 369.9944227116
G 5 67 391.9954359818
G# 5 68 415.3046975799
A 5 69 440
A# 5 70 466.1637615181
B 5 71 493.8833012561
C 6 72 523.2511306012
C# 6 73 554.3652619537
D 6 74 587.3295358348
D# 6 75 622.2539674442
E 6 76 659.2551138257
F 6 77 698.456462866
F# 6 78 739.9888454233
G 6 79 783.9908719635
G# 6 80 830.6093951599
A 6 81 880
A# 6 82 932.3275230362
B 6 83 987.7666025122
C 7 84 1046.5022612024
C# 7 85 1108.7305239075
D 7 86 1174.6590716696
D# 7 87 1244.5079348883
E 7 88 1318.5102276515
F 7 89 1396.912925732
F# 7 90 1479.9776908465
G 7 91 1567.981743927
G# 7 92 1661.2187903198
A 7 93 1760
A# 7 94 1864.6550460724
B 7 95 1975.5332050245
C 8 96 2093.0045224048
C# 8 97 2217.461047815
D 8 98 2349.3181433393
D# 8 99 2489.0158697767
E 8 100 2637.020455303
F 8 101 2793.825851464
F# 8 102 2959.9553816931
G 8 103 3135.963487854
G# 8 104 3322.4375806396
A 8 105 3520
A# 8 106 3729.3100921447
B 8 107 3951.066410049
C 9 108 4186.0090448096
C# 9 109 4434.92209563
D 9 110 4698.6362866785
D# 9 111 4978.0317395533
E 9 112 5274.0409106059
F 9 113 5587.6517029281
F# 9 114 5919.9107633862
G 9 115 6271.926975708
G# 9 116 6644.8751612791
A 9 117 7040
A# 9 118 7458.6201842894
B 9 119 7902.132820098
C 10 120 8372.0180896192
C# 10 121 8869.8441912599
D 10 122 9397.2725733571
D# 10 123 9956.0634791066
E 10 124 10548.0818212118
F 10 125 11175.3034058561
F# 10 126 11839.8215267723
G 10 127 12543.853951416




Thursday, December 10, 2009

Let's Tune the Game Boy Like a Japanese Koto

Someone asked me to tune the Game Boy LSDJ ROM like a Japanese Koto. Sure, I said. The scale that this individual requested was the Hirajoshi 2 scale, which is a pentatonic scale made up of the following ratios above a fundamental frequency that is considered to be 1/1:

• 9/8
• 6/5
• 3/2
• 8/5
• 2/1

I've tuned the entire ROM to an A as a tonic note. The process was very similar to previous cases of retuning LSDJ for other purposes. I worked using a spreadsheet, which had the ratios and then calculated the frequencies for each note. Then, the data needed for the Game Boy to generate that frequency was calculated, and converted into hex. Finally, this block of hex tuning data was copied into the LSDJ ROM using a hex editor.

If anyone wants to see the spreadsheet or would like more details, please let me know.




Friday, December 04, 2009

Microtonal Chipmusic Compilation

Microtonality is a field that seems to me to be a little overlooked when it comes to chipmusic. That's why I thought it would be fun to do a microtonal compilation.

More information about microtonal music can be found here, for example.

If I receive more than 10 tracks, I will have to select the best 10 tracks. If I am unable to make such a choice because of a conflict of interest, then I will find others to make such choices for me.



Rules:
++ Software or hardware, real or fake, it's all good.
++ Tracks must be microtonal as far as the chosen tuning is concerned.
++ Effects are fine.


Submission:
++ Email submission to: seb dot tomczak at gmail dot com
++ The due date is February 20th 2010
++ Please use the FLAC format for submission, as I would like to release this in both lossy and lossless formats


How:
You might be asking yourself, ok this sounds like a reasonable compilation, but how can I write microtonal music for Gameboy or other consoles?
++ The ever-brilliant Abrasive has made an LSDJ tuning script.
++ LSDJ can also be retuned using a simple spreadsheet and a hex editor.
++ Nanoloop can be retuned in a similar fashion.
++ Furthermore, the SEGA Mega Drive, C64 SID chip and many other chipmusic-related consoles and computers support a frequency resolution that is fine enough for the composition of microtonal music. If anyone has any thoughts or ideas on how to write microtonal music for consoles other than the Gameboy, please feel free to share your thoughts here in the comments, as it will make this compilation more accessible.

Friday, June 05, 2009

X-EDX Tuning Synth


I made a very basic synth to explore equal division by ratio tuning a little more easily. The name comes from the fact that it can play any tuning of the form "x equal divisions of ratio a is to b". It's basically a patch with a sine / pulse / triangle wave, with a MIDI input.

The frequency of the wave is determined by the settings that the user puts in (reference frequency, ratio numerator, ratio denominator and equal division). The synth also contains an amplitude envelope.

The video example shows the synth playing a group of fifths, first with a scale based on perfect fourths and then using a scale based on perfect fifths. Very much inspired by nitro2k01's work here. Thanks Didrik!

Download it here.


12-TET, 7-ED5th and 5-ED4th


Here you can see a comparison of frequencies as governed by 12-TET, "7-ED5th" (7 equal divisions of the fifth) and "5-ED4th" (five equal divisions of the 4th). Includes deviations given in cents when compared to 12-TET.

Nitro Tuning: X-EDX

I was very much intrigued and inspired by nitro2k01's recent post about tuning (specifically, the post was about tuning in a "6-EDF" or six divisions of a fifth). Naturally, I wanted to play around with these ideas as well, so i made a super-simple Max patch that allowed me to easily explore these tunings. You can see it below. The patch allows the user to explore "variable" divisions of a "variable" ratio, hence the name X-EDX.

Saturday, March 21, 2009

Nanoloop Tuned to 18-TET! (Hacked ROM)

18-TET = 18 divisions of the octave instead of 12 (which is standard for western tuning). Special, special thanks to Abrasive for his help and his idea with this - all of the credit goes to him of course. On left, the original ROM with its frequency lookup table intact, and on the right the edited ROM with the 18-TET lookup table.

As far as I can tell, the lookup table starts at 0x730a and is 144 bytes long.

So normally, each different pitch is a semitone apart from the next pitch in Nanoloop, right? So 12 notes make up an octave.

By editing the frequency table, we can change the space between notes - so we can edit the tuning.

Instead of there being 12 pitches per octave, there are now 18 in the above example (ie. each step of pitch in Nanoloop is now only 2/3s of a semitone instead of a full semitone). It doesn't have to be 18, but thats just what I wanted to experiment with.

You could easily change the tuning to just intonation, 1/4 tone steps, ragas or middle eastern scales, or many other flavours of microtonality.

To generate my table, I used a spreadsheet. I'm sure that Abrasive has some super-smart way of doing it, but hey this is just how I did this. Not sure how correct it is, but yeah - if you want the spreadsheet, you can get it here: http://milkcrate.com.au/_other/downloads/spreadsheets/nanoloop_tuning.xls

One column had the MIDI notes from 0 to 127. The next column had the resulting frequency, based on the MIDI note. The formula I used was: Frequency = 440 * 2 ^ ((Note - 49) / 12)

The next column then had the appropriate data value to send to the Game Boy's audio register, based on the frequency of the note. The formula I used was: Data = (- 131072 / Frequency) + 2048

The next column had the data value as a hex number.

The next column had the resultant frequency, based on the audio register - this column shows you how the tuning compares to the actual frequency. The formula I used was: Frequency = 131072 / (2048 - Data)

The final four columns represented the (potentially) 16-bit data word.
For nibble 3 (the most significant one) I used the formula: dec2hex of: (Data / 4096) % 16.
For nibble 2: dec2hex of: (Data / 256) % 16.
For nibble 1: dec2hex of: (Data / 16) % 16.
For nibble 0: dec2hex of: (Data % 16

These four nibble columns are then copied and pasted into the ROM at the correct point. By changing the MIDI notes to fractions of whole numbers, different tuning can be obtained. Remember that each percentage point of a MIDI number is equal to a cent in musical interval terms.

In the spreadsheet, Nanoloop only uses the data in rows 27 - 90 it seems. This data area is marked in blue.



Tuesday, January 06, 2009

Chiptuning the Atari POKEY

The POKEY has a variety of ways that you can tune the chip, including using 8 bit or 16 bit data for the pitch, as well as choosing a direct division of the master clock, a division of 28 (which the eight bit data below is based on) and a division of 120.


Using Eight Bits
Below you can see the possible frequencies when using a POKEY in 8-bit mode, with a master clock of 1.843200 MHz. The approximate data values and resulting frequencies for the notes going from C2 to G6 are shown. Naturally, the higher the frequency, the lower the resolution. The lower resolution, the more out of tune the oscillator is.

There are four columns in the table below (sorry about the bad layout). 'Note' is the MIDI note number, '12-TET' is the in tune, ideal frequency for each note, 'Result' is the frequency that the POKEY will play for a give note and 'Difference' is the the difference between the in-tune note and the resulting POKEY note.


Note 12-TET Result Difference
48 130.8128 130.61 -2.66
49 138.5913 138.3 -3.7
50 146.8324 146.94 1.25
51 155.5635 155.26 -3.42
52 164.8138 164.57 -2.55
53 174.6141 174.15 -4.61
54 184.9972 184.91 -0.8
55 195.9977 195.92 -0.7
56 207.6523 207.01 -5.38
57 220.0000 219.43 -4.5
58 233.0819 233.43 2.62
59 246.9417 247.48 3.74
60 261.6256 261.22 -2.66
61 277.1826 276.59 -3.7
62 293.6648 293.88 1.25
63 311.1270 310.51 -3.42
64 329.6276 329.14 -2.55
65 349.2282 350.15 4.57
66 369.9944 369.82 -0.8
67 391.9954 391.84 -0.7
68 415.3047 416.64 5.54
69 440.0000 438.86 -4.5
70 466.1638 463.58 -9.62
71 493.8833 491.26 -9.23
72 523.2511 522.45 -2.66
73 554.3653 557.87 10.91
74 587.3295 587.76 1.25
75 622.2540 621.02 -3.42
76 659.2551 658.29 -2.55
77 698.4565 700.3 4.57
78 739.9888 731.43 -20.14
79 783.9909 783.67 -0.7
80 830.6094 822.86 -16.23
81 880.0000 889.58 18.74
82 932.3275 940.41 14.94
83 987.7666 997.4 16.81
84 1046.5023 1061.75 25.04
85 1108.7305 1097.14 -18.19
86 1174.6591 1265.93 129.55
87 1244.5079 1316.57 97.45
88 1318.5102 1496.1 218.76
89 1396.9129 1567.35 199.3
90 1479.9777 1645.71 183.77
91 1567.9817 1732.33 172.57
92 1661.2188 1936.13 265.12
93 1760.0000 2057.14 270.08
94 1864.6550 2194.29 281.81
95 1975.5332 2351.02 301.25
96 2093.0045 2531.87 329.55
97 2217.4610 2742.86 368.12
98 2349.3181 2992.21 418.76
99 2489.0159 3291.43 483.77


We can represent this difference as a table that compares the POKEY's frequencies for each note to the in-tune frequency.




We can also represent the amount that the POKEY is out of tune in terms of cents. For this graph, I have chosen a smaller range of values because the tuning becomes ridiculous as the frequency increases too high (this is measured in cents; 100 cents is equal to one semitone).



From note 48 onwards


Using Sixteen Bits
When sixteen bit mode is active, the tuning range and resolution increases immensely, allowing the chip to have a reasonable range of approx. eight octaves. The frequencies and their tuning in cents in comparison to 12-TET is shown below.



Note 12-TET Result Difference
1 8.6620 14.06 838.75
2 9.1770 14.06 738.75
3 9.7227 14.06 638.75
4 10.3009 14.06 538.75
5 10.9134 14.06 438.75
6 11.5623 14.06 338.75
7 12.2499 14.06 238.75
8 12.9783 14.06 138.75
9 13.7500 14.06 38.75
10 14.5676 14.57 0.02
11 15.4339 15.43 0.03
12 16.3516 16.35 0.01
13 17.3239 17.32 0
14 18.3540 18.35 0.01
15 19.4454 19.45 0.01
16 20.6017 20.6 0
17 21.8268 21.83 0.02
18 23.1247 23.12 0.02
19 24.4997 24.5 0.04
20 25.9565 25.96 0.02
21 27.5000 27.5 0.04
22 29.1352 29.14 0.04
23 30.8677 30.87 0.03
24 32.7032 32.7 0.04
25 34.6478 34.65 0
26 36.7081 36.71 0.01
27 38.8909 38.89 0.01
28 41.2034 41.2 0
29 43.6535 43.65 0.06
30 46.2493 46.25 0.07
31 48.9994 49 0.04
32 51.9131 51.92 0.07
33 55.0000 55 0.04
34 58.2705 58.27 0.1
35 61.7354 61.74 0.03
36 65.4064 65.41 0.04
37 69.2957 69.3 0.07
38 73.4162 73.42 0.01
39 77.7817 77.79 0.08
40 82.4069 82.41 0.08
41 87.3071 87.31 0.14
42 92.4986 92.5 0.07
43 97.9989 98 0.04
44 103.8262 103.83 0.07
45 110.0000 110 0.04
46 116.5409 116.55 0.21
47 123.4708 123.47 0.03
48 130.8128 130.82 0.04
49 138.5913 138.61 0.2
50 146.8324 146.85 0.15
51 155.5635 155.57 0.08
52 164.8138 164.84 0.24
53 174.6141 174.64 0.3
54 184.9972 185.02 0.24
55 195.9977 196 0.04
56 207.6523 207.66 0.07
57 220.0000 220 0.04
58 233.0819 233.14 0.43
59 246.9417 246.95 0.03
60 261.6256 261.67 0.29
61 277.1826 277.26 0.46
62 293.6648 293.69 0.15
63 311.1270 311.14 0.08
64 329.6276 329.73 0.55
65 349.2282 349.36 0.63
66 369.9944 370.12 0.59
67 391.9954 392 0.04
68 415.3047 415.32 0.07
69 440.0000 440.11 0.45
70 466.1638 466.4 0.87
71 493.8833 493.89 0.03
72 523.2511 523.34 0.29
73 554.3653 554.51 0.46
74 587.3295 587.38 0.15
75 622.2540 622.28 0.08
76 659.2551 659.7 1.17
77 698.4565 698.71 0.63
78 739.9888 740.24 0.59
79 783.9909 784.34 0.77
80 830.6094 831.02 0.85
81 880.0000 880.23 0.45
82 932.3275 932.79 0.87
83 987.7666 987.78 0.03
84 1046.5023 1047.27 1.27
85 1108.7305 1109.03 0.46
86 1174.6591 1175.51 1.25
87 1244.5079 1245.41 1.25
88 1318.5102 1320.34 2.41
89 1396.9129 1398.48 1.94
90 1479.9777 1481.67 1.98
91 1567.9817 1570.02 2.25
92 1661.2188 1663.54 2.42
93 1760.0000 1762.14 2.11
94 1864.6550 1865.59 0.87
95 1975.5332 1977.68 1.88
96 2093.0045 2094.55 1.27
97 2217.4610 2220.72 2.54
98 2349.3181 2351.02 1.25
99 2489.0159 2490.81 1.25
100 2637.0205 2640.69 2.41
101 2793.8259 2801.22 4.57
102 2959.9554 2963.34 1.98
103 3135.9635 3145.39 5.2
104 3322.4376 3327.08 2.42
105 3520.0000 3531.03 5.42
106 3729.3101 3731.17 0.87
107 3951.0664 3955.36 1.88
108 4186.0090 4189.09 1.27
109 4434.9221 4452.17 6.72
110 4698.6363 4702.04 1.25
111 4978.0317 4981.62 1.25
112 5274.0409 5296.55 7.37
113 5587.6517 5619.51 9.84
114 5919.9108 5945.81 7.56
115 6271.9270 6312.33 11.12
116 6644.8752 6678.26 8.68
117 7040.0000 7089.23 12.06
118 7458.6202 7492.68 7.89
119 7902.1328 7944.83 9.33
120 8372.0181 8378.18 1.27
121 8869.8442 8947.57 15.11
122 9397.2726 9404.08 1.25
123 9956.0635 10017.39 10.63
124 10548.0818 10593.1 7.37
125 11175.3034 11239.02 9.84
126 11839.8215 11968.83 18.76
127 12543.8540 12624.66 11.12

Once again, we can show the pitch versus the ideal pitch as note against frequency. Notice how the 12-TET line completely obscures the resultant frequency line - this is becasue the Atari POKEY is now much more in tune than if we were using eight bits of data!!


We can also show the tuning of each note in cents. The following graph shows the range from MIDI note 10 to MIDI note 110, a huge pitch range. The POKEY is much more in tune.

Sunday, September 21, 2008

Sega Mega Drive / Genesis Non 12-TET Tuning

Non-standard tuning is something that has interested me in a long time (I would probably say since early high school). The Sega Mega Drive / Genesis is the perfect candidate for merging my love of chip music with the exploration of non-standard divisions of the octave.

I have added a new feature to the Mega Drive / Genesis MIDI Interface - the ability to tune the pitches of the machine to non 12-TET tuning. 12-TET tuning is a tuning of equal temperament where the octave is divided into twelve logarithmically-equal divisions (semitones), and is the most common scale used in Western music.

The Megadrive can now be tuned to anything from 3-TET (so, the octave is divided three equal parts) to a staggering 128-TET (so, the octave is divided into one hundred and twenty-eight equal parts). This tuning is done via a single MIDI CC message.

The 12-TET is of course the standard tuning when the machine boots up (as one would expect) and the tuning is not entirely perfect (the maximum deviation for a pitch identity across the whole octave is about -0.9 to +0.9 cents).

So of course, the other forms of equally-tempered scales will not be perfectly in tune either. The larger the divisions, the greater the probability of error in comparison to the tuning ratio (of course).

The division process is calculated from MIDI note C-2, so every scale will share the same C-2 MIDI note but will differ more and more as the MIDI note number increases.

Friday, June 20, 2008

Chip Tuning the Sega Master System

By following the link below, you can see the tuning of the PAL and NTSC Sega Master System as I have implemented it. To avoid confusion of the various ways of naming MIDI notes, I have shown the tuning in comparison to MIDI note numbers. The resulting PAL and NTSC frequencies are compared to 12-TET equal tempered tuning.

This comparison is in cents, and has been rounded to two decimal places. The lowest MIDI note number that the Master System can play is MIDI note 45 (an 'A' two octaves below a concert 'A').

The tuning of the Master System above around MIDI note 101 begins to go horribly pear shaped, but this surely forms part of the character of playing chip music on a machine such as this. I suppose this brings up the interesting topic of how the tuning limitations of a system influence the feel and aesthetic of the music that is made using it.

Link: PAL and NTSC Sega Master System Tuning