; use of a sample with loop points specified in instrument sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 instr 1 imaxamp = 32767 kenv adsr 0.001, p3-0.125, 0.25, 0.099 ; very fast attack, 1/8-second decay to 1/4 amplitude, then 1/10-second release awave loscil kenv*imaxamp, cpspch(p5), 2, 2100, 1, 3877, 5163 ; parameters are for the "ahkey.aiff" soundfile ; base frequency is 2100Hz, and sustain loop is from sample 3877 to sample 5163 out awave endin