[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: avoid multiple fret diagrams

From: Pascal Obry
Subject: Re: avoid multiple fret diagrams
Date: Thu, 21 Jan 2010 21:13:28 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR; rv: Gecko/20090605 Thunderbird/ Mnenhy/


Thanks for the quick reply.

> First of all, hello. Welcome. I encourage everyone to read the Learning
> Manual once completely through before doing anything. 

I've gone through the manual already. But I've not found an answer to my

> To your question, you've included the fret diagram in the Notes
> variable. Everything in the Notes variable will be included when it is
> compiled. Essentially, your score is this:
> \score {
> <<
>    \new Staff {
>       d ^ \markup \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;" g b
>    }
>    \new TabStaff {
>       d ^ \markup \fret-diagram-terse #"x;x;o;2-2;3-3;1-1;" g b
>    }
>  >>
> }

Agreed. I understand that (I'm computer scientist:).

> If you look at it like this, you can see that you've duplicated the fret
> diagram.
> The easiest solution is so put your fret diagrams in a different
> variable, and include that variable only where you want it. i.e.,
> Diagrams = { s4 ^ \markup \fret-diagram-terse #"x;x;o;2-2;3-3;1-1 }
> \score { <<\new Staff \Notes \new Staff <<\Diagrams \Notes >> >> }

Right, but the piece I'm writing is large and I just have few fret
diagrams to include. So it seemed easier to me to insert the fret
diagrams inside the note flow.

I was wondering if a macro wont be usable here. I've seen something like
this generated by tuxguitar:

TrackAVoiceAMusic = #(define-music-function (parser location inTab)
   \tempo 4=120
   \clef #(if $inTab "tab" "treble_8")

When TrackAVoiceAMusic is inserted into a Staff the clef is set to treble_8:

   TrackAVoiceAMusic ##f

and when inside a tab it is set to tab:

   TrackAVoiceAMusic ##t

Is something like this usable to insert or not a markup?



--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|  -
--| "The best way to travel is by means of imagination"
--| gpg --keyserver --recv-key F949BD3B

reply via email to

[Prev in Thread] Current Thread [Next in Thread]