Hi,
I’m trying to play samples from a dictionary of buffers with this code.
~playbuf = Pbind(\instrument, \playbuf, \speed, 0.9);
(
Pdef(\a, Pseq([
Pbind(\buf, Prand(~samples[\es][\news],inf), \out, Pseq((..3)), \sampledur, Pfunc{|e| e[\buf].duration}.trace) <> ~playbuf,
Pbind(\buf, Prand(~samples[\es][\news], 4), \out, (..3), \speed, 0.9) <> ~playbuf,
])).play;
)
Sometimes it works, but more often than not I get this error which I’ve looked up but haven’t found any info, and I don’t have a clue what it means:
ERROR: 'PauseStream-awake' Out of context return of value: a DoesNotUnderstandError
RECEIVER:
Instance of EventStreamPlayer { (0x56036cc6e6d8, gc=38, fmt=00, flg=00, set=04)
instance variables [12]
stream : nil
originalStream : instance of Routine (0x56036cc682c8, size=28, set=5)
clock : instance of TempoClock (0x56036a65db68, size=7, set=3)
nextBeat : nil
streamHasEnded : true
isWaiting : false
era : Integer 0
rescheduledTime : nil
event : instance of Event (0x56036da29948, size=5, set=3)
muteCount : Integer 0
cleanup : instance of EventStreamCleanup (0x56036d31b7c8, size=1, set=2)
routine : instance of Routine (0x56036cc2d028, size=28, set=5)
}
CALL STACK:
MethodError:reportError
arg this = <instance of OutOfContextReturnError>
Nil:handleError
arg this = nil
arg error = <instance of OutOfContextReturnError>
Thread:handleError
arg this = <instance of Thread>
arg error = <instance of OutOfContextReturnError>
Object:throw
arg this = <instance of OutOfContextReturnError>
Object:outOfContextReturn
arg this = <instance of EventStreamPlayer>
arg method = PauseStream:awake
arg result = <instance of DoesNotUnderstandError>
PauseStream:awake
arg this = <instance of EventStreamPlayer>
arg beats = 664.0
arg seconds = 664.706888406
arg inClock = <instance of TempoClock>
^^ The preceding error dump is for ERROR: 'PauseStream-awake' Out of context return of value: a DoesNotUnderstandError
RECEIVER: an EventStreamPlayer
Any hints will be very much appreciated.