sr = 96000
kr = 96000
nchnls = 2
0dbfs = 1
zakinit 2, 1
vbaplsinit 2, 2, -30.0, 30.0
gi_origin = 27.678984
gi_integer_width = -2.767898
gi_distance_to_speakers = 1.27
gi_vh_wavetable_A167969 ftgen 0, 0, 17, -2, 0.942735, 0.893162, 0.829914, 0.776923, 0.717094, 0.662393, 0.609401, 0.563247, 0.515384, 0.465811, 0.417948, 0.359829, 0.306837, 0.258974, 0.202564, 0.132478, 0.072649
gi_vh_amplitude_A167969 ftgen 0, 0, 17, -2, 0.036752, 0.053808, 0.066322, 0.081338, 0.103863, 0.123885, 0.146410, 0.176442, 0.223994, 0.251524, 0.309087, 0.351634, 0.444235, 0.534334, 0.684498, 0.837164, 1.099952
gi_vh_panning_A167969 ftgen 0, 0, 17, -2, 28.38869, 24.52783, 21.12119, 17.60099, 14.42145, 10.78770, 6.926845, 3.860862, 0, -3.860862, -6.919745, -10.56059, -13.62657, -17.48743, -20.55341, -23.73295, -27.36670
gi_wavetable_0_A167969 ftgen 0, 0, 16384, 1, "clap_four.wav", 0, 0, 0
gi_wavetable_1_A167969 ftgen 0, 0, 16384, 1, "clap_five.wav", 0, 0, 0
gi_lowest_integer = 1
gi_highest_integer = 21
instr A167969
i_duration = p3
i_integer = p4
i_azimuth = gi_origin+(i_integer-gi_lowest_integer)*gi_integer_width
k_wavetable table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_wavetable_A167969
k_amplitude table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_amplitude_A167969
k_panning table3 (i_integer-gi_lowest_integer)*(16/(gi_highest_integer-gi_lowest_integer)), gi_vh_panning_A167969
a_index lphasor 1
a_signal table a_index, gi_wavetable_0_A167969
a_wavetable_1 table a_index, gi_wavetable_1_A167969
a_signal sum a_signal*k_wavetable, a_wavetable_1*(1-k_wavetable)
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_1
endin