Package jm.audio.synth

Examples of jm.audio.synth.Volume


        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


    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

                //if (premapped) {
//      grain = new Granulator(grin,durationArray,gpsArray,freqArray,ri,rgd,rf);
//        } else {
                grain = new Granulator(grin, 44100, 2, 50, 100);
                // }
                vol = new Volume(grain, 0.5f);
                Volume vol2 = new Volume(vol, 0.1f);
                pan = new StereoPan(vol2);
                SampleOut sout = new SampleOut(pan);
            } else {
                // if sounds is < 0 or > 6 and < 11 then it will
                // process an audio file. Default is 7.  Again it is
                // very open ended to accommodate wrong input numbers.
                SampleIn grin = new SampleIn(this, this.fileName);
                //if (premapped) {
//      grain = new Granulator(grin,durationArray,gpsArray,freqArray,ri,rgd,rf);
//        } else {
                grain = new Granulator(grin, 44100, 2, 50, 100);
                //}
                vol = new Volume(grain, 0.5f);
                Volume vol2 = new Volume(vol, 0.1f);
                pan = new StereoPan(vol2);
                SampleOut sout = new SampleOut(pan);
            }
        } 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);
            //}
            vol = new Volume(grain, 0.5f);
            Volume vol2 = new Volume(vol, 0.1f);
            pan = new StereoPan(vol2);
            SampleOut sout = new SampleOut(pan);
        }
    }
View Full Code Here

     * 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

     */
    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

        Envelope env = new Envelope(filt,
                new double[]{0.0, 0.0, 0.05, 1.0, 0.2,
                        0.4, 0.8, 0.3, 1.0, 0.0}
        );

        Volume vol = new Volume(env);

        SampleOut sout = new SampleOut(vol);

    }
View Full Code Here

    /**
     * Initialisation method used to build the objects that this instrument uses.
     */
    public void createChain() {
        Pluck plk = new Pluck(this, this.sampleRate, this.channels, this.feedback);
        Volume vol = new Volume(plk);
        StereoPan span = new StereoPan(vol);
        Envelope env = new Envelope(span, new double[]{0.0, 1.0, 0.9, 1.0, 1.0, 0.0});
        SampleOut sout;
        if (output == RENDER) sout = new SampleOut(env);
    }
View Full Code Here

    public void createChain() {
        //define the chain
        SampleIn sin = new SampleIn(this, fileName);

        ReSample reSample = new ReSample(sin, this.baseFreq);
        Volume vol = new Volume(reSample);
        StereoPan span = new StereoPan(vol);
        if (wholeFile) {
            sin.setWholeFile(wholeFile);
            if (output == RENDER) sout = new SampleOut(span);
        } else {
View Full Code Here

     */
    public void createChain() {
        Oscillator wt = new Oscillator(this, Oscillator.SQUARE_WAVE,
                this.sampleRate, channels);
        Envelope env = new Envelope(wt, envArray);
        Volume vol = new Volume(env);
        StereoPan span = new StereoPan(vol);
        if (output == RENDER) sout = new SampleOut(span);
    }
View Full Code Here

     */
    public void createChain() {
        Oscillator modulator = new Oscillator(this, Oscillator.SINE_WAVE,
                this.sampleRate, 1);
        modulator.setFrqRatio((float) 7.23);
        Volume wtAmp = new Volume(modulator);
        Value offsetAmp = new Value(this, this.sampleRate, 1, (float) 0.5);
        Add add = new Add(new AudioObject[]{wtAmp, offsetAmp});
        Oscillator carrier = new Oscillator(add,
                Oscillator.SINE_WAVE, Oscillator.AMPLITUDE);
        SampleOut sout = new SampleOut(carrier);
View Full Code Here

TOP

Related Classes of jm.audio.synth.Volume

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.