Copyright © 2005-2019 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 MIDIMan class section and the How to deal with MIDI protocol tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function StreamStart (

nPlayerIndex as Int16,

nFrequency as Int32,

nMidiChannels as Int16,

bMono as Boolean

nBitsPerSample as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes StreamStart (

Int16 nPlayerIndex,

Int32 nFrequency,

Int16 nMidiChannels,

Int16 bMono,

Int16 nBitsPerSample

);


 

[C++]

public: enumErrorCodes StreamStart (

Int16 nPlayerIndex,

Int32 nFrequency,

Int16 nMidiChannels,

Int16 bMono,

Int16 nBitsPerSample

);


 

 

 

Parameter

Description

 

 

nPlayerIndex

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:

Value

Meaning

false

The sound stream will be in Stereo.

true

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 (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.