FoscContextBlock

Returns a FoscContextBlock.


Description

A LilyPond file \context block.


Attributes Summary

Instance Properties

acceptsCommands Gets arguments of LilyPond \accepts commands.
alias Gets and sets argument of LilyPond \alias command.
consistsCommands Gets arguments of LilyPond \consists commands.
items Gets items in context block.
name Gets and sets argument of LilyPond \name command.
removeCommands Gets arguments of LilyPond \remove commands.
sourceLilypondType Gets and sets source context name.
type Gets and sets argument of LilyPond command.


Usage

  1. Example

    a = FoscContextBlock(sourceLilypondType: 'Staff', name: 'FluteStaff', type: 'Engraver_group', alias: 'Staff');
    a.removeCommands.add('Forbid_line_break_engraver');
    a.consistsCommands.add('Horizontal_bracket_engraver');
    a.acceptsCommands.add('FluteUpperVoice');
    a.acceptsCommands.add('FluteLowerVoice');
    a.items.add("\\accidentalStyle dodecaphonic");
    override(a).beam.positions = #[4,4];
    set(a).autoBeaming = false;
    set(a).tupletFullLength = true;
    set(a).proportionalNotationDuration = FoscSchemeMoment(#[1,24]);
    a.format;
    \context {
        \Staff
        \name FluteStaff
        \type Engraver_group
        \alias Staff
        \remove Forbid_line_break_engraver
        \consists Horizontal_bracket_engraver
        \accepts FluteUpperVoice
        \accepts FluteLowerVoice
        \override Beam.positions = #'(4 . 4)
        autoBeaming = ##f
        proportionalNotationDuration = #(ly:make-moment 1 24)
        tupletFullLength = ##t
        \accidentalStyle dodecaphonic
    }


Instance Properties


acceptsCommands

Gets arguments of LilyPond \accepts commands.

Returns list.

  1. Example

    a.acceptsCommands.postln;
    List[ 'FluteUpperVoice', 'FluteLowerVoice' ]


alias

Gets and sets argument of LilyPond \alias command.

Returns string or none.

  1. Example

    a.alias.postln;
    'Staff'


consistsCommands

Gets arguments of LilyPond \consists commands.

Returns list.

  1. Example

    a.consistsCommands.postln;
    List[ 'Horizontal_bracket_engraver' ]


items

Gets items in context block.

Returns list.

  1. Example

    a.items.postln;
    List[ "\\accidentalStyle dodecaphonic" ]


name

Gets and sets argument of LilyPond \name command.

Returns string or none.

  1. Example

    a.name.postln;
    'FluteStaff'


removeCommands

Gets arguments of LilyPond \remove commands.

Returns list.

  1. Example

    a.removeCommands.postln;
    List[ 'Forbid_line_break_engraver' ]


sourceLilypondType

Gets and sets source context name.

Returns string or none.

  1. Example

    a.sourceLilypondType.postln;
    'Staff'


type

Gets and sets argument of LilyPond command.

Returns string or none.

  1. Example

    a.type.postln;
    'Engraver_group'