FoscInspection

Returns a FoscInspection.


Description

Inspection agent.


Attributes Summary

Instance Properties

client Client of inspection agent.

Instance Methods

afterGraceContainer Gets after grace containers attached to leaf.
annotation Gets value of annotation with name attached to client.
annotationWrappers
badlyFormedComponents Gets badly formed components in client.
components Gets all components of prototype in the descendants of client.
contents Gets contents of client.
descendants Gets descendants of client.
duration Gets duration of client.
effectiveIndicator Gets effective indicator that matches prototype and governs client.
effective
effectiveStaff Gets effective staff of client.
effectiveWrapper
graceContainer abjad 2.21
graceNote Is true when client is grace note.
indicatorOfType (abjad: get_indicator)
indicators (abjad: get_indicators)
leafAt Gets leaf n.
lineage Gets lineage of client.
logicalTie Gets logical tie that governs leaf.
markup Gets all markup attached to client.
parentage Gets parentage of client.
piecewise Gets piecewise indicators attached to client.
soundingPitch Gets sounding pitch of client.
soundingPitches Gets sounding pitches of client.
spannerOfType Gets spanner of prototype attached to client.
spanners Gets spanners attached to client.
timespan Gets timespan of client.
verticalMoment Gets vertical moment starting with client.
verticalMomentAt Gets vertical moment at offset.
hasEffectiveIndicator Is true when indicator that matches prototype is in effect for client. Otherwise false.
hasIndicator Is true when client has one or more indicators that match prototype. Otherwise false.
hasSpanner Is true when client has one or more spanners that match prototype. Otherwise false.
isBarLineCrossing Is true when client crosses bar line. Otherwise false.
isWellFormed Is true when client is well-formed. Otherwise false.
reportModifications Reports modifications of client. Returns string.
tabulateWellFormednessViolations Tabulates well-formedness violations in client.
wrappers


Usage

  1. Example

    a = FoscInspection('blerk');
    ERROR: Meta_FoscInspection: client must be component, spanner, or nil: blerk.
  2. Example

    a = FoscInspection(FoscNote(60, 1));
    a.client;
    FoscNote('C4', 1/1)


Instance Properties


client

Client of inspection agent.

Returns component.

  1. Example

    a = FoscInspection(FoscNote(60, 1));
    a.client;
    FoscNote('C4', 1/1)


Instance Methods


afterGraceContainer

Gets after grace containers attached to leaf.

Returns after grace container or none.


annotation

Gets value of annotation with name attached to client.

Returns default when no annotation with name is attached to client.

Raises exception when more than one annotation with name is attached to client.

  1. Example

    a = FoscNote(60, 1/4);
    a.annotate('clef', FoscClef('bass'));
    FoscInspection(a).annotation('clef');
    a.show;


annotationWrappers

  1. Example

    a = FoscNote(60, 1/4);
    a.annotate('clef', FoscClef('bass'));
    FoscInspection(a).annotationWrappers;
    [ FoscWrapper.new ]


badlyFormedComponents

Gets badly formed components in client.

Returns array.


components

Gets all components of prototype in the descendants of client.

Returns client selection.


contents

Gets contents of client.

Returns sequential selection.


descendants

Gets descendants of client.

Returns descendants.

  1. Example

    a = FoscStaff(FoscLeafMaker().(#[60,62,64,65], [1/12,1/12,1/12,1/4]));
    FoscInspection(a).descendants.items;
    [ FoscStaff([  ], 'Staff', false), FoscTuplet(FoscMultiplier(2, 3), [  ]), FoscNote(FoscPitch("C4"), FoscDuration(1, 8)), FoscNote(FoscPitch("D4"), FoscDuration(1, 8)), FoscNote(FoscPitch("E4"), FoscDuration(1, 8)), FoscNote(FoscPitch("F4"), FoscDuration(1, 4)) ]


duration

Gets duration of client.

Returns duration.


effectiveIndicator

Gets effective indicator that matches prototype and governs client.

Returns indicator or none.


effective


effectiveStaff

Gets effective staff of client.

Returns staff or none.


effectiveWrapper


graceContainer

abjad 2.21

Gets grace container attached to leaf.

Returns grace container, acciaccatura container, appoggiatura container or none.


graceNote

Is true when client is grace note.


indicatorOfType

(abjad: get_indicator)

Gets indicator of prototype attached to client.

Raises exception when more than one indicator of prototype attach to client.

Returns default when no indicator of prototype attaches to client.

Returns indicator or default.


indicators

(abjad: get_indicators)


leafAt

Gets leaf n.

Returns leaf or none.

  1. FIXME returns: ERROR: Message __pitch__ not understood.

    a = FoscStaff([
        FoscVoice({ |i| FoscNote(0 + i, [1, 4]) } ! 10),
        FoscVoice({ |i| FoscNote(10 + i, [1, 4]) } ! 10)
    ]);
    FoscInspection(a).leafAt(7).pitch.pitchNumber;
    FoscInspection(a.select.byLeaf[5]).leafAt(2).pitch.pitchNumber;
    FoscInspection(a.select.leaves[4]).leafAt(-3).pitch.pitchNumber;


lineage

Gets lineage of client.

Returns lineage.


logicalTie

Gets logical tie that governs leaf.

Returns logical tie.

  1. FIXME returns: ERROR: Class not defined.

    a = [FoscNote(60, 1), FoscNote(60, 2)];
    FoscAttach(FoscTie(), a);
    FoscInspection(a[0]).logicalTie.music;


markup

Gets all markup attached to client.

Returns tuple.


parentage

Gets parentage of client.

Returns parentage.

  1. FIXME returns: ERROR: Message __music__ not understood.

    a = FoscNote(60, 1);
    FoscVoice([a]);
    FoscInspection(a).parentage.music;


piecewise

Gets piecewise indicators attached to client.

Returns indicator or default.


soundingPitch

Gets sounding pitch of client.

Returns pitch.


soundingPitches

Gets sounding pitches of client.

Returns tuple.

  1. e

  2. fs

  3. “), NamedPitch(”e


spannerOfType

Gets spanner of prototype attached to client.

Raises exception when more than one spanner of prototype attaches to client.

Returns default when no spanner of prototype attaches to client.

Returns spanner or default.

  1. FIXME returns: ERROR: Class not defined.

    a = [FoscNote(60, 1), FoscNote(60, 2)];
    FoscAttach(FoscTie(), a);
    FoscInspection(a[0]).spannerOfType(FoscTie);


spanners

Gets spanners attached to client.

Returns set.

  1. FIXME returns: ERROR: Class not defined.

    a = [FoscNote(60, 1), FoscNote(60, 2)];
    FoscAttach(FoscTie(), a);
    FoscInspection(a[0]).spanners;


timespan

Gets timespan of client.

Returns timespan.


verticalMoment

Gets vertical moment starting with client.

Returns vertical moment.


verticalMomentAt

Gets vertical moment at offset.

Returns vertical moment.


hasEffectiveIndicator

Is true when indicator that matches prototype is in effect for client. Otherwise false.

Returns true or false.


hasIndicator

Is true when client has one or more indicators that match prototype. Otherwise false.

Returns true or false.


hasSpanner

Is true when client has one or more spanners that match prototype. Otherwise false.

Returns true or false.


isBarLineCrossing

Is true when client crosses bar line. Otherwise false.

Returns true or false.


isWellFormed

Is true when client is well-formed. Otherwise false.

Returns true or false.


reportModifications

Reports modifications of client. Returns string.


tabulateWellFormednessViolations

Tabulates well-formedness violations in client.

Returns string.


wrappers