sr = 96000
kr = 96000
nchnls = 2
0dbfs = 1
zakinit 2, 1
vbaplsinit 2, 2, -30.0, 30.0
gi_origin = 28.856813
gi_integer_width = -2.219755
gi_distance_to_speakers = 1.27
gi_vh_amplitude_MAXPHI ftgen 0, 0, 17, -2, 0.086880, 0.082501, 0.078463, 0.074807, 0.071356, 0.067919, 0.064622, 0.061746, 0.059946, 0.056953, 0.055457, 0.053587, 0.052442, 0.051189, 0.051010, 0.050653, 0.050474
gi_vh_panning_MAXPHI ftgen 0, 0, 17, -2, 27.34738, 24.62448, 20.71771, 17.16610, 13.49611, 10.06288, 6.984828, 3.314834, 0, -3.607101, -7.214203, -10.82130, -14.42840, -18.03550, -20.95448, -25.57157, -28.41286
gi_wavetable_0_MAXPHI ftgen 0, 0, 0, 1, "lip_flapping_five.wav", 0, 0, 0
gi_lowest_integer = -14
gi_highest_integer = 12
gi_base_frequency = 1655.000000
gi_attack_from = .0089
gi_release_from = .0055
gi_golden_ratio = (sqrt(5)-1)/2
gi_power_of_golden_ratio pow gi_golden_ratio, 5
gi_temperament = gi_power_of_golden_ratio+1
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 = 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_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