/** Initialisation method used to build the objects that this instrument will use */ public void createChain() throws AOException { // modulator Value modFrequency = new Value(this, this.sampleRate, this.channels, (float) 5.0); Oscillator modulator = new Oscillator(modFrequency, Oscillator.SINE_WAVE, Oscillator.FREQUENCY); modulator.setAmp((float) 8.0); // constant Value constFreq = new Value(this, this.sampleRate, this.channels, Value.NOTE_PITCH); Add add = new Add(new AudioObject[] {constFreq, modulator}); // carrier Oscillator carrier = new Oscillator(add, Oscillator.SINE_WAVE, Oscillator.FREQUENCY); Envelope env2 = new Envelope(carrier, new double[] {0.0, 0.0, 0.1, 1.0, 1.0, 0.0}); Volume amp = new Volume(env2); SampleOut sout = new SampleOut(amp); }