I think I haven't described the issue very well. Here's a simplified version of what I want:
This works:
(
var freq = 300;
var cutoff = 310;
z = if (freq > cutoff, {100}, {200});
z.postln;
)
And given the values of freq and cutoff, it prints 200. What I want is to be able to do the same kind of comparison, but on a control signal, but this doesn't compile (if that's the right term). The only difference is that freq and cutoff are now control signals.
(
var freq = DC.kr(300);
var cutoff = DC.kr(310);
z = if (freq > cutoff, {100}, {200});
z.postln;
)
The interpreter complains "ERROR: Non Boolean in test."
The general question is how does one create a synth that has different characteristics based on some control signal which in this case is the frequency?
Regards,
Bill
On Thu, Mar 18, 2021, at 8:35 PM, [email protected] wrote:
> On Fri, Mar 19, 2021 at 8:33 AM James Harkins <[email protected]> wrote:
> > 0.5, 0.5, // i == 0: first is freq >= cutoff
>
> Oops, the comment is wrong: the first of each pair is freq < cutoff;
> the second is freq >= cutoff.
>
> hjh
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.):
> http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
>
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.