From d79791765b3fa1d60d35dc6373a3f2ffafa60038 Mon Sep 17 00:00:00 2001 From: Eugene Petkevich Date: Tue, 16 Jan 2024 04:16:15 +0100 Subject: [PATCH] test various gui examples --- temp.scd | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/temp.scd b/temp.scd index 92b6f47..d442c4f 100644 --- a/temp.scd +++ b/temp.scd @@ -321,13 +321,27 @@ History.play; // gui stuff +g = PdefGui(); // make a PdefGui +g.object = Pdef(\a); // show when a Pdef is put in +Pdef(\a, Pbind(\note, 12)); // show whether it has a source +Pdef(\a).play; // show whether playing, stopped, or ended, and pausable +Pdef(\a).set(\dur, 0.25); // show whether the Pdef has an envir +g.close; + ( Window.closeAll; -w = Window.new("Server Levels"); +w = Window.new("Server Levels", Window.availableBounds); +w.view.decorator = FlowLayout(w.view.bounds); ~l = ServerMeterView.new(s, w, 0@0, 17, 20); -w.width = ~l.width; -(0..13).do{|i| - ~l.view.children[0].children[i].visible = false; +w.view.bounds.width = ~l.view.bounds.width; +~f = FreqScopeView(w); +~f.inBus_(20+16); +~c = Stethoscope.new(s, view:w.view, index: 20+16); +w.onClose_({ ~f.kill; ~c.free }); +w.front; +~f.active_(true); +fork { + 0.5.wait; + }; -w.front; // show the window ) \ No newline at end of file -- 2.17.1