All Downloads are FREE. Search and download functionalities are using the official Maven repository.

art.jmusic.1.6.4.1.source-code.SimplePluckInst Maven / Gradle / Ivy

The newest version!
import jm.audio.io.SampleOut;
import jm.audio.synth.Pluck;

public final class SimplePluckInst extends jm.audio.Instrument {
    private int sampleRate;
    private int channels;

    public SimplePluckInst(int sampleRate) {
        this(sampleRate, 1);
    }

    /**
     * A constructor to set an initial sampling rate and number of channels.
     */
    public SimplePluckInst(int sampleRate, int channels) {
        this.sampleRate = sampleRate;
        this.channels = channels;
    }

    /**
     * Initialisation method used to build the objects that this instrument will use
     */
    public void createChain() {
        Pluck plk = new Pluck(this, sampleRate, this.channels);
        SampleOut sout = new SampleOut(plk);
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy