FoscClef

Returns a FoscClef.


Description

A clef


Attributes Summary

Class Methods

*clefNames Array of all clef names.
*fromSelection !!!TODO

Instance Properties

context Gets context. Staff by default.
hide Is true when clef should not appear in output (but should still determine effective clef).
middleCPosition !!!TODO: not yet implemented
name Gets name of clef.
parameter Is true.
redraw Is true.
tweaks Tweaks are not implemented on clef.

Instance Methods: Special Methods

format Formats clef.


Usage

  1. Some available clefs.

    FIXME: ERROR: Message ‘+’ not understood.

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65,67,69,71,72], [1/8]));
    c = #['treble','alto','bass','treble^8','bass_8','tenor','bass^15','percussion'];
    c.do { |name, i| a[i].attach(FoscClef(name)) };
    a.show;
  2. !!!TODO: tags not yet implemented

    Clefs can be tagged.

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
    m = FoscClef('bass');
    a[0].attach(m, tag: 'RED');
    a.show;


Class Methods


*clefNames

Array of all clef names.

  1. Example

    FoscClef.clefNames.postln;
    [ 'alto', 'baritone', 'bass', 'french', 'mezzosoprano', 'percussion', 'soprano', 'tab', 'tenor', 'treble', 'varbaritone' ]


*fromSelection

!!!TODO


Instance Properties


context

Gets context. Staff by default.

  1. Example

    a = FoscClef('treble');
    a.context.postln;
    'Staff'


hide

Is true when clef should not appear in output (but should still determine effective clef).

  1. Example

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/4]));
    m = FoscClef('treble', hide: true);
    a[0].attach(m);
    a.show;


middleCPosition

!!!TODO: not yet implemented

Gets middle C position of clef.

  1. Example

    a = FoscClef('treble');
    a.middleCPosition.postcs;
    FoscStaffPosition(-6)
  2. Example

    a = FoscClef('alto');
    a.middleCPosition.postcs;
    FoscStaffPosition(0)


name

Gets name of clef.

  1. Example

    a = FoscClef('treble');
    a.name.postln;
    treble


parameter

Is true.

  1. Example

    a = FoscClef('treble');
    a.parameter.postln;
    true


redraw

Is true.

  1. Example

    a = FoscClef('treble');
    a.redraw.postln;
    true


tweaks

Tweaks are not implemented on clef.

The LilyPond ‘’ command refuses tweaks.

Override the LilyPond Clef grob instead.


Instance Methods: Special Methods


format

Formats clef.

Returns string.

  1. Example

    a = FoscClef('treble');
    a.format;
    \clef "treble"