sr = 96000
kr = 96000
nchnls = 2
0dbfs = 1
zakinit 2, 1
vbaplsinit 2, 2, -30.0, 30.0
gi_origin_MINPHI = -27.397886
gi_origin_MAXPHI = 11.949659
gi_integer_width = 0.772411
gi_distance_to_speakers = 1.27
gi_vh_amplitude_MINPHI ftgen 0, 0, 17, -2, 0.028103, 0.026134, 0.024316, 0.023861, 0.022195, 0.021740, 0.021134, 0.020377, 0.019165, 0.019165, 0.018710, 0.019619, 0.020377, 0.021589, 0.022952, 0.024922, 0.025376
gi_vh_amplitude_MAXPHI ftgen 0, 0, 17, -2, 0.063758, 0.059652, 0.056574, 0.054008, 0.051442, 0.048620, 0.045284, 0.042975, 0.040923, 0.042462, 0.042719, 0.041436, 0.040923, 0.042462, 0.041692, 0.043488, 0.045028
gi_vh_panning_MINPHI ftgen 0, 0, 17, -2, -27.24736, -26.36008, -25.53617, -24.55382, -23.57147, -22.52575, -21.51171, -20.63928, -19.67377, -18.81818, -17.99427, -17.13867, -16.44152, -15.61762, -14.82540, -14.00150, -13.08252
gi_vh_panning_MAXPHI ftgen 0, 0, 17, -2, 12.06849, 12.92408, 13.93812, 14.88878, 15.90282, 16.85348, 17.86751, 18.88155, 19.67377, 20.78287, 21.73353, 22.93770, 23.92005, 24.96578, 25.88475, 27.12060, 28.03958
gi_wavetable_0_MINPHI ftgen 0, 0, 0, 1, "hand-drawn_four.wav", 0, 0, 0
gi_wavetable_0_MAXPHI ftgen 0, 0, 0, 1, "spring_six.wav", 0, 0, 0
gi_lowest_integer = -10
gi_highest_integer = 10
gi_base_frequency = 99.000000
gi_attack_from = .0047
gi_release_from = .0076
gi_golden_ratio = (sqrt(5)-1)/2
gi_power_of_golden_ratio pow gi_golden_ratio, 4
gi_temperament = gi_power_of_golden_ratio+1
instr MINPHI
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_release = gi_release_from
i_azimuth = (i_integer-gi_lowest_integer)*gi_integer_width+gi_origin_MINPHI
k_amplitude table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_amplitude_MINPHI
k_panning table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_panning_MINPHI
i_wavetable_0_MINPHI ftgenonce 0, 0, 8192, 30, gi_wavetable_0_MINPHI, 1, floor((sr/2)/i_frequency)
a_signal poscil3 k_amplitude, i_frequency, i_wavetable_0_MINPHI
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, 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
instr MAXPHI
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_release = gi_release_from
i_azimuth = (i_integer-gi_lowest_integer)*gi_integer_width+gi_origin_MAXPHI
k_amplitude table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_amplitude_MAXPHI
k_panning table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_panning_MAXPHI
i_wavetable_0_MAXPHI ftgenonce 0, 0, 8192, 30, gi_wavetable_0_MAXPHI, 1, floor((sr/2)/i_frequency)
a_signal poscil3 k_amplitude, i_frequency, i_wavetable_0_MAXPHI
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, 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