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

ba.selectn is not working correctly in faust2juce #938

Closed
mouseos opened this issue Aug 22, 2023 · 7 comments
Closed

ba.selectn is not working correctly in faust2juce #938

mouseos opened this issue Aug 22, 2023 · 7 comments

Comments

@mouseos
Copy link

mouseos commented Aug 22, 2023

I have written the following code. This code allows multiple stereo processing to be selected.
This works fine in the web IDE.
However, it does not function properly when compiled into juce with faust2juce.
The selections made are different and cannot be switched correctly.

type=(hslider("Enhancer type[style:menu{'222A':0;'maxx':3;'multiband':5;'Off':7}]",0,0,7,2));
function1(l,r)=l,r;
function2(l,r)=l*2,r*2;
function3(l,r)=l,*3r*3;

process(l,r)=(function1(l,r),function2(l,r),function3(l,r),(l,r))<:
ba.selectn(8,type),ba.selectn(8,type+1)
@sletz
Copy link
Member

sletz commented Aug 22, 2023

The code does not compile, can you paste it in another place ?

@dariosanfilippo
Copy link

dariosanfilippo commented Aug 22, 2023 via email

@mouseos
Copy link
Author

mouseos commented Aug 22, 2023

The code does not compile, can you paste it in another place ?

sorry. It may not have been possible to compile because the code was greatly simplified due to copyright issues.

@mouseos
Copy link
Author

mouseos commented Aug 22, 2023

From the top of my head, I suggest you make sure that hslider is outputting the expected value: I remember having issues when using an integer step size on a CAQT standalone app but not on the IDE. Dr Dario Sanfilippo http://dariosanfilippo.com

On Tue, 22 Aug 2023 at 18:36, yuu @.> wrote: I have written the following code. This code allows multiple stereo processing to be selected. This works fine in the web IDE. However, it does not function properly when compiled into juce with faust2juce. The selections made are different and cannot be switched correctly. type=(hslider("Enhancer type[style:menu{'222A':0;'maxx':3;'multiband':5;'Off':7}]",0,0,7,2)); function1(l,r)=l,r; function2(l,r)=l2,r2; function3(l,r)=l,3r3; process=(function1(l,r),function2(l,r),function3(l,r),(l,r))<: ba.selectn(8,type),ba.selectn(8,type+1) — Reply to this email directly, view it on GitHub <#938>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHG3I2BF6MUSV7QJE77QMS3XWTN2PANCNFSM6AAAAAA32GGYOQ . You are receiving this because you are subscribed to this thread.Message ID: @.**>

I'll check if hslider is working fine tomorrow.

@mouseos
Copy link
Author

mouseos commented Aug 23, 2023

It turns out that my code was written incorrectly. I fixed it and it works fine. However, there seems to be a bug in the hslider.
Before the fix
type=hslider("Enhancer type[style:menu{'222A':0;'maxx':3;'multiband':5;'Off':7}]", 0, 0, 7, 2);
After modification.
type=hslider("Enhancer type[style:menu{'222A':0;'maxx':2;'multiband':4;'Off':6}]", 0, 0, 7, 2);

Running the code before the modification will output 0→2→4→8 in web ide.
However, when compiled in juce, it outputs 0→3→5→7.
I think the behaviour of the hslider in web ide is wrong.

@sletz
Copy link
Member

sletz commented Aug 23, 2023

OK kept here: grame-cncm/faustide#78.

@sletz sletz closed this as completed Aug 23, 2023
@sletz
Copy link
Member

sletz commented Aug 31, 2023

OK thanlks, but even with type=hslider("Enhancer type[style:menu{'222A':0;'maxx':2;'multiband':4;'Off':6}]", 0, 0, 7, 2); the value does not always change at 128 frames bouderies (rare, but happens from time to time).

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