Sound Function - Sound Module Control Function

sdMidiSetSpeed

Sets the speed of a MIDI port

FORMAT

SDE_ERR sdMidiSetSpeed( handle, speed, fade_time )
SDMIDI handle
Sint16 speed
Sint16 fade_time

PARAMETER

 handle  Object port handle 
 speed  Target play speed 
 fade_time  Time to reach target play speed. 

RETURN

 SDE_ERR_NO_INIT  The Sound Library has not been initialized 
 SDE_ERR_HANDLE_NULL  The handle is NULL 
 SDE_ERR_HOST_CMD_BUF_NO_ENOUGH  No more host commands can be accepted 

DESCRIPTION

Sets MIDI sequence play speed.

The parameter "speed" which marks the target play speed is calculated as follows:

speed = m x 1000H - 1000H

where multiplier m = 1/64 to 3. Valid calculation results must be between -FC0H (min) and 1FFFH (max). Units of fade_time, which mark the time to reach play speed, are in milliseconds from 0000H (fastest) to 7FFFH (slowest).


NOTE

MIDI message sending API function sdMidiSendMes() is not affected.

REFERENCE

sdMidiSendMes()

sdMidiSetSpeed
COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999