Re: voiceOne and oneVoice

2021-10-01 Thread Leo Correia de Verdier
While this is certainly useful, one should be aware of what is happening. With 
the syntax 

soprano.1 = c’4

you are not defining a variable soprano.1 as c’4, you are defining the value 
corresponding to key 1 in an alist that is the value of variable soprano. This 
can be very powerful, useful and stylish, but also cause problems if you’re 
unaware of it, for instance: If you uncomment the fourth line in the following 
example it will stop working, since you overwrite the whole variable soprano 
containing the alist instead of creating a new variable with a shorter name. 

\version "2.22.1"
soprano.1 = e'4
soprano.2 = c'4
%soprano = d'4
\score { <<
  \soprano.1
  \soprano.2 >> }

There is more about alists in the documentation, and they’re used in very many 
places in lilypond. You can see them in the common structure Thing.property = 
value , for instance in overrides. 

Best
/Leo

> 30 sep. 2021 kl. 09:37 skrev Silvain Dupertuis :
> 
> Hi everyone,
> 
> One problem with this suggestion that Lilypond does not support the simple 
> use of digits in variable names.
> As far as I understand, it is because a digit following directly alphabetic 
> characters is interpreted as a duration.
> 
> I took me a long time to discover that there is a way out 
> (and I suggest these feature should be more accessible in the documentation!)
> 
> One can use numbered variables using a full-stop mark like these examples
> -- soprano.1, soprano.2 ... 
> -- mel.354, mel.521 -- using the song number in a songbook
> May-be other separation marks would work too. 
> One can also use quote marks for more sophisticated names, but it is more 
> complicated and rather inelegant...
> 
> Silvain
> 
> Le 30.09.21 à 07:52, Valentin Petzel a écrit :
>Hi David,
>> 
>> I'd say singleVoice would even be clearer.
>> But I think maybe it would also be a good idea if we had a synax like \voice 
>> number. Currently Lilypond only supports four voices, and any more requires 
>> knowledge about the scheme interface, but \voice1 \voice2, ... could 
>> directly support an arbitrary amount of voices.
>> 
>> Cheers,
>> Valentin
>> 
>> 30.09.2021 00:50:41 David Kastrup   
>> <mailto:d...@gnu.org>:
>> 
>>> Lukas-Fabian Moser  <mailto:l...@gmx.de> writes:
>>> 
>>>> Hi Kira,
>>>> 
>>>> Am 30.09.21 um 00:32 schrieb Kira Garvie:
>>>>> I realize this is a pretty basic question... but what is the
>>>>> difference between voiceOne and oneVoice? I am writing a multivoice
>>>>> keyboard-style hymn (as opposed to SATB chorale style) and the
>>>>> directions say to switch between oneVoice and voiceOne as needed for
>>>>> stem direction...
>>>>> "(d) Add voiceOne and oneVoice tags throughout to indicate stem
>>>>> direction. If
>>>>> there is no separately stemmed second part at the first note,
>>>>> oneVoice is assumed."
>>>>> Do I need to give an example?
>>>> \voiceOne sets the layout for the current voice as if it is the first
>>>> of several simultaneous voices.
>>>> \oneVoice sets the layout for the current voice as if it is an only voice.
>>> It would probably be clearer if we had
>>> 
>>> \firstVoice and \soleVoice instead of \voiceOne and \oneVoice, respectively.
>>> 
>>> --
>>> David Kastrup
> 
> Visa citerat innehåll
>> Hi David,
>> 
>> I'd say singleVoice would even be clearer.
>> But I think maybe it would also be a good idea if we had a synax like \voice 
>> number. Currently Lilypond only supports four voices, and any more requires 
>> knowledge about the scheme interface, but \voice1 \voice2, ... could 
>> directly support an arbitrary amount of voices.
>> 
>> Cheers,
>> Valentin
>> 
>> 30.09.2021 00:50:41 David Kastrup  <mailto:d...@gnu.org>:
>> 
>>> Lukas-Fabian Moser  <mailto:l...@gmx.de> writes:
>>> 
>>>> Hi Kira,
>>>> 
>>>> Am 30.09.21 um 00:32 schrieb Kira Garvie:
>>>>> I realize this is a pretty basic question... but what is the
>>>>> difference between voiceOne and oneVoice? I am writing a multivoice
>>>>> keyboard-style hymn (as opposed to SATB chorale style) and the
>>>>> directions say to switch between oneVoice and voiceOne as needed for
>>>>> stem direction...
>>>>> "(d) Add voiceOne and oneVoice tags throughout to indicate stem
>>>>> direction. If
>>>>> there is no separately stemm

Re: voiceOne and oneVoice

2021-09-30 Thread Guy Stalnaker
Just want to follow up on what Lukas-Fabian says here:



If you do in-staff polyphony via

<<

{ \upperMusic } \\ { \lowerMusic }

 >>

then the \\ makes LilyPond silently add a \voiceOne to \upperMusic and a
\voiceTwo to \lowerMusic, making sure that \upperMusic has upward stems,
articulations etc., and \lowerMusic has everything downwards.

Sometimes it is useful to switch back to "normal" one-voice layout even
in a polyphonic enivoronment; that can be done using \oneVoice.



When writing Temporary Polyphonic Context (TPC) in choral music with lyrics
and you need the lyrics to continue *into* the TPC (for example, at a
cadence where sopranos split to two parts and you need stems showing
different voice leading), you use this similar code, but make the voices
explicit and intentionally create a \new Voice. Then the use of \oneVoice
is necessary following the TPC, thus:



<<

{ \VoiceOne \upperMusic }
\new Voice {
{
\VoiceTwo \lowerMusic }
}

 >> \oneVoice



On Wed, Sep 29, 2021, 5:41 PM Lukas-Fabian Moser  wrote:

> Hi Kira,
>
> Am 30.09.21 um 00:32 schrieb Kira Garvie:
> > I realize this is a pretty basic question... but what is the
> > difference between voiceOne and oneVoice? I am writing a multivoice
> > keyboard-style hymn (as opposed to SATB chorale style) and the
> > directions say to switch between oneVoice and voiceOne as needed for
> > stem direction...
> > "(d) Add voiceOne and oneVoice tags throughout to indicate stem
> > direction. If
> > there is no separately stemmed second part at the first note, oneVoice
> > is assumed."
> > Do I need to give an example?
>
> \voiceOne sets the layout for the current voice as if it is the first of
> several simultaneous voices.
> \oneVoice sets the layout for the current voice as if it is an only voice.
>
> If you do in-staff polyphony via
>
> <<
>
> { \upperMusic } \\ { \lowerMusic }
>
>  >>
>
> then the \\ makes LilyPond silently add a \voiceOne to \upperMusic and a
> \voiceTwo to \lowerMusic, making sure that \upperMusic has upward stems,
> articulations etc., and \lowerMusic has everything downwards.
>
> Sometimes it is useful to switch back to "normal" one-voice layout even
> in a polyphonic enivoronment; that can be done using \oneVoice.
>
> A typical application is
>
> \once\oneVoice r8
>
> for a single rest that should be centered mid-staff (often, the other
> voice then has a simultaneous skip: s8). But this construction is not
> needed that often anymore because now there is the Merge_rests_engraver
> that is able to collect simultaneous rests in polyphonic situations and
> merge them to a single ("\oneVoice", so to speak) rest.
>
> As a rule, in writing polyphonic music, it's often useful to use
> \voiceOne, \voiceTwo etc. and \oneVoice, and there a comparatively few
> good situations to use an explicit \stemUp or \stemDown.
>
> Is this clear enough without compilable examples?
>
> Lukas
>
>
>


Re: voiceOne and oneVoice

2021-09-30 Thread Ernie Braganza
That was a very clear and helpful explanation. Thank you.

On Wed, Sep 29, 2021 at 6:42 PM Lukas-Fabian Moser  wrote:

> Hi Kira,
>
> Am 30.09.21 um 00:32 schrieb Kira Garvie:
> > I realize this is a pretty basic question... but what is the
> > difference between voiceOne and oneVoice? I am writing a multivoice
> > keyboard-style hymn (as opposed to SATB chorale style) and the
> > directions say to switch between oneVoice and voiceOne as needed for
> > stem direction...
> > "(d) Add voiceOne and oneVoice tags throughout to indicate stem
> > direction. If
> > there is no separately stemmed second part at the first note, oneVoice
> > is assumed."
> > Do I need to give an example?
>
> \voiceOne sets the layout for the current voice as if it is the first of
> several simultaneous voices.
> \oneVoice sets the layout for the current voice as if it is an only voice.
>
> If you do in-staff polyphony via
>
> <<
>
> { \upperMusic } \\ { \lowerMusic }
>
>  >>
>
> then the \\ makes LilyPond silently add a \voiceOne to \upperMusic and a
> \voiceTwo to \lowerMusic, making sure that \upperMusic has upward stems,
> articulations etc., and \lowerMusic has everything downwards.
>
> Sometimes it is useful to switch back to "normal" one-voice layout even
> in a polyphonic enivoronment; that can be done using \oneVoice.
>
> A typical application is
>
> \once\oneVoice r8
>
> for a single rest that should be centered mid-staff (often, the other
> voice then has a simultaneous skip: s8). But this construction is not
> needed that often anymore because now there is the Merge_rests_engraver
> that is able to collect simultaneous rests in polyphonic situations and
> merge them to a single ("\oneVoice", so to speak) rest.
>
> As a rule, in writing polyphonic music, it's often useful to use
> \voiceOne, \voiceTwo etc. and \oneVoice, and there a comparatively few
> good situations to use an explicit \stemUp or \stemDown.
>
> Is this clear enough without compilable examples?
>
> Lukas
>
>
>


Re: voiceOne and oneVoice

2021-09-30 Thread David Kastrup
Jean Abou Samra  writes:

> Le 30/09/2021 à 10:04, Valentin Petzel a écrit :
>> Hello Silvain,
>>
>> Note that I specified \voice number, so number is not part of the name, but 
>> an
>> argument. But Lilypond does (similar to TeX) interpret \command1 as \command 
>> 1
>> (which is the reason why numbers cannot be part of variable names, also
>> similar to how \commandA\commandB do not need to be separated, as well as
>> \command{ ... } is possible).
>>
>> This is the exact reason why I am suggesting this option: For instead of
>> having a fixed number of commands \voiceOne, \voiceTwo, ... you simply have 
>> to
>> say \voice1 (\voice 1), \voice2 and you can thus easily use an arbitrary
>> number of voices.
>>
>> Cheers,
>> Valentin
>
> There is also the to me annoying concept
> that \voiceTwo is usually the third voice.

It's the second of two or three voices, the second or third of four or
five voices and so on.

\voiceOne, \voiceThree, \voiceFive are the first, second, third from the
top while \voiceTwo, \voiceFour, \voiceSix are the first, second, third
from the bottom.

The problem is numbering them consecutively in the first place rather
than separately from top and bottom.

Which is why

\voices 1,3,4,2 << ... \\ ... \\ ... \\ >>

allows you to defuse what \\ does in the manner you like.

> Perhaps we could make \voice n format the
> n-th voice in the normal order?

We couldn't without knowing the total number of voices.  Even then, at
least with an odd number of voices, the choice of whether to do the
middle voice stem-up or stem-down may well depend on the material in
question.

-- 
David Kastrup



Re: voiceOne and oneVoice

2021-09-30 Thread Valentin Petzel
Hello Jean,

this is something we also find in other notation programs, because the voice 
does not only give the stem direction, but also the offset direction for 
collisions. The idea is basically: While you go from top/bottom to the center 
voices they offset into different directions.

So from a formatting perspective this order makes sense. And the big problem of 
a "natural" order is that the behaviour depends ob what other voices there are, 
so if you have v1 v2 then v2 would mean lowest voice, in v1 v2 v3 v4 this would 
mean the second highest voice.

As you probably can imagine this would be hard to implement and would very 
easily lead to unwantes behaviour.

Cheers, Valentin

30.09.2021 10:41:48 Jean Abou Samra :

> Le 30/09/2021 à 10:04, Valentin Petzel a écrit :
>> Hello Silvain,
>> 
>> Note that I specified \voice number, so number is not part of the name, but 
>> an
>> argument. But Lilypond does (similar to TeX) interpret \command1 as \command 
>> 1
>> (which is the reason why numbers cannot be part of variable names, also
>> similar to how \commandA\commandB do not need to be separated, as well as
>> \command{ ... } is possible).
>> 
>> This is the exact reason why I am suggesting this option: For instead of
>> having a fixed number of commands \voiceOne, \voiceTwo, ... you simply have 
>> to
>> say \voice1 (\voice 1), \voice2 and you can thus easily use an arbitrary
>> number of voices.
>> 
>> Cheers,
>> Valentin
> 
> There is also the to me annoying concept
> that \voiceTwo is usually the third voice.
> 
> Perhaps we could make \voice n format the
> n-th voice in the normal order?
> 
> Jean



Re: voiceOne and oneVoice

2021-09-30 Thread Lukas-Fabian Moser




There is also the to me annoying concept
that \voiceTwo is usually the third voice.

Perhaps we could make \voice n format the
n-th voice in the normal order?


That would mean that in two-part music, \voice 2 is down-stemmed, and in 
three-part music, it is up-stemmed.


In fact, from classical orchestral scores, the ordering 
high-low-high-low has quite an honorable tradition. Doesn't Han-Wen play 
the French Horn? :-)


Lukas




Re: voiceOne and oneVoice

2021-09-30 Thread Jean Abou Samra

Le 30/09/2021 à 10:04, Valentin Petzel a écrit :

Hello Silvain,

Note that I specified \voice number, so number is not part of the name, but an
argument. But Lilypond does (similar to TeX) interpret \command1 as \command 1
(which is the reason why numbers cannot be part of variable names, also
similar to how \commandA\commandB do not need to be separated, as well as
\command{ ... } is possible).

This is the exact reason why I am suggesting this option: For instead of
having a fixed number of commands \voiceOne, \voiceTwo, ... you simply have to
say \voice1 (\voice 1), \voice2 and you can thus easily use an arbitrary
number of voices.

Cheers,
Valentin


There is also the to me annoying concept
that \voiceTwo is usually the third voice.

Perhaps we could make \voice n format the
n-th voice in the normal order?

Jean




Re: voiceOne and oneVoice

2021-09-30 Thread Valentin Petzel
Hello Silvain,

Note that I specified \voice number, so number is not part of the name, but an 
argument. But Lilypond does (similar to TeX) interpret \command1 as \command 1 
(which is the reason why numbers cannot be part of variable names, also 
similar to how \commandA\commandB do not need to be separated, as well as 
\command{ ... } is possible).

This is the exact reason why I am suggesting this option: For instead of 
having a fixed number of commands \voiceOne, \voiceTwo, ... you simply have to 
say \voice1 (\voice 1), \voice2 and you can thus easily use an arbitrary 
number of voices.

Cheers,
Valentin

signature.asc
Description: This is a digitally signed message part.


Re: voiceOne and oneVoice

2021-09-30 Thread Aaron Hill

On 2021-09-30 12:36 am, Silvain Dupertuis wrote:

One problem with this suggestion that Lilypond does not support the
simple use of digits in variable names.
As far as I understand, it is because a digit following directly
alphabetic characters is interpreted as a duration.


I think the idea would be that \voice would be itself a music function:


voice = #(define-music-function (n) (index?)
 (context-spec-music (make-voice-props-set (1- n)) 'Voice))

<< { \voice1 b'4 c'' } \\ { \voice2 g'2 } >>



-- Aaron Hill



Re: voiceOne and oneVoice

2021-09-30 Thread Lukas-Fabian Moser

Hi Silvain,

I'd say singleVoice would even be clearer.
But I think maybe it would also be a good idea if we had a synax like \voice 
number. Currently Lilypond only supports four voices, and any more requires 
knowledge about the scheme interface, but \voice1 \voice2, ... could directly 
support an arbitrary amount of voices.
One problem with this suggestion that Lilypond does not support the 
simple use of digits in variable names.
As far as I understand, it is because a digit following directly 
alphabetic characters is interpreted as a duration.


That's true, but in this case, it's a feature not a bug: If there were a 
music function \voice accepting an integer parameter, then LilyPond 
would parse \voice1 equivalently to \voice 1.


voice =
#(define-music-function (number) (index?)
   #{
 <>^#(format #f "(voice ~a)" number)
   #})

\relative {
  \voice1 c'4 d e f
  \voice3 g f e d
}

Of course this function does not do anything useful yet.

Lukas




Re: voiceOne and oneVoice

2021-09-30 Thread Silvain Dupertuis

Hi everyone,

One problem with this suggestion that Lilypond does not support the simple use of digits 
in variable names.
As far as I understand, it is because a digit following directly alphabetic characters is 
interpreted as a duration.


I took me a long time to discover that there is a way out
(and I suggest these feature should be more accessible in the documentation!)

One can use numbered variables using a full-stop mark like these examples
-- soprano.1, soprano.2 ...
-- mel.354, mel.521 -- using the song number in a songbook
May-be other separation marks would work too.
One can also use quote marks for more sophisticated names, but it is more complicated and 
rather inelegant...


Silvain

Le 30.09.21 à 07:52, Valentin Petzel a écrit :

Hi David,

I'd say singleVoice would even be clearer.
But I think maybe it would also be a good idea if we had a synax like \voice 
number. Currently Lilypond only supports four voices, and any more requires 
knowledge about the scheme interface, but \voice1 \voice2, ... could directly 
support an arbitrary amount of voices.

Cheers,
Valentin

30.09.2021 00:50:41 David Kastrup :


Lukas-Fabian Moser  writes:


Hi Kira,

Am 30.09.21 um 00:32 schrieb Kira Garvie:

I realize this is a pretty basic question... but what is the
difference between voiceOne and oneVoice? I am writing a multivoice
keyboard-style hymn (as opposed to SATB chorale style) and the
directions say to switch between oneVoice and voiceOne as needed for
stem direction...
"(d) Add voiceOne and oneVoice tags throughout to indicate stem
direction. If
there is no separately stemmed second part at the first note,
oneVoice is assumed."
Do I need to give an example?

\voiceOne sets the layout for the current voice as if it is the first
of several simultaneous voices.
\oneVoice sets the layout for the current voice as if it is an only voice.

It would probably be clearer if we had

\firstVoice and \soleVoice instead of \voiceOne and \oneVoice, respectively.

--
David Kastrup



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: voiceOne and oneVoice

2021-09-30 Thread Valentin Petzel
Hi David,

I'd say singleVoice would even be clearer.
But I think maybe it would also be a good idea if we had a synax like \voice 
number. Currently Lilypond only supports four voices, and any more requires 
knowledge about the scheme interface, but \voice1 \voice2, ... could directly 
support an arbitrary amount of voices.

Cheers,
Valentin

30.09.2021 00:50:41 David Kastrup :

> Lukas-Fabian Moser  writes:
> 
>> Hi Kira,
>> 
>> Am 30.09.21 um 00:32 schrieb Kira Garvie:
>>> I realize this is a pretty basic question... but what is the
>>> difference between voiceOne and oneVoice? I am writing a multivoice
>>> keyboard-style hymn (as opposed to SATB chorale style) and the
>>> directions say to switch between oneVoice and voiceOne as needed for
>>> stem direction...
>>> "(d) Add voiceOne and oneVoice tags throughout to indicate stem
>>> direction. If
>>> there is no separately stemmed second part at the first note,
>>> oneVoice is assumed."
>>> Do I need to give an example?
>> 
>> \voiceOne sets the layout for the current voice as if it is the first
>> of several simultaneous voices.
>> \oneVoice sets the layout for the current voice as if it is an only voice.
> 
> It would probably be clearer if we had
> 
> \firstVoice and \soleVoice instead of \voiceOne and \oneVoice, respectively.
> 
> --
> David Kastrup



Re: voiceOne and oneVoice

2021-09-29 Thread Kira Garvie
I think that made sense! I will try it out and let you know if it doesnt!

On Wed, Sep 29, 2021 at 6:50 PM David Kastrup  wrote:

> Lukas-Fabian Moser  writes:
>
> > Hi Kira,
> >
> > Am 30.09.21 um 00:32 schrieb Kira Garvie:
> >> I realize this is a pretty basic question... but what is the
> >> difference between voiceOne and oneVoice? I am writing a multivoice
> >> keyboard-style hymn (as opposed to SATB chorale style) and the
> >> directions say to switch between oneVoice and voiceOne as needed for
> >> stem direction...
> >> "(d) Add voiceOne and oneVoice tags throughout to indicate stem
> >> direction. If
> >> there is no separately stemmed second part at the first note,
> >> oneVoice is assumed."
> >> Do I need to give an example?
> >
> > \voiceOne sets the layout for the current voice as if it is the first
> > of several simultaneous voices.
> > \oneVoice sets the layout for the current voice as if it is an only
> voice.
>
> It would probably be clearer if we had
>
> \firstVoice and \soleVoice instead of \voiceOne and \oneVoice,
> respectively.
>
> --
> David Kastrup
>


Re: voiceOne and oneVoice

2021-09-29 Thread David Kastrup
Lukas-Fabian Moser  writes:

> Hi Kira,
>
> Am 30.09.21 um 00:32 schrieb Kira Garvie:
>> I realize this is a pretty basic question... but what is the
>> difference between voiceOne and oneVoice? I am writing a multivoice
>> keyboard-style hymn (as opposed to SATB chorale style) and the
>> directions say to switch between oneVoice and voiceOne as needed for
>> stem direction...
>> "(d) Add voiceOne and oneVoice tags throughout to indicate stem
>> direction. If
>> there is no separately stemmed second part at the first note,
>> oneVoice is assumed."
>> Do I need to give an example?
>
> \voiceOne sets the layout for the current voice as if it is the first
> of several simultaneous voices.
> \oneVoice sets the layout for the current voice as if it is an only voice.

It would probably be clearer if we had

\firstVoice and \soleVoice instead of \voiceOne and \oneVoice, respectively.

-- 
David Kastrup



Re: voiceOne and oneVoice

2021-09-29 Thread Lukas-Fabian Moser

Hi Kira,

Am 30.09.21 um 00:32 schrieb Kira Garvie:
I realize this is a pretty basic question... but what is the 
difference between voiceOne and oneVoice? I am writing a multivoice 
keyboard-style hymn (as opposed to SATB chorale style) and the 
directions say to switch between oneVoice and voiceOne as needed for 
stem direction...
"(d) Add voiceOne and oneVoice tags throughout to indicate stem 
direction. If
there is no separately stemmed second part at the first note, oneVoice 
is assumed."

Do I need to give an example?


\voiceOne sets the layout for the current voice as if it is the first of 
several simultaneous voices.

\oneVoice sets the layout for the current voice as if it is an only voice.

If you do in-staff polyphony via

<<

{ \upperMusic } \\ { \lowerMusic }

>>

then the \\ makes LilyPond silently add a \voiceOne to \upperMusic and a 
\voiceTwo to \lowerMusic, making sure that \upperMusic has upward stems, 
articulations etc., and \lowerMusic has everything downwards.


Sometimes it is useful to switch back to "normal" one-voice layout even 
in a polyphonic enivoronment; that can be done using \oneVoice.


A typical application is

\once\oneVoice r8

for a single rest that should be centered mid-staff (often, the other 
voice then has a simultaneous skip: s8). But this construction is not 
needed that often anymore because now there is the Merge_rests_engraver 
that is able to collect simultaneous rests in polyphonic situations and 
merge them to a single ("\oneVoice", so to speak) rest.


As a rule, in writing polyphonic music, it's often useful to use 
\voiceOne, \voiceTwo etc. and \oneVoice, and there a comparatively few 
good situations to use an explicit \stemUp or \stemDown.


Is this clear enough without compilable examples?

Lukas




voiceOne and oneVoice

2021-09-29 Thread Kira Garvie
Hello all!
I realize this is a pretty basic question... but what is the
difference between voiceOne and oneVoice? I am writing a multivoice
keyboard-style hymn (as opposed to SATB chorale style) and the directions
say to switch between oneVoice and voiceOne as needed for stem direction...
"(d) Add voiceOne and oneVoice tags throughout to indicate stem direction.
If
there is no separately stemmed second part at the first note, oneVoice is
assumed."
Do I need to give an example?
Thank you!
Kira


re: Switch back a \voiceOne to \oneVoice

2017-10-15 Thread Remy CLAVERIE
Hi Robert,

 

Instead of using \voiceTwo, you could add a new tag : \tag #'tag_orchestral { 
\voiceTwo}

 

I think this method will give you the expected result.

 

HTH

 

Rémy

 

 

> Message du 15/10/17 16:21
> De : "Robert Kubosz" 
> A : lilypond-user@gnu.org
> Copie à : 
> Objet : Switch back a \voiceOne to \oneVoice
> 
> Hi everyone!
> 
> I have a project with many music pieces for brass orchestra. I wrote
> a score template with tags, so I can easily extract parts from it.
> I works almost perfectly, but a extracted voice is still engraved as
> \voiceOne or \voiceTwo instead of default engraving like \oneVoice.
> I really dig this problem, but I have no idea how to fix it.
> 
> Here is an attached snippet.ly file to show you what I get and what
> I want. I ask you if you could share some advise with me and help me fix it.
> 
> Robert
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
>
> [ snippet.ly (1.8 Ko) ]
> [ kubosz_robert.vcf (0.2 Ko) ]___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Switch back a \voiceOne to \oneVoice

2017-10-15 Thread David Kastrup
Robert Kubosz  writes:

> Thanks, David, I will definitely use tagGroup. I see some possible
> application for it in my work.
>
> It is revolutionary for me, that I can tag not only _music_, but also
> a music command. This idea never crossed my mind.

\voiceTwo _is_ music rather than a music command.

\void \displayLilyMusic \voiceTwo delivers

{
  \override Voice.AccidentalSuggestion.direction = #-1
  \override Voice.DotColumn.direction = #-1
  \override Voice.Dots.direction = #-1
  \override Voice.Fingering.direction = #-1
  \override Voice.LaissezVibrerTie.direction = #-1
  \override Voice.LigatureBracket.direction = #-1
  \override Voice.MultiMeasureRest.direction = #-1
  \override Voice.PhrasingSlur.direction = #-1
  \override Voice.RepeatTie.direction = #-1
  \override Voice.Rest.direction = #-1
  \override Voice.Script.direction = #-1
  \override Voice.Slur.direction = #-1
  \override Voice.Stem.direction = #-1
  \override Voice.TextScript.direction = #-1
  \override Voice.Tie.direction = #-1
  \override Voice.TupletBracket.direction = #-1
  \override Voice.TrillSpanner.direction = #-1
  \set Voice.graceSettings = #'((Voice Stem font-size -3) (Voice Flag font-size 
-3) (Voice NoteHead font-size -3) (Voice TabNoteHead font-size -4) (Voice Dots 
font-size -3) (Voice Stem length-fraction 0.8) (Voice Stem no-stem-extend #t) 
(Voice Beam beam-thickness 0.384) (Voice Beam length-fraction 0.8) (Voice 
Accidental font-size -4) (Voice AccidentalCautionary font-size -4) (Voice 
Script font-size -3) (Voice Fingering font-size -8) (Voice StringNumber 
font-size -8))
  \override Voice.NoteColumn.horizontal-shift = #0
 
}

Which is a whole lot of music.

If you want to tag a music command (namely something that still needs
arguments before being complete music), there is \etc to do the job: you
can write something like

baba = \tag music \tweak color #red \etc

and then

\baba c'4

expands to

\tag music \tweak color #red c'4

-- 
David Kastrup

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


Re: Switch back a \voiceOne to \oneVoice

2017-10-15 Thread Robert Kubosz
Thanks, David, I will definitely use tagGroup. I see some possible
application for it in my work.

It is revolutionary for me, that I can tag not only _music_, but also
a music command. This idea never crossed my mind.




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


Re: Switch back a \voiceOne to \oneVoice

2017-10-15 Thread David Kastrup
Robert Kubosz  writes:

> Hi Rémy
>
> This is it. I owe you a good beer, man :-)

You might also want to take a look at the \tagGroup command when using
tags for more than one purpose.

-- 
David Kastrup

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


Re: Switch back a \voiceOne to \oneVoice

2017-10-15 Thread Robert Kubosz
Hi Rémy

This is it. I owe you a good beer, man :-)

Thanks!
Robert

On 10/15/2017 06:43 PM, Remy CLAVERIE wrote:
> Hi Robert,
> 
>  
> 
> Instead of using \voiceTwo, you could add a new tag : \tag
> #'tag_orchestral { \voiceTwo}
> 
>  
> 
> I think this method will give you the expected result.
> 
>  
> 
> HTH
> 
>  
> 
> Rémy
> 
>  
> 
>  
> 
> > Message du 15/10/17 16:21
> > De : "Robert Kubosz" <kubosz.rob...@gmail.com>
>     > A : lilypond-user@gnu.org
> > Copie à :
> > Objet : Switch back a \voiceOne to \oneVoice
> >
> > Hi everyone!
> >
> > I have a project with many music pieces for brass orchestra. I wrote
> > a score template with tags, so I can easily extract parts from it.
> > I works almost perfectly, but a extracted voice is still engraved as
> > \voiceOne or \voiceTwo instead of default engraving like \oneVoice.
> > I really dig this problem, but I have no idea how to fix it.
> >
> > Here is an attached snippet.ly file to show you what I get and what
> > I want. I ask you if you could share some advise with me and help
> me fix it.
> >
> > Robert
> > ___
> > lilypond-user mailing list
> > lilypond-user@gnu.org
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
> >
> >
> > [ snippet.ly (1.8 Ko) ]
> > [ kubosz_robert.vcf (0.2 Ko) ]
> 

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


Switch back a \voiceOne to \oneVoice

2017-10-15 Thread Robert Kubosz
Hi everyone!

I have a project with many music pieces for brass orchestra. I wrote
a score template with tags, so I can easily extract parts from it.
I works almost perfectly, but a extracted voice is still engraved as
\voiceOne or \voiceTwo instead of default engraving like \oneVoice.
I really dig this problem, but I have no idea how to fix it.

Here is an attached snippet.ly file to show you what I get and what
I want. I ask you if you could share some advise with me and help me fix it.

Robert
\version "2.21.0"
\language deutsch

#(set! paper-alist (cons '("snippet" . (cons (* 100 mm) (* 70 mm))) paper-alist))
\paper {
  #(set-paper-size "snippet")
  tagline = ##f
  indent = 30
}

% I have files with defined orchestral voices, like below:

trumpet_first = \relative c'' {
	c d e f
}

trumpet_second = \relative g' {
	g a h c
}

%{
I have a score template for a whole orchestra. To keep this example
small I will only show trumpet's staff. The problem I have is that
eventually I want to extract voices from my score -- I can do this with
tags -- but the voices still are engraved with stems pointed up or
down (it depends if it is 1st or 2nd voice). I don't know how
to fix it and I would ask you for suggestions and ideas to undo the \voiceOne
or \voiceTwo commands.

I really like how tags are working, so I would like to stick with them.
Or maybe there is a scheme function to call a voice, for example trumpet_second,
by a symbol?:

\score {
 #(call-voice-by-symbol 'trumpet_second)
}
%}

orchestral_score = <<
	\new Staff = "Trumpets" <<
		\set Staff.instrumentName = "Trumpet I II in B"
		\set Staff.shortInstrumentName = "Tr"
		\set Staff.midiInstrument = #"trumpet"
		\new Voice = "Trumpet I" { \voiceOne \transposition b \tag #'tag_trumpet_first \trumpet_first }
		\new Voice = "Trumpet II" { \voiceTwo \transposition b \tag #'tag_trumpet_second \trumpet_second }
	>>
>>

% This is how my orchestral score is engraved and it is fine:
\score {
	\orchestral_score
}

% This is a voice extracted with a tag and the result is not satisfying me.
\score {
	\keepWithTag #'tag_trumpet_second \orchestral_score
		\layout {
		\context {
			\Staff
			\remove Instrument_name_engraver
		}
	}
}

% I want it to look like this.
\score {
	\trumpet_second
}<>___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user