[Csnd] an alternative code
| Date | 2013-04-01 20:51 |
| From | Enrico Francioni |
| Subject | [Csnd] an alternative code |
Hi! I would avoid repeatedly call the second instrument. What could be an alternative code to this? *** |
| Date | 2013-04-01 21:09 |
| From | Tarmo Johannes |
| Subject | Re: [Csnd] an alternative code |
Hi, do you mean just a loop to avoid writing many lines? Like instr 1 istart = 0 looppoint: schedule 2, istart, 1 loop_le istart,2,10,looppoint endin tarmo On Monday 01 April 2013 12:51:15 Enrico Francioni wrote: > Hi! > > I would avoid repeatedly call the second instrument. > What could be an alternative code to this? > > *** > > |
| Date | 2013-04-02 09:19 |
| From | Enrico Francioni |
| Subject | [Csnd] Re: an alternative code |
Unfortunately, the action time does not proceed regularly (for example: 0,1,3,5,6,8,12,14,15,18, etc, is variable) -- View this message in context: http://csound.1045644.n5.nabble.com/an-alternative-code-tp5721645p5721650.html Sent from the Csound - General mailing list archive at Nabble.com. |
| Date | 2013-04-02 09:29 |
| From | Victor Lazzarini |
| Subject | Re: [Csnd] Re: an alternative code |
you can place these values on a table and then read from it on each iteration, something like
this (untested0
gifn ftgen 0, 0, -10, 2,0,1,3,5,6,8,12,14,15,16
instr 1
istart = 0
iend = 9
looppoint:
ip2 table istart, gifn
schedule 2, ip2, 1
loop_le istart,1,iend,looppoint
endin
On 2 Apr 2013, at 09:19, Enrico Francioni wrote:
> Unfortunately, the action time does not proceed regularly
> (for example: 0,1,3,5,6,8,12,14,15,18, etc, is variable)
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/an-alternative-code-tp5721645p5721650.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> 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"
>
Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie
|
| Date | 2013-04-02 10:09 |
| From | Enrico Francioni |
| Subject | [Csnd] Re: an alternative code |
unlike the first code,
Schedule 2, 0, 2
Schedule 2, 2, 2
schedule 2, 3, 2
Schedule 2, 5, 2
schedule 2, 8, 2
etc ...
schedule 2, 1001, 2
believe that with the new code that you suggested there is saving cpu?
how it works:
gifn ftgen 0, 0, -58, -2,
0,6,10,17,21,26,32,35,42,45,51,54,61,68,71,76,79,84,90,96,101,107,111,119,126,130,135,139,144,150,157,161,169,175,182,186,191,194,202,205,211,215,222,230,236,241,247,252,258,265,269,274,282,288,292,297,301,309
instr 1
istart = 0
iend = 9
looppoint:
ip2 table istart, gifn
schedule 2, ip2, 2
;print ip2
loop_le istart,1,iend,looppoint
endin
instr 2
a1 diskin2 "filename.wav", 1
out a1
endin
--
View this message in context: http://csound.1045644.n5.nabble.com/an-alternative-code-tp5721645p5721652.html
Sent from the Csound - General mailing list archive at Nabble.com.
|