[HELP]Polyphony don't work


#1

Hi there
Well, SynthesiserVoice class works well on my former project. But this time I changed some code in my synthesiserVoice class and met this problem.

I set well for polyphony when using “synth.addVoice(newVoice())” , ie repeat this line for many times. (I’m sure it really adds that many voices, I debugged)
And when debugging, I noticed it can dispatch different midiNotes pressed together to several voices.
But the result is it only gives the earlier pressed note together with a little glide sound of another note you pressed.

Trust me I’ve checked my code and debugged for many times.

So can someone give suggestions what might be the cause?

THX in advance!


#2

Ok, well, I just made a simple mistake by

*outputBuffer.getSampleData (0, startSample) = moog.output * ampADSR.output * level; *outputBuffer.getSampleData (1, startSample) = chorus.output * chorusEnv.output * level;

should replaced by “+=”…Um…be careful…[/code]