 | OrchestraAddInstrument Method (InstrumentType, Scale, Int32) |
Constructs a new instrument with a specified scale and adds it to the orchestra
Namespace: MidiGremlinAssembly: MidiGremlin (in MidiGremlin.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic Instrument AddInstrument(
InstrumentType instrumentType,
Scale scale,
int octave = 3
)
Public Function AddInstrument (
instrumentType As InstrumentType,
scale As Scale,
Optional octave As Integer = 3
) As Instrument
public:
Instrument^ AddInstrument(
InstrumentType instrumentType,
Scale^ scale,
int octave = 3
)
member AddInstrument :
instrumentType : InstrumentType *
scale : Scale *
?octave : int
(* Defaults:
let _octave = defaultArg octave 3
*)
-> Instrument
Parameters
- instrumentType
- Type: MidiGremlinInstrumentType
Enum that represents an instrument - scale
- Type: MidiGremlinScale
In the scale you want the music to be played - octave (Optional)
- Type: SystemInt32
The instruments offset from the base octave.
If this number is negative, the instrument will have a deeper sound,
and if it is positive it will have a lighter sound.
It can be between -5 and 5, but this is outside normal human hearing.
Return Value
Type:
Instrument Returns an instrument that plays in the specified scale.
See Also