Thread: [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 |
|
From: <oxy...@ya...> - 2004-03-13 21:10:11
|
Mo: I have alsa by default in Fedora core 1, so I think that I can test a binary with tse3 stuff. Here is a program that we can use to implement the voice/microphone input: http://www.geocities.com/harpin_floh/kguitune_page.html I used the same idea (but in hardware) when I did my desing of the nylon midi guitar. Instead of have the name note of the note that is playing, we can use it to trigger the namebuttons in kleannotes2. And for the fretboard here is other program that have multiple strings: http://www.geocities.com/harpin_floh/kguitune_page.html I contacted the kde spanish translation team and they are asking for a PO file to finish the translation. Cheers! Javier _________________________________________________________ Do You Yahoo!? La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx |
|
From: Marek W. <Mar...@fu...> - 2004-03-24 02:31:27
|
Hi, On Saturday 13 March 2004 22:10, javier wrote: > Here is a program that we can use to implement the > voice/microphone input: > > http://www.geocities.com/harpin_floh/kguitune_page.html ? It looks quite complicated (because of oscilloscope-like rather than note's name output). I extracted a part of gtune http://www.fuw.edu.pl/~wiecko/gtune-extractedConsoleTuner.tgz that works fine for me. All it would require is wrapping this into a Q_OBJECT class which would emit a signal rather than write output to stdout (and in future fine-tune it). The main problem here is that gtune is not GPL. :((( Someone who would deal with this subject would have to write to gtune people and ask them to GPL at least this part of the code [they made up some strange license themselves]. Could someone, please, volunteer to do this? * write a letter to the gtune men (Michael Celli and Harold C.L. Baur) and ask them to GPL this part of code * if they agree - implement this into kln2 (we can talk about details) * if they don't - find some other GPLed, very simple tuner, extract the tune recognition part (so that it worked as the above extraction from gtune) and put it into kln2. > And for the fretboard here is other program that have > multiple strings: > http://www.geocities.com/harpin_floh/kguitune_page.html Javier, I'm sorry, but this is exactly the same link as the one above. :/ Shouldn't it be something else? Considering your previous e-mail, maybe http://xstick.sourceforge.net/ ? > I contacted the kde spanish translation team and they > are asking for a PO file to finish the translation. So far I used Qt .ts / .qm files for translations. I'm not sure if it was reasonable (I guess the .po system is native for glibc and used more frequently). KDE translators are big and well organized group. It would be great if we could use their help. I had quite a bad experience with KDE files placement, though. For example. it is virtually impossible to make the helpfiles be found by KDE help viewer on every system :(. I contacted guys from other older projects and they have the same problem. Basically, if you make things within KDE package (I mean, make it really part of KDE distribution) it works. If you make an external package it should work for most people (if you do it right) but there is no way things like the helpfiles worked for everybody. So before switching to .po we have to check if this would not lead to similar problems. Could someone, please, volunteer to look at the subject? How should the .po translations be prepared and loaded? Is it KDE-independent? Where should be the files placed? Is it possible to automatically convert .po to .ts and vice versa? If yes, we could use KDE translators team help without changing a thing in kln2! :) Yes, this looks as the simplest solution: how to convert .ts to .po and vice versa? ~Marek -- \/ /|\ Marek Wieckowski ##### | | | = . . = \|/ Institute of Theoretical Physics U | Warsaw University / ~ \___ | <| | | > . < | http://www.fuw.edu.pl/~wiecko <<___>> | http://klearnnotes2.sourceforge.net |
|
From: Silhusk <si...@bl...> - 2004-03-15 02:35:45
|
Hi, I managed to compile the version of kln2 at > http://www.fuw.edu.pl/~wiecko/klearnnotes2_cvs040310.tar.bz2 by editing the file src/Makefile.am as follows: 14c14 < klearnnotes2_LDADD = $(LIB_KFILE) $(LIB_KDEPRINT) $(all_libraries) --- > klearnnotes2_LDADD = $(LIB_KFILE) $(LIB_KDEPRINT) $(all_libraries) $(LIBTSE3) this way it compiles also if you do a './config --disable-midisupport' (disable TSE3 support) or you don't have TSE3 installed. Now a new problem: althought everything compiles, when I run kln2 and change MIDI Output to 'OSS/TSE' the application crashes! I think this is due to TSEOSSMidiOutput constructor (more precisely to transport(&metronome, &scheduler)) but I cannot figure out how to correct this. Someone can help? By the time I'll try to deal with 'Problem 2' > ============== > 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). regards, Carlo |
|
From: Marek W. <Mar...@fu...> - 2004-03-24 02:35:46
|
Carlo,
On Monday 15 March 2004 03:35, Silhusk wrote:
> I managed to compile the version of kln2 [...]
> by editing the file src/Makefile.am as follows:
> [...] $(LIBTSE3)
On Thursday 18 March 2004 20:41, Silhusk wrote:
> here are my changes to TSE/OSS and TSE/Alsa support, plese test it
> and let me know about the results
Yes, it compiles both with and without TSE3.
> MIDI patches are not implemented yet, but volume should work.
No, for me it doesn't. I can't hear any sound when I choose
OSS/TSE. :( And when switching back to OSS/Free kln2 crushes in
OSSMidiOutput::addNoteToChord(). I am trying to figure out what
the problem is.
Anyway, as due to your correction to the Makefile.am everything
compiles, we can put the files to the CVS. As I said your
version doesn't work for me (though it doesn't crush either - as
long as I don't switch midi modes back and forth). Therefore I
think we should have both in CVS. But I also think your version
should be considered basis for further development (and my old
one should be just a backup).
I will commit my version (with your correction to Makefile.am)
in a moment and let you know.
~Marek
--
\/ /|\ Marek Wieckowski
##### | | |
= . . = \|/ Institute of Theoretical Physics
U | Warsaw University
/ ~ \___ |
<| | |
> . < | http://www.fuw.edu.pl/~wiecko
<<___>> | http://klearnnotes2.sourceforge.net
|
|
From: Marek W. <Mar...@fu...> - 2004-03-24 04:04:23
|
On Wed, 24 Mar 2004, Marek Wieckowski wrote:
> I will commit my version (with your correction to Makefile.am)
> in a moment and let you know.
OK. Done.
Carlo, please commit your version to CVS now.
To do this:
* backup(!) the files modified by you
* update them from CVS (this will actually downgrade your files,
but this will keep repository consistent, so that you could
commit)
* replace the updated files by your backuped version
* check that everything compiles
* commit modified files to CVS.
~Marek
PS: to all:
When you want to commit a modified file, which was meanwhile modified and
committed by someone else you will have to update the file from CVS first.
In such a case always (!) make a backup copy of your local file. If
changes are in different parts of the file they will be merged smoothly
during the update, but if e.g. two people modify the same line of code,
update from CVS may corrupt your local file.
--
\/ /|\ Marek Wieckowski
##### | | |
= . . = \|/ Institute of Theoretical Physics
U | Warsaw University
/ ~ \___ |
<| | |
> . < | http://www.fuw.edu.pl/~wiecko
<<___>> | http://klearnnotes2.sourceforge.net
|
|
From: Marek W. <Mar...@fu...> - 2004-03-26 22:20:53
|
Hi e-body,
Carlo, thanks for committing your changes.
On Wed, 24 Mar 2004, Marek Wieckowski wrote:
> I can't hear any sound when I choose OSS/TSE. :(
To make OSS/TSE make sound on my computer I had to:
1. split NoteOn and NoteOff to two separate events (I don't
have a clue why TSE "matching event" doesn't work. But I don't
think splitting these into two separate commands might hurt
anybody.)
2. change back to channel=0 (I don't really know what
TSE3::MidiCommand::AllChannels does [docs on this are quite
poor, aren't they?]. All I know is, it doesn't work.)
I committed both changes into CVS.
Does Carlo's code work for Alsa people? Mo? Javier? (choose
ALSA/TSE in sound setup dialog).
> On Thursday 18 March 2004 20:41, Silhusk wrote:
> > MIDI patches are not implemented yet, but volume should work.
What works (after these changes):
* I can hear right sounds both on raw OSS/Free and OSS/TSE
* I can change device ("TSE port")
* kln2 does not crush when changing back to OSS/Free
* and, due to TSE SchedulerFactory usage (added by Carlo :) kln2
falls back to OSS when I choose Alsa (which I don't have)
instead of crushing. Nice. :)
What doesn't (apart from midi patch assignment):
* notes' lengths (would using MidiOutput::noteLengh instead of
'duration' work and be enough?)
* volume; Carlo, did you want to use MidiOutput::noteVelocity
property for this?
There are 3 "volumes":
- master and midi volumes set up in mixer
- velocity of an individual note.
Usually a user sets up mixer settings, and the
song/piece/program sets up note's velocities. This way user can
- have a huge master volume (to listen to her CD loud)
- small midi volume (to listen to some midi music silently)
- the midi file itself sets up velocities (thus within the small
midi volume some parts of the piece can be a bit more silent
or a bit louder).
We probably won't ever have whole pieces with changing dynamics
(velocities), but letting the user change velocities directly
can confuse her (and can confuse people reading the source).
To summarize: yeah, there is a noteVelocity property, but I
don't think this is what should be used directly by a user to
setup volumes (and right now a user does not have any influence
on this). I think TSE mixer (or OSS mixer as it is done now)
should be used for this.
~Marek
--
\/ /|\ Marek Wieckowski
##### | | |
= . . = \|/ Institute of Theoretical Physics
U | Warsaw University
/ ~ \___ |
<| | |
> . < | http://www.fuw.edu.pl/~wiecko
<<___>> | http://klearnnotes2.sourceforge.net
|
|
From: Carlo <si...@bl...> - 2004-03-29 20:59:10
|
Hi, Il ven, 2004-03-26 alle 22:20, Marek Wieckowski ha scritto: > 1. split NoteOn and NoteOff to two separate events (I don't > have a clue why TSE "matching event" doesn't work. But I don't > think splitting these into two separate commands might hurt > anybody.) I changed this another time, according to TSE3 documentation. I hope this works as supposed. > 2. change back to channel=0 (I don't really know what > TSE3::MidiCommand::AllChannels does [docs on this are quite > poor, aren't they?]. All I know is, it doesn't work.) I thought it was intended to have the note on every channel, and... I agree, the whole TSE3 documentation is poor (motivation to make our better). > * volume; Carlo, did you want to use MidiOutput::noteVelocity > property for this? Yes, you are right. Thank you Marek for clearing out about the 3 volumes. > I think TSE mixer (or OSS mixer as it is done now) > should be used for this. I added mixer and i'll commit changes in a moment. I encountered problems with setVolume not linking (see the lines commented out). I also had to increase the delay time before playing a chord (midi-TSE.cpp line 127), but I still don't understand why the forked processes hang up. regards, Carlo |
|
From: Marek W. <Mar...@fu...> - 2004-04-09 16:50:40
|
Carlo,
On Mon, 29 Mar 2004, Carlo wrote:
> I changed this another time, according to TSE3 documentation.
> I hope this works as supposed.
I'm getting a bit tired with this. :( After some minor changes (that
shouldn't really change anything - like splitting auto adding Note_Off
event into a separate command) it works. And then after a similar change
in a different version of the code it doesn't and so on. Usually such a
random situation means, that for example some variables randomly are or
are not initialized to proper values. Volume? Midi patch? I tried some,
but didn't find any pattern.
But if you have time to continue working on this - please, do. :) Probably
at some point there will be a minor change which will make it work for me
too.
I wonder if it works for anybody with Alsa...
> > 2. change back to channel=0 (I don't really know what
> > TSE3::MidiCommand::AllChannels does [docs on this are quite
> > poor, aren't they?]. All I know is, it doesn't work.)
> I thought it was intended to have the note on every channel, and...
I think, T::MC::AllChannels cannot be used for any midi command. It
probably can be used to e.g. set volume of all channels or midi patch of
all channels. But it seems, it does not cycle putting each note to a
different channel. It's just a guess, because :
> I agree, the whole TSE3 documentation is poor
:(
> I added mixer and i'll commit changes in a moment. I encountered
> problems with setVolume not linking (see the lines commented out).
Ha! That's a good one. I looked into tse source. It looks like
MixerChannel::setVolume() is OK, but MixerPort::setVolume() is declared
but never defined! :( I'm not sure what to do about it. For now - just
forget about (=don't use) MixerPort::setVolume(). Maybe in future we'd
define it ourselves?
From user's point of view: if setting mixer volume does nothing, any user
can use external mixer program to setup volumes. Not convenient, but for
now I suppose that's all we can do fast.
~Marek
--
\/ /|\ Marek Wieckowski
##### | | |
= . . = \|/ Institute of Theoretical Physics
U | Warsaw University
/ ~ \___ |
<| | |
> . < | http://www.fuw.edu.pl/~wiecko
<<___>> | http://klearnnotes2.sourceforge.net
|
|
From: <oxy...@ya...> - 2004-04-10 08:53:29
|
I can't compile in my system, but if you send me a rpm I can try it with alsa. _________________________________________________________ Do You Yahoo!? La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx |
|
From: Marek W. <Mar...@fu...> - 2004-04-10 15:14:57
|
On Sat, 10 Apr 2004, javier wrote: > if you send me a rpm I can try it with alsa. http://www.fuw.edu.pl/~wiecko/klearnnotes2-1.1.040410-0.i386.rpm Thanks! :) ~Marek PS: You also need tse3 libraries : http://ccrma-www.stanford.edu/planetccrma/software/libraries.html#SECTION00039900000000000000 -- \/ /|\ Marek Wieckowski ##### | | | = . . = \|/ Institute of Theoretical Physics U | Warsaw University / ~ \___ | <| | | > . < | http://www.fuw.edu.pl/~wiecko <<___>> | http://klearnnotes2.sourceforge.net |
|
From: <oxy...@ya...> - 2004-04-13 17:41:15
|
[root]rpm -Uvh klearnnotes2-1.1.040410-0.i386.rpm
Preparing...
########################################### [100%]
[root]# klearnnotes2
klearnnotes2: error while loading shared libraries:
libqt-mt.so.3: cannot open shared object file: No such
file or directory
_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
|