[kln2-devel] tse3: alsa, arts and maybe more!
Brought to you by:
wiecko
|
From: Marek W. <Mar...@fu...> - 2004-03-12 01:38:59
|
Hi e-body, I am leaving Warsaw today for 10 days. As usually, I cannot promise to check my e-mails regularly until Mar 23. Sorry. I do have some problems for you to solve while I am away, though. I hope someone will cope with them. I tried to look at possibility to use tse3 library ( http://tse3.sourceforge.net ) for two things: 1. ALSA midi output (really, really needed) 2. midi piano keyboard input (requested independently by few persons) [in future: 3. reading midi files for training notes for a specific piece of music rather than random ones]. Let's stick to the first subject for now. I don't have ALSA, I use OSS. But I managed to make TSE3 OSS interface work on my computer and tried to add ALSA support in a similar way. Unfortunately, I don't have ALSA and can't test it. If you look at http://tse3.sourceforge.net/doc/doxygen/namespaceTSE3_1_1Plt.html you will see, that tse3 deals with OSS, ALSA and aRts in a similar way: you just replace a OSSMidiScheduler for an ALSA or arts MidiScheduler. This means anyone who is interested can help add new features independently of which of these systems you use! :) ============== Problem 1: compilation This is a big problem. But I hope there is a simple solution. Things do not compile. A "-ltse3" option is not passed to linker even if tse3 library is installed. When linking, /bin/sh ../libtool --silent --mode=link --tag=CXX g++ ... breaks with an error midi-TSE.o: In function `TSEOSSMidiOutput::TSEOSSMidiOutput(void)': midi-TSE.o(.text+0x28): undefined reference to `TSE3::PhraseEdit::PhraseEdit(int)' and so on. To solve this manually, you just have to (in src/) copy the same line ("/bin/sh ../libtool ...") but with extra "-ltse3" (of course, you have to have tse3 library installed first!). Therefore,I cannot commit what I did to CVS, and changed kln2 sources are available only at: http://www.fuw.edu.pl/~wiecko/klearnnotes2_cvs040310.tar.bz2 This is the first problem to solve. If we cannot use CVS it is hard for a few people to work on things simultaneously. :( Adding "-ltse3" as an obligatory option is not a good idea. Users who do not have tse3 library should still have possibility to use kln2, just the extra features should be turned off. That's where the mess came from: configure needs to check if there is the tse3 lib, and if yes add some defines (WITH_TSE3 or HAVE_TSE3_TSE3_H) and -ltse3, if no don't define the constants and do not add -ltse3. So the question is: how to make the bloody configure.in.in work. Lines 7-8 of this file is how I tried to make it check for tse3 libs, but it doesn't. It checks for headers, but still doesn't find libs and doesn't add the -ltse3 option for the linker :( . Therefore, everything below the 9th line: # FROM KGUITAR 0.4.1 - check for TSE3 : is taken from kguitar. But it doesn't work either. :( Apparently I am missing something. Maybe some nasty workaround would do for now? Note that, if you modify the configure.in.in file you may need to type make -f admin/Makefile.common cvs to update 'configure' and other scripts. ============== Problem 2: extra features for OSS As I said, OSS with TSE3 basically works (provided you link manually). But I didn't have time to add volume (=midi velocity and mixer volumes) control. Also, after choosing OSS/TSE3 one should be able to turn midi on and off (on => internal_midifd=0, off => internal_midifd=-1; play => if (internal_midifd==-1) do nothing). Could someone with OSS look into this? TSE support for ALSA and aRts works in exactly the same way, so if anybody adds this for OSS, this should work for all the others too! :) ============== Problem 3: ALSA support * test if current ALSA MIDI works (choose it from the sound setup dialog) * if yes, add some TSE3 mixer support (currently volume setup methods are just blank {}) [this is like Problem 2, just for alsa] * if no, delete TSEAlsaMidiOutput definitions, and explicitly copy and modify TSEOSSMidiOutput (there may be a problem with inheriting) ============= Problem 4: aRts support Right now, if kln2 finds aRts (KDE sound server) it suspends it. This means other aRts programs cannot use soundcard when kln2 is running. So using aRts rather than turning it off would be very much welcome. And again, this looks like a VERY simple task - just replace OSSMidiScheduler with an arts one and add new stuff to the sound setup dialog. ============= If anyone would like to coordinate/organize work on one of the above subjects, please write a short note to this list. I hope the subject is challenging enough to make you all interested. :) Best regards, Marek PS: Problems with compilation shouldn't stop development of such important features. Yeah, probably we will need "very unusable" cvs branch in future, just to enable many people to work on things even if some fundamental problems are not solved. PPS: No, I don't plan to drop native OSS sound support. As it is already there, people without tse3 should be able to use sound. Why not? And because of the same reason, native (non tse) alsa would be nice too. It's just that tse solves many problems the same time in a standardized way, so this should be the focus for now. -- \/ /|\ Marek Wieckowski ##### | | | = . . = \|/ Institute of Theoretical Physics U | Warsaw University / ~ \___ | <| | | > . < | http://www.fuw.edu.pl/~wiecko <<___>> | http://klearnnotes2.sourceforge.net |