Hi. I've been trying to use midiout but it does not work when sending sysex because it sends 1 byte at a time. Chatting with matju on #irc where he showed me the source code, I think the problem is that midiout uses ultimately sys_alsa_putmidibyte to send
snd_seq_ev_set_sysex(&ev,1,&data)
one byte at a time
So we thought about writing an external that uses alsa-midi functions and he guided me the first steps. Now, the problem is that this external would need access to structure midi_handle, and variables alsa_midioutfd and alsa_nmidiout which are defined in s_midi_alsa.c (because creating and opening ALSA ports is handled there). The functions provided by s_midi are not good enough as I need to
snd_seq_ev_set_sysex(&ev, data_array_size,data_array)
So my question is: is it possible to write such external? or I need to patch the sources? Thanks!
On 2010-10-27 06:10, Enrique Vetere wrote:
Hi. I've been trying to use midiout but it does not work when sending sysex because it sends 1 byte at a time. Chatting with matju on #irc where he showed me the source code, I think the problem is that midiout uses ultimately sys_alsa_putmidibyte to send
snd_seq_ev_set_sysex(&ev,1,&data)
one byte at a time
So we thought about writing an external that uses alsa-midi functions and he guided me the first steps. Now, the problem is that this external would need access to structure midi_handle, and variables alsa_midioutfd and alsa_nmidiout which are defined in s_midi_alsa.c (because creating and opening ALSA ports is handled there). The functions provided by s_midi are not good enough as I need to
snd_seq_ev_set_sysex(&ev, data_array_size,data_array)
So my question is: is it possible to write such external? or I need to patch the sources?
IMHO this is a bug, so you should patch the source, then submit the patch to the tracker. Also it seems to bug differently on different OSs, only linux uses alsa. Pd's sysex implementation didn't work properly on WIN32 either last time I checked.
Martin
I agree it's a bug. So far I've done a simple c program that outputs the sysex correctly, so I would be able to patch. The thing is that if we keep midiout object we need to change it's interface (because it would have to accept a list instead of a float). So maybe better to create a new object sysexout?
PS: On the other hand I need some help building/configuring, I open another thread...
On 27 October 2010 09:36, Martin Peach martin.peach@sympatico.ca wrote:
On 2010-10-27 06:10, Enrique Vetere wrote:
Hi. I've been trying to use midiout but it does not work when sending sysex because it sends 1 byte at a time. Chatting with matju on #irc where he showed me the source code, I think the problem is that midiout uses ultimately sys_alsa_putmidibyte to send
snd_seq_ev_set_sysex(&ev,1,&data)
one byte at a time
So we thought about writing an external that uses alsa-midi functions and he guided me the first steps. Now, the problem is that this external would need access to structure midi_handle, and variables alsa_midioutfd and alsa_nmidiout which are defined in s_midi_alsa.c (because creating and opening ALSA ports is handled there). The functions provided by s_midi are not good enough as I need to
snd_seq_ev_set_sysex(&ev, data_array_size,data_array)
So my question is: is it possible to write such external? or I need to patch the sources?
IMHO this is a bug, so you should patch the source, then submit the patch to the tracker. Also it seems to bug differently on different OSs, only linux uses alsa. Pd's sysex implementation didn't work properly on WIN32 either last time I checked.
Martin
There's already a sysexin so sysexout makes sense.
I can help testing it on Os X.
p
On 27/10/2010 09:55, Enrique Vetere wrote:
I agree it's a bug. So far I've done a simple c program that outputs the sysex correctly, so I would be able to patch. The thing is that if we keep midiout object we need to change it's interface (because it would have to accept a list instead of a float). So maybe better to create a new object sysexout?
PS: On the other hand I need some help building/configuring, I open another thread...
On 27 October 2010 09:36, Martin Peach <martin.peach@sympatico.ca mailto:martin.peach@sympatico.ca> wrote:
On 2010-10-27 06:10, Enrique Vetere wrote: Hi. I've been trying to use midiout but it does not work when sending sysex because it sends 1 byte at a time. Chatting with matju on #irc where he showed me the source code, I think the problem is that midiout uses ultimately sys_alsa_putmidibyte to send snd_seq_ev_set_sysex(&ev,1,&data) one byte at a time So we thought about writing an external that uses alsa-midi functions and he guided me the first steps. Now, the problem is that this external would need access to structure midi_handle, and variables alsa_midioutfd and alsa_nmidiout which are defined in s_midi_alsa.c (because creating and opening ALSA ports is handled there). The functions provided by s_midi are not good enough as I need to snd_seq_ev_set_sysex(&ev, data_array_size,data_array) So my question is: is it possible to write such external? or I need to patch the sources? IMHO this is a bug, so you should patch the source, then submit the patch to the tracker. Also it seems to bug differently on different OSs, only linux uses alsa. Pd's sysex implementation didn't work properly on WIN32 either last time I checked. Martin
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Just to chime in, I was able to get midiout to send sysex data to a micro korg using midiout on Os X. What i discovered was that I had to put a 1ms delay between every byte or message being sent to midiout.
p
On 27/10/2010 09:36, Martin Peach wrote:
On 2010-10-27 06:10, Enrique Vetere wrote:
Hi. I've been trying to use midiout but it does not work when sending sysex because it sends 1 byte at a time. Chatting with matju on #irc where he showed me the source code, I think the problem is that midiout uses ultimately sys_alsa_putmidibyte to send
snd_seq_ev_set_sysex(&ev,1,&data)
one byte at a time
So we thought about writing an external that uses alsa-midi functions and he guided me the first steps. Now, the problem is that this external would need access to structure midi_handle, and variables alsa_midioutfd and alsa_nmidiout which are defined in s_midi_alsa.c (because creating and opening ALSA ports is handled there). The functions provided by s_midi are not good enough as I need to
snd_seq_ev_set_sysex(&ev, data_array_size,data_array)
So my question is: is it possible to write such external? or I need to patch the sources?
IMHO this is a bug, so you should patch the source, then submit the patch to the tracker. Also it seems to bug differently on different OSs, only linux uses alsa. Pd's sysex implementation didn't work properly on WIN32 either last time I checked.
Martin
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
IMHO this happens because the base implementation is buggy. Sending sysex has to happen as a stream, not byte per byte. So the midiout object would have to accept a list instead of a float. The 1ms delay might be what korg needs to understand a sloopy message. For information: What I try to do is send MMC sysex messages for transport control (PLAY/STOP/REC/etc). Sending byte per byte would work OK with ardour but wrong with qtractor. This might be because ardour is somewhat more resilient in the interpretation of the message (just as your korg synth works with 1ms delay). Fixing the base implementation to accept list instead of float should work. Unfortunately I cannot test on OSX...
On 27 October 2010 10:37, Paulo Casaes irmaosaturno@gmail.com wrote:
Just to chime in, I was able to get midiout to send sysex data to a micro korg using midiout on Os X. What i discovered was that I had to put a 1ms delay between every byte or message being sent to midiout.
p
On 27/10/2010 09:36, Martin Peach wrote:
On 2010-10-27 06:10, Enrique Vetere wrote:
Hi. I've been trying to use midiout but it does not work when sending sysex because it sends 1 byte at a time. Chatting with matju on #irc where he showed me the source code, I think the problem is that midiout uses ultimately sys_alsa_putmidibyte to send
snd_seq_ev_set_sysex(&ev,1,&data)
one byte at a time
So we thought about writing an external that uses alsa-midi functions and he guided me the first steps. Now, the problem is that this external would need access to structure midi_handle, and variables alsa_midioutfd and alsa_nmidiout which are defined in s_midi_alsa.c (because creating and opening ALSA ports is handled there). The functions provided by s_midi are not good enough as I need to
snd_seq_ev_set_sysex(&ev, data_array_size,data_array)
So my question is: is it possible to write such external? or I need to patch the sources?
IMHO this is a bug, so you should patch the source, then submit the patch to the tracker. Also it seems to bug differently on different OSs, only linux uses alsa. Pd's sysex implementation didn't work properly on WIN32 either last time I checked.
Martin
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
On 2010-10-27 09:37, Paulo Casaes wrote:
Just to chime in, I was able to get midiout to send sysex data to a micro korg using midiout on Os X. What i discovered was that I had to put a 1ms delay between every byte or message being sent to midiout.
That sounds like a bug as well....
Martin
I have been able to send midi out with alsa on linux with no problems. One problem I did have was that the sysex _input_ was limited to something around 100 bytes.. once you have a larger message than that the whole message is dropped.
I tried my patch on a windows machine once and sysex output didn't work at all.
I wanted to write a sysex editor for a piece of hardware I built, thought it would be cross platform, pd vanilla only, but nope...
-alex
On Wed, Oct 27, 2010 at 6:01 AM, Martin Peach martin.peach@sympatico.ca wrote:
On 2010-10-27 09:37, Paulo Casaes wrote:
Just to chime in, I was able to get midiout to send sysex data to a micro korg using midiout on Os X. What i discovered was that I had to put a 1ms delay between every byte or message being sent to midiout.
That sounds like a bug as well....
Martin
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev