The code to aseqview would also prove instructive if you go the ALSA route.
* Christian Henz [Fri, 12 Sep 2003 at 03:05 +0200] <quote> > On Thu, Sep 11, 2003 at 12:56:06PM -0700, Sean Don wrote: > > > > Hi, > > > > I'd like to program a "player piano" under GNU/Linux for OSS/Lite. All it would > > do is play MIDI files and light up a song's notes on a graphical keyboard. > > > > Unfortunately, my old SB16 sound card does not have AWE support and its Yamaha > > OPL3 FM synthesizer support sounds very inorganic. Hence, I'm looking for a way > > to use a "software sequencer" (like Timidity.) I tried Fluidsynth, but it causes > > midis to break up on my computer. > > > > Here are my questions: > > > > 1. Is is possible to have a previously written player for OSS (such as SDL Mixer > > or Timidity) play a stream in the background, and I somehow "read into" what > > notes are being played at every moment so I can light up the correct piano key? > > Unfortunately, Timidity is stand-alone; that is, is has no developmental > > libraries. > > > > Hmm, I don't know about OSS, but you really should consider using ALSA! > > A simple solution would be to use timidity or fluidsynth as standalone apps and > write a simple ALSA-sequencer client(check out > http://www.suse.de/~mana/alsa090_howto.html) that just reads incomming events and > draws the piano keys accordingly. Then you (a)connect your sequencer's MIDI-out to > timidity/fluidsynth AND your app. > > cheers, > Christian Henz > </quote> -- Hans Fugal | De gustibus non disputandum est. http://hans.fugal.net/ | Debian, vim, mutt, ruby, text, gpg http://gdmxml.fugal.net/ | WindowMaker, gaim, UTF-8, RISC, JS Bach --------------------------------------------------------------------- GnuPG Fingerprint: 6940 87C5 6610 567F 1E95 CB5E FC98 E8CD E0AA D460
pgp00000.pgp
Description: PGP signature
