Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Metronome/Mathematica/metronome.math
Normal file
17
Task/Metronome/Mathematica/metronome.math
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
s = Sound[Play[Sin[1000 t], {t, 0, 0.05}]];
|
||||
ss = Sound[Play[Sin[2000 t], {t, 0, 0.05}]];
|
||||
bpm = 180;
|
||||
slp = 60/bpm;
|
||||
color = White;
|
||||
i = 0;
|
||||
Dynamic[Graphics[{color, Disk[]}, ImageSize -> 50]]
|
||||
While[True,
|
||||
i = Mod[i + 1, 4, 1];
|
||||
color = {Green, Red, Darker@Red, Red, Darker@Red}[[i]];
|
||||
If[i == 1,
|
||||
EmitSound[ss]
|
||||
,
|
||||
EmitSound[s]
|
||||
];
|
||||
Pause[slp];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue