Re: [LAU] Audio in cgi?

From: david <gnome@email-addr-hidden>
Date: Sat Dec 12 2009 - 09:58:32 EET

Bob van der Poel wrote:
> I'm trying to write a cgi script for the MMA documentation which will
> play various sample midi files. I've got it creating files, etc. But,
> when I call timidity to play the file my apache log file has a message
> "Can't open output device". I'm assuming the the user www-data doen't
> have permission to access an audio port.
>
> So, I added www-data to the audio group ... still no playback.
>
> Any ideas on this (or a different approach! ... would javascript be
> any better?) appreciated.

I'm not clear about something here. You're running a CGI script to play
MIDI files. But doing that would only make them play on your server -
not the visitor's computer.

Presuming that the goal is for visitors to be able to play sample MIDI
files from the web page, there are Javascript players you could use on
the pages. I don't know how useful they might be for visitors, though -
not everyone's system comes setup to play MIDIs ... my system plays
MIDIs - when I fire up QSynth to do so - but even then it won't play
MIDIs from a web page (always reports there's no plugin to play MIDI). I
have to view source, download the MIDI file - then I can play it.

Perhaps in your CGI scripting you could have it "play" the MIDI to an
OGG or MP3 file and have THAT file play on the page?

-- 
David
gnome@email-addr-hidden
authenticity, honesty, community
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Sat Dec 12 12:15:02 2009

This archive was generated by hypermail 2.1.8 : Sat Dec 12 2009 - 12:15:02 EET