sr = 96000
kr = 96000
nchnls = 2
0dbfs = 1
zakinit 2, 1
vbaplsinit 2, 2, -30.0, 30.0
gi_origin = -24.769053
gi_integer_width = 5.504234
gi_distance_to_speakers = 1.27
gi_vh_amplitude_MAX0501 ftgen 0, 0, 17, -2, 0.241492, 0.247319, 0.252419, 0.256061, 0.258247, 0.258975, 0.259704, 0.257518, 0.253876, 0.250233, 0.246591, 0.239306, 0.234935, 0.224736, 0.211624, 0.197054, 0.174471
gi_vh_panning_MAX0501 ftgen 0, 0, 17, -2, -26.72517, -23.27020, -19.81524, -16.56351, -13.51501, -9.755195, -6.706695, -3.251731, 0, 2.845268, 5.995380, 8.840644, 11.88914, 15.48065, 18.39260, 21.74595, 25.09930
gi_lowest_integer = 1
gi_highest_integer = 10
gi_base_frequency = 439.000000
gi_attack_from = .0055
gi_attack_to = .0034
gi_release_from = .0089
gi_release_to = .0055
gi_golden_ratio = (sqrt(5)-1)/2
gi_power_of_golden_ratio pow gi_golden_ratio, 6
gi_temperament = gi_power_of_golden_ratio+1
instr MAX0501
i_duration = p3
i_integer = p4
i_multiplier pow gi_temperament, i_integer-gi_lowest_integer
i_frequency = gi_base_frequency*i_multiplier
i_attack = gi_attack_from+(i_integer-gi_lowest_integer)*((gi_attack_to-gi_attack_from)/(gi_highest_integer-gi_lowest_integer))
i_release = gi_release_from+(i_integer-gi_lowest_integer)*((gi_release_to-gi_attack_from)/(gi_highest_integer-gi_lowest_integer))
i_azimuth = gi_origin+(i_integer-gi_lowest_integer)*gi_integer_width
k_amplitude table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_amplitude_MAX0501
k_panning table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_panning_MAX0501
i_length filelen "gehrs_glass_three.pvx"
k_time phasor 1.0/i_length
k_time = k_time*i_length
a_signal pvoc k_time, i_frequency/947, "gehrs_glass_three.pvx"
a_attack linen 1.0, i_attack, i_duration, 0.0
a_release linen 1.0, 0.0, i_duration, i_release
a_signal = a_signal*a_attack
a_panning = 1.0
vbapz 2, 0, a_panning, k_panning
a_0, a_1 delayst a_signal*k_amplitude, i_azimuth, gi_distance_to_speakers
a_p0 zar 0
a_p1 zar 1
a_0 = a_0*a_p0
a_1 = a_1*a_p1
outs a_0*a_release, a_1*a_release
endin