 < Similar in several p-fields to example "granmix1," but here the 4 source
 < soundfiles create a 6 note chord instead of a unison. Each soundfile source
 < "plays" {or "tremolos" between} 2 or 3 notes of the chord {see p9}.
 < mix together four source soundfiles :
 *f1 0 524288 -1 "/sflib/voice/sop1.fs4.wav" 0 0 0;
 *f2 0 262144 -1 "/sflib/wind/fl.gs4.wav" 0 0 0;
 *f3 0 262144 -1 "/sflib/string/vln.g4.wav" 0 0 0;
 *f4 0 262144 -1 "/sflib/perc/crt.fs6.wav" 0 0 0;

instr gran  0 6;   < output lasts 6 seconds
p3  mo 3. .03 .04 .01 .02/ x 3. .01 .02 .1;  < time between grains gets
                                   < shorter, then further apart at end
  < duty factor:  determines overlap of grains
  < normal range is between 100.02 and 100.2 {producing .02-.2 second overlaps}
du  mx 6.  100.07  100.12;   < overlap time increases slightly
   < p4 cross-fade time for both fade-in & fade-out ;
   <   p4  normally = c. 1/2 duty factor fraction { 1/2 the grain overlap time}
p4  mx  6.  .03  .06;  < cross-fade times increase, like the duty factor

   < p5 = output amplitude : raw amp {10.1-32767} or multiplier {.001 - 10.}
       < default 0 = same amplitude as input soundfile
p5  nu 13000/ 16000 / 10000/ 21000; < try to balance the 4 timbres

   < p6 = gen1 function number
p6  nu 1 / 2 / 3 / 4 ; < alternate the soprano, flute, violin & crotale sources

   < p7 = length of soundfile to be used, in seconds {duration} OR # of samples
p7  6.5;  < use all but the very end of the soprano tone
    3.5;  < use all but the very end of the flute tone
    3.5;  < use all but the very end of the violin tone
    2.;  < use only 1st 2. seconds of crotale soundfile

   < p8 = skip time into gen1 func : if positive p8  = skip time in seconds
      < if negative {between -.001 and -.999}, p8 = % of soundfile skipped
p8  mo 6 -.001 -.98; < march through the source soundfiles from beginning to end

   < p9 = pitch multiplier {default 0 = no pitch change}
  < use transpositions for each source that create the chord pitches:
p9  se 1. 1. 1.334;  < soprano f#4 plays chord tones f#4 & b4
    se 1. .891 1.189 1.682 1.887; < flute g#4 plays chord tones f#4, b4, f5 ,g5
    se 1. .943 1.782 ; < vln g4 play chord tones fs4 & f5
    se 1. 1.06 1.26 1.78 1.79  ; < crotate fs6 plays chord tones g5, bf5 e6
   < for stereo output only p10 = pan location {1. = hard left, 0 = hard right}
p10
  <  Added user p-fields: 
end;  <<< End of ### granmix2 ### example score >>>
