perltux has asked for the wisdom of the Perl Monks concerning the following question:

I just found out that somebody has written a Perl6 wrapper for the portMIDI library, see here:
https://github.com/Perl6-Noise-Gang/Audio-PortMIDI/
The original library is here:
http://portmedia.sourceforge.net/portmidi/

Since I would very much like to be able to use portMIDI with Perl5 I would like to know how hard it would be to port the Perl6 portMIDI wrapper to Perl5.

I only have average Perl5 programming experience, but have zero experience with Perl6 and have never written wrappers for C libraries (and don't have C/C++ progamming skills).

Replies are listed 'Best First'.
Re: portMIDI wrapper for Perl5
by afoken (Chancellor) on May 20, 2016 at 16:14 UTC
    Since I would very much like to be able to use portMIDI with Perl5 I would like to know how hard it would be to port the Perl6 portMIDI wrapper to Perl5.

    Perl6 and Perl5 are very different systems, better try to use a native interface to the library, i.e. XS or perhaps a Module based on Inline::C (which does most of the nasty XS stuff behind your back).

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: portMIDI wrapper for Perl5
by stevieb (Canon) on May 20, 2016 at 13:27 UTC

    If you're on a Windows platform, Win32::MIDI looks like it may be promising. I didn't see anything else after a very quick search on the CPAN, but you can have a look to see if any of them may fit the bill here.

      I'm on Linux, but I have already used both Win32::MIDI on Windows and MIDI::ALSA on Linux.
      The reason why I would prefer to use portMIDI is because it's platform-independent and works on OS X too.