Expression

Functions

get_music_region

expression.get_music_region(exp_assign)

View source

Returns a music region corresponding to the input expression assignment.

Input Type Description
exp_assign FCExpression
Return type Description
FCMusicRegion

get_associated_entry

expression.get_associated_entry(exp_assign)

View source

Returns the note entry associated with the input expression assignment, if any.

Input Type Description
exp_assign FCExpression
Return type Description
FCNoteEntry associated entry or nil if none

calc_handle_offset_for_smart_shape

expression.calc_handle_offset_for_smart_shape(exp_assign)

View source

Returns the horizontal EVPU offset for a smart shape endpoint to align exactly with the handle of the input expression, given that they both have the same EDU position.

Input Type Description
exp_assign FCExpression
Return type Description
number

calc_text_width

expression.calc_text_width(expression_def, expand_tags)

View source

Returns the text advance width of the input expression definition.

Input Type Description
expression_def FCTextExpessionDef
expand_tags (optional) boolean defaults to false, currently only supports ^value()
Return type Description
number

is_for_current_part

expression.is_for_current_part(exp_assign, current_part)

View source

Returns true if the expression assignment is assigned to the current part or score.

Input Type Description
exp_assign FCExpression
current_part (optional) FCPart defaults to current part, but it can be supplied if the caller has already calculated it.
Return type Description
boolean

is_dynamic

expression.is_dynamic(exp)

View source

Returns true if the expression appears to be a dynamic.

Input Type Description
exp FCExpression
Return type Description
boolean

resync_expressions_for_category

expression.resync_expressions_for_category(category_id)

View source

Updates the fonts and positioning of all expression definitions linked to a category after making changes to the category.

Input Type Description
category_id number

resync_to_category

expression.resync_to_category(expression_def)

View source

Updates the fonts and positioning of an expression definition to match its category after making changes to the category.

Input Type Description
expression_def FCTextExpessionDef