b.action = { if (b.value ==1,
(CocoaDialog.getPaths({arg paths;
paths.do({arg b,;
Buffer.read(s,b,bufnum:0);
"No. Of Channels:".postln;
f = SoundFile.new;
f.openRead(b);
f.numChannels.postln;
a = SCSoundFileView.new(w, Rect(100,280,345,
60));
a.soundfile = f;
a.read(0, f.numFrames);
a.drawsWaveForm = true;
w.refresh;
b2 = SCButton(w,Rect(13.5,65,70,20));
b2.font = Font("Courier", 14);
b2.states = [
["Mono",Color.red
(0.62,1),Color.clear],
["Stereo",Color.red
(0.62,1),Color.clear]
];
b11.valueAction = f.numChannels - 1;
b2.refreshl
});},
{"cancelled".postln;};
));
)};