* primary audio object(s) are the one or more
* objects which head up the chain(s)
*/
public void createChain() {
//define the chain
SampleIn sin = new SampleIn(this, fileName);
sin.setWholeFile(wholeFile);
ReSample reSample = new ReSample(sin, this.baseFreq);
// modulate filter cutoff
Oscillator sineMod = new Oscillator(this, Oscillator.SINE_WAVE, sin.getSampleRate(),
sin.getChannels(), Oscillator.FREQUENCY, (float) modRate);
sineMod.setAmp((float) this.modAmount * this.cutoff);
// sub
Oscillator subOsc = new Oscillator(this, Oscillator.SQUARE_WAVE, sin.getSampleRate(),
sin.getChannels());
subOsc.setFrqRatio(0.5f);
subOsc.setAmp((float) subAmp);
Add adder = new Add(new AudioObject[]{reSample, subOsc});
// filter
Filter filt = new Filter(new AudioObject[]{adder, sineMod}, this.cutoff, Filter.LOW_PASS);