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

From: Jens M Andreasen <jens.andreasen@email-addr-hidden>
Date: Mon Jul 25 2005 - 10:10:59 EEST

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
>

-- 
Received on Mon Jul 25 12:15:06 2005

This archive was generated by hypermail 2.1.8 : Mon Jul 25 2005 - 12:15:06 EEST