Section FXProcessors
FXProcessor handling utility functions.
- See
- FXProcessor
Summary
| Return type | Function and summary |
|---|---|
| int | 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. |
| int | ApplyToAllSelectedFXProcessors(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. | |
| boolean | EnsureObjectInStaffArea(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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| source | FXProcessor | The FXProcessor to copy | |
| dest | FXProcessor | 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| instr | Instrument | The instrument | |
| fxproc | FXProcessor | 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| staff | Staff | staff | |
| obj | Object: Dynamic, StaffText, FXProcessor, Picture |
- Return
- boolean:
trueif object has been moved vertically,falseotherwise.
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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| processFunc | function | 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. | |
| printedStavesOnly | boolean | false | If 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
| score | Score | score | |
| staves | nil | ||
| firstBar | int | 1 | First bar to start applying the function. |
| lastBar | int | score.NumberOfBars | Last bar to stop applying the function. |
| processFunc | function | 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