C# Class LitDev.LDMusic

Afficher le fichier Open project: litdev1/LitDev

Méthodes publiques

Méthode Description
EndNote ( Primitive value ) : void

Stop a note being played.

InstrumentName ( Primitive instrument ) : Primitive

Get an instrument name from its number.

PlayMusic ( Primitive notes ) : void

Plays musical notes.

PlayMusic2 ( Primitive notes, Primitive instrument, Primitive velocity, Primitive volume, Primitive pan, Primitive channel ) : void

Plays musical notes with specified instrument and MDI channel. Also set volume, pan (balance) and velocity (key hit speed).

PlayNote ( Primitive octave, Primitive note, Primitive channel ) : Primitive

Play an individual note (allows multi-channel instruments).

Reset ( ) : void

Reset (stop all music on all channels).

Private Methods

Méthode Description
ChangeInstrument ( int number, int channel ) : void
ChangePan ( int number, int channel ) : void
ChangeVolume ( int number, int channel ) : void
EnsureDeviceInit ( ) : void
PlayNote ( int number, int channel ) : void
PlayNote ( int octave, string note, int length, int channel ) : void
PlayNotes ( string song, int channel ) : void
ResetDefaults ( ) : void
ResetDevice ( ) : void
StopNote ( int number, int channel ) : void
midiOutClose ( IntPtr midiOutt ) : int
midiOutOpen ( IntPtr &midiOut, uint uDeviceID, IntPtr dwCallback, IntPtr dwCallbackInstance, uint dwFlags ) : int
midiOutReset ( IntPtr midiOutt ) : int
midiOutSetVolume ( IntPtr midiOut, uint dwVolume ) : int
midiOutShortMsg ( IntPtr midiOut, uint dwMsg ) : int

Method Details

EndNote() public static méthode

Stop a note being played.
public static EndNote ( Primitive value ) : void
value Primitive The note to stop (this is the value returned by PlayNote when the note was started).
Résultat void

InstrumentName() public static méthode

Get an instrument name from its number.
public static InstrumentName ( Primitive instrument ) : Primitive
instrument Primitive The instrument number.
Résultat Primitive

PlayMusic() public static méthode

Plays musical notes.
public static PlayMusic ( Primitive notes ) : void
notes Primitive /// A set of musical notes to play. The format is a subset of the Music Markup Language supported by QBasic. ///
Résultat void

PlayMusic2() public static méthode

Plays musical notes with specified instrument and MDI channel. Also set volume, pan (balance) and velocity (key hit speed).
public static PlayMusic2 ( Primitive notes, Primitive instrument, Primitive velocity, Primitive volume, Primitive pan, Primitive channel ) : void
notes Primitive /// A set of musical notes to play. The format is a subset of the Music Markup Language supported by QBasic. ///
instrument Primitive The instrument number.
velocity Primitive The key velocity (1 to 128, default 100).
volume Primitive Volume (0 to 100, default 50).
pan Primitive Pan left (-100) or right (100) (default 0).
channel Primitive The MIDI channel (1 to 16).
Résultat void

PlayNote() public static méthode

Play an individual note (allows multi-channel instruments).
public static PlayNote ( Primitive octave, Primitive note, Primitive channel ) : Primitive
octave Primitive The octave (0 to 8).
note Primitive The note ("A","F#","B-" etc).
channel Primitive The MIDI channel (1 to 16).
Résultat Primitive

Reset() public static méthode

Reset (stop all music on all channels).
public static Reset ( ) : void
Résultat void