Re: Pfxb not working with NRT recording?

[email protected] Sat, 15 May 2021 09:17:23 +0800
Newsgroups gmane.comp.audio.supercollider.user
Message-ID <CAFniQ7Xzicu-He2+kYjB3v=Ejq6W0jraMxVXCA0=syFUdE+vEw@mail.gmail.com>
On Fri, May 14, 2021 at 1:17 PM <[email protected]> wrote:
> Just ran into this same issue - searched the old emails - and I'm not
> sure this has been resolved.
> Any new ideas?

OK... step by step...

The first thing to do is check the OSC messages in the Score. (There's
no magic -- if something is broken -- look at what it's actually
doing.)

a = q.asScore(5);

a.score.do(_.postln); ""

[ 0.0, [ /g_new, 1, 0, 0 ] ]
[ 0.0, [ 21, 1000, 0, 1 ] ]
[ 0.0, [ 9, system_link_audio_2, 1001, 3, 1000, out, 0, in, 4,
fadeTime, 0.02, gate, 1, doneAction, 3 ] ]
[ 0.0, [ 9, nullProc, 1002, 0, 1000, out, 4 ] ]
[ 0.0, [ 9, testSynth, 1003, 0, 1000, out, 4, amp, 0.1, freq, 261.6255653006 ] ]
[ 0.8, [ 15, 1003, gate, 0 ] ]
... snip
[ 4.0, [ n_free, 1002 ] ]
[ 4.0, [ n_free, 1002 ] ]
[ 5.0, [ c_set, 0, 0 ] ]

Bus numbers and group targets look reasonable, so that's not the problem.

What about "9 [/s_new], system_link_audio_2"? The example uses
`writeDefFile` on its own SynthDefs, so it's assuming that the NRT
server will load SynthDefs from disk. So let's check the SynthDef
directory:

SynthDef.synthDefDir.openOS;

... and here, I find "system_line_audio.scsyndef" (from
JITLibExtensions) but not "system_link_*".

In fact nothing in the class SystemSynthDefs is written to disk.
That's probably a good thing because we don't want to clutter the
disk.

So, any patterns that depend on defs created in SystemSynthDefs will
need some extra attention for NRT.

a = q.asScore(5, 0.001);
a.add([0, [\d_recv, SynthDescLib.at('system_link_audio_2').def.asBytes]]);
a.sort;

a.recordNRT(outputFilePath: "~/testQ.aiff".standardizePath, options:
ServerOptions.new.numOutputBusChannels_(2), action: { "done".postln
});

Now the AIFF file is OK.

Or, if you want to be extra sure and add all of the system defs:

(
a = q.asScore(5, 0.001);
SynthDescLib.global.synthDescs.keysValuesDo { |key, desc|
    if(key.asString.beginsWith("system_")) {
        a.add([0, [\d_recv, desc.def.asBytes]]);
    };
};
a.sort;
)

Probably the NRT guide help file should be updated to call attention to this.

BTW during rendering there were some "/n_set node not found" errors --
this is because you should not have a `gate` argument in conjunction
with `Env.perc`.

HTH,
hjh

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/