FrankBuss / FrankBussRackPlugin

VCV Rack Plugin
Other
19 stars 2 forks source link

Formula Feature Request: add variable for polyphonic output channel index #2

Open freddyz opened 5 years ago

freddyz commented 5 years ago

I think it would be useful for Formula to have another lowercase letter variable (let's assume "c" for the purposes of this discussion) so that the output signal can depend on the output channel number.

Some possible uses:

Your Formula module is so useful in so many situations. Thank you for creating it, and I'm very glad it will be available in Rack v1! I learned a lot from your code when I was creating my computerscare modules plugin - thank you for releasing the source code as well!

FrankBuss commented 5 years ago

Looks like a good idea. I think then the Formula module would need a context menu as well, to select the number of output channels. For example "auto" to adjust the number of channels to the max number of channels of each input, as it is now implemented, and 1-16 to set a fixed number of outputs, in case there is no input. The the harmonic series generator would work without any unused inputs.

ScriptKitty-git commented 4 years ago

I think it would be useful for Formula to have another lowercase letter variable (let's assume "c" for the purposes of this discussion) so that the output signal can depend on the output channel number.

Some possible uses:

* Generate 1/16 volts on output channel 1, 2/16 volts on output channel 2, ... and 1 volt on output channel 16:
  `c/16`

* Output `x` on channel 1, and `y` on all the other channels:
  `(c==1)*x + (c!=1)*y`

* Generate the first 16 sine waves of the harmonic series:
  `sin(2*pi*p*c)*5`

Your Formula module is so useful in so many situations. Thank you for creating it, and I'm very glad it will be available in Rack v1! I learned a lot from your code when I was creating my computerscare modules plugin - thank you for releasing the source code as well!

+1 Came here to propose exactly the same. It would be so useful to be able to do that and it would make the plugin much more powerful! Thanks for creating it, Formula is one of the most usefull plugins in vcv.