shakfu / chuck-max

Embedding ChucK in a Max/MSP external.
Other
12 stars 2 forks source link

changed N_OUT_CHANNELS to 2 for stereo #4

Closed HighHarmonics2 closed 5 months ago

HighHarmonics2 commented 5 months ago

I made this change and verified via a new make build, validating in Max.

shakfu commented 5 months ago

Yes, you can set the number of inlets and outlets via N_IN_CHANNELS and N_OUT_CHANNELS. I'd rather not change the current default right now as everyone's needs are slightly different.

HighHarmonics2 commented 5 months ago

I'm curious about the rationale to have a default of only one channel. I agree that users have different needs, but it seems that if there are 2 channels, you can always only use one. And if your chuck program doesn't do any stereo processing, patching the R & L outlets to R & L on a gain or dac/ezdac object in Max is just fine.

But if you do anything with pan, or use a stereo sound source, having only one outlet gives the user no option to have true stereo playback. Also, in Max it is common for msp objects to have a "channels" attribute that defaults to 2.

Now that I know about this, I have a solution, but I'm concerned about other users who may not realize there is an option to change it. Also, it seems unnecessary to have to change the source code every time I pull the latest. At some point I'm sure I'll forget!

I respect that you may have a different perspective, I just ask you to consider my input.

Thanks again for providing this and responding to my input.

shakfu commented 5 months ago

The reason I prefer the object to default to monophonic output is because that's the simplest use-case.

Nonetheless, I appreciate where you are coming from, so ideally there should be an option to set the number of channels at object creation. I've tested this and it works... but I'm not ui part is still not confirmed: whether it should be argument or an attribute. Intuitively the former since it doesn't really make sense to change the number of channels after object creation...

HighHarmonics2 commented 5 months ago

Thanks for revisiting this. Setting the channel number via argument makes sense to me.

shakfu commented 5 months ago

This is now done as per a recent commit. Check the project README for some info about how this works.