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

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

Open
freddyz opened this issue Jun 11, 2019 · 2 comments

Comments

@freddyz
Copy link

freddyz commented Jun 11, 2019

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!

@FrankBuss
Copy link
Collaborator

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
Copy link

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.

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

2 participants