#ifndef MIDI_CAMD_H #define MIDI_CAMD_H /* Copyright © 1995-2001, The AROS Development Team. All rights reserved. $Id: camd.h 23422 2005-07-09 13:16:04Z ksvalast $ */ /* Some comments are needed in this file. */ #ifndef EXEC_TYPES_H # include #endif #ifndef EXEC_LISTS_H # include #endif #ifndef UTILITY_TAGITEM_H # include #endif #define CD_Linkages 0 typedef union{ ULONG l[2]; UBYTE b[4]; }MidiMsg; #define mm_Msg l[0] #define mm_Time l[1] #if !AROS_BIG_ENDIAN # define mm_Status b[3] # define mm_Data1 b[2] # define mm_Data2 b[1] # define mm_Port b[0] #else # define mm_Status b[0] # define mm_Data1 b[1] # define mm_Data2 b[2] # define mm_Port b[3] #endif #define mm_Data b struct MidiCluster{ struct Node mcl_Node; WORD mcl_Participants; struct List mcl_Receivers; struct List mcl_Senders; WORD mcl_PublicParticipants; UWORD mcl_Flags; /* Private data */ }; /* Please use GetMidiLinkAttrsA instead of reading directly, and no writing is allowed. */ struct MidiLink{ struct Node ml_Node; WORD ml_Pad; struct MinNode ml_OwnerNode; struct MidiNode *ml_MidiNode; struct MidiCluster *ml_Location; char *ml_ClusterComment; UBYTE ml_Flags; UBYTE ml_PortID; UWORD ml_ChannelMask; ULONG ml_EventTypeMask; union SysExFilter{ UBYTE b[4]; ULONG sxf_Packed; }ml_SysExFilter; APTR ml_ParserData; APTR ml_UserData; /* Private data may follow. (currently not, but..) */ }; #if !AROS_BIG_ENDIAN # define sxf_Mode b[3] # define sxf_ID1 b[2] # define sxf_ID2 b[1] # define sxf_ID3 b[0] #else # define sxf_Mode b[0] # define sxf_ID1 b[1] # define sxf_ID2 b[2] # define sxf_ID3 b[3] #endif #define MLTYPE_Receiver 0 #define MLTYPE_Sender 1 #define MLTYPE_NTypes 2 #define MLF_Sender 1 #define MLF_PartChange 2 #define MLF_PrivateLink 4 #define MLF_DeviceLink 8 #define MLINK_Base (TAG_USER+65) enum{ MLINK_Location=MLINK_Base, MLINK_ChannelMask, MLINK_EventMask, MLINK_UserData, MLINK_Comment, MLINK_PortID, MLINK_Private, MLINK_Priority, MLINK_SysExFilter, MLINK_SysExFilterX, MLINK_Parse, MLINK_Reserved, MLINK_ErrorCode, MLINK_Name }; #define SXF_ModeBits 4 #define SXF_CountBits 3 #define SXFM_Off 0 #define SXFM_1Byte 0 #define SXFM_3Byte 4 /* Please use GetMidiAttrsA instead of reading directly, and no writing is allowed. */ struct MidiNode{ struct Node mi_Node; UWORD mi_ClientType; struct Image *mi_Image; struct MinList mi_OutLinks; struct MinList mi_InLinks; struct Task *mi_SigTask; struct Hook *mi_ReceiveHook; struct Hook *mi_ParticipantHook; BYTE mi_ReceiveSigBit; BYTE mi_ParticipantSigBit; UBYTE mi_ErrFilter; UBYTE mi_pad; ULONG *mi_TimeStamp; ULONG mi_MsgQueueSize; ULONG mi_SysExQueueSize; /* Private data. */ }; #define CCType_Sequencer 1 #define CCType_SampleEditor 2 #define CCType_PatchEditor 4 #define CCType_Notator 8 #define CCType_EventProcessor 16 #define CCType_EventFilter 32 #define CCType_EventRouter 64 #define CCType_ToneGenerator 128 #define CCType_EventGenerator 256 #define CCType_GraphicAnimator 512 #define MIDI_Base (TAG_USER+65) enum{ MIDI_Name=MIDI_Base, MIDI_SignalTask, MIDI_RecvHook, MIDI_PartHook, MIDI_RecvSignal, MIDI_PartSignal, MIDI_MsgQueue, MIDI_SysExSize, MIDI_TimeStamp, MIDI_ErrFilter, MIDI_ClientType, MIDI_Image, MIDI_ErrorCode }; enum{ CME_NoMem=801, CME_NoSignals, CME_NoTimer }; #define CME_NoUnit(a) (820+(a)) enum{ CMB_Note, CMB_Prog, CMB_PitchBend, CMB_CtrlMSB, CMB_CtrlLSB, CMB_CtrlSwitch, CMB_CtrlByte, CMB_CtrlParam, CMB_CtrlUndef, CMB_Mode, CMB_ChanPress, CMB_PolyPress, CMB_RealTime, CMB_SysCom, CMB_SysEx }; #define CMF_Note (1L<mm_Msg) enum{ CMEB_MsgErr, CMEB_BufferFull, CMEB_SysExFull, CMEB_ParseMem, CMEB_RecvErr, CMEB_RecvOverflow, CMEB_SysExTooBig }; #define CMEF_MsgErr (1L<