Scale Tuning
2003/3/23 Takuichi Hirano
周波数を求める関数(平均律)
[Input]
オクターブ
音 (c,c#,d,d#,e,f,f#,g,g#,a,a#,b)
In[1]:=
![ABCToNumOfHalfTone[ABC_] := Which[ ABC == "C" || ABC == "c", 0, ABC == &q ... ; FreqTemperament[OctABCList_List] := Map[(FreqTemperament[#[[1]], #[[2]]] &), OctABCList] ;](HTMLFiles/index_1.gif)
周波数を求める関数(純正律)
基準周波数は平均律で決める。
基準音から2オクターブ分までサポート
[Input]
基準音のオクターブと音名
と
オクターブ
音 (c,c#,d,d#,e,f,f#,g,g#,a,a#,b)
In[4]:=
![FreqJustIntonation[OctaveStd_, ABCStd_, Octave_, ABC_] := Module[{r = 2^(1/12)}, (* 純正律 (just ... ABCList_List] := Map[(FreqJustIntonation[OctaveStd, ABCStd, #[[1]], #[[2]]] &), OctABCList] ;](HTMLFiles/index_2.gif)
Difference Between Temperament and Just Intonation
In[6]:=

In[7]:=
![FreqTemperament[ABCList]](HTMLFiles/index_4.gif)
Out[7]=

In[8]:=
![FreqJustIntonation[4, "a", ABCList]](HTMLFiles/index_6.gif)
Out[8]=

In[9]:=
![g1 = ListPlot[FreqTemperament[ABCList], PlotStyle -> {AbsolutePointSize[8], AbsoluteThickn ... 1, 7}, {440, 880}}, Frame -> True, Axes -> None, DisplayFunction -> $DisplayFunction]](HTMLFiles/index_8.gif)
![[Graphics:HTMLFiles/index_9.gif]](HTMLFiles/index_9.gif)
Out[13]=

Scale Tuning Data for MIDI
Roland SC-88VL Manual p. 86, p. 80
In[14]:=
![DecNumberToHexString1[n_] := Module[{}, Which[ n == 10, "a", n == 11, "b" ... tring1[hex[[2]]] ] ; CentToMIDIScaleTuningData[lis_List] := Map[CentToMIDIScaleTuningData, lis] ;](HTMLFiles/index_11.gif)
In[26]:=
![CDEList = {{4, "c"}, {4, "c#"}, {4, "d"}, {4, "d#"}, { ... uot;} &), CentToMIDIScaleTuningData[Round[1200 * Log[2, Scale[1]/Scale[0]]]] ] ] , -1 ] ] ] ;](HTMLFiles/index_12.gif)




Converted by Mathematica
(March 29, 2003)