[Csnd] andif?
| Date | 2010-11-08 11:45 |
| From | Stefan Thomas |
| Subject | [Csnd] andif? |
| Dear community, I'm searching for an opcode that does executes something if two conditions are true (something like "andif"), Actually I would like to change the sound, if the modwheel is >1 and if the midinote is higher than 60. I tried it, without sucess with: <CsoundSynthesizer> |
| Date | 2010-11-08 11:55 |
| From | Rory Walsh |
| Subject | [Csnd] Re: andif? |
Use the logical AND operator &&. For example if(k1>0 && k2<10) then bla bla bla endif This tests if k1>0 AND k2<10 Rory. On 8 November 2010 11:45, Stefan Thomas |
| Date | 2010-11-08 11:57 |
| From | Stefan Thomas |
| Subject | [Csnd] Re: Re: andif? |
| Oh Yes, thanks, it was simple! But I couldn't find it in the manual (at least not quickly). 2010/11/8 Rory Walsh <rorywalsh@ear.ie> Use the logical AND operator &&. For example |
| Date | 2010-11-08 12:03 |
| From | Richard Dobson |
| Subject | [Csnd] Re: andif? |
On 08/11/2010 11:45, Stefan Thomas wrote:
> Dear community,
> I'm searching for an opcode that does executes something if two
> conditions are true (something like "andif"),
> Actually I would like to change the sound, if the modwheel is >1 and if
> the midinote is higher than 60.
> I tried it, without sucess with:
..
> if (imodwheel >0) (inote >isplitpoint) then
>
You need the "Logical" AND operator &&
try:
if (imodwheel >0 && inote >isplitpoint) ...
Richard Dobson
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2010-11-08 12:08 |
| From | joachim heintz |
| Subject | [Csnd] Re: Re: Re: andif? |
if you want to check the manual page, this is the overview: http://www.csounds.com/manual/html/MathArtLogic.html this may also be useful: http://en.flossmanuals.net/bin/view/Csound/OpcodeGuideVI joachim Am 08.11.2010 um 12:57 schrieb Stefan Thomas: > Oh Yes, thanks, it was simple! > But I couldn't find it in the manual (at least not quickly). > > 2010/11/8 Rory Walsh |
| Date | 2010-11-08 17:38 |
| From | Stefan Thomas |
| Subject | [Csnd] Re: Re: Re: Re: andif? |
| Thanks. Especially the floss-manual seems to be a spring of wisdom! 2010/11/8 joachim heintz <jh@joachimheintz.de> if you want to check the manual page, this is the overview: |
| Date | 2010-11-09 18:06 |
| From | Jana |
| Subject | [Csnd] Re: Re: andif? |
Am 08.11.2010 12:55, schrieb Rory Walsh:
> Use the logical AND operator&&. For example
>
By the way, there are some strange logical opcodes (and, or, xor) listed
via csound -z1, even with different combinations of i/k/a-rates.
[...]
xor a aa
xor a ak
xor a ka
xor i ii
xor k kk
[...]
I haven't found anything about them in the manual and using them by
trial ends up with a "no legal opcode" error. What's the matter with them?
Example:
instr 1
k1 init 1
k2 init 2
kres xor k1, k2
endin
Best,
Jana
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2010-11-09 18:14 |
| From | jpff@cs.bath.ac.uk |
| Subject | [Csnd] Re: Re: Re: andif? |
They are expected to be used in expression (infix) form
> Am 08.11.2010 12:55, schrieb Rory Walsh:
>> Use the logical AND operator&&. For example
>>
>
> By the way, there are some strange logical opcodes (and, or, xor) listed
> via csound -z1, even with different combinations of i/k/a-rates.
>
> [...]
> xor a aa
> xor a ak
> xor a ka
> xor i ii
> xor k kk
> [...]
>
> I haven't found anything about them in the manual and using them by
> trial ends up with a "no legal opcode" error. What's the matter with them?
>
> Example:
>
> instr 1
> k1 init 1
> k2 init 2
> kres xor k1, k2
> endin
>
> Best,
> Jana
>
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|