BASS.NET API for the Un4seen BASS Audio LibraryBassMidi ClassBASS.NET API for the Un4seen BASS Audio Library
BASS .NET API wrapper for BASSMIDI.

Requires: bassmidi.dll - BASSMIDI Add-On - available @ www.un4seen.com.

Inheritance Hierarchy

SystemObject
  Un4seen.Bass.AddOn.MidiBassMidi

Namespace: Un4seen.Bass.AddOn.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public sealed class BassMidi

The BassMidi type exposes the following members.

Methods

  NameDescription
Public methodStatic memberBASS_MIDI_FontCompact
Compact a soundfont's memory usage.
Public methodStatic memberBASS_MIDI_FontFree
Frees a soundfont.
Public methodStatic memberBASS_MIDI_FontGetInfo(Int32)
Retrieves information on a soundfont.
Public methodStatic memberCode exampleBASS_MIDI_FontGetInfo(Int32, BASS_MIDI_FONTINFO)
Retrieves information on a soundfont.
Public methodStatic memberBASS_MIDI_FontGetPreset
Public methodStatic memberBASS_MIDI_FontGetPresetFonts
Retrieves the presets in a soundfont.
Public methodStatic memberBASS_MIDI_FontGetPresets
Retrieves the presets in a soundfont.
Public methodStatic memberBASS_MIDI_FontGetVolume
Retrieves a soundfont's volume level.
Public methodStatic memberCode exampleBASS_MIDI_FontInit(String)
Initializes a soundfont from a file (unicode).
Public methodStatic memberCode exampleBASS_MIDI_FontInit(String, BASSFlag)
Initializes a soundfont from a file (unicode).
Public methodStatic memberBASS_MIDI_FontInitUser
Initializes a soundfont via user callback functions.
Public methodStatic memberBASS_MIDI_FontLoad
Preloads presets from a soundfont.
Public methodStatic memberCode exampleBASS_MIDI_FontPack
Produces a compressed version of a soundfont.

Unicode version only here (BASS_UNICODE will be used automatically).

Public methodStatic memberBASS_MIDI_FontSetVolume
Sets a soundfont's volume level.
Public methodStatic memberBASS_MIDI_FontUnload
Unloads presets from a soundfont.
Public methodStatic memberCode exampleBASS_MIDI_FontUnpack
Produces a decompressed version of a packed soundfont.

Unicode version only here (BASS_UNICODE will be used automatically).

Public methodStatic memberBASS_MIDI_InFree
Frees a MIDI input device.
Public methodStatic memberBASS_MIDI_InGetDeviceInfo(Int32)
Retrieves information on a MIDI input device.
Public methodStatic memberBASS_MIDI_InGetDeviceInfo(Int32, BASS_MIDI_DEVICEINFO)
Retrieves information on a MIDI input device.
Public methodStatic memberBASS_MIDI_InGetDeviceInfos
Returns the total number of available MIDI input devices.
Public methodStatic memberBASS_MIDI_InGetGeviceInfos
Returns all available MIDI input devices.
Public methodStatic memberBASS_MIDI_InInit
Initializes a MIDI input device.
Public methodStatic memberBASS_MIDI_InStart
Starts a MIDI input device.
Public methodStatic memberBASS_MIDI_InStop
Stops a MIDI input device.
Public methodStatic memberBASS_MIDI_StreamCreate
Creates a sample stream to render real-time MIDI events.
Public methodStatic memberBASS_MIDI_StreamCreateEvents
Creates a sample stream from a sequence of MIDI events.
Public methodStatic memberBASS_MIDI_StreamCreateFile(Byte, Int64, Int64, BASSFlag, Int32)
Creates a sample stream from a MIDI memory byte[].

This overload implements Unicode filenames. The BASS_UNICODE flag will be added automatically.

Public methodStatic memberBASS_MIDI_StreamCreateFile(IntPtr, Int64, Int64, BASSFlag, Int32)
Creates a sample stream from a MIDI memory IntPtr.

This overload implements Unicode filenames. The BASS_UNICODE flag will be added automatically.

Public methodStatic memberBASS_MIDI_StreamCreateFile(String, Int64, Int64, BASSFlag, Int32)
Creates a sample stream from a MIDI sound file.

This overload implements Unicode filenames. The BASS_UNICODE flag will be added automatically.

Public methodStatic memberCode exampleBASS_MIDI_StreamCreateFileUser
Creates a sample stream from a MIDI file via a user callback function.
Public methodStatic memberBASS_MIDI_StreamCreateURL
Creates a sample stream from an MIDI file on the internet, optionally receiving the downloaded data in a callback.
Public methodStatic memberCode exampleBASS_MIDI_StreamEvent(Int32, Int32, BASSMIDIEvent, Int32)
Applies an event to a MIDI stream.
Public methodStatic memberCode exampleBASS_MIDI_StreamEvent(Int32, Int32, BASSMIDIEvent, Byte, Byte)
Applies an event to a MIDI stream.
Public methodStatic memberBASS_MIDI_StreamEvents(Int32, BASSMIDIEventMode, BASS_MIDI_EVENT)
Applies any number of events to a MIDI stream (BASS_MIDI_EVENTS_STRUCT).
Public methodStatic memberBASS_MIDI_StreamEvents(Int32, BASSMIDIEventMode, Int32, Byte)
Applies any number of events to a MIDI stream (BASS_MIDI_EVENTS_RAW).
Public methodStatic memberBASS_MIDI_StreamEvents(Int32, BASSMIDIEventMode, Int32, IntPtr, Int32)
Applies any number of events to a MIDI stream (BASS_MIDI_EVENTS_RAW).
Public methodStatic memberCode exampleBASS_MIDI_StreamGetChannel
Gets a HSTREAM handle for a MIDI channel (e.g. to set DSP/FX on individual MIDI channels).
Public methodStatic memberBASS_MIDI_StreamGetEvent
Retrieves the current value of an event in a MIDI stream channel.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetEvents(Int32, Int32, BASSMIDIEvent)
Retrieves the events in a MIDI file stream.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetEvents(Int32, Int32, BASSMIDIEvent, BASS_MIDI_EVENT)
Retrieves the events in a MIDI file stream.
Public methodStatic memberBASS_MIDI_StreamGetEventsCount
Retrieves the number of events in a MIDI file stream.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetFonts(Int32)
Retrieves the soundfont configuration of a MIDI stream, or the default soundfont configuration.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetFonts(Int32, BASS_MIDI_FONT, Int32)
Retrieves the soundfont configuration of a MIDI stream, or the default soundfont configuration.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetFonts(Int32, BASS_MIDI_FONTEX, Int32)
Retrieves the soundfont configuration of a MIDI stream, or the default soundfont configuration.
Public methodStatic memberBASS_MIDI_StreamGetFontsCount
Retrieves the number of elements in the soundfont configuration.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetFontsEx
Retrieves the soundfont configuration of a MIDI stream, or the default soundfont configuration.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32)
Retrieves a marker from a MIDI stream.
Public methodStatic memberCode exampleBASS_MIDI_StreamGetMark(Int32, BASSMIDIMarker, Int32, BASS_MIDI_MARK)
Retrieves a marker from a MIDI stream.
Public methodStatic memberBASS_MIDI_StreamGetMarks
Retrieves the markers in a MIDI file stream.
Public methodStatic memberBASS_MIDI_StreamGetMarksCount
Retrieves the number of markers in a MIDI file stream.
Public methodStatic memberBASS_MIDI_StreamGetTrackCount
Returns the total number of tracks contained in the MIDI stream.
Public methodStatic memberBASS_MIDI_StreamLoadSamples
Preloads the samples required by a MIDI file stream.
Public methodStatic memberCode exampleBASS_MIDI_StreamSetFonts(Int32, BASS_MIDI_FONT, Int32)
Applies a soundfont configuration to a MIDI stream, or sets the default soundfont configuration.
Public methodStatic memberCode exampleBASS_MIDI_StreamSetFonts(Int32, BASS_MIDI_FONTEX, Int32)
Applies a soundfont configuration to a MIDI stream, or sets the default soundfont configuration.
Public methodStatic memberFreeMe
Unloads this library. This must be called when you have previously called LoadMe.
Public methodStatic memberCode exampleLoadMe
Loads this library into memory. The library will be search in the current application directory.
Public methodStatic memberCode exampleLoadMe(String)
Loads this library into memory. The library will be loaded from the given path.
Top
Fields

  NameDescription
Public fieldStatic memberSupportedStreamExtensions
Supported file extensions of the bassmidi.dll
Public fieldStatic memberSupportedStreamName
Supported file format name of the bassmidi.dll
Top
Remarks

BASSMIDI is an extension to the BASS audio library, enabling the playing of MIDI files (Musical Instrument Digital Interface), using SF2 soundfonts to provide the sounds.

The MIDI format is used in very much the same way as any of the built-in BASS stream formats - simply call the MIDI stream creation function instead of the BASS built-in functions. The BASS plugin system (see BASS_PluginLoad) is also supported.

SF2 soundfonts are used to provide the sounds. There are several soundfonts available on the internet. One example (Chorium) is available from the BASS webpage. On Win32, the Creative 4MB/2MB soundfont (CT4MGM.SF2/CT2MGM.SF2) will be used by default when it's present (in the Windows system directory).

See Also

Reference