Copyright © 2005-2019 MultiMedia Soft

MIDI.VoicesSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets the maximum number of voices to play at a time for supporting polyphony on the loaded MIDI stream. The current maximum number can be obtained through the MIDI.VoicesGet method.

The default number of voices for MIDI streams can be modified through the MIDI.VoicesDefaultSet method.

 

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 VoicesSet (

nPlayerIndex as Int16,

nVoices as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes VoicesSet (

Int16 nPlayerIndex,

Int16 nVoices

);


 

[C++]

public: enumErrorCodes VoicesSet (

Int16 nPlayerIndex,

Int16 nVoices

);


 

 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nVoices

The maximum number of voices to play at a time; the accepted range of values is from 1 to 256. The higher the number of voices, the higher will be the amount of needed CPU so by reducing the number of voices there will be some CPU saving.

 

 

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.