About csound-x and csound environment

View: New views
9 Messages — Rating Filter:   Alert me  

About csound-x and csound environment

by Dmitriy-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm a bit confused posting about csound-x on this list, but maybe someone
here uses (or tries to) it too and could help me.

Here's the situation:

I have installed:       Debian Sid
                CSound 5.11 from official repos
                Emacs 23.1 from official repos
                CSound-x 2.18 (stef-elisp-2.18)


Here's how i configured csound-x so far:

(add-to-list 'load-path "~/emacs/plugins/stef-elisp/")
(require 'stef-elisp)

;;;;;;;;CSound-x Environment
(setq cscsd-OPCODEDIR64 "/usr/lib/csound/plugins64-5.2/")
(setq cscsd-OPCODEDIR "/usr/lib/csound/plugins64-5.2/")
(setq cscsd-INCDIR "/win/mymusic/csound_includes/")
(setq cscsd-temp-csd-file "/win/mymusic/tmp/tmp.csd")
(setq cscsd-default-csd-directory "/win/mymusic/tmp/")

And when i try to 'process file' (from the CSD menu), i get following error
message:
Error opening plugin directory '~': ??? ?????? ????? ??? ????????


I searched through all files that stef-elisp consists of for that message
(except the question marks part), but i didn't find it.

I searched through various sources of csound documentation and couldn't find
any mention of this error (which i think is csound related, because error is
showed in the Shell buffer).

I suspect that error is somehow related to csound invocation and the way it
is performed in csound-x.


... Any help? Please?



Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: About csound-x and csound environment

by Stéphane Rollandin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I'm a bit confused posting about csound-x on this list, but maybe someone
> here uses (or tries to) it too and could help me.

well I am the developper and as far as I am concerned this is the right
place for general questions about it.

now if the problem happens to be very specific to your
installation/system, then we may proceed via private mails.

> And when i try to 'process file' (from the CSD menu), i get following error
> message:
> Error opening plugin directory '~': ??? ?????? ????? ??? ????????
> 

this is a csound error message, and it seems to say that your plugin
directory is not valid. the following garbage is not related to csound-x
in any way I can fathom.

does (file-exists-p (cscsd-OPCODEDIR)) return t in Emacs ?
does (cscsd-OPCODEDIR) indeed return "/usr/lib/csound/plugins64-5.2/" ?
does (getenv "OPCODEDIR") also return "/usr/lib/csound/plugins64-5.2/" ?


best,

Stef





Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: About csound-x and csound environment

by Stéphane Rollandin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Here's how i configured csound-x so far:
>
> (add-to-list 'load-path "~/emacs/plugins/stef-elisp/")
> (require 'stef-elisp)
>
> ;;;;;;;;CSound-x Environment
> (setq cscsd-OPCODEDIR64 "/usr/lib/csound/plugins64-5.2/")
> (setq cscsd-OPCODEDIR "/usr/lib/csound/plugins64-5.2/")
> (setq cscsd-INCDIR "/win/mymusic/csound_includes/")
> (setq cscsd-temp-csd-file "/win/mymusic/tmp/tmp.csd")
> (setq cscsd-default-csd-directory "/win/mymusic/tmp/")

the environment variables (cscsd-OPCODEDIR, cscsd-SFDIR, etc..) need to
be set via the customization tool in Emacs. this may be related to your
problem.

try by simply keeping these lines in your .emacs

  (add-to-list 'load-path "~/emacs/plugins/stef-elisp/")
  (require 'stef-elisp)

then start Emacs, do M-x customize-group csound-x-applications-paths and
record your settings there (don't forget to save the changes for all
sessions)

the reason for this (you can ignore the following, it's just for
information) is that these variables have to be synchronized with the
actual environment variables of the Emacs process. the custom system
takes care of that: when you change the Emacs variable, the
corresponding environment variable is changed accordingly (to say it
differently, csound-x controls the Emacs process environment for all
csound-related stuff). if you set the variables directly with setq then
the synchronization is not enforced and this may lead to the kind of
problem you have (depending on the global values of the actual
environment variables when Emacs starts)

hope this helps,

Stef




Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: About csound-x and csound environment

by Dmitriy-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stéphane Rollandin wrote:

>> I'm a bit confused posting about csound-x on this list, but maybe someone
>> here uses (or tries to) it too and could help me.
>
> well I am the developper and as far as I am concerned this is the right
> place for general questions about it.
>
> now if the problem happens to be very specific to your
> installation/system, then we may proceed via private mails.
>
>> And when i try to 'process file' (from the CSD menu), i get following
>> error message:
>> Error opening plugin directory '~': ??? ?????? ????? ??? ????????
>> 
>
> this is a csound error message, and it seems to say that your plugin
> directory is not valid. the following garbage is not related to csound-x
> in any way I can fathom.

You're right. More than that, it's related to my /dev/hands/ and /dev/brain
(as i recently discovered). I just didn't want that "custom" mess in my
.emacs, so i decided to split it to a number of files, each of which would
include settings for a particular package (stef-elisp in this case).
However, i encountered some unusual (to me) behavior of Emacs (i'm just a
newbie in Emacs, Elisp, Csound and everything else you could probably
imagine ))), concerning environment variables managing. My code for setting
csound-x environment was at least incorrect i suppose (but for now i didn't
figured out which is the correct one). Now if i use "custom" to set
environment of csound-x, everything works fine (but i have a little mess in
.emacs thanks to "custom" code).
>

So, if i use (setq ....) to set environment, then
 does (file-exists-p (cscsd-OPCODEDIR)) return t in Emacs ? yes
 does (cscsd-OPCODEDIR) indeed return "/usr/lib/csound/plugins64-5.2/" ? yes
 does (getenv "OPCODEDIR") also return "/usr/lib/csound/plugins64-5.2/" ? no
(it's '~')

But i think there is a way to set things correct without using "custom",
which i will try to discover meanwhile.

PS. That way is not in using (setenv ...) which i tried and it won't work as
expected.


 

> best,
>
> Stef
>
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body "unsubscribe
> csound"




Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: Re: About csound-x and csound environment

by Felipe Sateler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 2009-11-09 at 01:00 +0400, Dmitriy wrote:

> Stéphane Rollandin wrote:
>
> >> I'm a bit confused posting about csound-x on this list, but maybe someone
> >> here uses (or tries to) it too and could help me.
> >
> > well I am the developper and as far as I am concerned this is the right
> > place for general questions about it.
> >
> > now if the problem happens to be very specific to your
> > installation/system, then we may proceed via private mails.
> >
> >> And when i try to 'process file' (from the CSD menu), i get following
> >> error message:
> >> Error opening plugin directory '~': ??? ?????? ????? ??? ????????
> >> 
> >
> > this is a csound error message, and it seems to say that your plugin
> > directory is not valid. the following garbage is not related to csound-x
> > in any way I can fathom.
>
> You're right. More than that, it's related to my /dev/hands/ and /dev/brain
> (as i recently discovered). I just didn't want that "custom" mess in my
> .emacs, so i decided to split it to a number of files, each of which would
> include settings for a particular package (stef-elisp in this case).
> However, i encountered some unusual (to me) behavior of Emacs (i'm just a
> newbie in Emacs, Elisp, Csound and everything else you could probably
> imagine ))), concerning environment variables managing. My code for setting
> csound-x environment was at least incorrect i suppose (but for now i didn't
> figured out which is the correct one). Now if i use "custom" to set
> environment of csound-x, everything works fine (but i have a little mess in
> .emacs thanks to "custom" code).
> >
>
> So, if i use (setq ....) to set environment, then
>  does (file-exists-p (cscsd-OPCODEDIR)) return t in Emacs ? yes
>  does (cscsd-OPCODEDIR) indeed return "/usr/lib/csound/plugins64-5.2/" ? yes
>  does (getenv "OPCODEDIR") also return "/usr/lib/csound/plugins64-5.2/" ? no
> (it's '~')
>
> But i think there is a way to set things correct without using "custom",
> which i will try to discover meanwhile.
>
> PS. That way is not in using (setenv ...) which i tried and it won't work as
> expected.
Note that there is probably some mangling involved that shouldn't really
be there. Debian csound does not need OPCODEDIR64 to be set to work (it
defaults to the location of the Debian provided plugins).


--
Saludos,
Felipe Sateler


signature.asc (853 bytes) Download Attachment

Re: Re: About csound-x and csound environment

by Dmitriy-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Note that there is probably some mangling involved that shouldn't really
> be there. Debian csound does not need OPCODEDIR64 to be set to work (it
> defaults to the location of the Debian provided plugins).

Yeah, i already encountered that bit of confusion when i searched for
correct OPCODEDIR (that's plugins64-5.2). It seems that on Debian we have a
mix of precision and efficiency if we install csound from repos ))). AFAIK
there's a 32bit csound with 64bit libs.

But that's not an obstacle.. i've got both OPCODEDIR and OPCODEDIR64 set,
and everything works fine.



Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: About csound-x and csound environment

by Dmitriy-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> hope this helps,

It sure is. Discovering how it all works by myself would cost me some time.

Thanks for participation in (actually) my problems.



Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: Re: Re: About csound-x and csound environment

by Stéphane Rollandin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>
>> But i think there is a way to set things correct without using "custom",
>> which i will try to discover meanwhile.

have a look at the code around line 90 in csound-csd.el
that's where the environment variable handling via custom is
implemented. beware of the big macros :) cscsd-defenv does most of the job.

this thing is rather complex, also because csound-x is a component of a
larger system, called Surmulot, where csound is packaged as another
component. in Surmulot, the user can swap on-the-fly from the packaged
csound to its own system-wide csound, if any. so csound-x provides all
the logic needed to reconfigure the whole environment of the Emacs
process dynamically.

if you're brave enough to go and dig in the code, then good luck !

best,

Stef




Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"

Re: Re: Re: About csound-x and csound environment

by Dmitriy-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stéphane Rollandin wrote:

>>>
>>> But i think there is a way to set things correct without using "custom",
>>> which i will try to discover meanwhile.
>
> have a look at the code around line 90 in csound-csd.el
> that's where the environment variable handling via custom is
> implemented. beware of the big macros :) cscsd-defenv does most of the
> job.

It already attracted my attention, but i haven't tried it yet. I'll follow
your advice then and dig it.

> this thing is rather complex, also because csound-x is a component of a
> larger system, called Surmulot, where csound is packaged as another
> component. in Surmulot, the user can swap on-the-fly from the packaged
> csound to its own system-wide csound, if any. so csound-x provides all
> the logic needed to reconfigure the whole environment of the Emacs
> process dynamically.
>
> if you're brave enough to go and dig in the code, then good luck !

Well, elisp seems to be pretty straight forward to me (on my stage of
noobism :). At least it is definitely achieveable.
 

> best,
>
> Stef
>
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@... with body "unsubscribe
> csound"




Send bugs reports to this list.
To unsubscribe, send email sympa@... with body "unsubscribe csound"