LoadLibrary analogous function?

[…]

(well not full MIDI - I just want to be able to get SDL events from
my MIDI keyboard :slight_smile:

This might be nice as well.

So whoever commented on this before - WHERE IS IT???

MIDI? Well, I’m into audio, so I usually comment on that sort of stuff.
:slight_smile:

We discussed some MIDI related project of yours, but I can’t remember any
detailed MIDI API design discussions, nor any official statements on SDL
1.2 or 1.3 and MIDI.

I remember some idea about receiving MIDI messages as SDL events,
though… (And adding timestamps to SDL the events for better accuracy.)

Normal messages are usually 1…4 bytes, so they could easilly be passed
around inside SDL events;

typedef struct
{
	Uint8 type;
	Uint8 size;
	Uint8 data[4];
} SDL_MIDIEvent;

No parameters to set for a basic MIDI interface, so "open input/output"
flags should do;

int SDL_OpenMIDI(int open_input, int open_output);
void SDL_CloseMIDI(void);	/* Actually "SDL_OpenMIDI(0,0);" */

Sending MIDI messages of any size is trivial;

int SDL_SendMIDI(Uint8 *data, int size);

The messy part would be receiving “long messages” (SysEx…). One
could use an internal circular buffer (which skips to avoid wrapping) to
store the data blocks, and pass direct buffer pointers inside the
"SDL_LongMIDIEvent" events.

A special “SDL_FreeMIDIBuffer(SDL_MIDIEvent *midievent)” call would be
required, or the MIDI code would require some hack to make sure you’ve
removed the event after the long MIDI event from the SDL event queue
before freeing buffer space. heh

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Thursday 30 August 2001 09:25, winterlion wrote:

Sorry if this already figures somewhere else, but where is the 1.3 API
supposed to be discussed? This list? I’m looking forward for it and
would be pleased to add my 2 cents, provided there is room for it.

Yes, is there any other forum to discuss the API changes needed? I have
also some experiences with SDL (I’m writing an emulator) that should
change in the future.

Not yet. We’re still ironing out stupid things like “how do we build it?”

Thanks though. We’ll let you know as soon as there’s something to see and
comment on.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment