[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invisible notes, Scheme contexts
From: |
Don Blaheta |
Subject: |
Re: Invisible notes, Scheme contexts |
Date: |
Tue, 13 Dec 2005 03:55:05 -0600 |
User-agent: |
Mutt/1.2.5.1i |
Quoth Han-Wen Nienhuys:
> Don Blaheta wrote:
> > 2) Is there a Scheme function to retrieve the _current_ context? It
> > looks like all the functions require a context as an argument.
>
> What do you mean by "current" ? Where do you need it ?
The context that is enclosing the point where the Scheme function is
called. I guess it's probably in the location variable that is the
second argument to a music-function, but I'm not sure how to access it
from there.
I'm actually particularly interested in getting the id of the current
context, so I can store it in a variable and use the value of that
variable later. I've also been having trouble typing in such an id
literally; if I define a music function like
foo = #(def-music-function (parser location str) (string?)
#{ \context Voice = $str { \override NoteHead #'font-size = #3 }
#})
and then include in my code
\foo "blah"
I get an error
funcs.ly:26:14: error: syntax error, unexpected STRING, expecting SCM_T or
SCM_IDENTIFIER
\foo "blah
"
error: errors found, ignoring music expression
I can't figure out how to convert between Scheme strings and the
lilypond-native things that look like strings but seem to be something
else (often a LYRICS_STRING, though not in this case).
(Again, all on 2.6.4 on MacOS.)
--
-=-Don address@hidden<http://www.blahedo.org/>-=-
The streets are safe in Philadelphia. It's only the people who make them
unsafe. --Frank Rizzo, ex-police chief and mayor of Philadelphia
- Invisible notes, Scheme contexts, Don Blaheta, 2005/12/13
- Re: Invisible notes, Scheme contexts, Han-Wen Nienhuys, 2005/12/13
- Re: Invisible notes, Scheme contexts,
Don Blaheta <=
- Re: Invisible notes, Scheme contexts, Erik Sandberg, 2005/12/13
- Re: Invisible notes, Scheme contexts, Han-Wen Nienhuys, 2005/12/13
- Re: Invisible notes, Scheme contexts, Nicolas Sceaux, 2005/12/13
- Re: Invisible notes, Scheme contexts, Erik Sandberg, 2005/12/14
- Re: Invisible notes, Scheme contexts, Trevor Bača, 2005/12/14
- Music function arguments, Han-Wen Nienhuys, 2005/12/14
- Re: Music function arguments, Trevor Bača, 2005/12/14
- Re: Invisible notes, Scheme contexts, Henrik Frisk, 2005/12/15