Skip to contentSkip to conversation

Newbie question: Sending untimed MIDI data to ALSA seq

DISCUSSION Josh Lehan 3 participants 5 messages Jan 9, 2010 – Jan 13, 2010

lore
Share & tools
lore

Josh Lehan

author
#0 lore raw

Hello.

Newbie question: I'm wondering about sending untimed MIDI data to the ALSA sequencer subsystem.

The application would be for a "beep"-like program, from the command line, that instead of making beeps, would play MIDI instruments to make better-sounding beeps.

I have TiMidity hooked up into ALSA, as a softsynth, and it works just fine for playing MIDI data sent to it by ALSA.

The "aplaymidi" command works for .MID files, and the "vkeybd" program works for simulating a keyboard and sending in untimed MIDI data. The "aseqview" program also works great for watching the notes being played, as they go by. So, my MIDI software stack appears to be in order. I don't have a hardware synthesizer hooked up at the moment (my Kawai K1 is showing its age, and a few keys are broken).

I also looked at "amidi", which features a -S option to send in untimed MIDI bytes, but unfortunately, that addresses an entirely different namespace. Evidently, it only speaks to "RawMIDI" devices, of which TiMidity is not.

So, I can't generate untimed MIDI data on my own. I was thinking of writing a small "midibeep" program that would do this, similar to what vkeybd does, but without requiring any user interaction.

Does such a program already exist?

Thanks!

Josh

#1 lore raw

At Sat, 09 Jan 2010 15:13:23 -0800,

Quoted 25 lines · Josh Lehan

Hello.

Newbie question: I'm wondering about sending untimed MIDI data to the ALSA sequencer subsystem.

The application would be for a "beep"-like program, from the command line, that instead of making beeps, would play MIDI instruments to make better-sounding beeps.

I have TiMidity hooked up into ALSA, as a softsynth, and it works just fine for playing MIDI data sent to it by ALSA.

The "aplaymidi" command works for .MID files, and the "vkeybd" program works for simulating a keyboard and sending in untimed MIDI data. The "aseqview" program also works great for watching the notes being played, as they go by. So, my MIDI software stack appears to be in order. I don't have a hardware synthesizer hooked up at the moment (my Kawai K1 is showing its age, and a few keys are broken).

I also looked at "amidi", which features a -S option to send in untimed MIDI bytes, but unfortunately, that addresses an entirely different namespace. Evidently, it only speaks to "RawMIDI" devices, of which TiMidity is not.

Quoted 5 lines

So, I can't generate untimed MIDI data on my own. I was thinking of writing a small "midibeep" program that would do this, similar to what vkeybd does, but without requiring any user interaction.

Does such a program already exist?

I don't know of such thing, too.
It'd be nice to have in alsa-utils.

Takashi

#3 lore raw
In reply to Josh Lehan
Quoted 4 lines · Josh Lehan

I also looked at "amidi", which features a -S option to send in untimed MIDI bytes, but unfortunately, that addresses an entirely different namespace. Evidently, it only speaks to "RawMIDI" devices, of which TiMidity is not.

Try the snd-virmidi driver. It is intended to make sequencer ports available as OSS midi devices, but you also get RawMIDI ports for free.

HTH
Clemens

author
#2 lore raw
In reply to Takashi Iwai
Quoted 7 lines · Takashi Iwai

At Sat, 09 Jan 2010 15:13:23 -0800,

Quoted 5 lines · Josh Lehan

Hello.

Newbie question: I'm wondering about sending untimed MIDI data to the ALSA sequencer subsystem.

Quoted 8 lines
Quoted 5 lines

The application would be for a "beep"-like program, from the command line, that instead of making beeps, would play MIDI instruments to make better-sounding beeps.

Does such a program already exist?

I don't know of such thing, too.
It'd be nice to have in alsa-utils.

Thanks for the suggestion!

A few days ago, I started writing a program to do just this. It is coming along nicely. When it's finished, I'll post a link to it here, for your review.

Josh

author
#4 lore raw
In reply to Clemens Ladisch
Quoted 8 lines · Clemens Ladisch
Quoted 4 lines · Josh Lehan

I also looked at "amidi", which features a -S option to send in untimed MIDI bytes, but unfortunately, that addresses an entirely different namespace. Evidently, it only speaks to "RawMIDI" devices, of which TiMidity is not.

Try the snd-virmidi driver. It is intended to make sequencer ports available as OSS midi devices, but you also get RawMIDI ports for free.

Thanks for the suggestion. I looked into that kernel driver, but it's not a full solution to the problem. I have an idea for writing a little ALSA program (in userspace) that will accept arbitrary bytes as input, and feed it into the ALSA stack, so I'll work on that. If I am successful in getting that done, then it will be a really clean solution to this problem.

Josh