Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Benno Senoner <sbenno@em.gardena.net>
To: linux-sound@vger.kernel.org
Subject: Re: midi controllers + laptop
Date: Mon, 01 May 2000 00:17:52 +0000	[thread overview]
Message-ID: <marc-linux-sound-95714035902810@msgid-missing> (raw)

Hi,

assumption 1:
you have a dumb MIDI interface which is a cable from serial port
to DIN connector, and requires that you run at 31250bps,
this will simply not work on a PC independently of the OS,
because the UARTS found in PC hardware simply do not support
the 31250 baudrate since the baudrate has to be an integer divisor
of 4*115200 , and unfortunately this is not possible for 31250.
(the AMIGA serial port was able to use the 31250bps rate, therefore
the MIDI interface was really cheap to implement)

assumption 2:
you have a true serial to MIDI interface
(like this one http://www.maxmidi.com/diy/serial/index.html)
which runs the PC to midi box at standard baudrates
(38400,57600 etc) and the MIDI part at 31250bps then
it sould be quite easy to support serial MIDI interfaces.

/dev/midi00 behaves like a std serial device except athat it runs 
always at 31250bps.

Therefore the trick would be to run your app using the 
LD_PRELOAD trick which overloads the open() syscall. 
(implementing the LD_PRELOAD wrapper should be really trivial,
but I have not that kind of hardware here to test that kind
of program)

The wrapper simply has to check if the opening of /dev/midi00
has been requested, then if yes open
/dev/ttyS0 (or S1) instead, set the the serial port in RAW mode
and baudrate to 38400 (or higher) and return the filedescriptor.

at this point apps using RAW MIDI I/O should work ok
(like Softwerk for example).

Notice that there are some apps which use the OSS or ALSA sequencer,
therefore this trick would not work.
But there seem to be solutions to this problem.
(alsa virtual MIDI port, and similar module for OSS)
(please look at the linux-audio-dev and alsa-devel archives of
the last two weeks )

ALSA folks, would it be possible to redirect the ALSA sequencer
output to a serial MIDI device ? If yes what are the right
steps to do this ?

Benno.

> hi,
> 
> i can't seem to find any info about using external midi interfaces with
> linux. i'm using a laptop (dell inspiron 7500, which works very well
> with linux!) so my soundcard (maestro IIe) doesn't have a midi port on
> it...i use a number of midi controllers (like the peavey pc1600 fader
> box) when performing, and i'd love to move some of my software over to
> linux...
> 
> so can i just get a standard midi interface and hook it up to my serial
> port? i can't find any info at all on this, all i'm finding is "how to
> play midi files using your soundcard type stuff."
> 
> thanks,
> douglas
> 

             reply	other threads:[~2000-05-01  0:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-01  0:17 Benno Senoner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-04-30 18:37 midi controllers + laptop douglas irving repetto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-sound-95714035902810@msgid-missing \
    --to=sbenno@em.gardena.net \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox