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

[sc-users] setting start and end points of an SCSoundFileView



with SCRangeSlider i can set the start and end points with instance.lo_ and instance.hi_. how would i do this with SCSoundFileView?
thanks,
- j

here's some code. i'm trying to use number boxes to set the selection in and out:

(
var w, b, c, d;
w = SCWindow.new;
w.front;
b = SCSoundFileView(w, Rect(20, 20, 350, 60));
b.soundfile = ~file;
b.read(0, ~file.numFrames);
c = SCNumberBox(w, Rect(20, 90, 45, 30));
d = SCNumberBox(w, Rect(70, 90, 45, 30));
c.action = {
	b.selectionStartTime(c.value); // not the correct method??
	};
d.action = {
	b.selectionEndTime(d.value) // i know this method doesn't exist...
	};
)