James Harkins | 1 May 03:24 2011
Picon

Re: problem with Splay

At Sat, 30 Apr 2011 15:39:09 +0200,
Patrick Borgeat wrote:
> Mh, maybe it would be better to preserve the rate?
> 
> So X.ar * 0.0 doesn't get 0 but DC.ar(0) (same with kr)
> 
> This is off course not as efficient as scalar 0 but eliminates these kind of problems.

Here's a use case where one would not want to replace 0 with DC.ar(0) or Silent.ar(1).

~makeSynth = { |name, sawAmpFactor = 1, squareAmpFactor = 1|
	SynthDef(name, { |freq, amp, ... blah blah...|
		var	saw = Saw.ar(freq) * sawAmpFactor,
			square = Pulse.ar(freq, 0.5) * squareAmpFactor;
		... blah blah...
		Out.ar(out, (saw + square) * envgen * amp);
	}).add;
};

In the current implementation, passing 0 to either sawAmpFactor or squareAmpFactor doesn't merely
silence one or the other oscillator -- it completely removes it from the graph. So you get a SynthDef with
the smallest number of UGens to get the specified result.

I'm tempted to say that it might be even better, instead of promoting scalars to the next unit's rate, it
might be even better to recognize the special case of a silent input. LPF.ar(DC.ar(0), 2000) will output
only zeros, so why not detect (pseudocode)...?

	if(in == 0) { ^0 };
	if(in.rate == \scalar) { in = DC.whateverRate(in) };
	^this.multiNew(...)
(Continue reading)

James Harkins | 1 May 03:31 2011
Picon

Re: URGENT AND IMPORTANT : Re: Because

At Sat, 30 Apr 2011 11:20:34 -0700,
Josh Parmenter wrote:
> Also - I just checked Snopes, and this thread is all just a hoax.

Damn. I already forwarded it to everyone in my address book.
hjh

--
James Harkins /// dewdrop world
jamshark70@...
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Scott Wilson | 1 May 09:45 2011
Picon
Picon

Re: \/\ nato.0+83990 Re: URGENT AND IMPORTANT : Re: Because


On 30 Apr 2011, at 22:45, Julian Rohrhuber wrote:


On 30.04.2011, at 23:34, Josh Parmenter wrote:

I was trying to get us going in the direction of Beatles lyrics. Oh well. Coo coo ca choo.

Josh

On Apr 30, 2011, at 10:52 AM, Nick Collins wrote:

What was  the topic again?


Re: OT: wrt nn flame wars

RJK


Neato is Laura Croft, but only if you want her to be...

RJK


Ronald J. Kuivila your pop.tart m9nd aktivity = illuminating mais ...

how is your assignment +?

nn

ooooouuu, my hero!

<g> not good. (Hoped we could do better for a dev list) Come on guys, lame.

pffft (just kidding you KIDS rawk huh =)

kewl! lol

cheers,

x

PS For all I care, we can stuff a duck 3 layers deep - get an 'ok' result. Doesnt mean things are right.
Tim Blechmann | 1 May 10:06 2011

QTopView-backColor

hi jakob,

nick's CanonicHillLoss is currently not working with qtcollider, because it 
doesn't implement QTopView-backColor ... would be nice if you could have a look 
at this ...

thanks, tim

--

-- 
tim@...
http://tim.klingt.org

Music is the can opener of the soul. It makes you terribly quiet 
inside, makes you aware that there's a roof to your being.
  Henry Miller
Stefan Kersten | 1 May 11:10 2011
Picon
Picon

SF.net Git: supercollider branch, master, updated. deb78dcfe1d466b79d3e3f6c10d1a7e23f69bf01

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "supercollider".

The branch, master has been updated
       via  deb78dcfe1d466b79d3e3f6c10d1a7e23f69bf01 (commit)
      from  63a5719cc119415c202bde4687b4aa439d669993 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit deb78dcfe1d466b79d3e3f6c10d1a7e23f69bf01
Author: Stefan Kersten <sk@...>
Date:   Sun May 1 11:08:22 2011 +0200

    Improve error messages for name reading functions

diff --git a/server/scsynth/SC_GraphDef.cpp b/server/scsynth/SC_GraphDef.cpp
index a3e0cec..03e73d0 100644
--- a/server/scsynth/SC_GraphDef.cpp
+++ b/server/scsynth/SC_GraphDef.cpp
 <at>  <at>  -27,12 +27,9  <at>  <at> 
 #include "SC_UnitSpec.h"
 #include "SC_UnitDef.h"
 #include "SC_HiddenWorld.h"
-#include <stdio.h>
-#include <stdlib.h>
 #ifndef _MSC_VER
 #include <dirent.h>
 #endif //_MSC_VER
-#include <stdexcept>
 #include "ReadWriteMacros.h"
 #include "SC_Prototypes.h"
 #include "SC_CoreAudio.h"
 <at>  <at>  -42,6 +39,12  <at>  <at> 
 #include "SC_Win32Utils.h"
 #endif

+#include <stdio.h>
+#include <stdlib.h>
+#include <sstream>
+#include <stdexcept>
+#include <string>
+
 extern Malloc gMalloc;

 int32 GetHash(ParamSpec* inParamSpec)
 <at>  <at>  -58,9 +61,12  <at>  <at>  int32* GetKey(ParamSpec* inParamSpec)
 void ReadName(char*& buffer, int32* name);
 void ReadName(char*& buffer, int32* name)
 {
-	uint32 namelen = readInt8(buffer);
+	uint32 namelen = readUInt8(buffer);
 	if (namelen >= kSCNameByteLen) {
-		throw std::runtime_error("name too long > 31 chars");
+		std::ostringstream os;
+		os << "name too long (> " << kSCNameByteLen - 1 << " chars): "
+		   << std::string(buffer, namelen);
+		throw std::runtime_error(os.str());
 	}
 	memset(name, 0, kSCNameByteLen);
 	readData(buffer, (char*)name, namelen);
 <at>  <at>  -71,7 +77,10  <at>  <at>  void ReadNodeDefName(char*& buffer, int32* name)
 {
 	uint32 namelen = readUInt8(buffer);
 	if (namelen >= kSCNodeDefNameByteLen) {
-		throw std::runtime_error("name too long > 255 chars");
+		std::ostringstream os;
+		os << "node definition name too long (> " << kSCNodeDefNameByteLen - 1 << " chars): "
+		   << std::string(buffer, namelen);
+		throw std::runtime_error(os.str());
 	}
 	memset(name, 0, kSCNodeDefNameByteLen);
 	readData(buffer, (char*)name, namelen);
-----------------------------------------------------------------------

Summary of changes:
 server/scsynth/SC_GraphDef.cpp |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

hooks/post-receive
--

-- 
supercollider

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Stefan Kersten | 1 May 11:20 2011
Picon

Re: [PATCH] increase max synthdef name length to 255 chars

hi felix,

On 30.04.11 18:12, felix wrote:
> though I sometimes have thousands of synth defs at once, so maybe there is a
> memory issue.
> still that's not much memory

it could be an issue on embedded/mobile devices; if turns out to be a real
problem, we could make it a compile time option.

> but could it throw an error that says what def name was that exceeded char limit ?

good idea, i've just committed a fix.

> also, we all know its annoying to be told "synth def not found" and not be told
> which def was searched for. 
> and also "node not found"
> 
> if I remember correctly that requires a rework of the error raising system in
> the server

yes, currently the realtime node manipulation functions return error codes which
don't carry context information, probably probably because exceptions need to
allocate memory in a way that is not realtime safe. instead of the error enum we
could use a small struct that carries context for some of the operations (such
as a node if), but it will be difficult to pass a synthdef name this way, for
example.

<sk>

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Fredrik Olofsson | 1 May 11:47 2011

Re: Default synthdef again + git commit


27 apr 2011 kl. 12.13 skrev thor:

>
>
> On 27 Apr 2011, at 10:54, James Harkins wrote:
>
>> I'm not sure what the deal is anyway. The default amp is 0.1 in the  
>> default Event, and it's also 0.1 in the default SynthDef (unless  
>> something changed since 3.4.3?). It's only if one explicitly  
>> specifies an amp of 1.0 that distortion would occur, or...?
>
> Yes, it's that, but also if you're playing chords. Here for example  
> with amp = 0.5:
>
> Pbind(\instrument, \default, \degree, Pseq([0, 4, [2, 5], [1, 5, 7],  
> 1], inf), \dur, 1, \amp, 0.5).play;
>
> Sorry, this is such a minor issue, but I thought it might be good
> to have the default synthdef in SC one that doesn't clip when amp is  
> 1.
>
> Try to view this with a scope window and you'll see that it's  
> clipping too much
> for it to be healthy.
>
> t

please revert this.  imo, the default synth should not be touched.

though you're welcome to write a quark that, when installed, fixes  
this distortion 'issue'.
_f

   #|
      fredrikolofsson.com     musicalfieldsforever.com
   |#

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Patrick Borgeat | 1 May 11:56 2011
Picon

Re: problem with Splay

Not totally unrelated: This bug (missing rate check) is still there too: Compiles fine. Kills the audience.

{
var sig = Dust2.ar(100) * 0.0;
FreeVerb.ar(sig);
}.play


Am 01.05.2011 um 03:24 schrieb James Harkins:

That is, we have a current policy of breaking SynthDef building on an unexpected scalar

Julian Rohrhuber | 1 May 12:41 2011
Picon

Re: problem with Splay

FreeVerb should be a subclass of Filter -- this would fix it.

On 01.05.2011, at 11:56, Patrick Borgeat wrote:

> Not totally unrelated: This bug (missing rate check) is still there too: Compiles fine. Kills the audience.
> 
> {
> 	var sig = Dust2.ar(100) * 0.0;
> 	FreeVerb.ar(sig);	
> }.play
> 
> 
> Am 01.05.2011 um 03:24 schrieb James Harkins:
> 
>> That is, we have a current policy of breaking SynthDef building on an unexpected scalar
> 

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/

Tim Blechmann | 1 May 14:29 2011

[PATCH v2] SCClassLibrary: cross-platform FreqScope implementation

hi all,

second version of the original patch. this version is still compatible with
swingosc, since it still uses the redirection mechanism.
will commit this version, unless someone objects ...

cheers, tim

>8-----------

the old FreqScope was implemented for each platform separately. this
is not necessarily needed, since it can be implemented based on ScopeView.

the implementation has also been cleaned up, making it more robust by replacing
explicit delay with callbacks.

Signed-off-by: Tim Blechmann <tim@...>
---
 .../Control/FreqScope.sc}                          |  222 +++++------
 .../Common/GUI/PlusGUI/Control/scopeResponse.sc    |   44 ++-
 SCClassLibrary/Common/GUI/ViewRedirect.sc          |    2 +-
 .../Platform/osx/scide_scapp/CocoaGUI.sc           |    4 +-
 SCClassLibrary/QtCollider/QFreqScope.sc            |  424 --------------------
 SCClassLibrary/QtCollider/QtGUI.sc                 |    5 +-
 6 files changed, 126 insertions(+), 575 deletions(-)
 rename SCClassLibrary/Common/GUI/{osx/scide_scapp/SCFreqScope.sc =>
PlusGUI/Control/FreqScope.sc} (59%)
 delete mode 100644 SCClassLibrary/QtCollider/QFreqScope.sc

diff --git a/SCClassLibrary/Common/GUI/osx/scide_scapp/SCFreqScope.sc b/SCClassLibrary/Common/GUI/PlusGUI/Control/FreqScope.sc
similarity index 59%
rename from SCClassLibrary/Common/GUI/osx/scide_scapp/SCFreqScope.sc
rename to SCClassLibrary/Common/GUI/PlusGUI/Control/FreqScope.sc
index cf52674..d8fda7b 100644
--- a/SCClassLibrary/Common/GUI/osx/scide_scapp/SCFreqScope.sc
+++ b/SCClassLibrary/Common/GUI/PlusGUI/Control/FreqScope.sc
 <at>  <at>  -1,40 +1,37  <at>  <at> 
-// SCFreqScope and FreqScope
+// PlusFreqScope and PlusFreqScopeWindowVew
 // by Lance Putnam
+// cross-platform port by Tim Blechmann

-SCFreqScope : SCScope {
+PlusFreqScope {
+	classvar <>server;

-	classvar <server;
-	var <scopebuf, <fftbuf;
-	var <active, <node, <inBus, <dbRange, dbFactor, rate, <freqMode;
+	var <scope;
+	var <scopebuf;
+	var <active, <synth, <inBus, <dbRange, dbFactor, rate, <freqMode;
 	var <bufSize;	// size of FFT
 	var <>specialSynthDef, <specialSynthArgs; // Allows to override the analysis synth

-	*viewClass { ^SCScope }
-
-	*initClass { server = Server.internal }
+	*initClass {
+		server = Server.internal;   // FIXME: Some systems don't have an internal server
+		this.initSynthDefs;
+	}

 	*new { arg parent, bounds;
-		^super.new(parent, bounds).initSCFreqScope
+		^super.new.initFreqScope (parent, bounds)
 	}

-	initSCFreqScope {
-		active=false;
-		inBus=0;
-		dbRange = 96;
-		dbFactor = 2/dbRange;
-		rate = 4;
-		freqMode = 0;
-		bufSize = 2048;
-
-		node = server.nextNodeID;
-	}
+	*initSynthDefs {
+		Class.initClassTree(SynthDef);
+		Class.initClassTree(SynthDescLib);
+		Class.initClassTree(Server);
+		UGen.allSubclasses.do(Class.initClassTree(_));

-	sendSynthDefs {
 		// dbFactor -> 2/dbRange

 		// linear
-		SynthDef("freqScope0", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
+		SynthDef("freqScope0", { arg in=0, fftBufSize = 2048, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
 			var signal, chain, result, phasor, numSamples, mul, add;
+			var fftbufnum = LocalBuf(fftBufSize, 1);
 			mul = 0.00285;
 			numSamples = (BufSamples.kr(fftbufnum) - 2) * 0.5; // 1023 (bufsize=2048)
 			signal = In.ar(in);
 <at>  <at>  -44,11 +41,12  <at>  <at>  SCFreqScope : SCScope {
 			phasor = LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, numSamples, numSamples + 2);
 			phasor = phasor.round(2); // the evens are magnitude
 			ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-		}).send(server);
+		}).storeOnce;

 		// logarithmic
-		SynthDef("freqScope1", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
+		SynthDef("freqScope1", { arg in=0, fftBufSize = 2048, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
 			var signal, chain, result, phasor, halfSamples, mul, add;
+			var fftbufnum = LocalBuf(fftBufSize, 1);
 			mul = 0.00285;
 			halfSamples = BufSamples.kr(fftbufnum) * 0.5;
 			signal = In.ar(in);
 <at>  <at>  -57,35 +55,14  <at>  <at>  SCFreqScope : SCScope {
 			phasor = halfSamples.pow(LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5)) * 2; // 2 to bufsize
 			phasor = phasor.round(2); // the evens are magnitude
 			ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-		}).send(server);
-
-//		SynthDef("freqScope2", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
-//			var signal, chain, result, phasor, numSamples, mul, add;
-//			mul = 0.00285;
-//			numSamples = (BufSamples.kr(fftbufnum)) - 2;
-//			signal = In.ar(in);
-//			chain = FFT(fftbufnum, signal);
-//			chain = PV_MagSmear(chain, 1);
-//			phasor = ((LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5).squared * numSamples)+1).round(2);
-//			ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-//		}).send(server);
-//
-//		SynthDef("freqScope3", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
-//			var signal, chain, result, phasor, numSamples, mul, add;
-//			mul = 0.00285;
-//			numSamples = (BufSamples.kr(fftbufnum)) - 2;
-//			signal = In.ar(in);
-//			chain = FFT(fftbufnum, signal);
-//			chain = PV_MagSmear(chain, 1);
-//			phasor = ((LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5).cubed * numSamples)+1).round(2);
-//			ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-//		}).send(server);
+		}).storeOnce;

 		// These next two are based on the original two, but adapted by Dan Stowell
 		// to calculate the frequency response between two channels
-		SynthDef("freqScope0_magresponse", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1,
dbFactor = 0.02, in2=1;
+		SynthDef("freqScope0_magresponse", { arg in=0, fftBufSize = 2048, scopebufnum=1, rate=4,
phase=1, dbFactor = 0.02, in2=1;
 			var signal, chain, result, phasor, numSamples, mul, add;
 			var signal2, chain2, divisionbuf;
+			var fftbufnum = LocalBuf(fftBufSize, 1);
 			mul = 0.00285;
 			numSamples = (BufSamples.kr(fftbufnum) - 2) * 0.5; // 1023 (bufsize=2048)
 			signal = In.ar(in);
 <at>  <at>  -100,11 +77,12  <at>  <at>  SCFreqScope : SCScope {
 			phasor = LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, numSamples, numSamples + 2);
 			phasor = phasor.round(2); // the evens are magnitude
 			ScopeOut.ar( ((BufRd.ar(1, divisionbuf, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-		}).send(server);
+		}).storeOnce;

-		SynthDef("freqScope1_magresponse", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1,
dbFactor = 0.02, in2=1;
+		SynthDef("freqScope1_magresponse", { arg in=0, fftBufSize = 2048, scopebufnum=1, rate=4,
phase=1, dbFactor = 0.02, in2=1;
 			var signal, chain, result, phasor, halfSamples, mul, add;
 			var signal2, chain2, divisionbuf;
+			var fftbufnum = LocalBuf(fftBufSize, 1);
 			mul = 0.00285;
 			halfSamples = BufSamples.kr(fftbufnum) * 0.5;
 			signal = In.ar(in);
 <at>  <at>  -118,84 +96,70  <at>  <at>  SCFreqScope : SCScope {
 			phasor = halfSamples.pow(LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5)) * 2; // 2 to bufsize
 			phasor = phasor.round(2); // the evens are magnitude
 			ScopeOut.ar( ((BufRd.ar(1, divisionbuf, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-		}).send(server);
+		}).storeOnce;
+	}

-		"SCFreqScope: SynthDefs sent".postln;
+	initFreqScope { arg parent, bounds;
+		scope = ScopeView(parent, bounds);
+
+		active = false;
+		inBus = 0;
+		dbRange = 96;
+		dbFactor = 2/dbRange;
+		rate = 4;
+		freqMode = 0;
+		bufSize = 2048;
 	}

-	allocBuffers {
+	allocBuffersAndStart {
+		Buffer.alloc(server, bufSize/4, 1, { |sbuf|
+			scope.bufnum = sbuf.bufnum;
+			("FreqScope: Buffer allocated ("
+					++ sbuf.bufnum.asString ++ ")").postln;

-		scopebuf = Buffer.alloc(server, bufSize/4, 1,
-			{ arg sbuf;
-				this.bufnum = sbuf.bufnum;
-				fftbuf = Buffer.alloc(server, bufSize, 1,
-				{ arg fbuf;
-					("SCFreqScope: Buffers allocated ("
-						++ sbuf.bufnum.asString ++ ", "
-						++ fbuf.bufnum.asString ++ ")").postln;
-				});
-			});
+			scopebuf = sbuf;
+			this.start;
+		});
 	}

 	freeBuffers {
-		if( scopebuf.notNil && fftbuf.notNil, {
-			("SCFreqScope: Buffers freed ("
-				++ scopebuf.bufnum.asString ++ ", "
-				++ fftbuf.bufnum.asString ++ ")").postln;
+		if( scopebuf.notNil, {
+			("FreqScope: Buffer freed (" ++ scopebuf.bufnum.asString ++ ")").postln;
 			scopebuf.free; scopebuf = nil;
-			fftbuf.free; fftbuf = nil;
 		});
 	}

 	start {
-
-		// sending bundle messes up phase of LFSaw in SynthDef (????)
-//		server.sendBundle(server.latency,
-//			["/s_new", "freqScope", node, 1, 0,
-//				\in, inBus, \mode, mode,
-//				\fftbufnum, fftbuf.bufnum, \scopebufnum, scopebuf.bufnum]);
-
-		node = server.nextNodeID; // get new node just to be safe
-		server.sendMsg("/s_new", specialSynthDef ?? {"freqScope" ++ freqMode.asString}, node, 1, 0,
-				\in, inBus, \dbFactor, dbFactor, \rate, 4,
-				\fftbufnum, fftbuf.bufnum, \scopebufnum, scopebuf.bufnum, *specialSynthArgs);
+		var defname = specialSynthDef ?? {"freqScope" ++ freqMode.asString};
+		var args = [\in, inBus, \dbFactor, dbFactor, \rate, 4, \fftBufSize, bufSize,
+			\scopebufnum, scopebuf.bufnum] ++ specialSynthArgs;
+		synth = Synth.new(defname, args, server.asGroup);
 	}

 	kill {
-		this.eventSeq(0.5, {this.active_(false)}, {this.freeBuffers});
-	}
-
-	// used for sending in order commands to server
-	eventSeq { arg delta ... funcs;
-		Routine.run({
-			(funcs.size-1).do({ arg i;
-				funcs[i].value;
-				delta.wait;
-			});
-			funcs.last.value;
-
-		}, 64, AppClock);
+		this.active_(false);
+		this.freeBuffers;
 	}

 	active_ { arg bool;
 		if(server.serverRunning, { // don't do anything unless server is running

-		if(bool, {
-			if(active.not, {
-				CmdPeriod.add(this);
-				if((scopebuf.isNil) || (fftbuf.isNil), { // first activation
-					this.eventSeq(0.5, {this.sendSynthDefs}, {this.allocBuffers}, {this.start});
-				}, {
-					this.start;
+			if(bool, {
+				if(active.not, {
+					CmdPeriod.add(this);
+					if(scopebuf.isNil) { // first activation
+						this.allocBuffersAndStart;
+					} {
+						this.start;
+					};
+				});
+			}, {
+				if(active, {
+					synth.free;
+					CmdPeriod.remove(this);
 				});
 			});
-		}, {
-			if(active, {
-				server.sendBundle(server.latency, ["/n_free", node]);
-				CmdPeriod.remove(this);
-			});
-		});
-		active=bool;
+			active=bool;

 		});
 		^this
 <at>  <at>  -204,7 +168,7  <at>  <at>  SCFreqScope : SCScope {
 	inBus_ { arg num;
 		inBus = num;
 		if(active, {
-			server.sendBundle(server.latency, ["/n_set", node, \in, inBus]);
+			synth.set(\in, inBus);
 		});
 		^this
 	}
 <at>  <at>  -213,15 +177,14  <at>  <at>  SCFreqScope : SCScope {
 		dbRange = db;
 		dbFactor = 2/db;
 		if(active, {
-			server.sendBundle(server.latency, ["/n_set", node, \dbFactor, dbFactor]);
+			synth.set(\dbFactor, dbFactor);
 		});
 	}

 	freqMode_ { arg mode;
 		freqMode = mode.asInteger.clip(0,1);
 		if(active, {
-			server.sendMsg("/n_free", node);
-			node = server.nextNodeID;
+			synth.free;
 			this.start;
 		});
 	}
 <at>  <at>  -231,7 +194,6  <at>  <at>  SCFreqScope : SCScope {
 		if(active == true, {
 			CmdPeriod.remove(this);
 			active = false;
-			node = server.nextNodeID;
 			// needs to be deferred to build up synth again properly
 			{ this.active_(true) }.defer( 0.5 );
 		});
 <at>  <at>  -240,7 +202,7  <at>  <at>  SCFreqScope : SCScope {
 	specialSynthArgs_ {|args|
 		specialSynthArgs = args;
 		if(args.notNil and:{active}){
-			server.sendMsg("/n_set", node, *specialSynthArgs);
+			synth.set(*specialSynthArgs);
 		}
 	}

 <at>  <at>  -248,8 +210,7  <at>  <at>  SCFreqScope : SCScope {
 		this.specialSynthDef_(defname);
 		this.specialSynthArgs_(extraargs);
 		if(active, {
-			server.sendMsg("/n_free", node);
-			node = server.nextNodeID;
+			synth.free;
 			this.start;
 		});
 	}
 <at>  <at>  -258,9 +219,13  <at>  <at>  SCFreqScope : SCScope {
 		^this.new(parent, bounds).inBus_(bus1.index)
 			.special("freqScope%_magresponse".format(freqMode), [\in2, bus2])
 	}
+
+	doesNotUnderstand { arg selector ... args;
+		^scope.performList(selector, args);
+	}
 }

-SCFreqScopeWindow { //was FreqScope
+PlusFreqScopeView {
 	classvar <scopeOpen;
 	var <scope, <window;

 <at>  <at>  -319,38 +284,38  <at>  <at>  SCFreqScopeWindow { //was FreqScope
 				});
 			};

-			window = SCWindow("Freq Analyzer", rect.resizeBy(pad[0] + pad[1] + 4, pad[2] + pad[3] + 4), false);
+			window = Window("Freq Analyzer", rect.resizeBy(pad[0] + pad[1] + 4, pad[2] + pad[3] + 4), false);

 			freqLabel.size.do({ arg i;
-				freqLabel[i] = SCStaticText(window, Rect(pad[0] - (freqLabelDist*0.5) + (i*freqLabelDist),
pad[2] - 10, freqLabelDist, 10))
+				freqLabel[i] = StaticText(window, Rect(pad[0] - (freqLabelDist*0.5) + (i*freqLabelDist),
pad[2] - 10, freqLabelDist, 10))
 					.font_(font)
 					.align_(0)
 				;
-				SCStaticText(window, Rect(pad[0] + (i*freqLabelDist), pad[2], 1, rect.height))
+				StaticText(window, Rect(pad[0] + (i*freqLabelDist), pad[2], 1, rect.height))
 					.string_("")
 					.background_(scopeColor.alpha_(0.25))
 				;
 			});

 			dbLabel.size.do({ arg i;
-				dbLabel[i] = SCStaticText(window, Rect(0, pad[2] + (i*dbLabelDist), pad[0], 10))
+				dbLabel[i] = StaticText(window, Rect(0, pad[2] + (i*dbLabelDist), pad[0], 10))
 					.font_(font)
 					.align_(1)
 				;
-				SCStaticText(window, Rect(pad[0], dbLabel[i].bounds.top, rect.width, 1))
+				StaticText(window, Rect(pad[0], dbLabel[i].bounds.top, rect.width, 1))
 					.string_("")
 					.background_(scopeColor.alpha_(0.25))
 				;
 			});

-			scope = SCFreqScope(window, rect.moveBy(pad[0], pad[2]));
+			scope = FreqScope(window, rect.moveBy(pad[0], pad[2]));

 			scope.xZoom_((scope.bufSize*0.25) / width);

 			setFreqLabelVals.value(scope.freqMode, 2048);
 			setDBLabelVals.value(scope.dbRange);

-			SCButton(window, Rect(pad[0] + rect.width, pad[2], pad[1], 16))
+			Button(window, Rect(pad[0] + rect.width, pad[2], pad[1], 16))
 				.states_([["Power", Color.white, Color.green(0.5)], ["Power", Color.white, Color.red(0.5)]])
 				.action_({ arg view;
 					if(view.value == 0, {
 <at>  <at>  -363,12 +328,12  <at>  <at>  SCFreqScopeWindow { //was FreqScope
 				.canFocus_(false)
 			;

-			SCStaticText(window, Rect(pad[0] + rect.width, pad[2]+20, pad[1], 10))
+			StaticText(window, Rect(pad[0] + rect.width, pad[2]+20, pad[1], 10))
 				.string_("BusIn")
 				.font_(font)
 			;

-			SCNumberBox(window, Rect(pad[0] + rect.width, pad[2]+30, pad[1], 14))
+			NumberBox(window, Rect(pad[0] + rect.width, pad[2]+30, pad[1], 14))
 				.action_({ arg view;
 					view.value_(view.value.asInteger.clip(0, Server.internal.options.numAudioBusChannels));
 					scope.inBus_(view.value);
 <at>  <at>  -377,11 +342,11  <at>  <at>  SCFreqScopeWindow { //was FreqScope
 				.font_(font)
 			;

-			SCStaticText(window, Rect(pad[0] + rect.width, pad[2]+48, pad[1], 10))
+			StaticText(window, Rect(pad[0] + rect.width, pad[2]+48, pad[1], 10))
 				.string_("FrqScl")
 				.font_(font)
 			;
-			SCPopUpMenu(window, Rect(pad[0] + rect.width, pad[2]+58, pad[1], 16))
+			PopUpMenu(window, Rect(pad[0] + rect.width, pad[2]+58, pad[1], 16))
 				.items_(["lin", "log"])
 				.action_({ arg view;
 					scope.freqMode_(view.value);
 <at>  <at>  -391,11 +356,11  <at>  <at>  SCFreqScopeWindow { //was FreqScope
 				.font_(font)
 			;

-			SCStaticText(window, Rect(pad[0] + rect.width, pad[2]+76, pad[1], 10))
+			StaticText(window, Rect(pad[0] + rect.width, pad[2]+76, pad[1], 10))
 				.string_("dbCut")
 				.font_(font)
 			;
-			SCPopUpMenu(window, Rect(pad[0] + rect.width, pad[2]+86, pad[1], 16))
+			PopUpMenu(window, Rect(pad[0] + rect.width, pad[2]+86, pad[1], 16))
 				.items_(Array.series(12, 12, 12).collect({ arg item; item.asString }))
 				.action_({ arg view;
 					scope.dbRange_((view.value + 1) * 12);
 <at>  <at>  -421,5 +386,4  <at>  <at>  SCFreqScopeWindow { //was FreqScope
 			^this.newCopyArgs(scope, window)
 		});
 	}
-
 }
diff --git a/SCClassLibrary/Common/GUI/PlusGUI/Control/scopeResponse.sc b/SCClassLibrary/Common/GUI/PlusGUI/Control/scopeResponse.sc
index 439a091..b5c5341 100644
--- a/SCClassLibrary/Common/GUI/PlusGUI/Control/scopeResponse.sc
+++ b/SCClassLibrary/Common/GUI/PlusGUI/Control/scopeResponse.sc
 <at>  <at>  -25,6 +25,11  <at>  <at>  Slew.scopeResponse
 		var bus1, bus2, synth, win, fs;
 		server = server ?? {GUI.stethoscope.defaultServer};

+		if (server != FreqScope.server) {
+			"Function-scopeReponse: resetting Freqscope.server".warn;
+			FreqScope.server = server;
+		};
+
 		// Create two private busses
 		bus1 = Bus.audio(server, 1).postln;
 		bus2 = Bus.audio(server, 1).postln;
 <at>  <at>  -33,28 +38,33  <at>  <at>  Slew.scopeResponse
 		// Also, onClose must free the synth and the busses

 		win = GUI.window.new(label, Rect(100, 100, 511, 300));
-		fs = GUI.freqScopeView.response(win, win.view.bounds, bus1, bus2, freqMode);
-		win.onClose_{
+		fs = FreqScope.response(win, win.view.bounds, bus1, bus2, freqMode);
+
+		win.onClose_ {
 			fs.kill;
-			server.bind{[synth, bus1, bus2].do(_.free)};
+			synth.release;
 		};
+
 		win.front;
 		fs.active_(true);

-		Task{
-			1.5.wait;
-			server.sync;
-			// Create a synth using this function and the busses
-			synth = {
-				var noise = PinkNoise.ar;
-				var filtered = this.value(noise);
-				if (not(mute)) {
-					Out.ar(0, (filtered * 0.1) ! 2);   // filter only
-				};
-				Out.ar(bus1, noise);
-				Out.ar(bus2, filtered);
-			}.play(Node.basicNew(server, fs.node), addAction: \addBefore);
-		}.play;
+		// Create a synth using this function and the busses
+		synth = { |gate = 1|
+			var noise = PinkNoise.ar;
+			var filtered = this.value(noise);
+			var env = EnvGen.kr(Env.asr(0.1, 1, 0.1, \sine), gate, 0.1, doneAction: 2);
+			if (not(mute)) {
+				Out.ar(0, (filtered * env) ! 2);   // filter only
+			};
+			Out.ar(bus1, noise);
+			Out.ar(bus2, filtered);
+		}.play(fs.synth.asTarget, addAction: \addBefore);
+		synth.register;
+		synth.onFree {
+			{
+				[bus1, bus2].do(_.free);
+			}.defer;
+		}

 		^fs
 	}
diff --git a/SCClassLibrary/Common/GUI/ViewRedirect.sc b/SCClassLibrary/Common/GUI/ViewRedirect.sc
index 786c9fc..71b894f 100644
--- a/SCClassLibrary/Common/GUI/ViewRedirect.sc
+++ b/SCClassLibrary/Common/GUI/ViewRedirect.sc
 <at>  <at>  -68,7 +68,7  <at>  <at>  Stethoscope : ViewRedirect {
 ScopeView : ViewRedirect { *key { ^\scopeView }}
 FreqScopeView : ViewRedirect { *key { ^\freqScopeView }} // redirects to SCFreqScope

-FreqScope : ViewRedirect { // redirects to SCFreqScopeWindow
+FreqScope : ViewRedirect { // redirects to FreqScopeWindow
 	*new { arg width=512, height=300, busNum=0, scopeColor, bgColor;
 		busNum = busNum.asControlInput;
 		^this.implClass.new(width, height, busNum, scopeColor)
diff --git a/SCClassLibrary/Platform/osx/scide_scapp/CocoaGUI.sc b/SCClassLibrary/Platform/osx/scide_scapp/CocoaGUI.sc
index 8dc2c94..1652d36 100644
--- a/SCClassLibrary/Platform/osx/scide_scapp/CocoaGUI.sc
+++ b/SCClassLibrary/Platform/osx/scide_scapp/CocoaGUI.sc
 <at>  <at>  -27,8 +27,8  <at>  <at>  CocoaGUI {

 	///////////////// Common -> GUI /////////////////

-	*freqScope { ^SCFreqScopeWindow }
-	*freqScopeView { ^SCFreqScope }
+	*freqScope     { ^PlusFreqScope }
+	*freqScopeView { ^PlusFreqScopeView }
 	*scopeView { ^SCScope }
 	*stethoscope { ^SCStethoscope }

diff --git a/SCClassLibrary/QtCollider/QFreqScope.sc b/SCClassLibrary/QtCollider/QFreqScope.sc
deleted file mode 100644
index 4af226d..0000000
--- a/SCClassLibrary/QtCollider/QFreqScope.sc
+++ /dev/null
 <at>  <at>  -1,424 +0,0  <at>  <at> 
-// QFreqScope and QFreqScopeWindow
-// by Lance Putnam
-// modified by Jakob Leben and Lucas Samaruga for GUI.qt scheme
-
-QFreqScope : QScope {
-
-  classvar <server;
-  var <scopebuf, <fftbuf;
-  var <active, <node, <inBus, <dbRange, dbFactor, rate, <freqMode;
-  var <bufSize; // size of FFT
-  var <>specialSynthDef, <specialSynthArgs; // Allows to override the analysis synth
-
-  *initClass { server = Server.internal }
-
-  *new { arg parent, bounds;
-    ^super.new(parent, bounds).initSCFreqScope
-  }
-
-  initSCFreqScope {
-    active=false;
-    inBus=0;
-    dbRange = 96;
-    dbFactor = 2/dbRange;
-    rate = 4;
-    freqMode = 0;
-    bufSize = 2048;
-
-    node = server.nextNodeID;
-  }
-
-  sendSynthDefs {
-    // dbFactor -> 2/dbRange
-
-    // linear
-    SynthDef("freqScope0", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
-      var signal, chain, result, phasor, numSamples, mul, add;
-      mul = 0.00285;
-      numSamples = (BufSamples.kr(fftbufnum) - 2) * 0.5; // 1023 (bufsize=2048)
-      signal = In.ar(in);
-      chain = FFT(fftbufnum, signal, hop: 0.75, wintype:1);
-      chain = PV_MagSmear(chain, 1);
-      // -1023 to 1023, 0 to 2046, 2 to 2048 (skip first 2 elements DC and Nyquist)
-      phasor = LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, numSamples, numSamples + 2);
-      phasor = phasor.round(2); // the evens are magnitude
-      ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-    }).send(server);
-
-    // logarithmic
-    SynthDef("freqScope1", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
-      var signal, chain, result, phasor, halfSamples, mul, add;
-      mul = 0.00285;
-      halfSamples = BufSamples.kr(fftbufnum) * 0.5;
-      signal = In.ar(in);
-      chain = FFT(fftbufnum, signal, hop: 0.75, wintype:1);
-      chain = PV_MagSmear(chain, 1);
-      phasor = halfSamples.pow(LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5)) * 2; // 2 to bufsize
-      phasor = phasor.round(2); // the evens are magnitude
-      ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-    }).send(server);
-
-//    SynthDef("freqScope2", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
-//      var signal, chain, result, phasor, numSamples, mul, add;
-//      mul = 0.00285;
-//      numSamples = (BufSamples.kr(fftbufnum)) - 2;
-//      signal = In.ar(in);
-//      chain = FFT(fftbufnum, signal);
-//      chain = PV_MagSmear(chain, 1);
-//      phasor = ((LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5).squared * numSamples)+1).round(2);
-//      ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-//    }).send(server);
-//
-//    SynthDef("freqScope3", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1, dbFactor = 0.02;
-//      var signal, chain, result, phasor, numSamples, mul, add;
-//      mul = 0.00285;
-//      numSamples = (BufSamples.kr(fftbufnum)) - 2;
-//      signal = In.ar(in);
-//      chain = FFT(fftbufnum, signal);
-//      chain = PV_MagSmear(chain, 1);
-//      phasor = ((LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5).cubed * numSamples)+1).round(2);
-//      ScopeOut.ar( ((BufRd.ar(1, fftbufnum, phasor, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-//    }).send(server);
-
-    // These next two are based on the original two, but adapted by Dan Stowell
-    // to calculate the frequency response between two channels
-    SynthDef("freqScope0_magresponse", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1,
dbFactor = 0.02, in2=1;
-      var signal, chain, result, phasor, numSamples, mul, add;
-      var signal2, chain2, divisionbuf;
-      mul = 0.00285;
-      numSamples = (BufSamples.kr(fftbufnum) - 2) * 0.5; // 1023 (bufsize=2048)
-      signal = In.ar(in);
-      signal2 = In.ar(in2);
-      chain = FFT(fftbufnum, signal, hop: 0.75, wintype:1);
-      divisionbuf = LocalBuf(BufFrames.ir(fftbufnum));
-      chain2 = FFT(divisionbuf, signal2, hop: 0.75, wintype:1);
-      // Here we perform complex division to estimate the freq response
-      chain = PV_Div(chain2, chain);
-      chain = PV_MagSmear(chain, 1);
-      // -1023 to 1023, 0 to 2046, 2 to 2048 (skip first 2 elements DC and Nyquist)
-      phasor = LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, numSamples, numSamples + 2);
-      phasor = phasor.round(2); // the evens are magnitude
-      ScopeOut.ar( ((BufRd.ar(1, divisionbuf, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-    }).send(server);
-
-    SynthDef("freqScope1_magresponse", { arg in=0, fftbufnum=0, scopebufnum=1, rate=4, phase=1,
dbFactor = 0.02, in2=1;
-      var signal, chain, result, phasor, halfSamples, mul, add;
-      var signal2, chain2, divisionbuf;
-      mul = 0.00285;
-      halfSamples = BufSamples.kr(fftbufnum) * 0.5;
-      signal = In.ar(in);
-      signal2 = In.ar(in2);
-      chain = FFT(fftbufnum, signal, hop: 0.75, wintype:1);
-      divisionbuf = LocalBuf(BufFrames.ir(fftbufnum));
-      chain2 = FFT(divisionbuf, signal2, hop: 0.75, wintype:1);
-      // Here we perform complex division to estimate the freq response
-      chain = PV_Div(chain2, chain);
-      chain = PV_MagSmear(chain, 1);
-      phasor = halfSamples.pow(LFSaw.ar(rate/BufDur.kr(fftbufnum), phase, 0.5, 0.5)) * 2; // 2 to bufsize
-      phasor = phasor.round(2); // the evens are magnitude
-      ScopeOut.ar( ((BufRd.ar(1, divisionbuf, phasor, 1, 1) * mul).ampdb * dbFactor) + 1, scopebufnum);
-    }).send(server);
-
-    "SCFreqScope: SynthDefs sent".postln;
-  }
-
-  allocBuffers {
-
-    scopebuf = Buffer.alloc(server, bufSize/4, 1,
-      { arg sbuf;
-        this.bufnum = sbuf.bufnum;
-        fftbuf = Buffer.alloc(server, bufSize, 1,
-        { arg fbuf;
-          ("SCFreqScope: Buffers allocated ("
-            ++ sbuf.bufnum.asString ++ ", "
-            ++ fbuf.bufnum.asString ++ ")").postln;
-        });
-      });
-  }
-
-  freeBuffers {
-    if( scopebuf.notNil && fftbuf.notNil, {
-      ("SCFreqScope: Buffers freed ("
-        ++ scopebuf.bufnum.asString ++ ", "
-        ++ fftbuf.bufnum.asString ++ ")").postln;
-      scopebuf.free; scopebuf = nil;
-      fftbuf.free; fftbuf = nil;
-    });
-  }
-
-  start {
-
-    // sending bundle messes up phase of LFSaw in SynthDef (????)
-//    server.sendBundle(server.latency,
-//      ["/s_new", "freqScope", node, 1, 0,
-//        \in, inBus, \mode, mode,
-//        \fftbufnum, fftbuf.bufnum, \scopebufnum, scopebuf.bufnum]);
-
-    node = server.nextNodeID; // get new node just to be safe
-    server.sendMsg("/s_new", specialSynthDef ?? {"freqScope" ++ freqMode.asString}, node, 1, 0,
-        \in, inBus, \dbFactor, dbFactor, \rate, 4,
-        \fftbufnum, fftbuf.bufnum, \scopebufnum, scopebuf.bufnum, *specialSynthArgs);
-  }
-
-  kill {
-    this.eventSeq(0.5, {this.active_(false)}, {this.freeBuffers});
-  }
-
-  // used for sending in order commands to server
-  eventSeq { arg delta ... funcs;
-    Routine.run({
-      (funcs.size-1).do({ arg i;
-        funcs[i].value;
-        delta.wait;
-      });
-      funcs.last.value;
-
-    }, 64, AppClock);
-  }
-
-  active_ { arg bool;
-    if(server.serverRunning, { // don't do anything unless server is running
-
-    if(bool, {
-      if(active.not, {
-        CmdPeriod.add(this);
-        if((scopebuf.isNil) || (fftbuf.isNil), { // first activation
-          this.eventSeq(0.5, {this.sendSynthDefs}, {this.allocBuffers}, {this.start});
-        }, {
-          this.start;
-        });
-      });
-    }, {
-      if(active, {
-        server.sendBundle(server.latency, ["/n_free", node]);
-        CmdPeriod.remove(this);
-      });
-    });
-    active=bool;
-
-    });
-    ^this
-  }
-
-  inBus_ { arg num;
-    inBus = num;
-    if(active, {
-      server.sendBundle(server.latency, ["/n_set", node, \in, inBus]);
-    });
-    ^this
-  }
-
-  dbRange_ { arg db;
-    dbRange = db;
-    dbFactor = 2/db;
-    if(active, {
-      server.sendBundle(server.latency, ["/n_set", node, \dbFactor, dbFactor]);
-    });
-  }
-
-  freqMode_ { arg mode;
-    freqMode = mode.asInteger.clip(0,1);
-    if(active, {
-      server.sendMsg("/n_free", node);
-      node = server.nextNodeID;
-      this.start;
-    });
-  }
-
-  cmdPeriod {
-    this.changed(\cmdPeriod);
-    if(active == true, {
-      CmdPeriod.remove(this);
-      active = false;
-      node = server.nextNodeID;
-      // needs to be deferred to build up synth again properly
-      { this.active_(true) }.defer( 0.5 );
-    });
-  }
-
-  specialSynthArgs_ {|args|
-    specialSynthArgs = args;
-    if(args.notNil and:{active}){
-      server.sendMsg("/n_set", node, *specialSynthArgs);
-    }
-  }
-
-  special { |defname, extraargs|
-    this.specialSynthDef_(defname);
-    this.specialSynthArgs_(extraargs);
-    if(active, {
-      server.sendMsg("/n_free", node);
-      node = server.nextNodeID;
-      this.start;
-    });
-  }
-
-  *response{ |parent, bounds, bus1, bus2, freqMode=1|
-    ^this.new(parent, bounds).inBus_(bus1.index)
-      .special("freqScope%_magresponse".format(freqMode), [\in2, bus2])
-  }
-}
-
-QFreqScopeWindow {
-	classvar <scopeOpen;
-	var <scope, <window;
-
-	*new { arg width=512, height=300, busNum=0, scopeColor, bgColor;
-		var rect, scope, window, pad, font, freqLabel, freqLabelDist, dbLabel, dbLabelDist;
-		var setFreqLabelVals, setDBLabelVals;
-		var nyquistKHz;
-		if(scopeOpen != true, { // block the stacking up of scope windows
-			//make scope
-
-			scopeOpen = true;
-
-			if(scopeColor.isNil, { scopeColor = Color.green });
-			if(bgColor.isNil, { bgColor = Color.green(0.1) });
-
-			rect = Rect(0, 0, width, height);
-			pad = [30, 38, 14, 10]; // l,r,t,b
-			font = QFont("Monaco", 9);
-			freqLabel = Array.newClear(12);
-			freqLabelDist = rect.width/(freqLabel.size-1);
-			dbLabel = Array.newClear(17);
-			dbLabelDist = rect.height/(dbLabel.size-1);
-
-			nyquistKHz = Server.internal.sampleRate;
-			if( (nyquistKHz == 0) || nyquistKHz.isNil, {
-				nyquistKHz = 22.05 // best guess?
-			},{
-				nyquistKHz = nyquistKHz * 0.0005;
-			});
-
-
-			setFreqLabelVals = { arg mode, bufsize;
-				var kfreq, factor, halfSize;
-
-				factor = 1/(freqLabel.size-1);
-				halfSize = bufsize * 0.5;
-
-				freqLabel.size.do({ arg i;
-					if(mode == 1, {
-						kfreq = (halfSize.pow(i * factor) - 1)/(halfSize-1) * nyquistKHz;
-					},{
-						kfreq = i * factor * nyquistKHz;
-					});
-
-					if(kfreq > 1.0, {
-						freqLabel[i].string_( kfreq.asString.keep(4) ++ "k" )
-					},{
-						freqLabel[i].string_( (kfreq*1000).asInteger.asString)
-					});
-				});
-			};
-
-			setDBLabelVals = { arg db;
-				dbLabel.size.do({ arg i;
-					dbLabel[i].string = (i * db/(dbLabel.size-1)).asInteger.neg.asString;
-				});
-			};
-
-			window = QWindow("Freq Analyzer", rect.resizeBy(pad[0] + pad[1] + 4, pad[2] + pad[3] + 4), false);
-
-			freqLabel.size.do({ arg i;
-				freqLabel[i] = QStaticText(window, Rect(pad[0] - (freqLabelDist*0.5) + (i*freqLabelDist),
pad[2] - 10, freqLabelDist, 10))
-					.font_(font)
-					.align_(0)
-				;
-				QStaticText(window, Rect(pad[0] + (i*freqLabelDist), pad[2], 1, rect.height))
-					.string_("")
-					.background_(scopeColor.alpha_(0.25))
-				;
-			});
-
-			dbLabel.size.do({ arg i;
-				dbLabel[i] = QStaticText(window, Rect(0, pad[2] + (i*dbLabelDist), pad[0], 10))
-					.font_(font)
-					.align_(1)
-				;
-				QStaticText(window, Rect(pad[0], dbLabel[i].bounds.top, rect.width, 1))
-					.string_("")
-					.background_(scopeColor.alpha_(0.25))
-				;
-			});
-
-			scope = QFreqScope(window, rect.moveBy(pad[0], pad[2]));
-
-			scope.xZoom_((scope.bufSize*0.25) / width);
-
-			setFreqLabelVals.value(scope.freqMode, 2048);
-			setDBLabelVals.value(scope.dbRange);
-
-			QButton(window, Rect(pad[0] + rect.width, pad[2], pad[1], 16))
-				.states_([["Power", Color.white, Color.green(0.5)], ["Power", Color.white, Color.red(0.5)]])
-				.action_({ arg view;
-					if(view.value == 0, {
-						scope.active_(true);
-					},{
-						scope.active_(false);
-					});
-				})
-				.font_(font)
-				.canFocus_(false)
-			;
-
-			QStaticText(window, Rect(pad[0] + rect.width, pad[2]+20, pad[1], 10))
-				.string_("BusIn")
-				.font_(font)
-			;
-
-			QNumberBox(window, Rect(pad[0] + rect.width, pad[2]+30, pad[1], 14))
-				.action_({ arg view;
-					view.value_(view.value.asInteger.clip(0, Server.internal.options.numAudioBusChannels));
-					scope.inBus_(view.value);
-				})
-				.value_(busNum)
-				.font_(font)
-			;
-
-			QStaticText(window, Rect(pad[0] + rect.width, pad[2]+48, pad[1], 10))
-				.string_("FrqScl")
-				.font_(font)
-			;
-			QPopUpMenu(window, Rect(pad[0] + rect.width, pad[2]+58, pad[1], 16))
-				.items_(["lin", "log"])
-				.action_({ arg view;
-					scope.freqMode_(view.value);
-					setFreqLabelVals.value(scope.freqMode, 2048);
-				})
-				.canFocus_(false)
-				.font_(font)
-			;
-
-			QStaticText(window, Rect(pad[0] + rect.width, pad[2]+76, pad[1], 10))
-				.string_("dbCut")
-				.font_(font)
-			;
-			QPopUpMenu(window, Rect(pad[0] + rect.width, pad[2]+86, pad[1], 16))
-				.items_(Array.series(12, 12, 12).collect({ arg item; item.asString }))
-				.action_({ arg view;
-					scope.dbRange_((view.value + 1) * 12);
-					setDBLabelVals.value(scope.dbRange);
-				})
-				.canFocus_(false)
-				.font_(font)
-				.value_(7)
-			;
-
-			scope
-				.background_(bgColor)
-				.style_(1)
-				.waveColors_([scopeColor.alpha_(1)])
-				.inBus_(busNum)
-				.active_(true)
-				.canFocus_(false)
-			;
-
-			window.onClose_({ scope.kill;
-			scopeOpen = false;
-			}).front;
-			^this.newCopyArgs(scope, window)
-		});
-	}
-
-}
diff --git a/SCClassLibrary/QtCollider/QtGUI.sc b/SCClassLibrary/QtCollider/QtGUI.sc
index 3750157..4d7001b 100644
--- a/SCClassLibrary/QtCollider/QtGUI.sc
+++ b/SCClassLibrary/QtCollider/QtGUI.sc
 <at>  <at>  -35,8 +35,9  <at>  <at>  QtGUI {
   *listView { ^QListView }
   *popUpMenu { ^QPopUpMenu }
   *textView { ^QTextView; }
-  *freqScope { ^QFreqScopeWindow }
-  *freqScopeView { ^QFreqScope }
+
+  *freqScope     { ^PlusFreqScope }
+  *freqScopeView { ^PlusFreqScopeView }
   *scopeView { ^QScope }
   *stethoscope { ^QStethoscope }
   *soundFileView { ^QSoundFileView }
--

-- 
1.7.4.1

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/


Gmane