diff options
-rw-r--r-- | monophon/monophon.ino | 2 | ||||
-rw-r--r-- | music/starwars | 2 | ||||
-rw-r--r-- | music/starwars-kurz | 1 | ||||
-rw-r--r-- | rtttl.py | 3 |
4 files changed, 4 insertions, 4 deletions
diff --git a/monophon/monophon.ino b/monophon/monophon.ino index f997375..d1dfeb2 100644 --- a/monophon/monophon.ino +++ b/monophon/monophon.ino @@ -32,10 +32,8 @@ void loop() { void beep(long usecs) { high(); delayMicroseconds(usecs*high_factor); -// delayMicroseconds(usecs*on_percentage/100); low(); delayMicroseconds(usecs*(1-high_factor)); -// delayMicroseconds(usecs*(100-on_percentage)/100); } void high() { diff --git a/music/starwars b/music/starwars index 9dbf69a..4000cd2 100644 --- a/music/starwars +++ b/music/starwars @@ -1 +1 @@ -Star_Wars_:d=4,o=5,b=150:2g,192p,2g,19p,2g,192p,3d#,26p,8a#,384p,1g,7p.,2d6,192p,d.6,15p.,2d6,192p,3d#6,13p,8a#,384p,f#.,15p.,3d#,13p,15a#.,38p,1g,1p,15a#.,38p,15a.,38p,a#.,p.,2f#,192p,3d#,13p,8a#,1p,d6,384p,d#6,384p,2c6,19p,a#6,384p,a6,384p,2f#6,19p,d7,384p,c#7,384p,a6,384p,c7,384p,a#6,384p,f#6,384p,d#6,1p,15g6,55p,15f#6,55p,15f6,55p,15e6,55p,15f6,55p,15g6,55p,15a6,55p,15g#6,55p,15g6,55p,15f#6,55p,15g6,55p,15a6,55p,43a#6,128p,14d7,1p,32d6,96p,32d6,96p,32d6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32c6,96p,32c6,96p,32c6,7p,32a#6,96p,32a#6,96p,32a#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32d7,96p,32d7,96p,32d7,96p,32c#7,96p,32c#7,96p,32c#7,96p,32a6,96p,32a6,96p,32a6,96p,32c7,96p,32c7,96p,32c7,96p,32a#6,96p,32a#6,96p,32a#6,96p,32f#6,96p,32f#6,96p,32f#6,96p,32d#6,96p,32d#6,96p,32d#6,7p,32d6,96p,32d6,96p,32d6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32c6,96p,32c6,96p,32c6,7p,32a#6,96p,32a#6,96p,32a#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32g7,96p,32g7,96p,32g7,96p,32d7,96p,32d7,96p,32d7,96p,32a#6,96p,32a#6,96p,32a#6,96p,32g#6,96p,32g#6,96p,32g#6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32b,96p,32b,96p,32b,96p,32g#,96p,32g#,96p,32g#,7p,32d6,96p,32d6,96p,32d6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32c6,96p,32c6,96p,32c6,7p,32a#6,96p,32a#6,96p,32a#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32d7,96p,32d7,96p,32d7,96p,32c#7,96p,32c#7,96p,32c#7,96p,32a6,96p,32a6,96p,32a6,96p,32c7,96p,32c7,96p,32c7,96p,32a#6,96p,32a#6,96p,32a#6,96p,32f#6,96p,32f#6,96p,32f#6,96p,32d#6,96p,32d#6,96p,32d#6,7p,32d6,96p,32d6,96p,32d6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32c6,96p,32c6,96p,32c6,7p,32a#6,96p,32a#6,96p,32a#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32g7,96p,32g7,96p,32g7,96p,32d7,96p,32d7,96p,32d7,96p,32a#6,96p,32a#6,96p,32a#6,96p,32g#6,96p,32g#6,96p,32g#6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32b,96p,32b,96p,32b,96p,32g#,96p,32g#,96p,32g#,7p,32d6,96p,32d6,96p,32d6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32c6,96p,32c6,96p,32c6,7p,32a#6,96p,32a#6,96p,32a#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32d7,96p,32d7,96p,32d7,96p,32c#7,96p,32c#7,96p,32c#7,96p,32a6,96p,32a6,96p,32a6,96p,32c7,96p,32c7,96p,32c7,96p,32a#6,96p,32a#6,96p,32a#6,96p,32f#6,96p,32f#6,96p,32f#6,96p,32d#6,96p,32d#6,96p,32d#6,7p,32d6,96p,32d6,96p,32d6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32c6,96p,32c6,96p,32c6,7p,32a#6,96p,32a#6,96p,32a#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32g7,96p,32g7,96p,32g7,96p,32d7,96p,32d7,96p,32d7,96p,32a#6,96p,32a#6,96p,32a#6,96p,32g#6,96p,32g#6,96p,32g#6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32b,96p,32b,96p,32b,96p,32g#,96p,32g#,96p,32g#,7p,32d6,96p,32d6,96p,32d6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32c6,96p,32c6,96p,32c6,7p,32a#6,96p,32a#6,96p,32a#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32c#7,96p,32c#7,96p,32c#7,96p,32c7,96p,32c7,96p,32c7,96p,32g#6,96p,32g#6,96p,32g#6,96p,32b6,96p,32b6,96p,32b6,96p,32a6,96p,32a6,96p,32a6,96p,32f6,96p,32f6,96p,32f6,96p,32d6,96p,32d6,96p,32d6,7p,32g#6,96p,32g#6,96p,32g#6,96p,32a6,96p,32a6,96p,32a6,96p,32f#6,96p,32f#6,96p,32f#6,7p,32e7,96p,32e7,96p,32e7,96p,32d#7,96p,32d#7,96p,32d#7,96p,32c7,96p,32c7,96p,32c7,7p,32c#7,96p,32c#7,96p,32c#7,96p,32c7,96p,32c7,96p,32c7,96p,32g#6,96p,32g#6,96p,32g#6,96p,32b6,96p,32b6,96p,32b6,96p,32a6,96p,32a6,96p,32a6,96p,32f6,96p,32f6,96p,32f6,96p,32d6,96p,32d6,96p,32d6,7p,32a#,96p,32a#,96p,32a#,96p,32b,96p,32b,96p,32b,96p,32g#,96p,32g#,96p,32g#,7p,32f#6,96p,32f#6,96p,32f#6,96p,32f6,96p,32f6,96p,32f6,96p,32d6,96p,32d6,96p,32d6,7p,32g7,96p,32g7,96p,32g7,96p,32d7,96p,32d7,96p,32d7,96p,32a#6,96p,32a#6,96p,32a#6,96p,32g#6,96p,32g#6,96p,32g#6,96p,32d#6,96p,32d#6,96p,32d#6,96p,32b,96p,32b,96p,32b,96p,32g#,96p,32g#,96p,32g#,1p,8e6,384p,2a6,192p,b.6,192p,17c7,384p,17d7,384p,2c7,192p,2c#7,1p,43g6,128p,43g6,128p,30g.6,77p,15g.6,7p,15g.6,7p,15f#.6,7p,15g.6,7p,15f#.6,7p,43g6,128p,43g6,128p,30g.6,77p,30g.6,77p,30g.6,77p,15g.6,7p,15g.6,7p,43g6,128p,43g6,128p,30g.6,7p,15g.6,7p,15f#.6,7p,15f#.6,7p,15f#.6,7p,43g6,128p,43g6,128p,30g.6,77p,30g.6,77p,30g.6,77p,15g.6,1p,8g.6,19p,8g.6,19p,8g.6,19p,7d#6,26p,30a#.6,7 +Star_Wars_kurz:d=4,o=5,b=109:2g,192p,2g,19p,2g,192p,3d#,26p,8a#,384p,1g,7p.,2d6,192p,d.6,15p.,2d6,192p,3d#6,13p,8a#,384p,f#.,15p.,3d#,13p,15a#.,38p,1g diff --git a/music/starwars-kurz b/music/starwars-kurz new file mode 100644 index 0000000..8412087 --- /dev/null +++ b/music/starwars-kurz @@ -0,0 +1 @@ +Star_Wars_:d=4,o=5,b=109:2g,192p,2g,19p,2g,192p,3d#,26p,8a#,384p,1g,7p.,2d6,192p,d.6,15p.,2d6,192p,3d#6,13p,8a#,384p,f#.,15p.,3d#,13p,15a#.,38p,1g @@ -54,7 +54,7 @@ def parse(s): defaults = parse_defaults(defs) defaultlength = int(defaults['d']) defaultoctave = int(defaults['o']) - timefactor = int(defaults['b'])/60 + timefactor = 60/int(defaults['b']) # for m in _rtttl_re.finditer(music): for tone in music.split(","): @@ -74,6 +74,7 @@ def parse(s): if ld: length = length * 1.5 length = length*timefactor + tone = freqs[t.lower()] if o: octave = o |