denemo-devel
[Top][All Lists]
Advanced

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

[bug #62781] Voice directives don't allow overrides


From: Richard Shann
Subject: [bug #62781] Voice directives don't allow overrides
Date: Mon, 18 Jul 2022 07:54:38 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?62781>

                 Summary: Voice directives don't allow overrides
                 Project: Denemo
               Submitter: rshann
               Submitted: Mon 18 Jul 2022 11:54:37 AM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
             Open/Closed: Open
         Discussion Lock: Any


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 18 Jul 2022 11:54:37 AM UTC By: Richard Shann <rshann>
Setting overrides like this:

(ToggleDirective "voice" "prefix" "Ambitus" " \\consists \"Ambitus_engraver\"
" DENEMO_ALT_OVERRIDE  DENEMO_OVERRIDE_AFFIX  DENEMO_OVERRIDE_GRAPHIC )

doesn't give any output to the voice - unlike staff where the staff definition
is sensitive to them, the code in scorelayout.c has been developed for staff
but is still very basic for voice:

void
set_staff_definition (GString * str, DenemoStaff * curstaffstruct)
{
  gint staff_override = get_lily_override (curstaffstruct->staff_directives);
  gchar *staff_prolog_insert = get_skip_prefix
(curstaffstruct->staff_directives, DENEMO_OVERRIDE_WITH);
//DENEMO_ALT_OVERRIDE | DENEMO_OVERRIDE_AFFIX  ignores directives with
DENEMO_OVERRIDE_AFFIX or ALT_OVERRIDE
  gchar *staff_epilog_insert = get_skip_postfix
(curstaffstruct->staff_directives, DENEMO_OVERRIDE_WITH);//was get_postfix
ignores directives with DENEMO_OVERRIDE_AFFIX set
  gchar *denemo_name = curstaffstruct->subpart ? g_strdup_printf ("%s_%s",
curstaffstruct->denemo_name->str, curstaffstruct->subpart->str) :
curstaffstruct->denemo_name->str;

    {
      gchar *alt_override = get_alt_non_aff_prefix
(curstaffstruct->staff_directives);       //This is only the prefix field
being gotten
      if (*alt_override)
       {
           
        if (staff_override)
            {
            g_string_append_printf (str, "%s %s%s", alt_override,
staff_prolog_insert, staff_epilog_insert);
            }
        else
                        g_string_append_printf (str, "\n%%Start of Staff\n %s  
\\new %s = \"%s\" <<
%s\n", 
                                 alt_override, 
curstaffstruct->type?curstaffstruct->type:"Staff",
denemo_name, staff_epilog_insert);
         
      } else 
      {
          g_free (alt_override);
          alt_override = get_include_prefix (curstaffstruct->staff_directives,
DENEMO_OVERRIDE_WITH);  
          if (*alt_override)
          {
            if (staff_override)
                {
                g_string_append_printf (str, "%s %s%s", alt_override,
staff_prolog_insert, staff_epilog_insert);
                }
            else
               g_string_append_printf (str, "\n%%Start of Staff\n  \\new %s =
\"%s\" \\with { %s }<< %s\n",
curstaffstruct->type?curstaffstruct->type:"Staff", denemo_name, alt_override,
staff_epilog_insert); 
           }
          else
            {
                if (staff_override)
                    {
                    g_string_append_printf (str, "%s %s%s", alt_override,
staff_prolog_insert, staff_epilog_insert);
                    } 
                else
                    g_string_append_printf (str, "\n%%Start of Staff\n\\new %s
= \"%s\" %s << %s\n", curstaffstruct->type?curstaffstruct->type:"Staff",
denemo_name, staff_prolog_insert, staff_epilog_insert);
            
        }
      }
      g_free (alt_override);
    }
  if (curstaffstruct->subpart)
    g_free (denemo_name);
  g_free (staff_prolog_insert);
  g_free (staff_epilog_insert);
}

void
set_voice_definition (GString * str, DenemoStaff * curstaffstruct, gchar *
voicetag)
{
  gint voice_override = get_lily_override (curstaffstruct->voice_directives);

  gchar *voice_prolog_insert = get_prefix (curstaffstruct->voice_directives);
  gchar *voice_epilog_insert = get_postfix
(curstaffstruct->voice_directives);
  if (voice_override)
    {
      g_string_append_printf (str, "%s", voice_prolog_insert);
    }
  else
    {
      g_string_append_printf (str, "\\new Voice = \"%s\" %s { %s\n", voicetag,
voice_prolog_insert, voice_epilog_insert);
    }
}

This would need to be upgraded to allow ambitus on a voice level.










    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62781>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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