- Edited
Hello,
Here is a small change in the code of the example "Hello.scd" which does not work : It seems that .duration does not exist or is not understood.on bela
s.waitForBoot {
// Your code goes here.
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
b.duration;
//b.duration.postln does not work either
{
BufRd.ar(1, b, SinOsc.ar(0.08) * BufFrames.ir(b))
}.play;
};
There after the error log:
PROTECTED CALL STACK:
Meta_MethodError:new 0x1b48ae0
arg this = DoesNotUnderstandError
arg what = nil
arg receiver = nil
Meta_DoesNotUnderstandError:new 0x1b49ca0
arg this = DoesNotUnderstandError
arg receiver = nil
arg selector = /
arg args = [ nil ]
Object:doesNotUnderstand 0x18c7e20
arg this = nil
arg selector = /
arg args = nil
a FunctionDef 0x24b11b0
sourceCode = "{
// Your code goes here.
b = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");
b.duration;
{
BufRd.ar(1, b, SinOsc.ar(0.08) * BufFrames.ir(b))
}.play;
}"
Routine:prStart 0x1fe8520
arg this = a Routine
arg inval = 7.473800079
CALL STACK:
DoesNotUnderstandError:reportError
arg this =
< closed FunctionDef >
arg error =
Integer:forBy
arg this = 0
arg endval = 0
arg stepval = 2
arg function =
var i = 0
var j = 0
SequenceableCollection:pairsDo
arg this = [*2]
arg function =
Scheduler:seconds_
arg this =
arg newSeconds = 13.802333348
Meta_AppClock:tick
arg this =
var saveClock =
Process:tick
arg this =
^^ The preceding error dump is for ERROR: Message '/' not understood.
RECEIVER: nil
Can someone help me corecting this ? ( I need the duration of the buffer fora Grain synth.)
thank you
JM