77940938d9ea7d762948d07a7ed85031fe572284
[naja.git] / data / sounds / __init__.py
1 import random
2
3 from naja.gen_sound import Chunk, scale
4
5
6 def grind():
7     yield Chunk('sine', freq=100, length=0.01, volume=25)
8     tones = []
9     for freq in (100, 150, 200, 350, 120, 170, 300):
10         tones.append(Chunk('sine', freq=freq, length=0.01, volume=25))
11     for i in range(75):
12         yield random.choice(tones)
13     yield Chunk('sine', freq=100, length=0.01, volume=25)
14
15
16 SOUNDS = {
17     'chirp': scale(1650, 1449, -200, length=0.05, volume=50),
18     'error': Chunk('sine', freq=1000, length=0.25),
19     'grind': grind(),
20     'shutdown': scale(800, 199, -200),
21     'silence': Chunk('silence', length=2),
22     'startup': scale(200, 801, 200),
23     'zoop': scale(500, 800, 20, length=0.01, volume=50),
24     'zzzzz': Chunk('sine', freq=100, length=0.5, volume=50),
25 }