| 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
> 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
> 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:
> >
> >>
> >>
> >>
> >>
> >> sr = 48000Use the &&
> >> kr = 480
> >> ksmps = 100
> >> nchnls = 2
> >> 0dbfs = 1
> >> ; tabels
> >> giSine ftgen 0,0, 2^10, 10, 1
> >>
> >> gkmodwheel init 0
> >>
> >> massign 1, 101
> >>
> >> instr 1
> >> ichannelinstrumentone = 1
> >> icontrollerinstrumentone = 1
> >> gkmodwheel ctrl7 ichannelinstrumentone, icontrollerinstrumentone,
> 0, 1 ;
> >> controller 1 is the modwheel
> >> endin
> >>
> >> instr 101
> >> ; icps cpstmid ituningtable
> >> inote notnum
> >> isplitpoint init 60
> >> icps cpsmidi
> >> iamp ampmidi 0.75
> >> imodwheel = i(gkmodwheel)
> >>
> >> amixSinus oscil iamp, icps, giSine
> >> amixFM foscil iamp, icps, 8, 13, 1, giSine
> >> if (imodwheel >0) (inote >isplitpoint) then
> >>
> >> amix = amixFM
> >> else
> >> amix = amixSinus
> >> endif
> >> outs amix, amix
> >> endin
> >>
> >>
> >>
> >> f0 3600
> >> i1 0 3600
> >>
> >>
> >
> >
> >
> >
> >
> >
>
>
> 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"
|