[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] plotting a buffer in a gui panel
Hey,
Just to add my two cents... this is what I do for plotting buffers, using
blackrain's handy extension to SCSoundFileView:
http://www.nabble.com/file/p13360770/SCSoundFileView-plus.sc
SCSoundFileView-plus.sc :
(
var path,b,folder,items,w,menu,sfv;
//put your folder of sounds here
path = "sounds/guitar_harmonics/";
b = Buffer.readDir(path,10,"aif");// using wslib
folder = (path ++ "*").pathMatch;
items = Array(folder.size);
folder.do{|path,i|
var clip;
clip = PathName(path);
items.add(clip.fileNameWithoutExtension);
};
w = SCWindow.new.front;
menu = SCPopUpMenu(w,Rect(10,110,250,20));
menu.items = items;
menu.action_{|item|
sfv.plotBuffer(b[item.value],showProgress:false);//plots selected
buffer
};
sfv = SCSoundFileView(w,Rect(10,10,300,100));
)
//code is a little messy but I'm a little foggy this morning
Dan Stowell wrote:
>
> Hi -
>
> I have a GUI for a setup in which audio is recorded/played back on
> buffers. Would like to have little ".plot"-like panels showing each
> waveform. What's the best way of doing this?
>
> I'm not sure if SCSoundFileView is right because I'm not working with
> audio that's on disk, just audio that exists in buffers. I tried to do
> it with SCSoundFileView anyway and got a bit stuck. I'd be grateful
> for a simple example, or just some guidance...
>
> Thanks
> Dan
> _______________________________________________
> sc-users mailing list
> sc-users@xxxxxxxxxxxxxxx
> http://www.create.ucsb.edu/mailman/listinfo/sc-users
>
>
--
View this message in context: http://www.nabble.com/plotting-a-buffer-in-a-gui-panel-tf4671567.html#a13360770
Sent from the Supercollider - User mailing list archive at Nabble.com.