Denis wrote: > When I using: > cat MIDI_MESSAGES_FILE > /dev/snd/midiC0D0 (MPU401) > Datas are sure to be transmitted. > > But when I using: > cat MIDI_MESSAGES_FILE > /dev/snd/midiC0D2 (Wavetable) > Datas are seem to be transmitted because of the information for > "/proc/asound/card0/midi2". > Output 0 > Tx bytes : 592 > > But NO SOUND! > I can't hear any sound from Wavetable by rawmidi. > The Wavetable only works with ALSA-SEQ Mode, Eg: pmidi can play midi files > successfully.
Rawmidi ports don't care about timing, they send the data when it is written to the device file. When using cat, all messages are sent immediately, without any timing. When you send a note-on message with echo -ne '\x90\x30\x7f' > /dev/snd/midiC0D2 and then a note-off message echo -ne '\x90\x30\x00' > /dev/snd/midiC0D2 then you'll hear a sound in the time span between those two messages. When you send note-on and note-off at the same time echo -ne '\x90\x30\x7f\x90\x30\x00' > /dev/snd/midiC0D2 nothing will be heard because because the note is silenced immediately. If you want to play sound with a rawmidi device, you have to use a program that waits for the appropriate time between messages, e.g. playmidi. HTH Clemens ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user