ssb22 / jianpu-ly

Jianpu in Lilypond
http://ssb22.user.srcf.net/mwrhome/jianpu-ly.html
Apache License 2.0
77 stars 19 forks source link

Multiple Voices? #22

Closed suntong closed 1 year ago

suntong commented 1 year ago

If multiple voices possible with jianpu-ly?
I.e., same song sang by different group of people Soprano, Alto, Tenor, Bass etc with their own tunes, and put on the same sheet.

Again from the afromentend jianpu bible, p3:

You can use voice name marker such as Soprano, Mezzo-soprano, Alto, Tenor, Baritone, Bass, Lead, ... Please put them before the system bracket.

ssb22 commented 1 year ago

Yes, use NextPart and instrument (the human voice counts as an instrument...)

instrument=Soprano
1 2 3 4
L: lah lah di dah
NextPart instrument=Alto
5, 6, 7, 1
L: dum dum di dum
NextPart instrument=Tenor
3, 4, 5, 6,
L: pom pom pom pom
suntong commented 1 year ago

Gocha. Thx!!

suntong commented 1 year ago

Oh, a follow up question, what's the syntax to change instrument / voice?

I just dup the above lines again, but got:

Error: Changing header 'instrument' from 'Tenor' to 'Soprano' (is there a missing NextPart or NextScore?)

Our music basically have three instruments / voices. The first line keeps changing from T.B to S.A to T.S... and the 2nd and 3rd lines keeps changing like that as well.

ssb22 commented 1 year ago

Hi, I'm afraid changing instrument or voice in the middle of the same part isn't really supported, but you can hack it with Lilypond code:

instrument=Bass
1, 2, 3, 4,
LP: \mark \markup "Change to Soprano" \set Staff.shortInstrumentName = "S"
:LP
1' 2' 3' 4'
L: low low low low high high high high
suntong commented 1 year ago

Yeah, that'll do as well. THX!!

suntong commented 1 year ago

Our music basically have three instruments / voices. The first line keeps changing from T.B to S.A to T.S... and the 2nd and 3rd lines keeps changing like that as well.

This is how our music voices changes:

instrument=1
LP: \mark \markup "T.B"
:LP
1, 2, 3, 4,
LP: \mark \markup "S.A"
:LP
1' 2' 3' 4'
L: mlow low mlow low whigh high whigh high

NextPart instrument=2
LP: \mark \markup "S"
:LP
1, - 3, -
LP: \mark \markup "T"
:LP
1 - 3 -

NextPart instrument=3
LP: \mark \markup "A"
:LP
1 - 3 -
LP: \mark \markup "B"
:LP
1, - 3, -

Is it somehow able to get the \markup show up on each of their own instrument?

I saw conflict with event: 'mark-event' when calling lilypond and only the first "T.B" and "S.A" are on the music sheet.

ssb22 commented 1 year ago

Ah yes maybe \mark was a bad idea because you can only have one at a time. Maybe just make it an ordinary text command:

1, ^"T.B." 2, 3, 4,

would attach the text "T.B." above the note 1, (and as it's attached to just that note it won't conflict with any other text being attached to any other note at the same time)

suntong commented 1 year ago

Maybe just make it an ordinary text command

YEP!

instrument=1
1, ^"T.B." 2, 3, 4,
1' ^"S.A" 2' 3' 4'
L: mlow low mlow low whigh high whigh high

NextPart instrument=2
1, ^"S" - 3, -
1 ^"T" - 3 -

NextPart instrument=3
1 ^"A" - 3 -
1, ^"B" - 3, -

That works perfectly!!

image

Thanks!!!