Welcome to mirror list, hosted at ThFree Co, Russian Federation.

siren.py « examples « python « bindings « audaspace « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 071279b162d348227f1b358f7edfba1b05bda3d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python
import aud, math, time
length = 0.5
fadelength = 0.05

device = aud.Device()
high = aud.Sound.sine(880).limit(0, length).fadein(0, fadelength).fadeout(length - fadelength, length)
low = aud.Sound.sine(700).limit(0, length).fadein(0, fadelength).fadeout(length - fadelength, length).volume(0.6)
sound = high.join(low)
handle = device.play(sound)
handle.loop_count = -1

start = time.time()

while time.time() - start < 10:
	angle = time.time() - start

	handle.location = [math.sin(angle), 0, -math.cos(angle)]