Is cruciallib's Instr still working with nowadays SC events/patterns? Errors with `asGroup`

I tried their first example from their page on patterns, but it’s erroring out with ERROR: Message 'asGroup' not understood.

    Instr("minimoog.two",{ arg freq=440,int1=5,int2 = -5,width1=0.1,width2=0.1,width3=0.1,
        var p;[ freq  * int1.midiratio, freq, freq * int2.midiratio],
                [ width1,width2,width3],0.3);,freq * ffreqInterval.midiratio,rq)
            *,doneAction: 2)


        \type, \instr,
        \instr, "minimoog.two",
        // note is converted to freq by things in NotePlayer
        // args are passed into the function
        \int1, Prand([-3,0,7,11,13],inf),
        \dur, 0.5

The Instr seem to create ok, even their Patch.gui works but the Instrs can’t be played via Events or Pbinds. Even the simpler

Instr("minimoog.two").spawnEvent( (freq: 100) )

fails the same way ERROR: Message 'asGroup' not understood.

Any ideas how to fix this?

I have the vague impression that the Rest rework in the recent versions of SC might have broken this feature of cruciallib, given the surrounding code where it dies.

It appears this issue was reported 2 years minus 1.5 months ago:

FWIW, Chris aka crucial felix has largely moved on to other projects and isn’t doing much with SC anymore. But a PR on his repository might be welcome.

The error text reported there is:

ERROR: Message 'asGroup' not understood.
Instance of Function

And Event has:

group: { ~server.defaultGroup.nodeID }

So I’d be roughly 99.9999999% sure that Rest has nothing to do with it.

Event’s default group is a function (so it can adapt to whichever Server object is provided in the event). The crucial library seems to expect to be able to call asGroup on this and get a Group object. Probably it would work to implement Function:asGroup – but I have doubts about this approach because it depends on an Event being used at that moment… so I don’t have a good idea right now how to solve it.


1 Like

There’s alas more than one repository…"crucial-library")

“supercollider-quarks” is the wrong one, so it’s unlikely that the issue you just logged there will be looked at.


1 Like

Also the fix you mentioned works.

Instr("minimoog.two").spawnEvent( (freq: 200, group: s.asGroup, ) )

makes sound.