E:/VEMUS/Vemus/include/MidiShare.h File Reference

#include "windows.h"

Go to the source code of this file.

Classes

struct  TMidiSEX
struct  TMidiST
struct  TMidiEv
struct  TMidiSeq
struct  TFilter
struct  SlotRefNum
struct  TSlotInfos
struct  TDriverOperation
struct  TDriverInfos
struct  TSyncInfo
struct  TSmpteLocation

Defines

#define MIDISHAREAPI   __declspec(dllimport)
#define MSALARMAPI   CALLBACK
#define typeNote   0
#define typeKeyOn   1
#define typeKeyOff   2
#define typeKeyPress   3
#define typeCtrlChange   4
#define typeProgChange   5
#define typeChanPress   6
#define typePitchWheel   7
#define typeSongPos   8
#define typeSongSel   9
#define typeClock   10
#define typeStart   11
#define typeContinue   12
#define typeStop   13
#define typeTune   14
#define typeActiveSens   15
#define typeReset   16
#define typeSysEx   17
#define typeStream   18
#define typePrivate   19
#define typeProcess   128
#define typeDProcess   129
#define typeQuarterFrame   130
#define typeCtrl14b   131
#define typeNonRegParam   132
#define typeRegParam   133
#define typeSeqNum   134
#define typeTextual   135
#define typeCopyright   136
#define typeSeqName   137
#define typeInstrName   138
#define typeLyric   139
#define typeMarker   140
#define typeCuePoint   141
#define typeChanPrefix   142
#define typeEndTrack   143
#define typeTempo   144
#define typeSMPTEOffset   145
#define typeTimeSign   146
#define typeKeySign   147
#define typeSpecific   148
#define typePortPrefix   149
#define typeRcvAlarm   150
#define typeApplAlarm   151
#define typeReserved   152
#define typeLastReserved   254
#define typeDead   255
#define NoteOff   0x80
#define NoteOn   0x90
#define PolyTouch   0xa0
#define ControlChg   0xb0
#define ProgramChg   0xc0
#define AfterTouch   0xd0
#define PitchBend   0xe0
#define SysRealTime   0xf0
#define SysEx   0xf0
#define QFrame   0xf1
#define SongPos   0xf2
#define SongSel   0xf3
#define UnDef2   0xf4
#define UnDef3   0xf5
#define Tune   0xf6
#define EndSysX   0xf7
#define MClock   0xf8
#define UnDef4   0xf9
#define MStart   0xfa
#define MCont   0xfb
#define MStop   0xfc
#define UnDef5   0xfd
#define ActSense   0xfe
#define MReset   0xff
#define MIDIerrSpace   -1
#define MIDIerrRefNum   -2
#define MIDIerrBadType   -3
#define MIDIerrIndex   -4
#define MIDIerrEv   -5
#define MIDIerrUndef   -6
#define MIDInoErr   0
#define MIDIerrDriverLoad   1
#define MIDIerrTime   2
#define MIDISyncExternal   0x8000
#define MIDISyncAnyPort   0x4000
#define DrvNameLen   32
#define Slot(ref)   ((ref).slotRef)
#define Link(e)   ( (e)->link )
#define Date(e)   ( (e)->date )
#define EvType(e)   ( (e)->evType )
#define RefNum(e)   ( (e)->refNum )
#define Port(e)   ( (e)->port )
#define Canal(e)   ( (e)->chan )
#define Chan(e)   ( (e)->chan )
#define Pitch(e)   ( (e)->info.note.pitch )
#define Vel(e)   ( (e)->info.note.vel )
#define Dur(e)   ( (e)->info.note.dur )
#define Data(e)   ( (e)->info.data )
#define LinkSE(e)   ( (e)->info.linkSE )
#define LinkST(e)   ( (e)->info.linkST )
#define TSNum(e)   ( (e)->info.timeSign.numerator )
#define TSDenom(e)   ( (e)->info.timeSign.denominator )
#define TSClocks(e)   ( (e)->info.timeSign.nClocks )
#define TS32nd(e)   ( (e)->info.timeSign.n32nd )
#define KSTon(e)   ( (e)->info.keySign.ton )
#define KSMode(e)   ( (e)->info.keySign.mode )
#define Tempo(e)   ( (e)->info.tempo )
#define SeqNum(e)   ( (e)->info.seqNum.number )
#define ChanPrefix(e)   ( (e)->info.data[0] )
#define PortPrefix(e)   ( (e)->info.data[0] )
#define First(e)   ( (e)->first )
#define Last(e)   ( (e)->last )
#define FirstEv(e)   ( (e)->first )
#define LastEv(e)   ( (e)->last )

Typedefs

typedef unsigned char Byte
typedef void * Ptr
typedef unsigned char Boolean
typedef struct TMidiSEX FAR * MidiSEXPtr
typedef struct TMidiST FAR * MidiSTPtr
typedef struct TMidiEv FAR * MidiEvPtr
typedef struct TMidiSeq FAR * MidiSeqPtr
typedef struct TFilter FAR * MidiFilterPtr
typedef char FAR * MidiName
typedef char DriverName [32]
typedef DriverName SlotName
typedef struct TSyncInfo FAR * SyncInfoPtr
typedef struct TSmpteLocation FAR * SmpteLocPtr
typedef short refNum
typedef short long a1
typedef short long long a2
typedef short long long long a3
typedef long code

Enumerations

enum  {
  MIDIOpenAppl = 1, MIDICloseAppl, MIDIChgName, MIDIChgConnect,
  MIDIOpenModem, MIDICloseModem, MIDIOpenPrinter, MIDIClosePrinter,
  MIDISyncStart, MIDISyncStop, MIDIChangeSync, MIDIOpenDriver,
  MIDICloseDriver, MIDIAddSlot, MIDIRemoveSlot, MIDIChgSlotConnect,
  MIDIChgSlotName
}
enum  SlotDirection {
  MidiInputSlot = 1, MidiOutputSlot, MidiInputOutputSlot, MidiInputSlot = 1,
  MidiOutputSlot, MidiInputOutputSlot
}
enum  { kSync24fs, kSync25fs, kSync30dfs, kSync30fs }

Functions

typedef void (CALLBACK *WakeupPtr)(short refnum)
short __declspec (dllimport) MidiGetVersion(void)

Variables

void short format
void short SmpteLocPtr loc
void MidiName applName
void LPVOID InfoZone
void RcvAlarmPtr alarm
short TDriverOperationop
Boolean TDriverInfosinfos
SlotRefNum MidiName name
SlotRefNum MidiName SlotDirection direction
SlotRefNum short index
void SlotRefNum slot
void SlotRefNum Boolean state
void MidiFilterPtr f
void short port
void short chan
void short type
void short dest
void long long v
void MidiEvPtr next
void long
void short
void MidiEvPtr e
void ApplyProcPtr proc
void MidiEvPtr unsigned long d
LPVOID LPVOID val
void unsigned long date


Define Documentation

#define ActSense   0xfe

#define AfterTouch   0xd0

#define Canal ( e   )     ( (e)->chan )

#define Chan ( e   )     ( (e)->chan )

#define ChanPrefix ( e   )     ( (e)->info.data[0] )

#define ControlChg   0xb0

#define Data ( e   )     ( (e)->info.data )

#define Date ( e   )     ( (e)->date )

#define DrvNameLen   32

#define Dur ( e   )     ( (e)->info.note.dur )

#define EndSysX   0xf7

#define EvType ( e   )     ( (e)->evType )

#define First ( e   )     ( (e)->first )

#define FirstEv ( e   )     ( (e)->first )

#define KSMode ( e   )     ( (e)->info.keySign.mode )

#define KSTon ( e   )     ( (e)->info.keySign.ton )

#define Last ( e   )     ( (e)->last )

#define LastEv ( e   )     ( (e)->last )

#define Link ( e   )     ( (e)->link )

#define LinkSE ( e   )     ( (e)->info.linkSE )

#define LinkST ( e   )     ( (e)->info.linkST )

#define MClock   0xf8

#define MCont   0xfb

#define MIDIerrBadType   -3

#define MIDIerrDriverLoad   1

#define MIDIerrEv   -5

#define MIDIerrIndex   -4

#define MIDIerrRefNum   -2

#define MIDIerrSpace   -1

#define MIDIerrTime   2

#define MIDIerrUndef   -6

#define MIDInoErr   0

#define MIDISHAREAPI   __declspec(dllimport)

#define MIDISyncAnyPort   0x4000

#define MIDISyncExternal   0x8000

#define MReset   0xff

#define MSALARMAPI   CALLBACK

#define MStart   0xfa

#define MStop   0xfc

#define NoteOff   0x80

#define NoteOn   0x90

#define Pitch ( e   )     ( (e)->info.note.pitch )

#define PitchBend   0xe0

#define PolyTouch   0xa0

#define Port ( e   )     ( (e)->port )

#define PortPrefix ( e   )     ( (e)->info.data[0] )

#define ProgramChg   0xc0

#define QFrame   0xf1

#define RefNum ( e   )     ( (e)->refNum )

#define SeqNum ( e   )     ( (e)->info.seqNum.number )

#define Slot ( ref   )     ((ref).slotRef)

#define SongPos   0xf2

#define SongSel   0xf3

#define SysEx   0xf0

#define SysRealTime   0xf0

#define Tempo ( e   )     ( (e)->info.tempo )

#define TS32nd ( e   )     ( (e)->info.timeSign.n32nd )

#define TSClocks ( e   )     ( (e)->info.timeSign.nClocks )

#define TSDenom ( e   )     ( (e)->info.timeSign.denominator )

#define TSNum ( e   )     ( (e)->info.timeSign.numerator )

#define Tune   0xf6

#define typeActiveSens   15

#define typeApplAlarm   151

#define typeChanPrefix   142

#define typeChanPress   6

#define typeClock   10

#define typeContinue   12

#define typeCopyright   136

#define typeCtrl14b   131

#define typeCtrlChange   4

#define typeCuePoint   141

#define typeDead   255

#define typeDProcess   129

#define typeEndTrack   143

#define typeInstrName   138

#define typeKeyOff   2

#define typeKeyOn   1

#define typeKeyPress   3

#define typeKeySign   147

#define typeLastReserved   254

#define typeLyric   139

#define typeMarker   140

#define typeNonRegParam   132

#define typeNote   0

#define typePitchWheel   7

#define typePortPrefix   149

#define typePrivate   19

#define typeProcess   128

#define typeProgChange   5

#define typeQuarterFrame   130

#define typeRcvAlarm   150

#define typeRegParam   133

#define typeReserved   152

#define typeReset   16

#define typeSeqName   137

#define typeSeqNum   134

#define typeSMPTEOffset   145

#define typeSongPos   8

#define typeSongSel   9

#define typeSpecific   148

#define typeStart   11

#define typeStop   13

#define typeStream   18

#define typeSysEx   17

#define typeTempo   144

#define typeTextual   135

#define typeTimeSign   146

#define typeTune   14

#define UnDef2   0xf4

#define UnDef3   0xf5

#define UnDef4   0xf9

#define UnDef5   0xfd

#define Vel ( e   )     ( (e)->info.note.vel )


Typedef Documentation

MidiEvPtr unsigned long short long a1

MidiEvPtr unsigned long short long long a2

MidiEvPtr unsigned long short long long long a3

void short Boolean

typedef unsigned char Byte

typedef long code

typedef char DriverName[32]

typedef struct TMidiEv FAR* MidiEvPtr

typedef struct TFilter FAR* MidiFilterPtr

typedef char FAR* MidiName

typedef struct TMidiSeq FAR* MidiSeqPtr

typedef struct TMidiSEX FAR* MidiSEXPtr

typedef struct TMidiST FAR* MidiSTPtr

typedef void* Ptr

MidiEvPtr unsigned long short refNum

typedef struct TSmpteLocation FAR* SmpteLocPtr

typedef struct TSyncInfo FAR* SyncInfoPtr


Enumeration Type Documentation

anonymous enum

Enumerator:
kSync24fs 
kSync25fs 
kSync30dfs 
kSync30fs 

anonymous enum

Enumerator:
MIDIOpenAppl 
MIDICloseAppl 
MIDIChgName 
MIDIChgConnect 
MIDIOpenModem 
MIDICloseModem 
MIDIOpenPrinter 
MIDIClosePrinter 
MIDISyncStart 
MIDISyncStop 
MIDIChangeSync 
MIDIOpenDriver 
MIDICloseDriver 
MIDIAddSlot 
MIDIRemoveSlot 
MIDIChgSlotConnect 
MIDIChgSlotName 

Enumerator:
MidiInputSlot 
MidiOutputSlot 
MidiInputOutputSlot 
MidiInputSlot 
MidiOutputSlot 
MidiInputOutputSlot 


Function Documentation

short __declspec ( dllimport   ) 

Keep Session Handle

Initialize Session

The VEMUS Event object which is used for inter-module communication

The audio buffer where the student performance is recoreded.

The instance of the VemusInputAudioBuffer used for recording. This can be referenced by the modules.

Path information (see definition of VemusPath_type)

Constructs a new VemusEvent

Parameters:
source The id of the module which is generating the event, or -1 if the message is sent by the GUI or the Core Services
message The type of the event
wparam First event parameter (semantics depend on the event type)
lparam Seconde event parameter (semantics depend on the event type)
Copy constructor

Assignment operator

Set the 4 extra float paramters

Set the 4 extra float paramters

The ID of the module which is generating this event.

The event type

First event parameter (semantics depend on the even type)

Second event parameter (semantics depend on the even type)

Extra float parameters

Exter long parameters

Open the audio buffer and allocate memory.

Close the audio buffer and de-allocate memory.

Reset the contents of the audio buffer

Is the buffer open?

Returns:
true if the buffer is open
Write 16-bit signed samples to the buffer
Parameters:
samples A pointer to a memory area with nsamples number of samples
nsamples The number of samples to be written
Read the audio buffer
Parameters:
pos Position in the audio buffer
Returns:
Pointer to the audio buffer memory
Warning:
Pointer-based memory access is unsafe but is provided for performance purposes.
Any attempt to read beyond the end of buffer, as reported by capacity() may result in a crash
Any attempt to read beyond the current prosition, as reported by size() will return undefined data
The pointer returned by this function will be invalidated if the buffer is closed
Get the buffer size, i.e. the index of the last valid samples
Returns:
The buffer size
Get the buffer capacity, i.e. the maximum number of samples that the buffer can hold
Returns:
The buffer capacity
Set the buffer mode of operation (default is linear)
Parameters:
bVal true for circular buffer, false for linear
Constructs a new VemusEvent
Parameters:
source The id of the module which is generating the event, or -1 if the message is sent by the GUI or the Core Services
message The type of the event
wparam First event parameter (semantics depend on the event type)
lparam Seconde event parameter (semantics depend on the event type)
Copy constructor

Assignment operator

Set the 4 extra float paramters

Set the 4 extra float paramters

The ID of the module which is generating this event.

The event type

First event parameter (semantics depend on the even type)

Second event parameter (semantics depend on the even type)

Extra float parameters

Exter long parameters

Open the audio buffer and allocate memory.

Close the audio buffer and de-allocate memory.

Reset the contents of the audio buffer

Is the buffer open?

Returns:
true if the buffer is open
Write 16-bit signed samples to the buffer
Parameters:
samples A pointer to a memory area with nsamples number of samples
nsamples The number of samples to be written
Read the audio buffer
Parameters:
pos Position in the audio buffer
Returns:
Pointer to the audio buffer memory
Warning:
Pointer-based memory access is unsafe but is provided for performance purposes.
Any attempt to read beyond the end of buffer, as reported by capacity() may result in a crash
Any attempt to read beyond the current prosition, as reported by size() will return undefined data
The pointer returned by this function will be invalidated if the buffer is closed
Get the buffer size, i.e. the index of the last valid samples
Returns:
The buffer size
Get the buffer capacity, i.e. the maximum number of samples that the buffer can hold
Returns:
The buffer capacity
Set the buffer mode of operation (default is linear)
Parameters:
bVal true for circular buffer, false for linear
Constructs a new VemusEvent
Parameters:
source The id of the module which is generating the event, or -1 if the message is sent by the GUI or the Core Services
message The type of the event
wparam First event parameter (semantics depend on the event type)
lparam Seconde event parameter (semantics depend on the event type)
Copy constructor

Assignment operator

Set the 4 extra float paramters

Set the 4 extra float paramters

The ID of the module which is generating this event.

The event type

First event parameter (semantics depend on the even type)

Second event parameter (semantics depend on the even type)

Extra float parameters

Exter long parameters

Open the audio buffer and allocate memory.

Close the audio buffer and de-allocate memory.

Reset the contents of the audio buffer

Is the buffer open?

Returns:
true if the buffer is open
Write 16-bit signed samples to the buffer
Parameters:
samples A pointer to a memory area with nsamples number of samples
nsamples The number of samples to be written
Read the audio buffer
Parameters:
pos Position in the audio buffer
Returns:
Pointer to the audio buffer memory
Warning:
Pointer-based memory access is unsafe but is provided for performance purposes.
Any attempt to read beyond the end of buffer, as reported by capacity() may result in a crash
Any attempt to read beyond the current prosition, as reported by size() will return undefined data
The pointer returned by this function will be invalidated if the buffer is closed
Get the buffer size, i.e. the index of the last valid samples
Returns:
The buffer size
Get the buffer capacity, i.e. the maximum number of samples that the buffer can hold
Returns:
The buffer capacity
Set the buffer mode of operation (default is linear)
Parameters:
bVal true for circular buffer, false for linear
Constructs a new VemusEvent
Parameters:
source The id of the module which is generating the event, or -1 if the message is sent by the GUI or the Core Services
message The type of the event
wparam First event parameter (semantics depend on the event type)
lparam Seconde event parameter (semantics depend on the event type)
Copy constructor

Assignment operator

Set the 4 extra float paramters

Set the 4 extra float paramters

The ID of the module which is generating this event.

The event type

First event parameter (semantics depend on the even type)

Second event parameter (semantics depend on the even type)

Extra float parameters

Exter long parameters

Open the audio buffer and allocate memory.

Close the audio buffer and de-allocate memory.

Reset the contents of the audio buffer

Is the buffer open?

Returns:
true if the buffer is open
Write 16-bit signed samples to the buffer
Parameters:
samples A pointer to a memory area with nsamples number of samples
nsamples The number of samples to be written
Read the audio buffer
Parameters:
pos Position in the audio buffer
Returns:
Pointer to the audio buffer memory
Warning:
Pointer-based memory access is unsafe but is provided for performance purposes.
Any attempt to read beyond the end of buffer, as reported by capacity() may result in a crash
Any attempt to read beyond the current prosition, as reported by size() will return undefined data
The pointer returned by this function will be invalidated if the buffer is closed
Get the buffer size, i.e. the index of the last valid samples
Returns:
The buffer size
Get the buffer capacity, i.e. the maximum number of samples that the buffer can hold
Returns:
The buffer capacity
Set the buffer mode of operation (default is linear)
Parameters:
bVal true for circular buffer, false for linear

typedef void ( CALLBACK *  WakeupPtr  ) 


Variable Documentation

void ApplAlarmPtr alarm

void MidiEvPtr unsigned long d

MidiEvPtr unsigned long date

void MidiEvPtr e

long long f

void short format

void LPVOID InfoZone

void long

void MidiName name

void ApplyProcPtr proc

void short

void Boolean state

void long v

LPVOID LPVOID val


Generated on Wed Jan 28 19:15:39 2009 for VEMUS by  doxygen 1.5.8