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

missing/useful [snake~] methods #1996

Open
porres opened this issue Jun 16, 2023 · 10 comments
Open

missing/useful [snake~] methods #1996

porres opened this issue Jun 16, 2023 · 10 comments
Labels
feature suggestion for an enhancement

Comments

@porres
Copy link
Contributor

porres commented Jun 16, 2023

an issue to discuss and propose more [snake~] methods

  • [snake~ nchs], get number of channels in a multichannel connection, useful to route signals according to number of channels and also to resize [clone], see get number of channels in mc connections #1989
  • [snake~ mix], this method could have a 2nd inlet with a toggle and one could use it to mix all channels into one when on, or pass it unchanged otherwise. This would be an alternative to allow setting [clone]'s "d" flags as messages #1994
  • [snake~ ltos] "list to sig" or something. Create a multichannel according to a list input. A bit like [sig~] but for lists and multichannels, it would also allow us to create a variable number of channels length.
@umlaeute
Copy link
Contributor

what's the advantage of [snake~ ltos] over the enhanced version of [sig~] as suggested by @Spacechild1 ?

@porres
Copy link
Contributor Author

porres commented Jun 16, 2023

what's the advantage of [snake~ ltos] over the enhanced version of [sig~] as suggested by @Spacechild1 ?

being able to create multichannel signals with a different number of channels according to the list input length

@Spacechild1
Copy link
Contributor

Spacechild1 commented Jun 16, 2023

I think these are all useful, but I would prefer different names:

[snake~ nchs] -> [snake~ count] or [snake channels]

[snake~ mix] -> [snake~ sum]

[snake~ ltos] -> [snake~ fromlist]

Two more methods:

  • [snake~ split]: split multichannel signal into two (the split index can be set dynamically)

  • [snake~ merge] or [snake~ join]: merge/join two multi-channel signals together

@Spacechild1 Spacechild1 added the feature suggestion for an enhancement label Jun 16, 2023
@abreubacelar
Copy link
Contributor

since split feels like the verb from list split, merge could be [snake~ append] and [snake~ prepend] ?

@Spacechild1
Copy link
Contributor

merge could be [snake~ append] and [snake~ prepend] ?

Prepend/append only makes sense for control objects where you have hot and cold inlets. For signal objects you only need a single method.

@abreubacelar
Copy link
Contributor

oh, understand, i thought about avoiding crossed connections, but it is silly xD

and what about an object to take specific channels from a signal?

not sure about the verb... get/take/reorder... ?

[snake~ get 1 3 2 4] could take an arbitrary signal with n channels and swap 3 and 2 channels and return just a 4 channel signal from the n channel input, would this be possible with the current objects?

maybe this could even be used for a specific duplication of signals

[snake~ get 1 2 1 3] could take a 3 channel, and output a 4 channel with the third signal being a copy from the first signal from the input

if the number of channels is lesser than the number expected, so just insert an empty signal there

and we could also drop some channels

like [snake~ get 4 2 6 3] ignoring 1 and 5 and reordering everything

what do you think?

@Spacechild1
Copy link
Contributor

Spacechild1 commented Jun 17, 2023

and what about an object to take specific channels from a signal?

+1

like [snake~ get 4 2 6 3] ignoring 1 and 5 and reordering everything

I really like the get method because it is very flexible.

@whale-av
Copy link

I miss "Magic Glass" more than anything else from Pd Extended. An enhanced version capable of showing multichannel values (and control values) would be useful.
If that is not possible, then maybe an enhanced [print~]...?
Also (sorry) in the Pd Help List of Objects.... patch, separating the audio objects that are multichannel capable from those that are not would be helpful.
David.

@umlaeute
Copy link
Contributor

umlaeute commented Mar 10, 2024

@whale-av while all of your suggestions are related to multichannel, none of them is related to [snake~] itself...so they seem to be a bit ot for this issue. you probably want to create a separate ticket.

@whale-av
Copy link

I apologize... I clicked the wrong thread link after registering to post.
Thank you all for all your great work.

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

No branches or pull requests

5 participants