Note Entry
Functions
get_music_region
note_entry.get_music_region(entry)
View source
Returns an intance of FCMusicRegion
that corresponds to the metric location of the input note entry.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
Return type |
Description |
FCMusicRegion |
|
get_evpu_notehead_height
note_entry.get_evpu_notehead_height(entry)
View source
Returns the calculated height of the notehead rectangle.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
Return type |
Description |
number |
the EVPU height |
get_top_note_position
note_entry.get_top_note_position(entry, entry_metrics)
View source
Returns the vertical page coordinate of the top of the notehead rectangle, not including the stem.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
entry_metrics (optional) |
FCEntryMetrics |
entry metrics may be supplied by the caller if they are already available |
Return type |
Description |
number |
|
get_bottom_note_position
note_entry.get_bottom_note_position(entry, entry_metrics)
View source
Returns the vertical page coordinate of the bottom of the notehead rectangle, not including the stem.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
entry_metrics (optional) |
FCEntryMetrics |
entry metrics may be supplied by the caller if they are already available |
Return type |
Description |
number |
|
calc_widths
note_entry.calc_widths(entry)
View source
Get the widest left-side notehead width and widest right-side notehead width.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
Return type |
Description |
number, number |
widest left-side notehead width and widest right-side notehead width |
calc_left_of_all_noteheads
note_entry.calc_left_of_all_noteheads(entry)
View source
Calculates the handle offset for an expression with “Left of All Noteheads” horizontal positioning.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to calculate from |
Return type |
Description |
number |
offset from left side of primary notehead rectangle |
calc_left_of_primary_notehead
note_entry.calc_left_of_primary_notehead(entry)
View source
Calculates the handle offset for an expression with “Left of Primary Notehead” horizontal positioning.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to calculate from |
Return type |
Description |
number |
offset from left side of primary notehead rectangle |
calc_center_of_all_noteheads
note_entry.calc_center_of_all_noteheads(entry)
View source
Calculates the handle offset for an expression with “Center of All Noteheads” horizontal positioning.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to calculate from |
Return type |
Description |
number |
offset from left side of primary notehead rectangle |
calc_center_of_primary_notehead
note_entry.calc_center_of_primary_notehead(entry)
View source
Calculates the handle offset for an expression with “Center of Primary Notehead” horizontal positioning.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to calculate from |
Return type |
Description |
number |
offset from left side of primary notehead rectangle |
calc_stem_offset
note_entry.calc_stem_offset(entry)
View source
Calculates the offset of the stem from the left edge of the notehead rectangle. Eventually the PDK Framework may be able to provide this instead.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to calculate from |
Return type |
Description |
number |
offset of stem from the left edge of the notehead rectangle. |
calc_right_of_all_noteheads
note_entry.calc_right_of_all_noteheads(entry)
View source
Calculates the handle offset for an expression with “Right of All Noteheads” horizontal positioning.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to calculate from |
Return type |
Description |
number |
offset from left side of primary notehead rectangle |
calc_note_at_index
note_entry.calc_note_at_index(entry, note_index)
View source
This function assumes for note in each(note_entry)
always iterates in the same direction.
(Knowing how the Finale PDK works, it probably iterates from bottom to top note.)
Currently the PDK Framework does not seem to offer a better option.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
note_index |
number |
the zero-based index |
stem_sign
note_entry.stem_sign(entry)
View source
This is useful for many x,y positioning fields in Finale that mirror +/-
based on stem direction.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
Return type |
Description |
number |
1 if upstem, -1 otherwise |
duplicate_note
note_entry.duplicate_note(note)
View source
Input |
Type |
Description |
note |
FCNote |
|
Return type |
Description |
FCNote | nil |
reference to added FCNote or nil if not success |
delete_note
note_entry.delete_note(note)
View source
Removes the specified FCNote from its associated FCNoteEntry.
Input |
Type |
Description |
note |
FCNote |
|
Return type |
Description |
boolean |
true if success |
make_rest
note_entry.make_rest(entry)
View source
Deletes all notes and turns the note_entry into a floating rest. This function also
deletes any attached entry details such as articulations and special tools edits.
Input |
Type |
Description |
entry |
FCNoteEntry |
|
Return type |
Description |
boolean |
success |
calc_pitch_string
note_entry.calc_pitch_string(note)
View source
Calculates the pitch string of a note for display purposes.
Input |
Type |
Description |
note |
FCNote |
|
Return type |
Description |
string |
display string for note |
calc_spans_number_of_octaves
note_entry.calc_spans_number_of_octaves(entry)
View source
Calculates the numer of octaves spanned by a chord (considering only staff positions, not accidentals).
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to calculate from |
Return type |
Description |
number |
of octaves spanned |
add_augmentation_dot
note_entry.add_augmentation_dot(entry)
View source
Adds an augentation dot to the entry. This works even if the entry already has one or more augmentation dots.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to which to add the augmentation dot |
remove_augmentation_dot
note_entry.remove_augmentation_dot(entry)
View source
Removes an augentation dot from the entry. This does nothing if the entry has no augmentation dots.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to which to add the augmentation dot |
Return type |
Description |
boolean |
true if the entry was modified, otherwise false |
get_next_same_v
note_entry.get_next_same_v(entry)
View source
Returns the next entry in the same V1 or V2 as the input entry.
If the input entry is V2, only the current V2 launch is searched.
If the input entry is V1, only the current measure and layer is searched.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to process |
Return type |
Description |
FCNoteEntry |
the next entry or nil in none |
hide_stem
note_entry.hide_stem(entry)
View source
Hides the stem of the entry by replacing it with Shape 0.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to process |
rest_offset
note_entry.rest_offset(entry, offset)
View source
Confirms the entry is a rest then offsets it from the staff rest “center” position.
Input |
Type |
Description |
entry |
FCNoteEntry |
the entry to process |
offset |
number |
offset in half spaces |
Return type |
Description |
boolean |
true if success |