[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reusing melody in different TabVoice instruments
From: |
Walt North |
Subject: |
reusing melody in different TabVoice instruments |
Date: |
Tue, 10 Sep 2024 08:03:54 -0700 |
User-agent: |
Mozilla Thunderbird |
Is there any way to do this? What follows is a made up example.
I have a melody that may be shared across different string
instruments.
I'd like to be able to reuse the melody notes and not repeat that
for each instrument. The different instruments may require
different restrain option, minimum frets and/or string numbers
throughout the piece.
Here is a simplified example with screen shot of desired result..
\version "2.24.2"
% I would like to be able to reuse this melody
melody = \relative c' {
c4 d e f |
c d e f |
}
% note the only differences are string number, fret values, and
restrain option
guitarMelody = \relative c' {
c4 d e f |
\set restrainOpenStrings = ##t
\set minimumFret = #3
% use third string
c\3 d e f |
}
banjoMelody = \relative c' {
c4 d e f |
\set restrainOpenStrings = ##f
\set minimumFret = #5
% use fourth string
c\4 d e f |
}
% how to start second measure at 5th fret with first note on 5th
string?
\markup Guitar
\score {
\new TabStaff
{ \guitarMelody }
}
% how to start second measure at 7th fret with first note on 4th
string?
\markup Banjo
\score {
\new TabStaff
\with { stringTunings = #banjo-open-g-tuning }
{ \banjoMelody }
}
- reusing melody in different TabVoice instruments,
Walt North <=