[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
function that inserts a toplevel expression
From: |
Urs Liska |
Subject: |
function that inserts a toplevel expression |
Date: |
Thu, 10 May 2012 11:53:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
Hi list,
I'm sorry that I once more have a basic Scheme question.
[
Any suggestion for a reading to find my way into Scheme?
I think I have some programming experience (although without any formal
IT tuition), mainly from object pascal, but also a little bit with other
languages.
But when it comes to Scheme I'm absolutely lost. I don't seem to be able
to find out even such things as to pass a color to a function ... All
these brackets and ticks and #s are so confusing, that it also isn't
possible getting somewhere through trial and error.
I have read much of LilyPond's Scheme introduction, but it doesn't seem
to help me much. So maybe I'd rather read something elsewhere and come
back trying to get that together with LilyPond when I'm a little bit
familiar with Scheme.
]
So now the question:
How can I write a function that produces a toplevel expression?
I want to be able to write:
\debugCurvesOn
or
#(debug-curves-on)
(or something similar) which should then expand to
\layout {
\context {
\Score
\override Slur #'stencil = #(display-control-points)
\override PhrasingSlur #'stencil = #(display-control-points)
\override Tie #'stencil = #(display-control-points)
}
}
(you see where this is going? ;-) )
So far I have realized this with an include file.
This works without problems, but calling a function seems
- more elegant and
- you don't need to remember the path (the function would be included
through the general library anyway)
Furthermore I will later want to write functions for the \score block,
and I will want to pass some parameters in there - which doesn't work
with include files.
Any help is appreciated
Best
Urs
- function that inserts a toplevel expression,
Urs Liska <=
- Re: function that inserts a toplevel expression, David Kastrup, 2012/05/10
- Re: function that inserts a toplevel expression, Urs Liska, 2012/05/10
- Re: function that inserts a toplevel expression, David Kastrup, 2012/05/10
- Re: function that inserts a toplevel expression, Jan-Peter Voigt, 2012/05/10
- Re: function that inserts a toplevel expression, Urs Liska, 2012/05/10
- Re: function that inserts a toplevel expression, David Kastrup, 2012/05/10
- Re: function that inserts a toplevel expression, Jan-Peter Voigt, 2012/05/10
- Re: function that inserts a toplevel expression, David Kastrup, 2012/05/10