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Phpf8k7nrrwUJj9RhTuQlTupDoPgzVpop7KRG67c3wfyd.E3pCQiE7hF+94eC0C7Dxa+gbLMNhEm6B6BgjCYT81YxdfwxmkFd8.UsStlvLLuvkd+y5HOjEZiKVjvSKB+vlvxhtx017fw.eLAdyeyK9T0zwzfduLfdGvRDD5w8vxmQP9Hp16mD5JqM8.oRnTHP8deVqopuxFWWMNq3j5mN3Ok+ltXC0XqoK13zEKKH5AFPjADY.QFPzpFD8PCHx.hLfHCHZUCh1z.hLfHCHx.hV0fnGY.QFPjADY.QqZPzVFPjADY.QFPzpFD8XCHx.hLfHCH5bCD8+k6QH1iyNxK6aMUUEekzYj9VZ5GWbM6dpwNMPoe+oR6rqe+5nPY06QddpP5WKiAEayCJgMOrD1rYIr4QkvlsJgMOtD17jEZiBbtShfElUtKmne6zOJWKqrO+wzJKzeU5bQY.
Add another 1 or 2 Sine Generators to the Group and press a note -> you can see in the video the Voice Count goes to like -758718571875813753
it didn't crash in the recording, but it's definitely crashy, only happens if they're in a Synth Group
-
wait i might be stupid, im on the Master branch...
-
ok still happening in the latest Develop commit
-
bumpy bump
-
ok I was able to get visual studio working at least well enough to get a callstack
Exception thrown: read access violation. **childVoice** was nullptr. occurred
HISE.exe!hise::ModulatorSynthGroupVoice::calculateNoFMVoiceInternal(hise::ModulatorSynth * childSynth, int unisonoIndex, int startSample, int numSamples, const float * voicePitchValues, bool & isFirst) Line 342
for (int i = 0; i < childContainer.size(); i++) { ModulatorSynthVoice *childVoice = childContainer.getVoice(i); //static_cast<ModulatorSynthVoice*>(childSynth->getVoice(childVoiceIndex)); // You have to remove them from the childvoice list jassert(unisonoStates.isBitSet(childVoice->getVoiceIndex())); if (childVoice->isInactive() || childVoice->getOwnerSynth() != childSynth) // childVoice nullptr here when container size > 8 { LOG_SYNTH_EVENT("V" + String(voiceIndex) + ": Skipping inactive voice " + String(childVoice->getVoiceIndex())); continue; } LOG_SYNTH_EVENT("V" + String(voiceIndex) + ": Rendering child voice " + String(childVoice->getVoiceIndex())); calculatePitchValuesForChildVoice(childSynth, childVoice, startSample, numSamples, voicePitchValues); childVoice->calculateBlock(startSample, numSamples); //etc
not sure what's causing any SineGen past 8 in a SynthGroup to be a nullptr, i cant compile the debug build so im stuck with release stack trace
-
void ModulatorSynthGroupVoice::ChildVoiceContainer::addVoice(ModulatorSynthVoice* v) { jassert(numVoices < 8); voices[numVoices++] = v; }
@Christoph-Hart is there any reason for this hard limit?
edit: im seeing a bunch of voice limits of 8 in here
-
@iamlamprey I consider the synth group kind of feature locked:
- use it for FM synthesis (one-carrier, one modulator)
- use it for unisono voices (up to sixteen) of a few sound generators.
- use it for combining a few sound generators into one. As you have kindly investigated, the hard limit is 8.
I don't have any plans of modifying this feature set as everything I add will decrease the performance of the existing use cases (and scaling is very critical here), especially if there are other solutions available. For additive synthesis (what I think you're after here), I strongly suggest going into scriptnode and setup one or more slider pack that drive the harmonic oscillator properties.
This being said, I've added a more user friendly form of communicating that you can't use more than 8 sound generators than a hard crash.
-
@Christoph-Hart Thanks for the clarification! I've been having some issues getting Scriptnode networks working in the compiled Rhapsody plugin but I'll try again today and see if I can figure out why it's doing what it's doing, otherwise I'll just keep the current setup