Gyre
Dave Seidel
Copyright (c) 2010 Dave Seidel, some rights reserved. This work is licensed under a
Creative Commons Attribution-Noncommercial 3.0 Unported License (http://creativecommons.org/licenses/by-nc/3.0/).
For more information, go to http://mysterybear.net/article/45/gyre
44100
1
2
96000
1
2
true
false
false
false
true
true
true
true
false
Gyre.wav
false
true
true
true
true
false
false
0
false
simple binaural beater
idur = p3 ; duration
iamp = ampdb(p4)/2 ; amplitude
icent = p5 ; center frequency (Hz)
idiff = p6 ; difference (Hz)
itab = p7 ; function table number (waveform)
irise = p8 ; envelope rise time
ifall = p9 ; envelope fall time
; amplitude envelope
ke linen iamp, irise, idur, ifall
; determine pitches
ip1 init icent + (idiff/2)
ip2 init icent - (idiff/2)
prints "center=%f beat=%f => freq1=%f freq2=%f\\n", icent, idiff, ip1, ip2
; generate tones
asig1 poscil3 ke, ip1, itab
asig2 poscil3 ke, ip2, itab
; output
blueMixerOut asig1, asig2
true
0.0
1
Master
0.0
false
false
Master
Master
0.0
false
false
0dbfs = 1
giTblSz init 1048577
; sine wave
giFn1 ftgen 1, 0, giTblSz, 10, 1
t 0 7.5
csound -Wdo devaudio -L stdin
false
false
2.0
0.0
root
-10066279
0
true
14
0
true
1.0
1
5
10.0
0.0
code
-12566464
2
INST = 1
AMP = -14.5
TABLE = 1
RISE = 2.0
FALL = 2.0
def binBeat2(ratio):
freq = 1.875 * float(ratio)
beat = 0.029296875 * float(ratio)
return "i%d 0 1 %f %f %f %d %f %f\n" % (INST, AMP, freq, beat, TABLE, RISE, FALL)
def binBeat3(ratio):
freq = 0.46875 * float(ratio)
beat = 0.00732421875 * float(ratio)
return "i%d 0 1 %f %f %f %d %f %f\n" % (INST, AMP, freq, beat, TABLE, RISE, FALL)
65.0
0.0
PythonObject
-12566464
0
score = binBeat3(1546)
65.0
3.0
PythonObject
-12566464
0
score = binBeat3(1512)
65.0
6.0
PythonObject
-12566464
0
score = binBeat3(1344)
65.0
9.0
PythonObject
-12566464
0
score = binBeat3(1152)
65.0
12.0
PythonObject
-12566464
0
score = binBeat3(1134)
65.0
15.0
PythonObject
-12566464
0
score = binBeat3(1024)
65.0
18.0
PythonObject
-12566464
0
score = binBeat3(1008)
65.0
21.0
PythonObject
-12566464
0
score = binBeat3(896)
65.0
24.0
PythonObject
-12566464
0
score = binBeat3(784)
65.0
27.0
PythonObject
-12566464
0
score = binBeat3(768)
65.0
30.0
PythonObject
-12566464
0
score = binBeat3(756)
65.0
32.0
PythonObject
-12566464
0
score = binBeat3(588)
65.0
35.0
PythonObject
-12566464
0
score = binBeat3(567)
65.0
38.0
PythonObject
-12566464
0
score = binBeat3(512)
true
0.0
-1.0
false
false
false