Parent window for buffer plot


Is there a convenient way to specify a parent window for a buffer plot? This code does not work:, Platform.resourceDir +/+ "sounds/a11wlk01.wav");;

It’s a bit annoying if you want to use the .plot API, but you can access the actual View of the plot via the .interactionView method - you can stick this into a normal layout and then just destroy the old Window (.parent).

~plot = Array.geom(500, 1, 1.02).plot;
~v = View(bounds:200@300).layout_(
		StaticText().string_("Good Sounds").maxHeight_(20).align_(\center),

Thank you.

FWIW, I landed on this:, Platform.resourceDir +/+ "sounds/a11wlk01.wav");;

~plot=Plotter(bounds: Rect(10,10,300,200), parent:w);

~my_buffer.loadToFloatArray(action: {arg array, tmp; tmp=array; {~plot.value=tmp}.defer});
1 Like