Re: macro for instrument changes

2008-01-03 Thread Valentin Villenave
2007/12/29, Wilbert Berendsen [EMAIL PROTECTED]:

 I wrote this, which works well in 2.11.36:

Thanks, added as http://lsr.dsi.unimi.it/LSR/Item?u=1id=349

2007/12/30, Kieren MacMillan [EMAIL PROTECTED]:

 What I *meant* was, I'm pretty sure this is already done!
 I was just asking Han-Wen to confirm.

Sorry, I should have understood it this way :)

Cheers,
Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-30 Thread Kieren MacMillan

Hi Valentin (etc.) --


I understand Han-Wen is quite busy right now; maybe the simplest way
to do this would be to add such a macro to the LSR, without
necessarily including it in the standard LilyPond distribution.


What I *meant* was, I'm pretty sure this is already done!
I was just asking Han-Wen to confirm.
=)

Happy Holidays,
Kieren.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-29 Thread Wilbert Berendsen
Op vrijdag 28 december 2007, schreef Valentin Villenave:
 So, who's up for writing a snippet? :)

I wrote this, which works well in 2.11.36:

changeInstrument =
#(define-music-function (parser location string) (string?)
(make-music
'TextScriptEvent
'direction UP
'text (markup #:bold (#:box string

inst = #changeInstrument % a more convenient name

{ c \inst Horn d e f }

Write \inst Name (or \changeInstrument Name) before the note the markup 
should be attached to.

Of course you could also do:
englishHorn = \markup \box \bold English Horn
etc.


Met vriendelijke groet,
Wilbert Berendsen

-- 
http://www.wilbertberendsen.nl/
You must be the change you wish to see in the world.
-- Mahatma Gandi


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-29 Thread Stefan Thomas
Dear Wilbert,
many thanks!
It works also on version 2.11.34!
Wilbert Berendsen schrieb am 29.12.2007:

 wrote this, which works well in 2.11.36:

changeInstrument =
#(define-music-function (parser location string) (string?)
   (make-music
   'TextScriptEvent
   'direction UP
   'text (markup #:bold (#:box string

inst = #changeInstrument % a more convenient name

{ c \inst Horn d e f }

Write \inst Name (or \changeInstrument Name) before the note the
markup 
should be attached to.

Of course you could also do:
englishHorn = \markup \box \bold English Horn
etc.




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-28 Thread Valentin Villenave
2007/12/27, Kieren MacMillan [EMAIL PROTECTED]:

 Some time ago, I sponsored an improvement to InstrumentName (etc.);
 Han-Wen was going to have just such a macro pre-defined;
 I never confirmed what the outcome was -- HW?

Hi Kieren, Nicolas and everybody;

I understand Han-Wen is quite busy right now; maybe the simplest way
to do this would be to add such a macro to the LSR, without
necessarily including it in the standard LilyPond distribution.

There are already a huge number of very useful things in the LSR,
which haven't been officially implemented yet (e.g. the TimeSig
context, which I use everyday...).

So, who's up for writing a snippet? :)

Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-27 Thread Nicolas Sceaux


Le 27 déc. 07 à 17:13, Nicolas Sceaux a écrit :



Le 27 déc. 07 à 16:40, Stefan Thomas a écrit :


Dear Lilypond-users,
I am sure there is an easy way to create a macro for the layout of
the two markup-commands in the below quoted example:

\relative c' {
c1^\markup {\bold \box Englischhorn }
c1^\markup {\bold \box Heckelphon } }

I would like to write something like
{ c1\change Englischhorn c1 \change Heckelphon }
How can I do it?


You want to define a new markup command, see:
 http://lilypond.org/doc/v2.11/Documentation/user/lilypond/New-markup-command-definition 



oops, this answer is not complete.
Defining a markup command will make it possible to write eg:

  c1^\markup \change Englischhorn

which may be still too verbose.

Less verbose would be a music command expanding from:
  \changeInstrument Englischhorn c1
to:
   c1 s4*0^\markup \bold \box Englischhorn 

See:
  http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Music-functions 



nicolas



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


macro for instrument changes

2007-12-27 Thread Stefan Thomas
Dear Lilypond-users,
I am sure there is an easy way to create a macro for the layout of
the two markup-commands in the below quoted example:

\relative c' {
c1^\markup {\bold \box Englischhorn }
c1^\markup {\bold \box Heckelphon } }

I would like to write something like
{ c1\change Englischhorn c1 \change Heckelphon }
How can I do it?
Thanks for Your support.
Stefan



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-27 Thread Eyolf Østrem
On 27.12.2007 (16:40), Stefan Thomas wrote:
 Dear Lilypond-users,
 I am sure there is an easy way to create a macro for the layout of
 the two markup-commands in the below quoted example:
 
 \relative c' {
 c1^\markup {\bold \box Englischhorn }
 c1^\markup {\bold \box Heckelphon } }
 
 I would like to write something like
 { c1\change Englischhorn c1 \change Heckelphon }
 How can I do it?
 Thanks for Your support.
 Stefan

Something like this?

EH = \markup {\bold \box Englischhorn }
HP = \markup {\bold \box Heckelphon }

\relative c' {
c1^\EH c1^\HP 
}

-- 
What do Holy Accidents teach?  Be resilient.  Be strong.
Be ready for change, for the new.  Gather many experiences
and judge them by the steadfast nature of our faith.

  -- Tleilaxu Doctrine


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-27 Thread Nicolas Sceaux


Le 27 déc. 07 à 16:40, Stefan Thomas a écrit :


Dear Lilypond-users,
I am sure there is an easy way to create a macro for the layout of
the two markup-commands in the below quoted example:

\relative c' {
c1^\markup {\bold \box Englischhorn }
c1^\markup {\bold \box Heckelphon } }

I would like to write something like
{ c1\change Englischhorn c1 \change Heckelphon }
How can I do it?


You want to define a new markup command, see:
  http://lilypond.org/doc/v2.11/Documentation/user/lilypond/New-markup-command-definition 



nicolas

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: macro for instrument changes

2007-12-27 Thread Kieren MacMillan

Hi all,


Less verbose would be a music command expanding from:
  \changeInstrument Englischhorn c1
to:
   c1 s4*0^\markup \bold \box Englischhorn 

See:
  http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Music- 
functions


Some time ago, I sponsored an improvement to InstrumentName (etc.);
Han-Wen was going to have just such a macro pre-defined;
I never confirmed what the outcome was -- HW?

Cheers,
HKieren.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user