bugDenemo - Bugs: bug #62781, Voice directives don't allow...

 
 

bug #62781: Voice directives don't allow overrides

Submitter:  Richard Shann <rshann>
Submitted:  Mon 18 Jul 2022 11:54:37 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 18 Jul 2022 11:54:37 AM UTC, original submission:  

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.



Richard Shann <rshann>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rshann (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-27 rshann StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code