Phoenix.pm: Playing MIDI with Perl on Windows

Scott Walters scott at illogics.org
Fri Aug 15 18:00:10 CDT 2003


Hmm. I don't think we should help Doug. I think he is trying trying
to write a Perl exploit for this:

http://www.cert.org/advisories/CA-2003-18.html

-scott

On  0, Doug Miles <doug.miles at bpxinternet.com> wrote:
> 
> Chris Krum wrote:
> >>Hey all!
> >>
> >>I'm looking for a solution to play MIDI files from Perl on Windows.  I'm
> >>already aware of Win32API::MIDI on CPAN, but it requires Visual C++ to
> >>compile, and I don't have that available.  There are other MIDI modules
> >>on CPAN, but they appear to be concerned with generating/reading/munging
> >>MIDI.  I was wondering if there is a way to do it using Win32::OLE.  I'm
> >>woefully (or blissfully) ignorant of the Windows API, so any ideas are
> >>appreciated.  Thanks!
> >>
> > 
> > I'm also interested in playing midi from perl. Here are a few questions to
> > help me understand your situation better.
> > 
> > Does this have to be a pure perl solution? Could you use a rendering engine
> > like Timidity++ to render the midi to a wave file and output that to the
> > soundcard? Are you restricted to midi or could you use something like SAOL?
> > Is your app generating the midi files or does it pull them from a file
> > system somewhere? Do you need to play the midi notes in realtime (like
> > creating your own midi instrument) or are they stored in files and played
> > back later?
> 
> Unfortunately, I can't answer all of those questions right now.  I 
> should be getting more information soon.  What I did find was 
> Win32::MCI::Basic.  I was excited at first, because it worked fine on my 
> WinME box (boo, hiss :) ), but have since discovered that it doesn't 
> work on Win2000 (and possibly all NT based systems - just a guess).  I'm 
> wondering if the MCI API was removed in NT.  I haven't finished with my 
> research yet.
> 
> All of that being said, I might be able to use mp3 or wav files instead, 
> so if anyone has any suggestions on playing those under windows, feel 
> free. :)
> 



More information about the Phoenix-pm mailing list