 # TI-99/4A BASIC: A Program for Microtonal Adjustment

No replies to this topic

### #1 ColecoFan1981 OFFLINE

ColecoFan1981
• Location:Milwaukie (Oak Grove), OR

Posted Mon Apr 12, 2010 7:00 AM

Hi,

For those of you familiar with the Texas Instruments TI-99/4A and its BASIC program, what is the right way to write a program on it about microtonal adjustment? I want to use the FOR-NEXT and IF-THEN statements in the program; however, I do not know where to put them in regards to the mathematics below.

It could start off as something like this:
5 CALL CLEAR
10 LET F=60
20 LET Y=1200*LOG(F/16.3515978312876)/LOG(2)

About microtonal adjustments relating to musical pitches:
0 = C; 1 = C#; 2 = D; 3 = D#; 4 = E; 5 = F; 6 = F#; 7 = G; 8 = G#; 9 = A; 10 = A#; 11 = B

C1 = 32.7 Hz
C#1 = 34.65 Hz
D1 = 36.71 Hz
D#1 = 38.89 Hz
E1 = 41.2 Hz
F1 = 43.65 Hz
F#1 = 46.25 Hz
G1 = 49 Hz
G#1 = 51.91 Hz
A1 = 55 Hz
A#1 = 58.27 Hz
B1 = 61.74 Hz

To find out what note corresponds to a frequency of 52.5 Hz:
Y=1200*LOG(52.5/16.3515978312876)/LOG(2)
Y=2019.46

To find out octave N; it is the integer part of Y/1200 = 2019.46/1200 = 1
Then subtract 1*1200 from 2019.46, which gives Y'=819.46

Semitone (S) = integer part of 819.46/100 = 8. The note to insert is a G# (7=G; 8=G#; 9=A).
Now subtract 100*8 from 819.46. The result is 19.46, rounded to M=19 cents.
We have to insert a G#, 1st octave, with a microtonal adjustment of 19 cents.
Same frequency can be obtained by using an A, 1st octave, with a microtonal adjustment of (19-100) = -81 cents.

Thank you in advance,

Ben

Edited by ColecoFan1981, Mon Apr 12, 2010 7:03 AM.

#### 0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users