This is the VoxWare midi driver for serial ports and Newmidi midi driver suite. The one for VoxWare is ported from Linux to FreeBSD. Tsuyoshi Iguchi-san has made a great effort for the initial port against 3.1-STABLE VoxWare, and I(Seigo Tanimura) have ported it to 4.0-CURRENT VoxWare, continuing further work on Newmidi.
With this driver, you plug your midi module with a computer port into the serial port to use playmidi, rosegarden and other popular midi players and tools for VoxWare. I tried playing a midi sequence with heavy exclusives using playmidi to get NO latency on the tempo at all like sbmidi. Also, you get to have your favorite tune with Luigi's new audio driver.
Tsuyoshi-san and I are working to merge his driver into CURRENT. We would like anyone interested to have a review on our work. Thanks in advance, and have a nice tune!
You should have already got one, I hope.
Supported Cards:
Midi modules and instruments can be connected to your PC via an MPU401 midi interface. Most modern midi modules including Roland SC-{55,88} series have a {computer, host, etc} port. You can connect them to a serial port. A {computer, host, etc} port looks quite different from an ordinary common midi port, rather like a serial port on a Mac(on Roland's modules). The {computer, host, etc} port shoule be capable to receive at a bitrate of 38.4kbps.
If you are using a midi interface other than 16550.
If you would like to use a serial port, you need a cable to connect your midi module to your PC. For further information, please contact the manufacturer of your midi module.
We have the patches against 3.1-STABLE and 4.0-CURRENT at this moment.
http://www.eie.yz.yamagata-u.ac.jp/~a95516/zinnia/hack/rsmidi/uart16550patch.tar.gz
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-31stable-19990511.diff.gz(MFC up to uart16550-19990509.diff.gz, reported to reboot sometimes)
http://www.sfy.gr.jp/~zinnia/archives/uart16550-stable.19990609.patch.gz(MFC up to uart16550-19990605.diff.gz)
http://www.eie.yz.yamagata-u.ac.jp/~a95516/zinnia/hack/rsmidi/uart16550.egcsfixed.diff.gz
http://www.freebsd.org/~tanimura/newmidi/patches/newmidi-19991023.diff.gz(Support for CS461x/428x and GUS, some bug fix)
http://www.freebsd.org/~tanimura/newmidi/patches/newmidi-19991122.diff.gz(Bridge drivers are now in -current)
http://www.freebsd.org/~tanimura/newmidi/patches/newmidi-20000103.diff.gz(The interrupt handler of csa has moved to the bridge. sbc is now mondatory for SB cards.)
http://www.freebsd.org/~tanimura/newmidi/patches/microtimeout-19991023.diff.gz(Parted from newmidi)
http://www.freebsd.org/~tanimura/newmidi/patches/microtimeout-19991122.diff.gz(Bridge drivers are now in -current)
http://www.freebsd.org/~tanimura/newmidi/patches/microtimeout-20000103.diff.gz(The interrupt handler of csa has moved to the bridge. sbc is now mondatory for SB cards.)
http://www.freebsd.org/~tanimura/newmidi/patches/apictimer-19991023.diff.gz(Parted from newmidi, only measures the bus clock)
http://www.freebsd.org/~tanimura/newmidi/patches/apictimer-19991122.diff.gz(Bridge drivers are now in -current)
http://www.freebsd.org/~tanimura/newmidi/patches/apictimer-20000103.diff.gz(The interrupt handler of csa has moved to the bridge. sbc is now mondatory for SB cards.)
http://www.eie.yz.yamagata-u.ac.jp/~a95516/zinnia/hack/rsmidi/uart16550-19990420.diff.gz(on new-bus merge)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-19990424.diff.gz(sioreg.h has moved to sys/isa)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-19990501.diff.gz(forgot to have the desert, i386/isa/sound/{midi_synth, midibuf}.c, submitted by: Juergen Lock <nox@jelal.kn-bremen.de>)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-19990509.diff.gz(LGSND now has a tune! Hooray!)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-19990517.diff.gz(OPL3 synthesizer now works under LGSND)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-19990523.diff.gz(Implemented the missing ioctls and the callbacks, more use of flags)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-19990605.diff.gz(OPL now uses pnp probe/attach, writeraw and readraw have moved to synthdev_info)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/uart16550-19990619.diff.gz(HEADS UP: PnP for OPL3 will not work until newbusification completes! midi(4) and seq(4) have mostly moved to their own source files, preparing to newbusify)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/newmidi-19990627.diff.gz(HEADS UP: the major number for midi(4) and seq(4) has changed! We now use newbus, and will no longer depend on pcm(4).)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/patches/newmidi-19990706.diff.gz(MPU401 now works. A fine timer at a period of 156us is introduced. New ioctl(2)s MIO{S,G}PASSTHRU joined, to allow passing midi messages through the driver when not busy.)
http://www.naklab.dnj.ynu.ac.jp/~tanimura/freebsd-serialmidi/midimanual.tar.gz(nroff man pages for midi(4) and seq(4))
% cd /usr/src/sys
% zcat (somewhere)/uart16550-31stable-19990609.diff.gz | patch
% cd /usr/src/sys
% zcat (somewhere)/uart16550.egcsfixed.diff.gz | patch
If you need microtimeout/APIC timer patches:% cd /usr/src/sys
% zcat (somewhere)/newmidi-20000103.diff.gz | patch -p1
% zcat (somewhere)/microtimeout-20000103.diff.gz | patch -p1
% zcat (somewhere)/apictimer-20000103.diff.gz | patch -p1
On an SB AWE card, the OPL3 will not sound if the EMU8000 chip is left alone. I have a quick hack to enable and initialize the EMU8000 so that the OPL3 will be audible. For newmidi-19990627.diff.gz and later, all you have to do is to configure a midi device for an EMU8000.
In sys/i386/isa/snd/opl.c, you have something like this:
If you have an EMU8000 at the port of 0x620, leave the line unchanged. If you do not have an EMU8000 (SB16, etc), comment out the line. If the EMU8000 is at the port other than 0x620, change the value appropriately.#define EMU8K_HACK_PORT 0x620
Or disable the sio device, eg:#device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4
device sio0 at isa? disable port "IO_COM1" flags 0x10 tty irq 4
The port and the irq for {uartsio0, midi*} may vary, of course.# Would you like VoxWare?
controller snd0 # Do not forget this!
device uartsio0 at isa? port 0x3f8 irq 4
# Or Newmidi?
controller pnp0 # PnP support for ISA
# Non-PnP
device midi0 at isa? port 0x3f8 irq 4 # Serial port.
device midi1 at isa? port 0x388 # OPL3 synthesizer.
device midi2 at isa? port 0x620 # EMU8000 wavetable synth, only to make OPL sound.
device midi3 at isa? port 0x330 # MPU401, irq is autodetected.
# PnP
device midi0 # This is enough.
# Bridge drivers for ISA PnP/PCI cards.
# Do not forget pcm and midi as well.
device sbc0 # Creative SoundBlaster ISA PnP/non-PnP
device gusc0 # Gravis UltraSound ISA PnP
# Configure THIS if your are using a GUS non-PnP!
device csa0 # Crystal Semiconductor CS461x/428x PCI
pseudo-device seq 1 # This is the sequencer.
Under newbus, this is done automatically by the pnp driver.pnp 1 0 os enable irq0 5 drq0 1 drq1 5 port0 0x220 port1 0x330 port2 0x388
In order to allow configuring pcm(4) and midi(4)/seq(4) independently, midi(4) and seq(4) have grabbed the new major number. It is 200 at this moment, going to change once more when I get to grab the official one. You need to remake the device nodes for them, eg:
# cd /dev
# rm midi* sequencer*
# mknod midi0 c 200 2 ; chmod 666 midi0
# mknod midi1 c 200 18 ; chmod 666 midi1
# ln -s midi0 midi
# mknod sequencer0 c 200 1 ; chmod 666 sequencer0
# ln -s sequencer0 sequencer
# mknod midistat c 200 6 ; chmod 666 midistat
Or the following thing with Newmidi:Card config:
(snip)
16550 UART Midi at 0x3f8 irq 4
Midi devices:
0: SoundBlaster 16 Midi
1: uart16550A MIDI
FreeBSD Midi Driver (newmidi) Oct 24 1999 16:15:05
Installed devices:
midi0: <16550 uart midi> at 0x3f8 irq 4
midi1: <CS461x Midi Interface> at irq 19
midi2: <SB Midi Interface> at 0x330 irq 5
midi3: <SB OPL FM Synthesizer> at 0x388
midi4: <Creative SB32 (CTL0042) PnP Wavetable Synthesizer> at 0x620, 0xa20, 0xe20
seq: 1 unit(s) configured.
FreeBSD Audio Driver (newpcm) Oct 24 1999 16:15:23
Installed devices:
pcm0: <CS461x PCM Audio> at irq 19 (1/1 channels duplex)
pcm1: <SoundBlaster 16 4.13> at io 0x220 irq 5 drq 1:5 (1/1 channels duplex)
Check the messages in italic.
See this page. The document is under construction.
The architecture of sound card bridge drivers(part of a mail to Doug Rabson) Note: sbcard is the former name of sbc.
You can either e-mail directly to Tsuyoshi-san or me, or have a discussion on freebsd-hackers/ freebsd-multimedia.
$Id: index.html,v 1.34 2000/01/03 12:00:01 tanimura Exp $