Copyright © 2005-2019 MultiMedia Soft

MIDI.ChannelsSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the number of channels inside the loaded MIDI stream. The current number of channels can be retrieved through a call to the MIDI.ChannelsGet method.

Eventual new channels will be, by default, melodic. If the new number of channels should be smaller than the original one, any notes playing on removed channels will be stopped.

 

For further details about the use of MIDI protocol see the MIDIMan class section and the How to deal with MIDI protocol tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ChannelsSet (

nPlayerIndex as Int16,

nChannels as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes ChannelsSet (

Int16 nPlayerIndex,

Int16 nChannels

);


 

[C++]

public: enumErrorCodes ChannelsSet (

Int16 nPlayerIndex,

Int16 nChannels

);


 

 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nChannels

The number of channels inside the loaded MIDI stream.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.