Section FXProcessors

FXProcessor handling utility functions.

See
FXProcessor

Summary

Return typeFunction and summary
intApplyToAllFXProcessors(Score score, staves, int firstBar, int lastBar, function processFunc)
Apply a function to all FXProcessors in the score, or staff, or in a range of bars.
intApplyToAllSelectedFXProcessors(Score score, function processFunc, boolean printedStavesOnly)
Apply a function to all selected FXProcessors, individually selected or inside range selection.
 CopyFXProcessor(FXProcessor source, FXProcessor dest)
Copy all parameters from a FXProcessor to another one.
booleanEnsureObjectInStaffArea(Score score, Staff staff, obj)
Ensure an object is in the Staff area, move it vertically if needed.
 SetInstrumentFXProcessor(Instrument instr, FXProcessor fxproc)
Set the default FX Processor for an instrument.

Functions

CopyFXProcessor(FXProcessor source, FXProcessor dest)

Copy all parameters from a FXProcessor to another one.

ParameterTypeDefaultDescription
sourceFXProcessor The FXProcessor to copy
destFXProcessor The destination FXProcessor that will receive source settings.
Error
if source or dest are nil

SetInstrumentFXProcessor(Instrument instr, FXProcessor fxproc)

Set the default FX Processor for an instrument.

The instrument's FXProcessor is not visible on the score. It's the one you edit from the instrument dialog's "FX" button.

ParameterTypeDefaultDescription
instrInstrument The instrument
fxprocFXProcessor The FXProcessor which properties will be copied in the instrument's FX Processor

EnsureObjectInStaffArea(Score score, Staff staff, obj)

Ensure an object is in the Staff area, move it vertically if needed.

ParameterTypeDefaultDescription
scoreScore score
staffStaff staff
obj  Object: Dynamic, StaffText, FXProcessor, Picture
Return
boolean: true if object has been moved vertically, false otherwise.

ApplyToAllSelectedFXProcessors(Score score, function processFunc, boolean printedStavesOnly)

Apply a function to all selected FXProcessors, individually selected or inside range selection.

This browses selected FXProcessors on visible (printed) staves from first to last. Those attached to instruments are not processed.

ParameterTypeDefaultDescription
scoreScore score
processFuncfunction Function with two FXProcessor and Staff arguments, which returns true (= 1) if FX has been processed, -1 to stop the process. Other returned values are ignored, process continue to next.
printedStavesOnlybooleanfalseIf true selected FXs on not printed staves are skipped. This has no effect in Scroll mode where all staves are visible.
Return
int: Number of processed FXs
Error
if arguments are not valid.

ApplyToAllFXProcessors(Score score, staves, int firstBar, int lastBar, function processFunc)

Apply a function to all FXProcessors in the score, or staff, or in a range of bars.

FX attached to instrument are not processed.

ParameterTypeDefaultDescription
scoreScore score
staves nil
  • nil means all staves
  • a Staff object to apply only to that staff
  • a table of Staff to apply to a list of staves
firstBarint1First bar to start applying the function.
lastBarintscore.NumberOfBarsLast bar to stop applying the function.
processFuncfunction Function with two FXProcessor and Staff arguments, which returns true (= 1) if FXProcessor has been processed, -1 to stop the process. Other returned values are ignored, process continue to next FXProcessor.
Return
int: Number of processed FXProcessors
Error
if arguments are not valid.
See
ApplyToAllSelectedFXProcessors