##### Sound Function - Sound Module Control Function

# sdMidiSetVol

Sets the volume of a MIDI port

### FORMAT

`

  SDE_ERR sdMidiSetVol( handle, vol, fade_time )
  SDMIDI handle
  Sint8 vol
  Sint16 fade_time

`

### PARAMETER

  `handle` | Object port handle
  `vol` | Target volume
  `fade_time` | Time to reach target volume

### RETURN

  SDE_ERR_HOST_CMD_BUF_NO_ENOUGH | No more host commands can be accepted |
  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 the volume of a MIDI port.

  volume: range is -007FH (min) to 0000H (mid) to 007FH (max).

  Units of `fade_time`," which mark the time to reach play speed, are in milliseconds from 0000H (fastest) to 7FFFH (slowest).

### NOTE

  Very low volume levels may be inaudible. Also, setting a higher level may not increase volume (if, for example, the level of the original data was already set high).

sdMidiSetVol

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999