git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/sounds/mikrotourette-acdc-thunderstruck.rsc
blob: ac13e7e1468c3c75e99818422ab44c3c8e513cd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# =================
# Thunderstruck AC/DC
# =================
:local n11 63,66;
:local n12 64,67;
:local n21 71,69,68,69,68,66,68,64,66,63;
:local n22 64,63;

:local n11 ($n11,$n11);
:local n12 ($n12,$n12);
:local n1 ($n11,$n11,$n12,$n12);
:local n2 ($n21,$n22,$n22,$n22);
:local notes ($n1,$n1,$n2,$n2);
  
:local ticks 2;
:local speed 55ms;
:local stacc 5ms;
# Transposition
:local transpose -48;
# ==============================
# Don't change this:
:local frqtab 8372,8869,9397,9956,10548,11175,11839,12543,13288,14080,14916,15804;
:local n0; :local n;
:local d0; :local d;
:local l;
:local midi;
:local i;
:local octa;
:local frq;
:for i from=0 to= ([:len $notes]-1) do={
:set midi [:pick $notes $i];
:set midi ($midi + $transpose);
:set octa 0;
:while ( $midi < 60) do={:set midi ($midi + 12); :set octa ($octa + 1   ); };
:set midi ($midi - (12 * ($midi /12)));
:set frq [:tonum [:pick $frqtab $midi]];
:set frq ($frq>>($octa));
:set d0 $ticks;
:set d ($d0 * $speed );
:set l ($d0 * ($speed - $stacc));
:beep fr=$frq le=$l;
:delay $d;
:set midi 59;
:set midi ($midi + $transpose);
:set octa 0;
:while ( $midi < 60) do={:set midi ($midi + 12); :set octa ($octa + 1   ); };
:set midi ($midi - (12 * ($midi /12)));
:set frq [:tonum [:pick $frqtab $midi]];
:set frq ($frq>>($octa));
:set d0 $ticks;
:set d ($d0 * $speed );
:set l ($d0 * ($speed - $stacc));
:beep fr=$frq le=$l;
:delay $d;
}