Section Instruments

Harmony's Instruments utility functions

See
Instrument
MusicalInstrument An abstraction level above Harmony's Instrument.
MusicalInstruments

Summary

Return typeFunction and summary
booleanInstrumentIsUsed(Score score, Instrument instr, boolean excludeMutedStaves)
Is instr Instrument used in score ?
 SetInstrumentFXProcessor(Instrument instr, FXProcessor fxproc)
Set the default FX Processor for an instrument.

Functions

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

InstrumentIsUsed(Score score, Instrument instr, boolean excludeMutedStaves)

Is instr Instrument used in score ?

Instument.IsUsed returns true even if applide to rule that is never used, or used by a staff that has Virtual Singer voice active. This function handles these cases.

ParameterTypeDefaultDescription
scoreScore score
instrInstrument instr
excludeMutedStavesbooleanfalse 
Return
boolean: boolean