|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: [sc-users] plot update/refresh?On Apr 27, 2008, at 8:44 AM, James Harkins wrote:
plot { var data; data = this.asSignal(400).as(Array); ^Plot(data, ... etc.... ) } Let me know what you think. Otherwise, the Plot class itself would need to check for every case, and that seems like un-needed overhead. Env knows it's an Env, and what needs to be done to it before plotting (imo). Best, Josh
****************************************** /* Joshua D. Parmenter http://www.realizedsound.net/josh/ “Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono */_______________________________________________ Sc-devel mailing list Sc-devel@... http://lists.create.ucsb.edu/mailman/listinfo/sc-devel |
|
|
Re: [sc-users] plot update/refresh?On Apr 27, 2008, at 2:03 PM, Josh Parmenter wrote:
I wasn't clear enough... what I meant is, you should be able to plot Array, FloatArray, Signal, Wavetable etc. transparently. Really the better solution there is to get SCSoundFileView to accept subclasses of Array as well. That is, this... if (!isKindOfSlot(slots+0, class_array)) return errWrongType; ... should also permit class_floatarray, class_doublearray, class_signal, and possibly the class_int*arrays as well. Obviously something like Env must convert itself before passing the data into .plot :) hjh : H. James Harkins : http://www.dewdrop-world.net .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..: "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman _______________________________________________ Sc-devel mailing list Sc-devel@... http://lists.create.ucsb.edu/mailman/listinfo/sc-devel |
|
|
Re: [sc-users] plot update/refresh?On Apr 27, 2008, at 12:17 PM, James Harkins wrote:
Josh
****************************************** /* Joshua D. Parmenter http://www.realizedsound.net/josh/ “Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono */_______________________________________________ Sc-devel mailing list Sc-devel@... http://lists.create.ucsb.edu/mailman/listinfo/sc-devel |
|
|
Re: [sc-users] plot update/refresh?Hi all,
More work on this tonight. Between the type problem below, and a lack of finding a way to do discrete plots, I decided to start hacking the old ArrayedCollection:plot method into its own class. I have no problem if others decide to go back to the SCSoundFileView option, but I think this will, for the most part, work well. Attached is the quickly hacked together attempt, but I think it is on the right track. Data can now be changed, as well as minval and maxval (more later). Some clean-up is also in order. But... below are a few examples. I MAY have more time tonight and over the next couple of days to work on this... it depends more on how my wife's body holds up... we are a month out from our daughter being born, but she has been having contractions on and off all day (which, while the wait is on to see where things go, coding SC classes is a good way to keep distracted!). If I suddenly drop out of the picture for a few days though... you'll know why. Perhaps more later... josh a = Plot.new(Array.fill(200, {2.0.rand2}), minval: -4, maxval: 4, discrete: true) a.data_(Array.fill(200, {2.0.rand2})); a.minval_(-2, false); a.maxval_(2, true); a = Plot.new(Signal.fill(200, {2.0.rand2}), minval: -4, maxval: 4) a = Plot.new(FloatArray.fill(200, {2.0.rand2}), minval: -4, maxval: 4) b = Buffer.read(s,"sounds/a11wlk01.wav"); // not pretty! b.loadToFloatArray(action: { arg array; {Plot.new(array)}.defer }) // looks better... but takes some time! b.loadToFloatArray(action: { arg array; {Plot.new(array, discrete: true)}.defer }) ****************************************** /* Joshua D. Parmenter http://www.realizedsound.net/josh/ “Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono */ _______________________________________________ Sc-devel mailing list Sc-devel@... http://lists.create.ucsb.edu/mailman/listinfo/sc-devel |
|
|
Re: [sc-users] plot update/refresh?More updates on the possible Plot situation... see the examples below,
and the changes to the attached classes. I've been on this for a few hours today, but may have some time tomorrow. Time to stop procrastinating and start composing... James - I'll start thinking more about zooming etc. next. Best Josh a = Array.fill(200, {0.0.rrand(1.0)}); b.data_(b.data * 0.5).minval_(-1.0).maxval_(1.0).discrete_(true); // a stereo buffer... try your own. A dummy plot is thrown up until the data is collected // since the process is asynchronous, BUT we still want the plot to be returned so we can // do things to it later. a = Buffer.read(s, "sounds/FluteE4.aiff"); b = a.plot; // takes some time! b.discrete_(true); b.data; a = Env([0, 1, 0], [0.2, 0.8], \sin); b = a.plot; a = Signal.sineFill(1000, 1.0/[1,2,3,4,5,6]); b = a.plot; a = Signal.sineFill(512, 1.0/[1,2,3,4,5,6]).asWavetable; b = a.plot; b.minval_(-3.0); b.maxval_(3.0); b.setMinAndMax(-1.0, 1.0); // broken... damn it {SinOsc.ar([44, 43])}.plot On Apr 27, 2008, at 12:17 PM, James Harkins wrote: > On Apr 27, 2008, at 2:03 PM, Josh Parmenter wrote: > >> But every plot-able Class does need to be converted differently. >> Env needs to go through an asSignal->as(Array) process, where >> Buffer-data needs to be grabbed from the Server, and FloatArrays >> are ready to go. Doesn't it make sense that Env:plot should look >> something like this? > > I wasn't clear enough... what I meant is, you should be able to plot > Array, FloatArray, Signal, Wavetable etc. transparently. Really the > better solution there is to get SCSoundFileView to accept subclasses > of Array as well. That is, this... > > if (!isKindOfSlot(slots+0, class_array)) return errWrongType; > > ... should also permit class_floatarray, class_doublearray, > class_signal, and possibly the class_int*arrays as well. > > Obviously something like Env must convert itself before passing the > data into .plot :) > hjh > > : H. James Harkins > : jamshark70@... > : http://www.dewdrop-world.net > .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..: > > "Come said the Muse, > Sing me a song no poet has yet chanted, > Sing me the universal." -- Whitman > > _______________________________________________ > Sc-devel mailing list > Sc-devel@... > http://lists.create.ucsb.edu/mailman/listinfo/sc-devel /* Joshua D. Parmenter http://www.realizedsound.net/josh/ “Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono */ _______________________________________________ Sc-devel mailing list Sc-devel@... http://lists.create.ucsb.edu/mailman/listinfo/sc-devel |
|
|
Re: [sc-users] plot update/refresh?Fixed Function:plot
Best, Josh On Apr 27, 2008, at 12:17 PM, James Harkins wrote:
****************************************** /* Joshua D. Parmenter http://www.realizedsound.net/josh/ “Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono */_______________________________________________ Sc-devel mailing list Sc-devel@... http://lists.create.ucsb.edu/mailman/listinfo/sc-devel |
| Free Forum Powered by Nabble | Forum Help |