FoscNote

Returns a FoscNote.


Description

A note


Attributes Summary

Instance Properties

isPitched
noteHead Gets note-head of note.
noteHead_ Sets note-head of note.
writtenDuration Gets and sets written duration of note.
writtenDuration_ Sets written duration of note.
writtenPitch
writtenPitch_ Sets written pitch of note.

Instance Methods: SPECIAL

asCompileString
storeArgs Gets new arguments.
str


Usage

  1. FIXME: Error: Message pitch not understood.

    FoscNote().pitch.str;
  2. Example

    FoscNote().writtenDuration.str;
    1/4
    FoscNote().str;
    c'4
  3. FIXME: ERROR: Message isLilypondPitchName not understood.

    FoscNote("g'", 1/4).str;
  4. Example

    FoscNote("Gb5", 1/4).str;
    gf''4
    FoscNote(60, 1/4).str;
    c'4
    a = FoscNote(60, 1/4);
    a.show;

  5. Implicit conversion of type when another leaf is passed as initialization argument; indicators are preserved

    m = FoscNote(60, 1/4);
    m.attach(FoscArticulation('>'));
    m.attach(FoscDynamic('p'));
    a = FoscNote(m);
    a.show;

  6. Implicit conversion of type when another leaf is passed as initialization argument; indicators are preserved

    m = FoscChord(#[60,64,67], 1/4);
    m.attach(FoscArticulation('>'));
    m.attach(FoscDynamic('p'));
    a = FoscNote(m);
    a.show;


Instance Properties


isPitched


noteHead

Gets note-head of note.

Returns note-head.

  1. Example

    a = FoscNote(60, 1/4);
    a.noteHead.str;
    c'


noteHead_

Sets note-head of note.

  1. Example

    a = FoscNote(60, 1/4);
    a.noteHead_(61);
    a.noteHead.str;
    cs'


writtenDuration

Gets and sets written duration of note.

Returns duration

  1. Example

    a = FoscNote(60, 1/4);
    a.writtenDuration.str;
    1/4


writtenDuration_

Sets written duration of note.

  1. Example

    a = FoscNote(60, 1/4);
    a.writtenDuration.str;
    1/4
    a.writtenDuration_(3/4);
    a.writtenDuration.str;
    3/4
    a.writtenDuration_(5/4); // throws non-assignable duration error
    ERROR: Message 'writtenDuration_' not understood.


writtenPitch

  1. Example

    a = FoscNote(60, 1/4);
    a.writtenPitch.str;
    c'


writtenPitch_

Sets written pitch of note.

  1. Example

    a = FoscNote(60, 1/4);
    a.writtenPitch.str;
    c'
  2. Example

    a = FoscNote(60, 1/4);
    a.writtenPitch_("F#4");
    a.writtenPitch.str;
    fs'
    a.noteHead.writtenPitch.str;
    fs'


Instance Methods: SPECIAL


asCompileString

  1. Example

    FoscNote(60, 1/4).cs;
    FoscNote('C4', 1/4)


storeArgs

Gets new arguments.

Returns array.

  1. Example

    FoscNote(60, 1/4).storeArgs;
    [ FoscPitch("C4"), FoscDuration(1, 4) ]


str

  1. Example

    FoscNote(60, 1/4).str;
    c'4