FoscNoteHead

Returns a FoscNoteHead.


Description

A note-head.


Attributes Summary

Instance Properties

alternative !!!TODO: not yet implemented
alternative_ !!!TODO: not yet implemented
client Client of note-head.
isCautionary Gets isCautionary accidental flag.
isCautionary_ Sets isCautionary accidental flag.
isForced Gets isForced accidental flag.
isForced_ Sets isForced accidental flag.
isParenthesized Gets isParenthesized flag.
isParenthesized_ Sets isParenthesized flag.
tweaks Gets tweaks.
writtenPitch Gets written pitch of note-head.
writtenPitch_ Sets written pitch of note-head.

Instance Methods: Special Methods

asCompileString Gets interpreter representation of note-head.
copy Copies note-head.
== Is true when argument is a note-head with written writtenPitch equal to that of this note-head. Otherwise false.
format Formats note-head.
hash Hashes note-head.
< Is true when argument is a note-head with written writtenPitch greater than that of this note-head. Otherwise false.
str String representation of note-head.


Usage

  1. Example

    p = #[['size', 12]];
    a = FoscNoteHead(writtenPitch: 61, tweaks: p);
    a.tweak.color = 'red';
    a.tweak.prGetAttributePairs;
    [ [ 'color', 'red' ], [ 'size', 12 ] ]
    a.format;
    \tweak color #red
    \tweak size #12
    cs'


Instance Properties


alternative

!!!TODO: not yet implemented


alternative_

!!!TODO: not yet implemented


client

Client of note-head.

Returns note, chord or nil.


isCautionary

Gets isCautionary accidental flag.

Returns true or false.


isCautionary_

Sets isCautionary accidental flag.


isForced

Gets isForced accidental flag.

Returns true or false.


isForced_

Sets isForced accidental flag.


isParenthesized

Gets isParenthesized flag.

Returns true or false.


isParenthesized_

Sets isParenthesized flag.


tweaks

Gets tweaks.


writtenPitch

Gets written pitch of note-head.

Returns a FoscPitch.


writtenPitch_

Sets written pitch of note-head.


Instance Methods: Special Methods


asCompileString

Gets interpreter representation of note-head.

Returns string.

!!!TODO: incomplete

  1. Example

    a = FoscNoteHead(writtenPitch: 61, tweaks: p);
    a.cs;
    FoscNoteHead('C#4')


copy

Copies note-head.

Returns new note-head.


==

Is true when argument is a note-head with written writtenPitch equal to that of this note-head. Otherwise false.

Returns true or false.


format

Formats note-head.

Returns string.

  1. Example

    a = FoscNoteHead(writtenPitch: "Db4");
    a.format;
    df'
    a = FoscNoteHead(writtenPitch: FoscPitch("Db4"));
    a.format;
    df'
    a = FoscNoteHead(writtenPitch: FoscPitch("Db4"), isForced: true, isCautionary: true, isParenthesized: true);
    a.format;
    \parenthesize
    df'!?


hash

Hashes note-head.

Returns integer.

!!!TODO: not yet implemented.


<

Is true when argument is a note-head with written writtenPitch greater than that of this note-head. Otherwise false.

Returns true or false.

!!!TODO: not yet implemented.


str

String representation of note-head.

Returns string.

code:: a = FoscNoteHead(60, isCautionary: true); a.str;