ChangeScoreControl

Changes a MIDI control value for a channel.

Synopsis

Err ChangeScoreControl( ScoreContext *ScoreCon, int32Channel, int32 Index, int32 Value )

Description

This function changes a specified MIDI control value for notes played on the specified channel. It's the equivalent of a MIDI control message, currently limited to control values of 7 (channel volume control) and 10 (channel pan control).

The function determines the control to change through the value passed in the index argument. It then assigns the value passed in the value argument to the control. For channel volume, the value can range from 0 to 127, with 0 as silence and 127 as maximum volume. For channel panning, the value can range from 0 to 127, with 0 playing all the notes in the left of a stereo output and 127 playing all the notes in the right of a stereo output.

Arguments

ScoreCon
Pointer to a ScoreContext data structure controlling playback.
Channel
The number of the MIDI channel for which to change the control.
Index
The number of the control to be changed (currently only 7 and 10 are recognized).
Value
A value from 0 to 127 used as the new control setting.

Return Value

This function returns 0 if successful or an error code (a negative value) if an error occurs.

Implementation

Library call implemented in music.lib V20.

Associated Files

score.h, music.lib

See Also

ChangeProgramControl(), ChangeScorePitchBend(), InterpretMIDIMessage(), StartScoreNote(), StopScoreNote()