[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] routine that returns events problems



Thx James.

On Tue, Mar 12, 2019 at 10:16 AM <jamshark70@xxxxxxxxx> wrote:
>
> On Tue, Mar 12, 2019 at 9:30 PM <adam.a.juraszek@xxxxxxxxxxxxxx> wrote:
> > however just taking the duration values from the routine like so restores the normal nodeproxy functionality:
> > ~x = (instrument: \X, \buf, someBuffer);
> > ~kick[0] = Pbindf(~x, \dur, r.collect(_.dur));
> >
> > so it seems something about the routine returning events bypasses the normal nodeproxy roles and immediately plays the events 'outside' the nodeproxy context
>
> Ah, there's the clue.
>
> Routines receive an 'inval'. For events, you should modify the inval
> and yield it:
>
> (
> r = Routine { |inval|
>     loop {
>         ... do stuff to inval...
>         inval = inval.yield;
>     }
> }
> )
>
> You should (and this is a finer point that is not strongly documented)
> *not* simply do "myBrandNewEvent.yield". The above, with inval, is
> necessary.
>
> I'd guess the NodeProxy is passing the output bus into the
> pattern/routine using 'inval'. If your routine ignores inval, then you
> are ignoring the incoming parameters.
>
> hjh
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://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: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/