X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=data%2Fsounds%2F__init__.py;h=5773cb3970515c5763472e2143228cdb095ec46f;hb=db2d56a0ea2ac661367084276a74ff45ca247520;hp=77940938d9ea7d762948d07a7ed85031fe572284;hpb=1043032f980df1cf01f6d31fc5dc6774c1a3d846;p=naja.git diff --git a/data/sounds/__init__.py b/data/sounds/__init__.py index 7794093..5773cb3 100644 --- a/data/sounds/__init__.py +++ b/data/sounds/__init__.py @@ -1,25 +1,38 @@ +import itertools import random from naja.gen_sound import Chunk, scale def grind(): - yield Chunk('sine', freq=100, length=0.01, volume=25) + yield Chunk('sine', freq=200, length=0.01, volume=25) tones = [] - for freq in (100, 150, 200, 350, 120, 170, 300): - tones.append(Chunk('sine', freq=freq, length=0.01, volume=25)) + for freq in (200, 300, 400, 700, 240, 340, 600): + tones.append(Chunk('sine', freq=freq, length=0.005, volume=25)) for i in range(75): yield random.choice(tones) - yield Chunk('sine', freq=100, length=0.01, volume=25) + yield Chunk('sine', freq=200, length=0.01, volume=25) SOUNDS = { 'chirp': scale(1650, 1449, -200, length=0.05, volume=50), 'error': Chunk('sine', freq=1000, length=0.25), 'grind': grind(), - 'shutdown': scale(800, 199, -200), + 'shutdown': scale(1600, 399, -400, length=0.1), 'silence': Chunk('silence', length=2), - 'startup': scale(200, 801, 200), - 'zoop': scale(500, 800, 20, length=0.01, volume=50), - 'zzzzz': Chunk('sine', freq=100, length=0.5, volume=50), + 'startup': scale(400, 1601, 400, length=0.1), + 'zoop': scale(1000, 1600, 40, length=0.005, volume=50), + 'zzzzz': Chunk('sine', freq=200, length=0.25, volume=50), + 'yipee': itertools.chain( + scale(1400, 1801, 100, length=0.05, volume=50), + scale(1600, 1801, 100, length=0.05, volume=50), + ), + 'awwww': ( + Chunk('sine', freq=800, length=0.1, volume=50), + Chunk('sine', freq=500, length=0.2, volume=50), + ), + 'aha': ( + Chunk('sine', freq=2000, length=0.1, volume=50), + Chunk('sine', freq=2200, length=0.05, volume=50), + ), }