Doremi

Takuichi Hirano

公比を求める

In[1]:=

Solve[440 * r^12 == 880, r]

Out[1]=

{{r -> -2^(1/12)}, {r -> -i 2^(1/12)}, {r -> i 2^(1/12)}, {r -> 2^(1/12)}, {r -> ... 2)}, {r -> (-1)^(2/3) 2^(1/12)}, {r -> -(-1)^(5/6) 2^(1/12)}, {r -> (-1)^(5/6) 2^(1/12)}}

周波数を求める関数

[Input]
オクターブ
音 (c,c#,d,d#,e,f,f#,g,g#,a,a#,b)

In[2]:=

FreqDoReMi[Octave_, ABCTone_] := Module[{r = 2^(1/12)},  NumTone = Which[ ABCTone == "A&q ... t;G#" || ABCTone == "g#", 11] ;  (440 * r^((Octave - 4) * 12)) * r^NumTone // N ] ;

In[3]:=

dt = 0.5 ; Pulse[t1_, dt_, t_] := UnitStep[t - t1] - UnitStep[t - (t1 + dt)] ; ω[1] = 2 * ... ave[t], {t, 0, dt * 8},  SampleRate -> 44100,  SampleDepth -> 16,  PlayRange -> {-2, 2}]

[Graphics:HTMLFiles/index_5.gif]

Out[14]=

-Sound -


Converted by Mathematica  (February 20, 2003)