[LAU] Record / playback MIDI through MIDI <--> USB cable?

Bill Purvis bill at billp.org
Wed Aug 21 14:17:30 CEST 2019


On 21/08/2019 13:00, Kevin Cole wrote:
> ....
> Well, as I mentioned in the first message, that's "working" -- sort
> of: I've already established that it sees the keyboard, and that I can
> send and receive. It's just that I was trying to do it with the raw
> /dev/ and assuming that the format of .mid files that I've downloaded
> and played on the computer was a pure MIDI stream, and that just using
> "cat" would send it to the synthesizer and play it back. Instead, it
> played a lot of random noise on the synthesizer, rather than the
> actual tunes I would hear with timidity. So, that means either (a) the
> .mid files aren't raw MIDI, or (b) there's some other magic in the
> communication protocol, e.g. baud, parity, headers, etc.  Or that was
> my thinking.  And, when I tried the reverse, using "cat" to redirect
> the output of the raw /dev/ to a file named play-me.mid, timidity
> didn't play back what I did on the Yamaha.
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user at lists.linuxaudio.org
> https://lists.linuxaudio.org/listinfo/linux-audio-user
Hi Kevin,

MIDI events just state the type,pitch,velocity(volume). The timing of events
has to be figured out by whatever is recording it. Just copying the 
events into
a file, then feeding that back means the timing is compressed into a 
very short
time, probably a small fraction of a second, hence the noise.

What is needed is a program that will record the events taking note of the
time between each one, then to play them back with pauses to replicate the
timing.

A .mid file contains both the events and the timing information, hence 
it can
play the events at the desired times.

Bill

-- 
+----------------------------------------+
| Bill Purvis                            |
| email: bill at billp.org                  |
+----------------------------------------+


More information about the Linux-audio-user mailing list