MuseScore Plugins  3.5
Plugins API for MuseScore
Properties | List of all members
Channel Class Reference

Provides an access to channel properties. More...

Inheritance diagram for Channel:
Inheritance graph
[legend]
Collaboration diagram for Channel:
Collaboration graph
[legend]

Properties

QString name
 Name of this channel.
 
int volume
 Channel volume, from 0 to 127. More...
 
int pan
 Channel pan, from 0 to 127. More...
 
int chorus
 Channel chorus, from 0 to 127. More...
 
int reverb
 Channel reverb, from 0 to 127. More...
 
bool mute
 Whether this channel is muted. More...
 
int midiProgram
 MIDI program number, from 0 to 127. More...
 
int midiBank
 MIDI patch bank number. More...
 

Detailed Description

Provides an access to channel properties.

Similar to Mixer, changes to some of the playback-related properties are not recorded to undo stack and are not revertable with standard user-visible "undo" action. Changing MIDI patch though is undoable in normal way ("dock" type plugins may need to call Score::startCmd / Score::endCmd for that to work properly).

Iterating over all channels in the current score can be done as follows:

var parts = curScore.parts;
for (var i = 0; i < parts.length; ++i) {
var part = parts[i];
var instrs = part.instruments;
for (var j = 0; j < instrs.length; ++j) {
var instr = instrs[j];
var channels = instr.channels;
for (var k = 0; k < channels.length; ++k) {
var channel = channels[k];
channel.volume = 64; // just for example, changing the channel's volume
}
}
}
Since
MuseScore 3.5

Property Documentation

◆ chorus

int chorus
readwrite

Channel chorus, from 0 to 127.

Note
Changing this property is not revertable with a standard "undo" action. Plugins may need to handle reverting this property change if necessary.

◆ midiBank

int midiBank
readwrite

MIDI patch bank number.

Changing this property is recorded to the program's undo stack and can be reverted with a standard "undo" action.

◆ midiProgram

int midiProgram
readwrite

MIDI program number, from 0 to 127.

Changing this property is recorded to the program's undo stack and can be reverted with a standard "undo" action.

◆ mute

bool mute
readwrite

Whether this channel is muted.

Note
Changing this property is not revertable with a standard "undo" action. Plugins may need to handle reverting this property change if necessary.

◆ pan

int pan
readwrite

Channel pan, from 0 to 127.

Note
Changing this property is not revertable with a standard "undo" action. Plugins may need to handle reverting this property change if necessary.

◆ reverb

int reverb
readwrite

Channel reverb, from 0 to 127.

Note
Changing this property is not revertable with a standard "undo" action. Plugins may need to handle reverting this property change if necessary.

◆ volume

int volume
readwrite

Channel volume, from 0 to 127.

Note
Changing this property is not revertable with a standard "undo" action. Plugins may need to handle reverting this property change if necessary.

The documentation for this class was generated from the following files: