Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: tompad on November 25, 2007, 11:54:09 AM



Title: Anyone using LeMMA?
Post by: tompad on November 25, 2007, 11:54:09 AM
Hi!

In my mission on converting from Windows to UbuntuStudio
I found a nice replacement of Band-in-a-box in MMA. However
being a GUI-junkie i started to search for a GUI and found LeMMA.
Looks like the thing I need, but I have problems making it to work
in Ubuntu. Anyone else using LeMMA and maked it work?? In Ubuntu.


Regards
TompaD


Title: Re: Anyone using LeMMA?
Post by: bvdp on November 26, 2007, 02:33:50 AM
When you say "it doesn't work" could you be a bit more specific. I don't use the program, but I have tried it on Ubuntu, and it it does work.

I suspect that you are missing a library??? Easy way to discover that is to open a terminal and issue the command to run the program from there. For example, I just downloaded the latest and unzipped it into a directory. From a terminal window I type "python lemma.py" and it runs.

One running you do have to play with (and save) some settings since they default to sane things for windows, not linux.

Shout if you need more help. Either here, or let Gek know ... he's been quite helpful fixing problems.

Best,


Title: Re: Anyone using LeMMA?
Post by: bvdp on November 27, 2007, 11:21:33 PM
I did a bit more checking on this ... and there is a minor problem if you wish to "just run" the program :)

First off, the file lemma.py needs to have the exec bit set,

Second, the first line in that file has a '\r' character. This causes a problem ... the file "python\r" can't be found.

So, here's the simple solution:

 1. Create a directory for lemma.
 2. Unpack the zip file.
 3. run this command:  tr -d \r <lemma.py >lemma
 4. Create a symbolic link in a directory in your search path for lemma. I had lemma in ~/tmp, so I cd'd to /home/bob/bin and typed the command: ln -s lemma ~/tmp/lemma/lemma

Now, it "just works". Hope this helps!

I've also sent a copy of this message to Gek. Hopefully he can come up with an easier solution.



Title: Re: Anyone using LeMMA?
Post by: tompad on November 29, 2007, 09:08:14 PM
When you say "it doesn't work" could you be a bit more specific. I don't use the program, but I have tried it on Ubuntu, and it it does work.

Sorry to be a bit vague...:-) The problem I had was that I couldn't
choose a Groove, and hitting Play didn't make it play.

Quote
I suspect that you are missing a library??? Easy way to discover that is to open a terminal and issue the command to run the program from there.
I tried it, and suddenly I see some grooves!! Agood thing to run it from terminal, now I see clear
errormessages:
 
Exception in Tkinter callback
Traceback (most recent call last):
  File "lib-tk/Tkinter.py", line 1406, in __call__
    return self.func(*args)
  File "/home/tompad/LeMMA/LeMMA/app.py", line 220, in playFile
    settings.playMMA()
  File "/home/tompad/LeMMA/LeMMA/settings.py", line 67, in playMMA
    os.chdir(mmaPath.replace("mma.py", ""))
OSError: [Errno 20] Not a directory: '/usr/local/bin/mma'

I will check the files and see if it works better.


Regards
TompaD



Title: Re: Anyone using LeMMA?
Post by: bvdp on November 30, 2007, 05:43:33 PM
First thing: In LeMMA hit the <settings> button and setup the proper paths for you MMA installation. The defaults in the program are for a Windows install, which is NOT what you have in Ubuntu :)

Let us know how it goes. LeMMA is actually a nice little program for folks who don't like to use editors ... me, I've been doing this computing stuff way too long and an editor and the command line is what I think a computer is all about. I must be getting old!


Title: Re: Anyone using LeMMA?
Post by: kara on November 30, 2007, 07:10:59 PM
Hmm not quit right...
'/usr/local/bin/mma' is a typical linux setting wich points to the default directory where executable of a user ar installed, this directory doesn't exist on WIN*

But the solution is indeed to set the LEMMA setting to the default directory where mma is installed.
you could find it by typing
> whereis mma
or worst case
whereis mma.py

k



First thing: In LeMMA hit the <settings> button and setup the proper paths for you MMA installation. The defaults in the program are for a Windows install, which is NOT what you have in Ubuntu :)

Let us know how it goes. LeMMA is actually a nice little program for folks who don't like to use editors ... me, I've been doing this computing stuff way too long and an editor and the command line is what I think a computer is all about. I must be getting old!


Title: Re: Anyone using LeMMA?
Post by: bvdp on December 01, 2007, 12:28:03 AM
Actually, I could not reproduce the exact error the OP is having ... I did get similar (but different) ones when running lemma "out of the box".

You're right  about /usr/local/bin/mma NOT being a directory. In the linux installer this is a sym-link to the actual mma.py exec (using the link installer) ... but I'm not exactly sure of what is causeing the problem ... but I'm sure that just setting the correct paths in the <settings> tab will get things going.



Title: Re: Anyone using LeMMA?
Post by: kara on December 01, 2007, 08:56:41 AM
Bob,

Do you have a link for LeMMA ?
I'll install it and see if I can come up with something ...

EDIT : Nevermind, I found it  ::)


k


Title: Re: Anyone using LeMMA?
Post by: tompad on December 01, 2007, 01:05:21 PM
So, here's the simple solution:

 1. Create a directory for lemma.
 2. Unpack the zip file.
 3. run this command:  tr -d \r <lemma.py >lemma
 4. Create a symbolic link in a directory in your search path for lemma. I had lemma in ~/tmp, so I cd'd to /home/bob/bin and typed the command: ln -s lemma ~/tmp/lemma/lemma

I followed your solution except for the symbolic link, I got LeMMA in home and it works running
it from the teminal. and eureka!!! the grooves and help shows up, but I cant play the song.

My settings is:

S'/usr/bin/python2.5'
p1
.S'/usr/share/mma-bin-1.2/mma.py'
p2
.S'/usr/bin/timidity'
p3
.

In the "debug"-window in lemma i get:

Warning:
        No RC file was found or processed
ERROR:     Input file '/home/tompad/lemma_temp_.mma' not found

One another strange thing - when I run it from the terminal the grooves and help shows
just right, but when I make a "link" in the panel in Gnome with the commando:

python /home/tompad/lemma/lemma.py

the program starts but no help or grooves shows up!

I'm confused....


regards
TompaD



Title: Re: Anyone using LeMMA?
Post by: bvdp on December 01, 2007, 05:55:21 PM
For your  command line, try:

   (cd /home/tompad/lemma/; python lemma)

Don't know if you need the ()s or not in the gnome.

Let us know!


Title: Re: Anyone using LeMMA?
Post by: tompad on December 01, 2007, 08:57:45 PM
For your  command line, try:

   (cd /home/tompad/lemma/; python lemma)

Don't know if you need the ()s or not in the gnome.

Let us know!

Dont work at all, with or without ().....
Probably have to stick with the terminal....

regards
TompaD


Title: Re: Anyone using LeMMA?
Post by: bvdp on December 02, 2007, 12:13:37 AM

I should have tried it before suggesting :)

This does work:

1. Create the following file and put it in your path. Probably /usr/local/bin is a good place. I assume you call the file "lemma".

#!/bin/sh
LEMMADIR=/home/bob/tmp/lemma
cd $LEMMADIR ; python lemma.py


NOTE: change the setting for LEMMADIR to the location you are using.

2. Set the exec bit on the file with the command "chmod +x lemma".

3. Now, it will work. You can type lemma from a terminal or from the gnome or kde run applet.

If you are creative, you could even create a little icon and put that on the desktop, etc.

Have fun!




Title: Re: Anyone using LeMMA?
Post by: tompad on December 02, 2007, 06:48:42 PM

#!/bin/sh
LEMMADIR=/home/bob/tmp/lemma
cd $LEMMADIR ; python lemma.py

If you are creative, you could even create a little icon and put that on the desktop, etc.

U bet! :-)  Really great, it works like a clock! And guess what - I got the latest version
of LeMMA from Gek! 0.5! He has been looking it over for linux, and made some improvements.

Thanks for all the help, now I must get LeMMA-ing! :-)

Regards
TompaD
 


Title: Re: Anyone using LeMMA?
Post by: tompad on December 05, 2007, 01:20:30 PM
Hi  again! :-)

I couldn't resist to try improve the usage of LeMMA, so I decided to try to
put some parameters to timidity through LeMMA, but in vain...
I even made a script!! :-) but no luck, it looks like this:

#!/bin/sh
TIMIDITYDIR=/usr/bin/
cd $TIMIDITYDIR ; timidity -ia

And in settings I use /usr/local/bin/timidityplayer, and I have made it runable

I'm rather new to scripts...so is it something I've missed?
Timidity starts but have no midi loaded/playing.

Regards
TompaD


Title: Re: Anyone using LeMMA?
Post by: bvdp on December 05, 2007, 05:20:30 PM
All you need to do is something like this:

1. Create a script, let's call it mytimity, and put in your path. I put stuff like this in /home/bob/bin.

2. Make double sure that /home/bob/bin (or whatever) is in your path. The command echo $PATH will list the current path.

3. Make sure the script has the exec bit set. chmod +x <file> will do this.

Now, the script ..

#!/bin/bash
timidity -ia $*

that's it. The "$*" get's replaced by any params passed to the script.

In lemma just set the "player" to mytimity.

You should read the bash manual for more details on this. It gets confusing :) There are a number of ways to pass parameters inside a script.



Title: Re: Anyone using LeMMA?
Post by: tompad on December 05, 2007, 06:59:53 PM
Now, the script ..

#!/bin/bash
timidity -ia $*

that's it. The "$*" get's replaced by any params passed to the script.


Superb!  :-  I'm amazed! Now I can stop/paus the song if I need.

Truly thankfull
TompaD