Skip to Content

LASH support (patch) for Hydrogen

11 replies [Last post]
jaakko
Offline
Joined: 04/17/2010

Hi!

I just just finished my little project which I started to create LASH (http://www.nongnu.org/lash/) support for Hydrogen. The patch is created against Hydrogen 0.9.3 since it's the only stable version at the moment. All development and testing has been done in Ubuntu Feisty.

Please try it and give feedback if you like it (or don't like it)! The patch is attached to this post and can by applied like this:

1. Download hydrogen-0.9.3 source & extract it
3. Download the LASH patch to the same directory
2. Cd to the newly created hydrogen-0.9.3 directory
4. Patch the sources for LASH compatibility:
gunzip -c ../2515-hydrogen_lash.patch.gz | patch -p1
5. Apply other patches if needed
6. Run ./configure and check from the output that LASH support is enabled
7. Build by running make

NOTE: Remember to install LASH and it's header files before running configure :)

NOTE2: Also remember to use the tinyxml/gcc4 patch when needed. See thread: http://www.hydrogen-music.org/forum/index.php?action=show_thread&thread=344&fid=4&page=1

- Jaakko

jaakko
Offline
Joined: 04/17/2010

Here's a .deb package with LASH support for Ubuntu Feisty / Ubuntustudio:

http://www.cs.helsinki.fi/u/jjsipari/public/hydrogen_0.9.3-2_i386.deb

jaakko
Offline
Joined: 04/17/2010

Now the patch is uploaded to Ubuntu Hardy. So if you're already running Hardy there's no need to apply any patches for LASH support! Just do the basic dance:

1. apt-get update
2. apt-get install hydrogen

jaakko
Offline
Joined: 04/17/2010

Seems like the original patch was buggy. At least it doesn't work correctly in Ubuntu Hardy. It breaks when you do this:

(0. Make sure lashd is either running or automagically started when you start lash client programs)
1. Start seq24 (it's a nice little sequencer program)
2. Start hydrogen
3. Route midi from seq24 to hydrogen using QJackCtl
4. Save & Close the LASH project from lash_panel
5. Re-open the project from lash_panel. At least I only got the Hydrogen splash screen and after that hydrogen immediately exited.

The reason seems to be that Hydrogen's logging system crashes when it tries to log a billion times "[midi_action] Skipping midi event! Audio engine not ready.". This in turn is caused by something (seq24? LASH?) sending MIDI event's to Hydrogen before the audio engine has been initialized properly.

I've now fixed the LASH patch by moving the code snippet which informs LASH about Hydrogens ALSA seq id to be executed _after_ the audio engine has been initialized. This way no excessive logging is done and Hydrogen won't crash when restoring a LASH project with MIDI connections :)

The new fixed patch is attached to this mail. The old instructions (the first mail in this thread) still apply. Only change the name of the patch.

I'm sorry for the trouble I may have caused.

- Jaakko

wolke
wolke's picture
Offline
Joined: 03/30/2010

great work,
are you intrested to implement the lash support into the 0.9.4 svn version of hydrogen? I think, this would be great.

jaakko
Offline
Joined: 04/17/2010

I've only used the (fairly stable) 0.9.3 version myself since it's included in all the major Linux distributions. I know there are a few interesting changes coming in 0.9.4 but it feels like there is never going to be a release.

If the 0.9.4 svn branch is actually stable and there is a release coming some day then maybe I'll allocate some time to LASHify it in the future :)

- Jaakko

wolke
wolke's picture
Offline
Joined: 03/30/2010

:-( maybe with lash support into the 0.9.4 tree, the release will a little bit shortens :-).
I know nothing about release plans. But I think and hope,that we can anticipate a 0.9.4 release this year. Both developers (Comix & Mauser) currently spend time and work to the 0.9.4 version of hydrogen. I also work a little bit on it. I planned for me to inplement the lash support into the 0.9.4. But now you have do the primary work on this, and you have the background knowledge about lash :-)). If it is ok for you, I will try to implement your code into the 0.9.4 version.

jaakko
Offline
Joined: 04/17/2010

Please feel free to use my code as a base for LASH support in 0.9.4 . I can also answer any questions about it. You can reach me from jaakko [dot] sipari (attt) gmail . com.

wolke
wolke's picture
Offline
Joined: 03/30/2010

lash patch for 0.9.4 svn (rev 176).
Based on 0.9.3.1 sorce code, and some changes from jaakko.

Patch required liblash-dev!

pablomme
Offline
Joined: 04/17/2010

There appears to be a minor problem with the latest svn (182). In gui/gui.pro, line 115 should read
QMAKE_CXXFLAGS += -I/usr/include/lash-1.0
rather than
QMAKE_CXXFLAGS+ = -I/usr/include/lash-1.0
(space and + sign). It's not directly related to the lash patch, but I thought I'd post it here..

wolke
wolke's picture
Offline
Joined: 03/30/2010

thank you. I think it will be fixt today or tomorrow.

mauser
Offline
Joined: 03/30/2010

should be fixed now..