Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Befaco A*B+C #21

Closed
Litiec opened this issue Jul 10, 2021 · 3 comments
Closed

Befaco A*B+C #21

Litiec opened this issue Jul 10, 2021 · 3 comments

Comments

@Litiec
Copy link

Litiec commented Jul 10, 2021

Hello,
First of all thank you for the last update! I think that there might be a misbehaving in this module. When you brake the normalisation the second out doesn't work. You can see the led displaying the voltage but it doesn't t output anything.
Thank in advance

Screenshot 2021-07-10 at 21 29 15

@hemmer
Copy link
Collaborator

hemmer commented Jul 11, 2021

Ah yeah good catch. The issue is here, were the normalisation logic isn't quite right, following the changes to add polyphony. Specifically it only outputs in the second block if the first isn't connected.

I think the fix is to replace:

else if (outputs[OUT2_OUTPUT].isConnected()) {

	for (int c = 0; c < activeEngines1; c += 4)
		out2[c / 4] += out1[c / 4];

	activeEngines2 = std::max(activeEngines1, activeEngines2);

	outputs[OUT2_OUTPUT].setChannels(activeEngines2);
	for (int c = 0; c < activeEngines2; c += 4)
		outputs[OUT2_OUTPUT].setVoltageSimd(out2[c / 4], c);
}

with

else if (outputs[OUT2_OUTPUT].isConnected()) {

	for (int c = 0; c < activeEngines1; c += 4)
		out2[c / 4] += out1[c / 4];

	activeEngines2 = std::max(activeEngines1, activeEngines2);
}

if (outputs[OUT2_OUTPUT].isConnected()) {
	outputs[OUT2_OUTPUT].setChannels(activeEngines2);
	for (int c = 0; c < activeEngines2; c += 4)
		outputs[OUT2_OUTPUT].setVoltageSimd(out2[c / 4], c);
}

In this scenario mono top section will only be present in the first channel of a poly bottom section, which I think is probably the most sensible behaviour.

However frustratingly, I'm actually away on holiday for 2 weeks with no access to the developer machine so will be a little difficult to test/validate. @AndrewBelt may be able to help, and I may be able to get access, but worst case it might be a couple of weeks before it gets fixed.

@Litiec
Copy link
Author

Litiec commented Jul 11, 2021

Thank you fro the reply!
I just wanted to let you know.

@AndrewBelt
Copy link
Member

Fixed in a0acea0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants