Exemplo n.º 1
0
        public voice(ADSRStages adsrInit, double freq)
        {
            this.adsr      = adsrInit;
            this.frequency = freq;

            this.state = ADSRState.FREE;
        }
Exemplo n.º 2
0
		public voice(ADSRStages adsrInit, double freq)
		{
			this.adsr = adsrInit;
			this.frequency = freq;

			this.state = ADSRState.FREE;
		}
Exemplo n.º 3
0
        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();
            }
        }
Exemplo n.º 4
0
		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();

			}
		}