Csound Csound-dev Csound-tekno Search About

[Csnd] Csound-x syntax highlight ?

Date2014-09-12 15:54
FromAskwazzup
Subject[Csnd] Csound-x syntax highlight ?
Hello friends.

I have installed csound-x "plug-in" for emacs (which i started to learn
yesterday)  and it seems to load without errors, it also lists the csound
modes. What i'm wondering now, is there syntax highlighting for emacs in
shell mode (as i don't have a front end installed and running on the shell),
because i can't seem to find anything about it in the documentation and i
have no colors present (i also have no idea what i'm doing and what this
plugin is capable of, as i'm still very new to emacs and csound-x). 



--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-09-14 14:17
Fromadam
SubjectRe: [Csnd] Csound-x syntax highlight ?
Is this Csound-X from Stef's excellent work at
http://www.zogotounga.net/surmulot/surmulot.html  ? 

Perhaps you could ask him. 

But I doubt syntax highlighting is relevant in shell mode, perhaps 
only for the orchestra and score editing. 

Quietly it baffles me why Emacs, csound-X and the Lisp-based
environments are not more prominent as Csound frontends. They're
fantastic, and Stef's contribution has been tremendous. 

His Surmulot and Csound under Emacs worked 'out of the box' for me.
This was Csound from ELisp. (Although I got quite lost in Smalltalk for
a while).







On Fri, 2014-09-12 at 07:54 -0700, Askwazzup wrote:
> Hello friends.
> 
> I have installed csound-x "plug-in" for emacs (which i started to learn
> yesterday)  and it seems to load without errors, it also lists the csound
> modes. What i'm wondering now, is there syntax highlighting for emacs in
> shell mode (as i don't have a front end installed and running on the shell),
> because i can't seem to find anything about it in the documentation and i
> have no colors present (i also have no idea what i'm doing and what this
> plugin is capable of, as i'm still very new to emacs and csound-x). 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
> 



Date2014-09-14 14:40
FromAskwazzup
Subject[Csnd] Re: Csound-x syntax highlight ?
Adam wrote
> Is this Csound-X from Stef's excellent work at
> http://www.zogotounga.net/surmulot/surmulot.html  ? 
> 
> Perhaps you could ask him. 

Funny thing is, i was actually writing him an email, the same time you were
writing this post :)


Adam wrote
> But I doubt syntax highlighting is relevant in shell mode, perhaps 
> only for the orchestra and score editing. 

Well, that's the main thing for me - colours - , o love them, from black to
yellow he, he.


Adam wrote
> Quietly it baffles me why Emacs, csound-X and the Lisp-based
> environments are not more prominent as Csound frontends. They're
> fantastic, and Stef's contribution has been tremendous. 
> 
> His Surmulot and Csound under Emacs worked 'out of the box' for me.
> This was Csound from ELisp. (Although I got quite lost in Smalltalk for
> a while).

Some of the functions i tried seem to work correctly, however there is no
syntax highlighting and i'm not sure that all others work as intended, but
this seems like a wonderful interface for csound.





--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737503.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-09-15 18:52
Fromforrest curo
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
I've now tried this; and it looks good. However, I am not at all emacs-savvy

and I can't get actual sound out to 'dac:hw:0,0' whether running csd files directly or via the python->csound api examples.

[From terminal command-line, no problem with either!]

Emacs complains about a missing 'plugin directory' when it runs csd files directly, likewise says:
 unknown rtaudio module: 'alsa', using dummy module
rtaudio: dummy module enabled


On Sun, Sep 14, 2014 at 6:40 AM, Askwazzup <askwazzup@gmail.com> wrote:
Adam wrote
> Is this Csound-X from Stef's excellent work at
> http://www.zogotounga.net/surmulot/surmulot.html  ?
>
> Perhaps you could ask him.

Funny thing is, i was actually writing him an email, the same time you were
writing this post :)


Adam wrote
> But I doubt syntax highlighting is relevant in shell mode, perhaps
> only for the orchestra and score editing.

Well, that's the main thing for me - colours - , o love them, from black to
yellow he, he.


Adam wrote
> Quietly it baffles me why Emacs, csound-X and the Lisp-based
> environments are not more prominent as Csound frontends. They're
> fantastic, and Stef's contribution has been tremendous.
>
> His Surmulot and Csound under Emacs worked 'out of the box' for me.
> This was Csound from ELisp. (Although I got quite lost in Smalltalk for
> a while).

Some of the functions i tried seem to work correctly, however there is no
syntax highlighting and i'm not sure that all others work as intended, but
this seems like a wonderful interface for csound.





--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737503.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-09-15 19:04
FromAskwazzup
Subject[Csnd] Re: Csound-x syntax highlight ?
Well, i finally sorted out the syntax highlight stuff, i just reinstalled
everything and it seems to work now - very colorful also!


forrest wrote
> I've now tried this; and it looks good. However, I am not at all
> emacs-savvy
> 
> and I can't get actual sound out to 'dac:hw:0,0' whether running csd files
> directly or via the python->csound api examples.
> 
> [From terminal command-line, no problem with either!]
> 
> Emacs complains about a missing 'plugin directory' when it runs csd files
> directly, likewise says:
>  unknown rtaudio module: 'alsa', using dummy module
> rtaudio: dummy module enabled

I have the same problem too, and the same output. Wrote about it to the
Stefan, maybe he will be able to tell more about it.

I have the same pr




--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737517.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-09-16 00:51
Fromhlolli
Subject[Csnd] Re: Csound-x syntax highlight ?
 

I have this highlighting issue with csound-x as seen on this photo (if it
uploaded correctly otherwise its also here
http://postimg.org/image/cs8a3sv3x/ ).

If someone knows where to configure the coloring issue so text always has
transparent, or in my case black background.

And if you guys know how to compile .csd files in emacs without exiting it,
would be nice to know how, even better if it's possible to evaluate
section/selection (live code).





--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737522.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-09-16 03:04
Fromforrest curo
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
csoundx (on my system) is doing a perfectly fine job of compiling .csd files; if all I wanted was to send audio to a file I'd be done.

Stefan has been helpful as to how to configure csoundx so as to point to dac:

"In variable 'cscsd-process-file, "csound dac" is by default associated to the command line "$csound -dodac $dacoptions %s &", where csound-x will take care to replace $csound with the Csound binary as defined in variable 'cscsd-csound-binary, and $dacoptions with the value of variable 'cscsd-odac-settings, the %s being replaced with the
csd file name.

"So you may either change that association altogether in 'cscsd-process-file, or write the proper command-line flags in 'cscsd-odac-settings (which by default is empty). Both are customizable variable in Emacs."
------
I found cscsd-process-file in a nest of lisp functions in the csoundx directory; but I don't think I can safely tinker with it, not without far more acquaintance with lisp and/or emacs itself.

Help?

On Mon, Sep 15, 2014 at 4:51 PM, hlolli <hlolli@gmail.com> wrote:
<http://csound.1045644.n5.nabble.com/file/n5737522/snapemacs.png>

I have this highlighting issue with csound-x as seen on this photo (if it
uploaded correctly otherwise its also here
http://postimg.org/image/cs8a3sv3x/ ).

If someone knows where to configure the coloring issue so text always has
transparent, or in my case black background.

And if you guys know how to compile .csd files in emacs without exiting it,
would be nice to know how, even better if it's possible to evaluate
section/selection (live code).





--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737522.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-09-16 06:11
FromAskwazzup
Subject[Csnd] Re: Csound-x syntax highlight ?
hlolli wrote
> If someone knows where to configure the coloring issue so text always has
> transparent, or in my case black background.

press: alt+x
enter: customize-face
enter: csound, or cs and press tab, so it will give you avaivable options
for customizations
pick one and press enter (example: csound-avar-face "press enter")
tinker with the options and when you like what you see, press "apply-save"

As for audio output, i have found it in:
press: alt+x
enter: customize-options
enter: csound, or cs and press tab, so it will give you avaivable options
for customizations
pick csound-file-process

However i haven't tried to tinker with it yet, from the looks of it, will
try now.








--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737524.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-09-16 09:24
FromStéphane Rollandin
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
> 
>
> I have this highlighting issue with csound-x as seen on this photo (if it
> uploaded correctly otherwise its also here
> http://postimg.org/image/cs8a3sv3x/ ).

I don't exactly see what the issue is. If it is the background color, 
you can change it on a buffer basis by doing

	M-x set-background-color
	white

or permanently by writing in your .emacs file

	(add-to-list 'default-frame-alist '(background-color . "white"))


Stef

Date2014-09-16 09:27
FromStéphane Rollandin
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
> enter: customize-options

That would be customize-group, I believe, or customize-option for a 
single variable.

Stef


Date2014-09-16 12:36
Fromthorin kerr
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
It's a bit of a kluge, but I livecode with Cound-x using pymacs as a bridge to the python API for Csound. Happy to share lisp if wanted, although... I'm sure (I know) there are better ways to do this.

Thorin









On Tue, Sep 16, 2014 at 9:51 AM, hlolli <hlolli@gmail.com> wrote:

And if you guys know how to compile .csd files in emacs without exiting it,
would be nice to know how, even better if it's possible to evaluate
section/selection (live code).





--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737522.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-09-16 12:37
FromAskwazzup
Subject[Csnd] Re: Csound-x syntax highlight ?
forrest wrote
> I've now tried this; and it looks good. However, I am not at all
> emacs-savvy
> 
> and I can't get actual sound out to 'dac:hw:0,0' whether running csd files
> directly or via the python->csound api examples.
> 
> [From terminal command-line, no problem with either!]
> 
> Emacs complains about a missing 'plugin directory' when it runs csd files
> directly, likewise says:
>  unknown rtaudio module: 'alsa', using dummy module
> rtaudio: dummy module enabled

I managed to get real time sound working in csound-x (with the help of
Stephane). Maybe you have the same problem, so i will write what i did:

enter: alt+x
enter: customize-option
enter: cscsd-OPCODE6DIR (or OPCODE6DIR64)
In the "cscsd Opcodedir" field write the path to your csound plugins
libraries. Mine was:
/usr/loca/lib/csound/plugins-6.0/
press: apply and save
try it out with: alt-x  cscsd-process

I suspect that my problem might have stemed from the fact that i compiled
csound on arch linux, where the ldcnfig command doesn't work on csound for
some reason, so i had to, with the help of Victor L, configure my .bashrc
file to manually export csound libraries. Don't know if this is the main
culprit behind csound-x cscsd-process command not working from the get go,
but the above method worked for me..  
 








--
View this message in context: http://csound.1045644.n5.nabble.com/Csound-x-syntax-highlight-tp5737467p5737528.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-09-16 12:47
FromStéphane Rollandin
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
> It's a bit of a kluge, but I livecode with Cound-x using pymacs
>  as a bridge to the python API for
> Csound. Happy to share lisp if wanted, although... I'm sure (I know)
> there are better ways to do this.
>
> Thorin

I'm definitely interested in your code.

Stef


Date2014-09-16 14:37
Fromthorin kerr
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
AttachmentsCs6pymacs-edit.el  
Sure, see attached.

As well as pymacs, it uses one other package. A small one called flash-region

So, once you get actually get pymacs installed properly, you just need to load up this bit of elisp. This starts up Csound with an empty orc and provides a few functions: csoundEvalInstrument, csoundEvalScoreline and csoundEvalRegion are the main ones. A couple of handy navigation ones as well like csoundNextInstrument and csoundPreviousInstrument. Oh, and csoundStopPerformance, which ought to be called when you're finished 'performing'. 

I load this up on the csound-orc-mode-hook, and bind keys to all of them. 
Just start typing up instruments in csound-x, and evaluate them. 

I say there must be better ways to do this because - apart from the layers of sticky-tape holding it together (emacs-pymacs-python-C), I understand that pymacs actually blocks emacs and waits for Csound to send back a return value. Most of the time it's fast enough not to notice... except just sometimes.... a noticeable pause does happen, and that's a bit annoying live. Maybe using an emacs FFI, or have emacs send UDP messages to a Csound server would be better?


Thorin





On Tue, Sep 16, 2014 at 9:47 PM, Stéphane Rollandin <lecteur@zogotounga.net> wrote:
It's a bit of a kluge, but I livecode with Cound-x using pymacs
<https://github.com/pinard/Pymacs> as a bridge to the python API for
Csound. Happy to share lisp if wanted, although... I'm sure (I know)
there are better ways to do this.

Thorin

I'm definitely interested in your code.

Stef




Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





Date2014-09-16 16:37
FromStéphane Rollandin
SubjectRe: [Csnd] Re: Csound-x syntax highlight ?
Thanks !

Stef