remove trailing whitespaces

git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9417 a380766d-ff14-0410-b294-a243070f3f08
This commit is contained in:
Tim Blechmann 2009-09-26 06:17:48 +00:00
parent 4bff94c0cc
commit d1639c1cbb
11 changed files with 108 additions and 108 deletions

View file

@ -563,7 +563,7 @@ Either visit file internally (.sc) or start external editor (.rtf)."
) )
) )
; (if buffer ; (if buffer
; ;
; ) ; )
) )
) )

View file

@ -180,7 +180,7 @@ If EOB-P is non-nil, positions cursor at end of buffer."
:group 'sclang-options :group 'sclang-options
:version "21.3" :version "21.3"
:type 'boolean) :type 'boolean)
(defcustom sclang-main-stop nil (defcustom sclang-main-stop nil
"*Call Main.stop on shutdown." "*Call Main.stop on shutdown."
:group 'sclang-options :group 'sclang-options
@ -659,7 +659,7 @@ if PRINT-P is non-nil. Return STRING if successful, otherwise nil."
(setq default-directory sclang-runtime-directory)))) (setq default-directory sclang-runtime-directory))))
(switch-to-buffer buffer))) (switch-to-buffer buffer)))
(add-hook 'sclang-library-startup-hook (add-hook 'sclang-library-startup-hook
(lambda () (and sclang-show-workspace-on-startup (lambda () (and sclang-show-workspace-on-startup
(sclang-switch-to-workspace)))) (sclang-switch-to-workspace))))

View file

@ -96,7 +96,7 @@ The expressions are joined as alternatives with the \\| operator."
(concat "^\\s *\\*?\\(" sclang-method-name-regexp "\\)\\s *{") (concat "^\\s *\\*?\\(" sclang-method-name-regexp "\\)\\s *{")
"Regular expression matching method definitions.") "Regular expression matching method definitions.")
(defconst sclang-block-regexp (defconst sclang-block-regexp
"^\\((\\)\\s *\\(?:/[/*]?.*\\)?" "^\\((\\)\\s *\\(?:/[/*]?.*\\)?"
"Regular expression matching the beginning of a code block. "Regular expression matching the beginning of a code block.

View file

@ -5,7 +5,7 @@
(easy-mmode-define-minor-mode sclang-minor-mode (easy-mmode-define-minor-mode sclang-minor-mode
"Toggle sclang-minor-mode. "Toggle sclang-minor-mode.
With no argument, this command toggles the mode. With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode. Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode. Null prefix argument turns off the mode.
@ -18,7 +18,7 @@ sclang code with the normal command C-c C-c and C-c C-d."
;; The minor mode bindings. ;; The minor mode bindings.
'(("\C-c\C-c" . sclang-eval-region-or-line) '(("\C-c\C-c" . sclang-eval-region-or-line)
("\C-c\C-d" . sclang-eval-region) ("\C-c\C-d" . sclang-eval-region)
("\C-\M-x" . sclang-eval-defun) ("\C-\M-x" . sclang-eval-defun)
("\C-c\C-h" . sclang-find-help) ("\C-c\C-h" . sclang-find-help)
("\C-\M-h" . sclang-goto-help-browser) ("\C-\M-h" . sclang-goto-help-browser)
("\C-c\C-s" . sclang-main-stop) ("\C-c\C-s" . sclang-main-stop)
@ -29,7 +29,7 @@ sclang code with the normal command C-c C-c and C-c C-d."
(easy-mmode-define-minor-mode sclang-help-minor-mode (easy-mmode-define-minor-mode sclang-help-minor-mode
"Toggle sclang-minor-mode. "Toggle sclang-minor-mode.
With no argument, this command toggles the mode. With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode. Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode. Null prefix argument turns off the mode.

View file

@ -152,7 +152,7 @@
;; font-lock support ;; font-lock support
;; ===================================================================== ;; =====================================================================
(defvar sclang-font-lock-keyword-list (defvar sclang-font-lock-keyword-list
'( '(
"arg" "arg"
"classvar" "classvar"
@ -494,7 +494,7 @@ Returns the column to indent to."
(defun sclang-make-document () (defun sclang-make-document ()
(sclang-perform-command-no-result 'documentNew sclang-document-id) (sclang-perform-command-no-result 'documentNew sclang-document-id)
(sclang-document-update-properties t)) (sclang-document-update-properties t))
(defun sclang-close-document (buffer) (defun sclang-close-document (buffer)
(with-sclang-document (with-sclang-document
buffer buffer

View file

@ -17,12 +17,12 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to ;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA. ;; Boston, MA 02110-1301, USA.
;;; Commentary: ;;; Commentary:
;; ;;
;;; Code: ;;; Code:

View file

@ -46,7 +46,7 @@ EmacsInterface {
dt = { dt = {
result = IdentitySet.new; result = IdentitySet.new;
Class.allClasses.do { | class | Class.allClasses.do { | class |
if (class.isMetaClass.not) { if (class.isMetaClass.not) {
result.add(class.name); result.add(class.name);
@ -55,7 +55,7 @@ EmacsInterface {
result.add(method.name); result.add(method.name);
}; };
}; };
File.use(fileName, "w", { | file | File.use(fileName, "w", { | file |
result.collectAs(_.asString, Array).storeLispOn(file); result.collectAs(_.asString, Array).storeLispOn(file);
}); });
@ -83,7 +83,7 @@ EmacsInterface {
}) })
.put(\classDefinitions, { | name | .put(\classDefinitions, { | name |
var result, class, files; var result, class, files;
result = SortedList(8, this.makeSubListSorter(0, '<')); result = SortedList(8, this.makeSubListSorter(0, '<'));
if ((class = name.asSymbol.asClass).notNil) { if ((class = name.asSymbol.asClass).notNil) {
@ -105,12 +105,12 @@ EmacsInterface {
} }
} }
}; };
name -> result name -> result
}) })
.put(\methodDefinitions, { | name | .put(\methodDefinitions, { | name |
var result, symbol, getter, setter; var result, symbol, getter, setter;
result = SortedList(8, this.makeSubListSorter(0, '<')); result = SortedList(8, this.makeSubListSorter(0, '<'));
symbol = name.asSymbol; symbol = name.asSymbol;
@ -125,7 +125,7 @@ EmacsInterface {
} }
} }
}; };
name -> result name -> result
}) })
.put(\methodReferences, { | name | .put(\methodReferences, { | name |
@ -167,7 +167,7 @@ EmacsInterface {
args = method.argNames.copyToEnd(1); args = method.argNames.copyToEnd(1);
varArgs = method.varArgs; varArgs = method.varArgs;
lastIndex = args.lastIndex; lastIndex = args.lastIndex;
args.do({ | name, i | args.do({ | name, i |
var default; var default;
if (varArgs and: { i == lastIndex }) { if (varArgs and: { i == lastIndex }) {

View file

@ -231,7 +231,7 @@ EmacsButton : EmacsWidget {
[\let, [[\widget, [\cdr, [\find, id, 'sclang-widgets', ':key', [\quote, \car]]]], [\let, [[\widget, [\cdr, [\find, id, 'sclang-widgets', ':key', [\quote, \car]]]],
[\states, [\quote, states]]], [\states, [\quote, states]]],
['widget-put', \widget, ':states', \states], ['widget-put', \widget, ':states', \states],
['widget-value-set', \widget, [\nth, value, \states]]] ['widget-value-set', \widget, [\nth, value, \states]]]
).asLispString) */ ).asLispString) */
} }
initStates {|argStates|states=argStates} initStates {|argStates|states=argStates}

View file

@ -108,7 +108,7 @@ EmacsDocument
} }
background_ {arg color, rangestart= -1, rangesize = 0; background_ {arg color, rangestart= -1, rangesize = 0;
} }
stringColor_ {arg color, rangeStart = -1, rangeSize = 0; stringColor_ {arg color, rangeStart = -1, rangeSize = 0;
} }
@ -116,15 +116,15 @@ EmacsDocument
front { front {
Emacs.sendToLisp(\_documentSwitchTo, this); Emacs.sendToLisp(\_documentSwitchTo, this);
} }
unfocusedFront { unfocusedFront {
Emacs.sendToLisp(\_documentPopTo, this); Emacs.sendToLisp(\_documentPopTo, this);
} }
syntaxColorize { syntaxColorize {
Emacs.sendToLisp(\_documentSyntaxColorize, this); Emacs.sendToLisp(\_documentSyntaxColorize, this);
} }
selectRange { arg start=0, length=0; selectRange { arg start=0, length=0;
//_TextWindow_SelectRange //_TextWindow_SelectRange
} }
@ -150,7 +150,7 @@ EmacsDocument
string_{|string, rangestart = -1, rangesize = 1| string_{|string, rangestart = -1, rangesize = 1|
Emacs.sendToLisp(\_documentPutString, [this, string]); Emacs.sendToLisp(\_documentPutString, [this, string]);
} }
currentLine { |returnFunc| currentLine { |returnFunc|
Emacs.evalLispExpression(['sclang-line-at-point'].asLispString, { |result| returnFunc.value( result ) } ); Emacs.evalLispExpression(['sclang-line-at-point'].asLispString, { |result| returnFunc.value( result ) } );
// ['with-current-buffer', title, ['thing-at-point', '\'line'] ].asLispString, { |result| returnFunc.value( result ) } ) // ['with-current-buffer', title, ['thing-at-point', '\'line'] ].asLispString, { |result| returnFunc.value( result ) } )
@ -168,7 +168,7 @@ EmacsDocument
Emacs.evalLispExpression(['with-current-buffer', title, ['current-word'] ].asLispString, { |result| returnFunc.value( result ) } ) Emacs.evalLispExpression(['with-current-buffer', title, ['current-word'] ].asLispString, { |result| returnFunc.value( result ) } )
^nil; ^nil;
} }
// environment support // environment support
/* envir_ { | environment | /* envir_ { | environment |
envir = environment; envir = environment;
@ -184,15 +184,15 @@ EmacsDocument
}; };
current = this; current = this;
} }
didResignKey { didResignKey {
if (envir === currentEnvironment) { if (envir === currentEnvironment) {
envir.pop; envir.pop;
}; };
if ( current === this, { current = nil } ); if ( current === this, { current = nil } );
//super.didResignKey; //super.didResignKey;
} }
// PRIVATE // PRIVATE
*prNewFromPath { | argPath, selectionStart, selectionLength, completionFunc | *prNewFromPath { | argPath, selectionStart, selectionLength, completionFunc |
@ -207,7 +207,7 @@ EmacsDocument
this.documentDo(id, completionFunc); this.documentDo(id, completionFunc);
} }
}); });
} }
*prNewFromString { | name, str, makeListener, completionFunc | *prNewFromString { | name, str, makeListener, completionFunc |
Emacs.sendToLisp( Emacs.sendToLisp(
\_documentNew, \_documentNew,
@ -249,8 +249,8 @@ EmacsDocument
prSetTitle { | argTitle | prSetTitle { | argTitle |
title = argTitle; title = argTitle;
} }
prGetFileName { prGetFileName {
^path ^path
} }
@ -260,7 +260,7 @@ EmacsDocument
path = Document.standardizePath(path); path = Document.standardizePath(path);
} }
} }
prSetIsListener { | flag | prSetIsListener { | flag |
isListener = flag.notNil; isListener = flag.notNil;
} }
@ -285,14 +285,14 @@ EmacsDocument
selectedText { selectedText {
^"" ^""
} }
rangeText { arg rangestart=0, rangesize=1; rangeText { arg rangestart=0, rangesize=1;
^"" ^""
} }
prinsertText { arg dataptr, txt; prinsertText { arg dataptr, txt;
} }
insertTextRange { arg string, rangestart, rangesize; insertTextRange { arg string, rangestart, rangesize;
} }
setBackgroundColor { } setBackgroundColor { }
selectedRangeLocation { selectedRangeLocation {
^0 ^0
} }
@ -308,7 +308,7 @@ EmacsDocument
} }
prinitByIndex { prinitByIndex {
^this.shouldNotImplement(thisMethod) ^this.shouldNotImplement(thisMethod)
} }
initLast { initLast {
^this.shouldNotImplement(thisMethod) ^this.shouldNotImplement(thisMethod)
} }

View file

@ -65,25 +65,25 @@ ScelDocument : Document{
} }
string_ { | argName, rangestart = -1, rangesize = 1 | string_ { | argName, rangestart = -1, rangesize = 1 |
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.string_( argName, rangestart, rangesize ) thisdoc.string_( argName, rangestart, rangesize )
},{ },{
cFuncs = cFuncs ++ { this.string_( argName ) }; cFuncs = cFuncs ++ { this.string_( argName ) };
}); });
} }
title_ { | argName, completFunc | title_ { | argName, completFunc |
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.title_( argName, completFunc ) thisdoc.title_( argName, completFunc )
},{ },{
cFuncs = cFuncs ++ { this.title_( argName, completFunc ) }; cFuncs = cFuncs ++ { this.title_( argName, completFunc ) };
}); });
} }
title{ title{
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
^thisdoc.title; ^thisdoc.title;
},{ },{
^("***"++title_p++"***") ^("***"++title_p++"***")
}); });
} }
@ -97,7 +97,7 @@ ScelDocument : Document{
prGetFileName { prGetFileName {
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
^thisdoc.path; ^thisdoc.path;
},{ },{
^path_p; ^path_p;
}); });
} }
@ -106,7 +106,7 @@ ScelDocument : Document{
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.prSetFileName( argPath ); thisdoc.prSetFileName( argPath );
},{ },{
cFuncs = cFuncs ++ { this.prSetFileName( argPath ) }; cFuncs = cFuncs ++ { this.prSetFileName( argPath ) };
}); });
} }
@ -122,42 +122,42 @@ ScelDocument : Document{
// ^this // ^this
} }
front { front {
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.front thisdoc.front
},{ },{
cFuncs = cFuncs ++ { this.front }; cFuncs = cFuncs ++ { this.front };
}); });
} }
unfocusedFront { unfocusedFront {
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.unfocusedFront; thisdoc.unfocusedFront;
},{ },{
cFuncs = cFuncs ++ { this.unfocusedFront }; cFuncs = cFuncs ++ { this.unfocusedFront };
}); });
} }
syntaxColorize { syntaxColorize {
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.syntaxColorize; thisdoc.syntaxColorize;
},{ },{
cFuncs = cFuncs ++ { this.syntaxColorize }; cFuncs = cFuncs ++ { this.syntaxColorize };
}); });
} }
prisEditable_{ | flag = true | prisEditable_{ | flag = true |
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.prisEditable_( flag ); thisdoc.prisEditable_( flag );
},{ },{
cFuncs = cFuncs ++ { this.prisEditable_( flag ) }; cFuncs = cFuncs ++ { this.prisEditable_( flag ) };
}); });
editable = flag; editable = flag;
} }
removeUndo{ removeUndo{
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
thisdoc.removeUndo thisdoc.removeUndo
},{ },{
cFuncs = cFuncs ++ { this.removeUndo }; cFuncs = cFuncs ++ { this.removeUndo };
}); });
} }
@ -194,29 +194,29 @@ ScelDocument : Document{
// dataptr = nil; // dataptr = nil;
} }
isEdited { isEdited {
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
^thisdoc.isEdited ^thisdoc.isEdited
},{ },{
^false; ^false;
}); });
} }
// isFront { thisdoc.isFront } // isFront { thisdoc.isFront }
editable_{arg abool=true; this.prisEditable_( abool ) } editable_{arg abool=true; this.prisEditable_( abool ) }
/* should maybe be this: /* should maybe be this:
path{ path{
if ( thisdoc.notNil, { if ( thisdoc.notNil, {
^^thisdoc.prGetFileName; ^^thisdoc.prGetFileName;
},{ },{
^path_p; ^path_p;
}); });
*/ */
path{^thisdoc.prGetFileName } path{^thisdoc.prGetFileName }
*addToList{ |doc| *addToList{ |doc|
var key, sceld; var key, sceld;
// "adding to List".postln; // "adding to List".postln;
key = allDocuments.detectIndex( { |it| it.thisdoc === doc } ); key = allDocuments.detectIndex( { |it| it.thisdoc === doc } );
if ( key.isNil, if ( key.isNil,
@ -234,13 +234,13 @@ ScelDocument : Document{
allDocuments.removeAt(toremove); allDocuments.removeAt(toremove);
}); });
} }
prclose { prclose {
if ( thisdoc.notNil,{ if ( thisdoc.notNil,{
thisdoc.prclose thisdoc.prclose
},{ },{
cFuncs = cFuncs ++ { this.prclose }; cFuncs = cFuncs ++ { this.prclose };
}); });
} }
string {arg rangestart, rangesize = 1; string {arg rangestart, rangesize = 1;
@ -291,14 +291,14 @@ ScelDocument : Document{
text { text {
^this.string; ^this.string;
} }
rangeText { arg rangestart=0, rangesize=1; rangeText { arg rangestart=0, rangesize=1;
^this.string( rangestart, rangesize ); ^this.string( rangestart, rangesize );
} }
// not implemented: // not implemented:
selectRange { arg start=0, length=0; } selectRange { arg start=0, length=0; }
background_ {arg color, rangestart= -1, rangesize = 0; background_ {arg color, rangestart= -1, rangesize = 0;
} }
stringColor_ {arg color, rangeStart = -1, rangeSize = 0; stringColor_ {arg color, rangeStart = -1, rangeSize = 0;
} }
@ -313,7 +313,7 @@ ScelDocument : Document{
} }
insertTextRange { arg string, rangestart, rangesize; insertTextRange { arg string, rangestart, rangesize;
} }
setBackgroundColor { } setBackgroundColor { }
selectedRangeLocation { selectedRangeLocation {
^0 ^0
} }
@ -325,7 +325,7 @@ ScelDocument : Document{
bounds_{ bounds_{
} }
*current { *current {
var cur = EmacsDocument.current; var cur = EmacsDocument.current;
if ( cur.isNil ){ if ( cur.isNil ){
@ -333,7 +333,7 @@ ScelDocument : Document{
}{ }{
^cur.sceld; ^cur.sceld;
} }
} }
*prGetIndexOfListener{ *prGetIndexOfListener{
^this.allDocuments.detectIndex( { |doc| doc.title == "*SCLang:PostBuffer*" } ); ^this.allDocuments.detectIndex( { |doc| doc.title == "*SCLang:PostBuffer*" } );
@ -345,7 +345,7 @@ ScelDocument : Document{
} }
prinitByIndex { prinitByIndex {
^this.shouldNotImplement(thisMethod) ^this.shouldNotImplement(thisMethod)
} }
initLast { initLast {
^this.shouldNotImplement(thisMethod) ^this.shouldNotImplement(thisMethod)
} }

View file

@ -9,16 +9,16 @@
var recorder, scoper; var recorder, scoper;
var countsViews, ctlr; var countsViews, ctlr;
var dumping=false, startDump, stopDump, stillRunning; var dumping=false, startDump, stopDump, stillRunning;
if (emacsbuf.notNil, { ^emacsbuf.front }); if (emacsbuf.notNil, { ^emacsbuf.front });
if(w.isNil,{ if(w.isNil,{
w = emacsbuf = EmacsBuffer("*" ++ name.asString ++ " server*"); w = emacsbuf = EmacsBuffer("*" ++ name.asString ++ " server*");
}); });
if(isLocal,{ if(isLocal,{
booter = EmacsButton(w, ["Boot","Quit"]); booter = EmacsButton(w, ["Boot","Quit"]);
booter.action = { arg value; booter.action = { arg value;
if(value == 1, { if(value == 1, {
booting.value; booting.value;
this.boot; this.boot;
@ -28,14 +28,14 @@
}); });
}; };
booter.value=serverRunning.binaryValue; booter.value=serverRunning.binaryValue;
killer = EmacsButton(w, ["K"], { Server.killAll }); killer = EmacsButton(w, ["K"], { Server.killAll });
killer.enabled = false; killer.enabled = false;
}); });
active = EmacsText(w, this.name.asString, 12, \center); active = EmacsText(w, this.name.asString, 12, \center);
// active.background = Color.black; // active.background = Color.black;
if(serverRunning,running,stopped); if(serverRunning,running,stopped);
makeDefault = EmacsButton(w, ["-> default"], { makeDefault = EmacsButton(w, ["-> default"], {
thisProcess.interpreter.s = this; thisProcess.interpreter.s = this;
@ -43,7 +43,7 @@
}); });
w.newline; w.newline;
recorder = EmacsButton(w, ["prepare rec","record >","stop []"], { recorder = EmacsButton(w, ["prepare rec","record >","stop []"], {
if (recorder.value == 1) { if (recorder.value == 1) {
this.prepareForRecord; this.prepareForRecord;
@ -51,16 +51,16 @@
if (recorder.value == 2) { this.record } { this.stopRecording }; if (recorder.value == 2) { this.record } { this.stopRecording };
}; };
}); });
recorder.enabled = false; recorder.enabled = false;
stillRunning = { stillRunning = {
SystemClock.sched(0.2, { this.stopAliveThread }); SystemClock.sched(0.2, { this.stopAliveThread });
}; };
w.defineKey("n", { this.queryAllNodes }) w.defineKey("n", { this.queryAllNodes })
.defineKey(" ", { if(serverRunning.not) { this.boot } }) .defineKey(" ", { if(serverRunning.not) { this.boot } })
.defineKey("d", { .defineKey("d", {
startDump = { startDump = {
this.dumpOSC(1); this.dumpOSC(1);
this.stopAliveThread; this.stopAliveThread;
dumping = true; dumping = true;
@ -74,7 +74,7 @@
}; };
if(dumping, stopDump, startDump) if(dumping, stopDump, startDump)
}); });
if (isLocal, { if (isLocal, {
running = { running = {
// active.stringColor_(Color.red); // active.stringColor_(Color.red);
@ -93,12 +93,12 @@
// active.stringColor_(Color.yellow(0.9)); // active.stringColor_(Color.yellow(0.9));
//booter.setProperty(\value,0); //booter.setProperty(\value,0);
}; };
w.onClose = { w.onClose = {
emacsbuf = nil; emacsbuf = nil;
ctlr.remove; ctlr.remove;
}; };
},{ },{
running = { running = {
// active.background = Color.red; // active.background = Color.red;
recorder.enabled = true; recorder.enabled = true;
@ -117,18 +117,18 @@
}; };
}); });
if(serverRunning,running,stopped); if(serverRunning,running,stopped);
w.newline; w.newline;
countsViews = countsViews =
#[ #[
"Avg CPU: ", "Peak CPU: ", "Avg CPU: ", "Peak CPU: ",
"UGens: ", "Synths: ", "Groups: ", "SynthDefs: " "UGens: ", "Synths: ", "Groups: ", "SynthDefs: "
].collect({ arg name, i; ].collect({ arg name, i;
var label,numView, pctView; var label,numView, pctView;
label = EmacsText(w, name, 12, \right); label = EmacsText(w, name, 12, \right);
if (i < 2, { if (i < 2, {
numView = EmacsText(w, "?", 5, \right); numView = EmacsText(w, "?", 5, \right);
pctView = EmacsText(w, "%"); pctView = EmacsText(w, "%");
},{ },{
@ -137,7 +137,7 @@
if (i == 1) { w.newline }; if (i == 1) { w.newline };
numView numView
}); });
ctlr = SimpleController(this) ctlr = SimpleController(this)
.put(\serverRunning, { if(serverRunning,running,stopped) }) .put(\serverRunning, { if(serverRunning,running,stopped) })
.put(\counts,{ .put(\counts,{
@ -150,7 +150,7 @@
}) })
.put(\cmdPeriod,{ .put(\cmdPeriod,{
recorder.value=0; recorder.value=0;
}); });
w.gotoBob; w.gotoBob;
w.front; w.front;
this.startAliveThread; this.startAliveThread;
@ -166,18 +166,18 @@
var getSliderValues; var getSliderValues;
s = Server.default; s = Server.default;
usefulControls = controls.select {|controlName, i| usefulControls = controls.select {|controlName, i|
var ctlname; var ctlname;
ctlname = controlName.name; ctlname = controlName.name;
(ctlname != "?") && (ctlname != "gate") (ctlname != "?") && (ctlname != "gate")
}; };
numControls = usefulControls.size; numControls = usefulControls.size;
sliders = Array.newClear(numControls); sliders = Array.newClear(numControls);
id = s.nextNodeID; // generate a note id. id = s.nextNodeID; // generate a note id.
// make the window // make the window
w = EmacsBuffer("*SynthDesc"+name++"*"); w = EmacsBuffer("*SynthDesc"+name++"*");
// add a button to start and stop the sound. // add a button to start and stop the sound.
@ -196,7 +196,7 @@
msgFunc.valueEnvir msgFunc.valueEnvir
}; };
}; };
startButton.action = {|value| startButton.action = {|value|
if (value == 1) { if (value == 1) {
// start sound // start sound
@ -211,22 +211,22 @@
}; };
}; };
}; };
// create controls for all parameters // create controls for all parameters
usefulControls.do {|controlName, i| usefulControls.do {|controlName, i|
var ctlname, ctlname2, capname, spec; var ctlname, ctlname2, capname, spec;
ctlname = controlName.name; ctlname = controlName.name;
capname = ctlname.copy; capname = ctlname.copy;
capname[0] = capname[0].toUpper; capname[0] = capname[0].toUpper;
spec = ctlname.asSymbol.asSpec; spec = ctlname.asSymbol.asSpec;
sliders[i] = EmacsNumber(w, capname, spec?ControlSpec(-1e8,1e8), sliders[i] = EmacsNumber(w, capname, spec?ControlSpec(-1e8,1e8),
{|ez| s.sendMsg("/n_set", id, ctlname, ez); }, controlName.defaultValue); {|ez| s.sendMsg("/n_set", id, ctlname, ez); }, controlName.defaultValue);
}; };
// set start button to zero upon a cmd-period // set start button to zero upon a cmd-period
cmdPeriodFunc = { startButton.value = 0; }; cmdPeriodFunc = { startButton.value = 0; };
CmdPeriod.add(cmdPeriodFunc); CmdPeriod.add(cmdPeriodFunc);
// stop the sound when window closes and remove cmdPeriodFunc. // stop the sound when window closes and remove cmdPeriodFunc.
w.onClose = { w.onClose = {
s.sendMsg("/n_free", id); s.sendMsg("/n_free", id);