[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] sclang in >console
Hi Fredrik, long time no see :-)
Actually, it's a great help just to know that it (probably) *should*
work. I'm pretty sure I followed all the helpful advice from
blackrain and also stefan kersten, but it looks like I need to put on
my monocle, raise my eye brow extra high, and do it from scratch once
again. Scel does work in Terminal, so I would like to think that I'm
almost there. The library seems to compile ok. Problem is that
something tries to connect to the WindowServer when I boot an SC
server in scel under >console. When I boot Server.internal, I get
"INIT_Processeses(), could not establish the default connection to
the WindowServer" and then "SCLang abort trap". When I boot
Server.local, I "only" get the WindowServer error, no abort trap.
Tom, yes, I changed Main.sc to load a file I called ~/sclang/docs/
startup.sc instead of ~/scwork/startup.rtf. And I commented out the
make server window lines in Main.sc (see my entire Main.sc below).
The startup.sc file is stripped down to this:
Server.program = "scsynth";
Server.default = s = Server.internal;
s.boot;
I also followed your tip from a while ago and removed MacUGens. So
maybe something did change in sclang...
Ok, for the record let's see what else I did...
Source code first.
Changed this in SuperCollider3/source/lang/LangSource/cmdLineFuncs.cpp:
#ifdef SC_DARWIN
# define USE_SC_TERMINAL_CLIENT 1 /* <-- changed from 0 to 1 */
#else
# define USE_SC_TERMINAL_CLIENT 1
#endif
In Xcode 1.5 I did the following in xSC3lang:
Project->Add Files
SC_TerminalClient.cpp from source/lang/LangSource/ to sclang target -
> Sources
SC_TerminalClient.h from headers/lang/ to sclang target -> Headers
SC_LanguageClient.cpp from source/lang/LangSource/ to sclang target -
> Sources
SC_LanguageClient.h from headers/lang/ to sclang target -> Headers
I'm not a virtuoso in Xcode, but as scel works in Terminal, I think I
did it right.
Someone mentioned this:
In SC_Speech.cpp: comment out method: void initSpeechPrimitives()
Actually I don't think I did that. Does that matter, and if so,
exactly which lines should I get rid of?
After building...
Of course, SCClassLibrary, synthdefs, Help, plugins and sounds dirs,
plus sclang and scsynth are all in directory ~/sclang
And all the *.el files are in ~/emacs
SuperCollider3/linux/scel/sc moved to ~/sclang/SCClassLibrary
~/.bash_profile looks like this:
PATH=$PATH:/Users/scel/sclang
export PATH
~/.emacs looks like this:
(add-to-list 'load-path "~/emacs")
(require 'sclang)
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/
paste it!
;; Your init file should contain only one such instance.
'(transient-mark-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste
it!
;; Your init file should contain only one such instance.
)
~/emacs/sclang-vars.el looks like this - to be honest I'm not 100%
sure this is correct:
(defconst sclang-system-data-dir "@PKG_DATA_DIR@"
"~/sclang")
(defconst sclang-system-help-dir "@PKG_DATA_DIR@/Help"
"~/sclang/Help")
(defconst sclang-system-extension-dir "@PKG_DATA_DIR@/Extensions"
"~/sclang/SCClassLibrary/sc")
(provide 'sclang-vars)
Reading the advice of our very helpful friend, blackrain, there
should be something like this:
(defcustom sclang-help-path (list "@PKG_DATA_DIR@/Help"
"~/sclang/Help")
How does that work?
Last thing: I don't have any ~/.sclang.cfg
I experimented with different paths, but finally deleted the file,
and then scel worked in Terminal. But not in >console. (Doesn't work
in console *with* the config file either).
My entire Main.sc looks like this:
Main : Process {
var argv;
startup {
super.startup;
Document.startup;
// set the 's' interpreter variable to the default server.
interpreter.s = Server.default;
// make server window
//Server.internal.makeWindow;
//Server.local.makeWindow;
//"~/scwork/startup.rtf".loadPaths;
"~/sclang/docs/startup.sc".loadPaths;
StartUp.run;
}
shutdown { // at recompile, quit
Server.quitAll;
HIDDeviceService.releaseDeviceList;
super.shutdown;
}
run { // called by command-R
}
stop { // called by command-.
SystemClock.clear;
AppClock.clear;
TempoClock.default.clear;
CmdPeriod.clear;
Server.freeAll; // stop all sounds on local servers
Server.resumeThreads;
}
recvOSCmessage { arg time, replyAddr, msg;
// this method is called when an OSC message is received.
OSCresponder.respond(time, replyAddr, msg);
}
recvOSCbundle { arg time, replyAddr ... msgs;
// this method is called when an OSC bundle is received.
msgs.do({ arg msg;
this.recvOSCmessage(time, replyAddr, msg);
});
}
newSCWindow {
SCWindow.viewPalette;
SCWindow.new.front;
}
argv {
^argv ?? { argv = this.prArgv }
}
// PRIVATE
prArgv {
_Argv
^[ ]
}
}
cheers
-martin
Den 16/05/2006 kl. 3.34 skrev Fredrik Olofsson:
hi Martin,
afraid not much help but i managed to install sclang on a
windowless xserver cluster so it should be possible. same emacs
version as you and i can't remember seeing that error.
did you follow this thread earlier?
http://www.create.ucsb.edu/pipermail/sc-users/2005-August/019964.html
http://www.create.ucsb.edu/pipermail/sc-users/2006-January/022994.html
http://www.create.ucsb.edu/pipermail/sc-users/2006-January/023013.html
has perhaps some hints buried.
_f0
On 15.05.2006, at 20:05, Martin Vognsen wrote:
Den 13/05/2006 kl. 17.39 skrev Martin Vognsen:
Hmm... I wonder why this isn't working for me. Scel works fine in
a terminal under Aqua. But in console I get this:
compile done
INIT_Processeses(), could not establish the default connection to
the WindowServer.Emacs: Initializing lisp interface.
Class tree inited in 0.09 seconds
booting internal
Using vector unit: yes
***SCLang abort trap***
Anybody got a clue? Is there a crude hack I can do to the scel
externals?
Oops, just noticed: What I actually meant was the scel
_extensions_. I was thinking of external method files, not
externals as in plugins. To be honest I'm not too familiar with
the way the class library works, but I think the scel extensions
library overwrites (almost?) everything gui related in the
standard sc libraries, am I right? But I'm not so sure that's
where the problem is. What I noticed is that Emacs.sc posts the
line "Emacs: Initializing lisp interface." But I don't know if
that is even related to the problem. If it worked for Tom, maybe
the problem is not in the class libraries at all...?? I get
"compile done", so... so far so good... Is there a way to bypass
the request for the WindowServer, that seems to cause problems? I
can't spot where that happens.
If I do sudo emacs -sclang, I get a blue screen after lib compile.
So (obviously) the problem is not that I can't connect to the
WindowServer, the problem is that something is trying to connect
to it at all.
Any pointers would be a great help.
#|
fredrikolofsson.com klippav.org musicalfieldsforever.com
|#
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-users