|
From: | Walt North |
Subject: | Re: reusing melody in different TabVoice instruments |
Date: | Thu, 12 Sep 2024 15:48:49 -0700 |
User-agent: | Mozilla Thunderbird |
There are a handful of notes that I want in different octave for some instruments. \resetRelativeOctave does not seem to work when in the tweaked code. But for those handful of cases I can put a skip in the main melody and then the specific octave note in the tweaked line,
\version "2.24.2" melody = \relative c' { c4 d e f | c d e f | s1 | } guitarTweaks = { s1 | \set restrainOpenStrings = ##f \set minimumFret = #3 s4\3 s4*3 | c'1 | } banjoTweaks = { s1 | \set restrainOpenStrings = ##f \set minimumFret = #1 s4\3 s4*3 | c''1 | } \markup Guitar \score { \new TabStaff { \new TabVoice { << \melody \guitarTweaks >> } } } \markup Banjo \score { \new TabStaff \with { stringTunings = #banjo-open-g-tuning } { \new TabVoice { << \melody \banjoTweaks >> } } } On 9/10/2024 12:05 PM, Walt North wrote:
Excellent - exactly what I was looking for.. On 9/10/2024 11:58 AM, Xavier Scheuer wrote:On Tue, 10 Sept 2024 at 17:04, Walt North <waltnorth@gmail.com> wrote: >> 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.Hello, This seems to work. guitarTweaks = { s1 | \set restrainOpenStrings = ##t \set minimumFret = #3 s4\3 s4*3 | } banjoTweaks = { s1 | \set restrainOpenStrings = ##f \set minimumFret = #5 s4\4 s4*3 | } \markup Guitar \score { \new TabStaff { \new TabVoice { << \melody \guitarTweaks >> } } } \markup Banjo \score { \new TabStaff \with { stringTunings = #banjo-open-g-tuning } { \new TabVoice { << \melody \banjoTweaks >> } } } Kind regards, Xavier
[Prev in Thread] | Current Thread | [Next in Thread] |