Copyright © 2001-2018 MultiMedia Soft

MIDI.StreamStart method

Previous pageReturn to chapter overviewNext page

Remarks

 

Allows creating and starting playback of a MIDI stream that will receive and reproduce MIDI events. The stream can be stopped at any time through the MIDI.StreamStop method.

 

The MIDI stream can be fed in several ways:

through the MIDI.StreamEventApply method
through the MIDI.StreamEventsListApply method
through the MIDI.StreamEventsRawApply method
through the MIDI.InputDevicesStartOnPlayer method
through the MIDI.KeyboardNote method

 

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

 

 

Syntax

 

[Visual Basic]

control.MIDI.StreamStart (

nPlayer as Integer,

nFrequency as Long,

nMidiChannels as Integer,

bMono as enumBoolean

nBitsPerSample as Integer

) as enumErrorCodes


 

[C++]

short control.MIDI.StreamStart (

short nPlayer,

long nFrequency,

short nMidiChannels,

short bMono,

short nBitsPerSample

);


 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nFrequency

Sample rate of the sound stream (e.g. 44100)

nMidiChannels

Number of MIDI channels, can be in the range from 1 to 128.

bMono

Boolean flag that specifies if the stream will be in Mono or in Stereo.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

The sound stream will be in Stereo.

BOOL_TRUE

1

The sound stream will be in Mono

nBitsPerSample

Number of bits per sample (e.g. 8, 16 or 32)

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful