Patches item #1060511, was opened at 2004-11-04 21:18 Message generated for change (Comment added) made by zmoelnig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1060511...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: None Status: Open Resolution: None Priority: 5 Submitted By: Pablo MartÃn (caedesv) Assigned to: Nobody/Anonymous (nobody) Summary: patch for native alsa sequencer midi support
Initial Comment: The patch allows pd to be connected to different sources and sinks of midi messages through the alsa sequencer natively. It lets pd open 1 or more sequencer inputs or outputs. Alsa midi support is selected at compile time, if alsa headers are found alsa midi support will be compiled instead of oss. All midi events work ok, i think probably raw midi does not.
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2005-07-11 18:56
Message: Logged In: YES user_id=564396
implemented a first version of runtime switching between OSS-midi and ALSA-midi. i haven't made all the various APIs switchable (as is with audio), because it deemed me too much work...
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2005-07-11 17:00
Message: Logged In: YES user_id=564396
replaced s_midi_alsa.c with steve's version; this allows more than 1 MIDI output-port (or device) (read: more than 16 channels) and fixes [midiout]
----------------------------------------------------------------------
Comment By: steve (steve94075) Date: 2005-06-28 07:46
Message: Logged In: YES user_id=1271013
i did a little tweaking of this patch and right now it works on all 8 ports of my midisport8x8, plus sys_putmidibyte is implemented, so [midiout] actually triggers midi instead of an error message. it's a bit of a hack job, but it works great for me (and hopefully you as well).
my modified version of s_midi_alsa.c can be found at http://finkla.com/steve/s_midi_alsa.c if anyone with power to update the files here on sourceforge cares to, please do, but in any case that link should stay alive for quite a while.
-steve
----------------------------------------------------------------------
Comment By: Miller Puckette (millerpuckette) Date: 2005-05-18 06:45
Message: Logged In: YES user_id=313747
I didn't look closely, but I think to do this right would require actually giving a run-time choice between ALSA and OSS MIDI systems. A big job.
----------------------------------------------------------------------
Comment By: Guenter Geiger (ggeiger) Date: 2005-05-02 11:16
Message: Logged In: YES user_id=430561
Here is the patch and s_midi_alsa.c file as I use it in the Debian package currently. It seems that the author of the patch does not have to time to update it, or probably he just isn't aware of problems, so take it with a grain of salt. Also we have to check for the multiple devices problem steve.long mentions.
Guenter
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody) Date: 2005-05-01 23:14
Message: Logged In: NO
apparently [notein] for channels above 16 works as expected, 17-32 coming from the second device and so on, but [noteout] only sends to the first device, chans 17-32 send to device 1 just like 1-16, as do 33-48, etc.
steve.long@camp.org
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2005-02-25 18:46
Message: Logged In: YES user_id=564396
this crashes my system if i don't have an alsa-sequencer (e.g. no modules loaded)
----------------------------------------------------------------------
Comment By: Guenter Geiger (ggeiger) Date: 2004-11-12 10:55
Message: Logged In: YES user_id=430561
there is a bug when no alsa devices are present (or if they can't be opened). Attached addon patch fixes the problem.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1060511...
I wrote:
Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2005-07-11 18:56
Message: Logged In: YES user_id=564396
implemented a first version of runtime switching between OSS-midi and ALSA-midi. i haven't made all the various APIs switchable (as is with audio), because it deemed me too much work...
and miller wrote:
Comment By: Miller Puckette (millerpuckette) Date: 2005-05-18 06:45
Message: Logged In: YES user_id=313747
I didn't look closely, but I think to do this right would require actually giving a run-time choice between ALSA and OSS MIDI systems. A big job.
i admit that i have done a dirty job by finally making the choice ALSA-midi vs OSS-midi a run-time switch, but at least it is done. i haven't done excessive testing on OSS, but i guess it should work fine. (at least it worked with virtual OSS-emulation devices under alsa)
what remains to be done: probably (LATER ;-)) make all MIDI-APIs switchable at runtime, just like in "audio", not just OSS vs ALSA. however, i didn't dare to do so, as i can currently compile only on linux.
i would appreciate testing very much, as i really hope that this will go into the main branch of pd.
the patch (i attach it, since it seems sf has some problems in the last days) is against pd-0.38-4, and quite some files are involved; i hope it will apply cleanly against pd-0.39testX.
ah yes, and i used steves bug-fixes for the alsa-midi implementation.
mfg.asd.r IOhannes
IOhannes m zmoelnig wrote:
I wrote:
the patch (i attach it, since it seems sf has some problems in the last days) is against pd-0.38-4, and quite some files are involved; i hope it will apply cleanly against pd-0.39testX.
and alas! it did not apply cleanly. anyhow, there was only a single problem with the arguments for pdtk_pd_startup (which i have shamelessly used for adding MIDI-api flags)
anyhow, attached is a patch against the latest CVS snapshot hope this helps
mfg.asd.r IOhannes
what remains to be done: probably (LATER ;-)) make all MIDI-APIs switchable at runtime, just like in "audio", not just OSS vs ALSA. however, i didn't dare to do so, as i can currently compile only on linux.
well, i'm not sure, if we have to switch midi apis on other osses ... afaik portmidi works fine on osx and mmio works fine on windoze ...
i would appreciate testing very much, as i really hope that this will go into the main branch of pd.
it works fine for me ... beside the fact that the button called "use multiple alsa devices" in the oss midi menu is a bit confusing ;-)
the patch (i attach it, since it seems sf has some problems in the last days) is against pd-0.38-4, and quite some files are involved; i hope it will apply cleanly against pd-0.39testX.
it was easy to merge it into devel_0_39 ... beside the mentioned fact of the extended pdtk_pd_startup
thanks a lot for your work!
cheers ... tim