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

[sc-users] Can't get NRT to work



Hello

I'm trying to render a pattern in non realtime but I'm getting an error.
I'm running SC 3.10 on Mac OS 10.12

My code is

(
SynthDef(\testNrtSynth, { |out, freq = 440|
    Out.ar(out, SinOsc.ar([freq, freq * 1.0001]) * -10.dbamp);
}).add;
)

(
p = Pspawner.new({ |sp|
    var first, second;
    sp.seq(
        Prout({
            first = Synth(\testNrtSynth, [\freq, 200]);
            3.wait;
            second = Synth(\testNrtSynth, [\freq, 400]);
            1.wait;
            first.free;
            1.wait;
            second.free;
        });
    );
    sp.wait(1);
});
)

// realtime works
p.play;

// NRT does not
p.render("/tmp/test.wav");

returns
record : setting clientID to 0.
ERROR: Message 'at' not understood.
RECEIVER:
   nil
ARGS:
   Integer 0
PATH: /Users/geoffroy/dev/supercollider-experiments/nrt-test.scd
CALL STACK:
    DoesNotUnderstandError:reportError
        arg this = <instance of DoesNotUnderstandError>
    Nil:handleError
        arg this = nil
        arg error = <instance of DoesNotUnderstandError>
    Thread:handleError
        arg this = <instance of Thread>
        arg error = <instance of DoesNotUnderstandError>
    Object:throw
        arg this = <instance of DoesNotUnderstandError>
    Object:doesNotUnderstand
        arg this = nil
        arg selector = 'at'
        arg args = [*1]
    ScoreStreamPlayer:makeScore
        arg this = <instance of ScoreStreamPlayer>
        arg stream = <instance of Routine>
        arg duration = 60
        arg event = <instance of Event>
        arg timeOffset = 0.0
        var ev = nil
        var startTime = nil
        var proto = <instance of Event>
    Object:render
        arg this = <instance of Pspawner>
        arg path = "/tmp/test.wav"
        arg maxTime = 60
        arg sampleRate = 44100
        arg headerFormat = "AIFF"
        arg sampleFormat = "int16"
        arg options = nil
        arg inputFilePath = nil
        arg action = "">        var file = nil
        var oscFilePath = "/tmp/temp_oscscore1021"
        var score = nil
    Interpreter:interpretPrintCmdLine
        arg this = <instance of Interpreter>
        var res = nil
        var func = <instance of Function>
        var code = "p.render("/tmp/test.wav");"
        var doc = nil
        var ideClass = <instance of Meta_ScIDE>
    Process:interpretPrintCmdLine
        arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Message 'at' not understood.
RECEIVER: nil

Thanks for your help !

All the best

Geoffroy