public voice(ADSRStages adsrInit, double freq) { this.adsr = adsrInit; this.frequency = freq; this.state = ADSRState.FREE; }
public polySynthAlgorithmic(ADSRStages adsrInit, int maxVoices) { this.BufferedA = new double[320]; this.BufferedB = new double[320]; this.BufferedC = new double[320]; this.BufferedD = new double[320]; this.bufferCount = 0; this.adsr = adsrInit; activeVoices = new LinkedList <int>(); voices = new voice[maxVoices]; for (int note = 0; note < maxVoices; note++) { voices[note] = new voice(adsrInit, SynthHelper.noteToFrequency(note)); voices[note].reset(); } }
public polySynthAlgorithmic(ADSRStages adsrInit, int maxVoices) { this.BufferedA = new double[320]; this.BufferedB = new double[320]; this.BufferedC = new double[320]; this.BufferedD = new double[320]; this.bufferCount = 0; this.adsr = adsrInit; activeVoices = new LinkedList<int>(); voices = new voice[maxVoices]; for (int note = 0; note < maxVoices; note++) { voices[note] = new voice(adsrInit, SynthHelper.noteToFrequency(note)); voices[note].reset(); } }