* MIDI programming
@ 2000-01-14 23:22
2000-01-15 2:38 ` David Olofson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: @ 2000-01-14 23:22 UTC (permalink / raw)
To: linux-sound
Hi,
Can anyone give me a hint at writing a simple
program to read MIDI keyboard input? I don't want to parse
this input, just to test the presence of the keyboard under
Linux.
Taras
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: MIDI programming
2000-01-14 23:22 MIDI programming
@ 2000-01-15 2:38 ` David Olofson
2000-01-15 7:17 ` est
2000-01-16 16:27 `
2 siblings, 0 replies; 4+ messages in thread
From: David Olofson @ 2000-01-15 2:38 UTC (permalink / raw)
To: linux-sound
On Sat, 15 Jan 2000, Тарас П.
Гальченко wrote:
> Hi,
> Can anyone give me a hint at writing a simple
> program to read MIDI keyboard input? I don't want to parse
> this input, just to test the presence of the keyboard under
> Linux.
Well, all you do is
fh = open("/dev/midi00", O_RDONLY); // (Port 00 hardcoded)
and then you read() as from any character dev. close(fh) when done.
//David
.- M u C o S -------------------. .- A u d i a l i t y ----------------.
| A Free/Open Multimedia | | Rock Solid, Hard Real Time, |
| Plugin & Integration Standard | | Low Latency Signal Processing |
`------> www.linuxdj.com/mucos -' `--> www.angelfire.com/or/audiality -'
.- D a v i d O l o f s o n ------------------------------------------.
| Audio Hacker, Linux Advocate, Open Source Advocate, Singer/Composer |
`----------------------------------------------> audiality@swipnet.se -'
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: MIDI programming
2000-01-14 23:22 MIDI programming
2000-01-15 2:38 ` David Olofson
@ 2000-01-15 7:17 ` est
2000-01-16 16:27 `
2 siblings, 0 replies; 4+ messages in thread
From: est @ 2000-01-15 7:17 UTC (permalink / raw)
To: linux-sound
> Can anyone give me a hint at writing a simple
> program to read MIDI keyboard input? I don't want to parse
> this input, just to test the presence of the keyboard under
> Linux.
>
> Taras
dd bs=1 if=/dev/midi | od -t x1 --width=1
..works for me. I strike a key and get:
0000000 fe
*
0000020 90
0000021 5d
0000022 35
0000023 fe
0000024 90
0000025 5d
0000026 00
0000027 fe
*
which is a bunch of activie sensing bytes, a note-on/note-off pair and
more active sensing bytes. :)
E
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: MIDI programming
2000-01-14 23:22 MIDI programming
2000-01-15 2:38 ` David Olofson
2000-01-15 7:17 ` est
@ 2000-01-16 16:27 `
2 siblings, 0 replies; 4+ messages in thread
From: @ 2000-01-16 16:27 UTC (permalink / raw)
To: linux-sound
Hi!
On Fri, Jan 14, 2000 at 11:17:47PM -0800, est@hyperreal.org wrote:
> > Can anyone give me a hint at writing a simple
> > program to read MIDI keyboard input? I don't want to parse
> > this input, just to test the presence of the keyboard under
> > Linux.
> >
> > Taras
>
> dd bs=1 if=/dev/midi | od -t x1 --width=1
> ..works for me. I strike a key and get:
>
> 0000000 fe
> *
> 0000020 90
I've tried this before but never got a byte :(
Maybe, my configuration is incorrect:
OSS/Free:3.8s2++-971130
Load type: Driver loaded as a module
Kernel: Linux flex.dorms.msu.ru 2.2.14pre18 #2 Wed Jan 5 22:17:13 MSK 2000 i586
Config options: 0
Installed drivers:
Card config:
Audio devices:
0: ESS ES1868 AudioDrive (rev 11) (3.01)
Synth devices:
0: Yamaha OPL3
Midi devices:
0: MPU-401 (UART) MIDI
Timers:
0: System clock
Mixers:
0: Sound Blaster
I've tried both uart401 and mpu401 modules but none
of them responses to key presses. Maybe there's some trick
with interrupt setting?
The soundcard is detected right, audio and midi
playback is ok, but I can't read MIDI.
Can anyone help me in getting my MIDI keyboard
working under Linux? (In Windows it works perfectly.)
Thanks in advance,
Taras
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-01-16 16:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-14 23:22 MIDI programming
2000-01-15 2:38 ` David Olofson
2000-01-15 7:17 ` est
2000-01-16 16:27 `
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox