[linux-audio-dev] HOw to create an ALSA out port

Jens M Andreasen jens.andreasen at chello.se
Mon Jul 25 03:10:59 EDT 2005


On Mon, 2005-07-25 at 00:50 +0200, Christoph Eckert wrote:
> Hi,
> 
> 
> I just wote a program to configure a m-audio Midisport 8x8.
> 
> Currently the program can only write a sysex file.
> 
> It would be convenient to send the data to the Midisport 
> control port instead. UNfortunately, I have no clue how to do 
> so easily.

But you know which port is the control port, right?
> 
> I only need to write sysex data which are kept in a character 
> array. Is there a possibility to easily
> 
> * connect to a certain port of a device (the Midisport control 
> port)

#include <sys/soundcard.h> // The oldfashioned way, sorry ;)

char sysexbuf[<somesize>];
int midifd = open("/dev/midi",O_WRONLY); // using the default device?

> * send the contents of the array to this port

write(midifd,&sysexbuf,sizeof sysexbuf);

> * close the port

close(midifd);

> I have already seen some documentation (especially the 
> examples of M- Nagorny), but as I just started to write code 
> it's still too complicated for me.
> 

Let's see if not someone will post the alsa version ... soon.

> Furthermore I was told that I do not need a fully featured 
> port and that a rawmidi port would be enough for my needs.
> 
> So, any pointer to some docs or example code I can understand 
> would be really cool.
> 
> 
> Thanks & best regards
> 
> 
>     ce
> 
-- 



More information about the linux-audio-dev mailing list