Package jm.audio.synth

Examples of jm.audio.synth.Oscillator


    /**
     * Initialisation method used to build the objects that
     * this instrument will use.
     */
    public void createChain() {
        Oscillator osc = new Oscillator(this, Oscillator.SINE_WAVE, this.sampleRate, this.channels);
        // set a fixed, rather the note determined, frequency
        if (frequency != -1.0f) {
            osc.setChoice(0);
            osc.setFrq(frequency);
        }
        Envelope env = new Envelope(osc, envPoints);
        Volume vol = new Volume(env);
        StereoPan span = new StereoPan(vol);
        if (output == RENDER) sout = new SampleOut(span);
View Full Code Here


    /**
     * Initialisation method used to build the objects that
     * this instrument will use and specify thier interconnections.
     */
    public void createChain() {
        Oscillator wt = new Oscillator(this, Oscillator.SAWTOOTH_WAVE, this.sampleRate, this.channels);
        Filter filt = new Filter(wt, this.filterCutoff, Filter.LOW_PASS);
        Envelope env = new Envelope(filt,
                new double[]{0.0, 0.0, 0.05, 1.0, 0.3, 0.4, 1.0, 0.0});
        Volume vol = new Volume(env);
//    SampleOut sout = new SampleOut(vol);
View Full Code Here

            }
        } else {
            // At this stage the only values left are between 0-6
            // These correspond directly to the oscillator input
            // values, so can be added directly.
            Oscillator grin = new Oscillator(this, sounds, 44100, 2);
            //if (premapped) {
//        grain = new Granulator(grin,durationArray,gpsArray,freqArray,ri,rgd,rf);
//    } else {
            grain = new Granulator(grin, 44100, 2, 50, 100);
            //}
View Full Code Here

    /**
     * Initialisation method used to build the objects that
     * this instrument will use.
     */
    public void createChain() {
        Oscillator modulator = new Oscillator(this, Oscillator.SINE_WAVE, this.sampleRate,
                this.channels, Oscillator.FREQUENCY, (float) 5.0);
        Volume vol = new Volume(modulator, 10.0f);
        Oscillator carrier = new Oscillator(vol,
                Oscillator.SINE_WAVE, Oscillator.AMPLITUDE);
        Envelope env2 = new Envelope(carrier,
                new double[]{0.0, 0.0, 0.1, 1.0, 1.0, 0.0});
        SampleOut sout = new SampleOut(env2);
    }
View Full Code Here

    /**
     * Initialisation method used to build the objects that
     * this instrument will use.
     */
    public void createChain() {
        Oscillator wt1 = new Oscillator(this, Oscillator.SINE_WAVE,
                this.sampleRate, Oscillator.MONO);
        wt1.setFrqRatio((float) 2.2);
        Envelope env = new Envelope(wt1,
                new double[]{0.0, 1.0, 1.0, 0.0});
        Oscillator wt2 = new Oscillator(env,
                Oscillator.SINE_WAVE, Oscillator.AMPLITUDE);
        Envelope env2 = new Envelope(wt2,
                new double[]{0.0, 0.0, 0.05, 1.0, 1.0, 0.0});
        SampleOut sout = new SampleOut(env2);
    }
View Full Code Here

     * Initialisation method used to build the objects that
     * this instrument will use.
     */
    public void createChain() {
        Value modFreq = new Value(this, this.sampleRate, this.channels, (float) 5.0);
        Oscillator modulator = new Oscillator(modFreq, Oscillator.SINE_WAVE,
                Oscillator.FREQUENCY);
        Volume amp = new Volume(modulator, (float) 0.4);
        Oscillator carrier = new Oscillator(amp, Oscillator.SINE_WAVE, Oscillator.AMPLITUDE);
        SampleOut sout = new SampleOut(carrier);
    }
View Full Code Here

     * this instrument will use and specify their interconnections.
     */

    public void createChain() {

        Oscillator wt = new Oscillator(this, Oscillator.SAWTOOTH_WAVE,
                this.sampleRate, this.channels);

        Filter filt = new Filter(wt, this.filterCutoff, Filter.HIGH_PASS);

        Envelope env = new Envelope(filt,
View Full Code Here

    /**
     * This method is automatically called on startup to initialise
     * any AudioObjects used by this instrument
     */
    public void createChain() {
        Oscillator osc = new Oscillator(this, Oscillator.SQUARE_WAVE,
                this.sampleRate, this.channels);
        Envelope env = new Envelope(osc, new double[]{0.0, 0.0, 0.1, 1.0, 0.3, 0.0});
        Comb comb = new Comb(env, delay, decay);
        SampleOut sout = new SampleOut(comb);
    }
View Full Code Here

     * audio object(s) in that array. (One array element per channel)
     */

    public void createChain() {

        Oscillator wt = new Oscillator(this, Oscillator.SINE_WAVE,
                this.sampleRate, 1);

        PrintOut pout = new PrintOut(wt);

    }
View Full Code Here

     * this instrument will use.
     * Declares the primary audio object array and the
     * audio object(s) in that array. (One array element per channel)
     */
    public void createChain() {
        Oscillator osc = new Oscillator(this, Oscillator.SINE_WAVE,
                this.sampleRate, this.channels);
        Envelope env = new Envelope(osc,
                new double[]{0.0, 0.0, 0.1, 1.0, 1.0, 0.0});
        SampleOut sout = new SampleOut(env);
    }
View Full Code Here

TOP

Related Classes of jm.audio.synth.Oscillator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.