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

rethink select #7

Open
felixroos opened this issue Jul 14, 2024 · 0 comments
Open

rethink select #7

felixroos opened this issue Jul 14, 2024 · 0 comments

Comments

@felixroos
Copy link
Owner

felixroos commented Jul 14, 2024

quoting pulu

seems like select doesnt preserve multichannel signals https://felixroos.github.io/kabelsalat/?p=bGV0IGltcHNlcSA9IG1vZHVsZSgiaW1wc2VxIiwgKHRyaWcsIC4uLnN0ZXApID0%2BIHRyaWcuc2VxKC4uLnN0ZXApLm11bCh0cmlnLnBlcmMoMCkpKTsKCmltcHVsc2UoOCkKICAuaW1wc2VxKDEsMCwxLDEsMCwxLDApCiAgLmFwcGx5KGcgPT4gZy5zZXEoMCwxLDQsNSw0LDEpCiAgICAuYWRkKDYwKS5taWRpbm90ZSgpCiAgICAucHVsc2Uoc2luZSgwLjkpLnJhbmdlKDAuMiwwLjQpKQogICAgLm11bChnLmFkKDAuMDAxLDAuMDcpKQogICAgLnBhbigtMSkKICAgIC5hcHBseShkcnkgPT4KICAgICAgZHJ5LmFkZCh4ID0%2BIHguZGVsYXkoMy84KS5tdWwoMC41KS5zdWIoMCkpCiAgICAgICAgLnNlbGVjdCgic3ViIikuYWRkKGRyeSkgLy8gc2hvdWxkIHNvdW5kIHRoZSBzYW1lIHdpdGggb3Igd2l0aG91dCB0aGlzIGxpbmU%2FCiAgICApCiAgKQogIC5vdXQoKTsK#select
or rather, i guess this creates a delay node for each channel and select just picks one of them
also i think i misunderstood the behavior before - so "first occurrence of the given type up in the graph" means "farthest from the output"
its a bit tricky in this case where i wanted to select the mul after the delay... i had to add a dummy .sub(0) (which only works as long as there is no sub node higher up)
i was thinking an alternative approach could be something like

dry.add(x => x.delay(3/8).mul(0.5).label("foo"))
  .select("foo")
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

1 participant