Skip to Content

hydrogen can't connect to jack

8 replies [Last post]
drjimmy42
Offline
Joined: 04/17/2010

I got hydrogen-0.9.3 to build successfully and it starts, but I get no outputs to show up in jack. I have other apps (rosegarden/ardour) working correctly so jack is working.

There are no audio in or out connectors for hydrogen in the qjackctl connection panel. In fact, the only thing hydrogen puts in there is a midi writable client.

This is some of the output I get

[i]
[ERROR] Hydrogen [audioEngine_startAudioDrivers] Error starting audio driver [audioDriver::connect()]
[ERROR] Hydrogen [audioEngine_startAudioDrivers] Using the NULL output audio driver
[ERROR] Hydrogen [audioEngine_startAudioDrivers] m_pMainBuffer_L == NULL
[ERROR] Hydrogen [audioEngine_startAudioDrivers] m_pMainBuffer_R == NULL
[ERROR] Hydrogen [audioEngine_setupLadspaFX] nBufferSize=0
[/i]

I've tried it lots of different ways:

*If H starts up with the audio-system set to jack and no other jack is running I get
[i]Error starting audio driver[/i]
*If qjackctl is started and my normal jack session is running and H audio-system is set to jack I get two errors
[i]Error starting audio driver[/i]
and
[i]Jack driver: cannot connect output port[/i]
*If H starts up with audio-system set to Alsa and jack is not running with alsa as the driver elsewhere, then H starts up and successfully uses alsa and makes noise.

So H can make noise with alsa only, but I can't find any configuration of jack, even ones that work with other apps, where H can recognize that jack is already running and connect to that running instance providing me with the ins and outs to and from other programs

I am using hydrogen-0.9.3 and jack-audio-connection-kit-0.102.20

I very much appreciate the help.

Thanks.

Squelt
Offline
Joined: 04/17/2010

May I ask what distro you are using? The fact that you are already using ardour/rosegarden successfully there, seems to indicate that you are very close to getting this to work. I am using the precompiled binaries that are avail from Debian (for both jack and hydrogen) and it is working like a charm (I had to type the option -d jack when starting hydrogen the first time, and it has been finding jack successfully ever since...) Did you also compile Jack yourself, or are you using a binary?

I don't think your problem is actually with the jack server... did you by any chance keep a log of the output when compiling hydrogen? Just to make SURE that it is compiling without any errors or missing parts (that you may need to use it like this). Sorry if that is a redundant suggestion, but it seems like it would be a shame if you didn't get it to work after getting this far

princebaba
Offline
Joined: 04/17/2010

this is what happens when i do:
~$ hydrogen -d jack
::
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 169
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
Using locale: /usr/share/hydrogen/data/i18n/hydrogen.fr_FR.UTF-8

Hydrogen 0.9.3 [Jul 17 2006] [http://www.hydrogen-music.org]
Copyright 2002-2005 Alessandro Cominu

Compiled modules: (FLAC) (Jack) (Alsa) (OSS) (LRDF)

Hydrogen comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details

Using data path: /usr/share/hydrogen/data
[WARNING] SongReader [readSong] Trying to load a song created with a different version of hydrogen.
[WARNING] SongReader [readSong] Song [/usr/share/hydrogen/data/DefaultSong.h2song] saved with version 0.9.2
[LadspaFX::getPluginList] reading directory: /usr/lib/ladspa
[LadspaFX::getPluginList] reading directory: /usr/lib/hydrogen/plugins
[LadspaFX::getLadspaFXGroup]
[LadspaFX::getPluginList] reading directory: /usr/lib/ladspa
[LadspaFX::getPluginList] reading directory: /usr/lib/hydrogen/plugins
Erreur de segmentation (core dumped)

Why ? ?
thx.

Comix
Offline
Joined: 04/17/2010

start hydrogen with:
hydrogen -d jack --verbose

--
comix http://comix.hydrogen-music.org

mezzmerized17
Offline
Joined: 04/17/2010

I have a very similar issue.

Running Ubuntu Studio Gutsy on Compaq Presario SR1750NX with
Presonus Firepod.

H works with alsa perfectly

Other clients work with jack, i.e. xmms, vlc (from firefox too) rosegarden, etc.

When I start with hydrogen -d jack, i get the output:

hydrogen -d jack --verbose
Warning: no locale found: /usr/share/hydrogen/data/i18n/hydrogen.en_US.UTF-8
Warning: error loading locale: /usr/share/hydrogen/data/i18n/hydrogen.en_US.UTF-8.qm

Hydrogen 0.9.3 [Oct 10 2007] [http://www.hydrogen-music.org]
Copyright 2002-2005 Alessandro Cominu

Compiled modules: (FLAC) (Jack) (Alsa) (OSS) (LRDF)
Verbose log mode = active

Hydrogen comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details

Using data path: /usr/share/hydrogen/data
[INFO] Preferences INIT
[INFO] Preferences [loadPreferences] Loading preferences file (GLOBAL) [/usr/share/hydrogen/data/hydrogen.default.conf]
[INFO] Preferences [loadPreferences] Loading preferences file (USER) [/home/brett/.hydrogen/hydrogen.conf]
[INFO] SongReader [readSong] /usr/share/hydrogen/data/DefaultSong.h2song
[WARNING] SongReader [readSong] Trying to load a song created with a different version of hydrogen.
[WARNING] SongReader [readSong] Song [/usr/share/hydrogen/data/DefaultSong.h2song] saved with version 0.9.2
[INFO] Song INIT "Untitled Song"
[LadspaFX::getPluginList] reading directory: /usr/lib/ladspa
[LadspaFX::getPluginList] reading directory: /usr/lib/hydrogen/plugins
[LadspaFX::getLadspaFXGroup]
[LadspaFX::getPluginList] reading directory: /usr/lib/ladspa
[LadspaFX::getPluginList] reading directory: /usr/lib/hydrogen/plugins
JACK tmpdir identified as [/dev/shm]
JACK tmpdir identified as [/dev/shm]
[INFO] Hydrogen *** Hydrogen audio engine init ***
[INFO] Hydrogen [audioEngine_startAudioDrivers]
[INFO] Hydrogen [createDriver] Jack
[INFO] JackDriver INIT
[INFO] JackDriver Jack SampleRate changed: the sample rate is now 48000/sec
[INFO] AlsaMidiDriver INIT
[INFO] AlsaMidiDriver alsaMidiDriver_thread() starting
[INFO] AlsaMidiDriver MIDI port name: None
[INFO] AlsaMidiDriver MIDI addr client: -1
[INFO] AlsaMidiDriver MIDI addr port: -1
[INFO] AlsaMidiDriver Midi input port at 131:0
[INFO] AlsaMidiDriver MIDI Thread INIT
[INFO] JackDriver [connect]

then..whammo:

[ERROR] Hydrogen [audioEngine_startAudioDrivers] Error starting audio driver [audioDriver::connect()]
[ERROR] Hydrogen [audioEngine_startAudioDrivers] Using the NULL output audio driver
[INFO] JackDriver DESTROY
[INFO] JackDriver [disconnect]
[INFO] JackDriver [deactivate]
[INFO] JackDriver jack_deactivate
[INFO] JackDriver calling jack_client_close
[INFO] NullDriver INIT
[INFO] NullDriver connect
[INFO] NullDriver [getOut_L()] not implemented yet
[ERROR] Hydrogen [audioEngine_startAudioDrivers] m_pMainBuffer_L == NULL
[INFO] NullDriver [getOut_R()] not implemented yet
[ERROR] Hydrogen [audioEngine_startAudioDrivers] m_pMainBuffer_R == NULL
[INFO] Hydrogen [audioEngine_setupLadspaFX] buffersize=0
[INFO] Hydrogen [audioEngine_setupLadspaFX] m_pSong=NULL
[INFO] Hydrogen [audioEngine_setSong] Untitled Song
[INFO] Hydrogen [audioEngine_clearNoteQueue()]
[INFO] Hydrogen [audioEngine_setupLadspaFX] buffersize=0
[ERROR] Hydrogen [audioEngine_setupLadspaFX] nBufferSize=0
[ERROR] NullDriver [setBpm] not implemented yet
[INFO] NullDriver [locate] not implemented
[INFO] PatEditPanel [selectedPatternChangedEvent]
[INFO] DrumkitManager INIT
[INFO] DrumkitManager [updateDrumkitList]
[WARNING] LocalFileMng [readXmlString] Using default value in name
[WARNING] LocalFileMng [readXmlString] Using default value in name
[WARNING] LocalFileMng [readXmlString] Using default value in name
[INFO] LayerPreview INIT
[INFO] WaveDisplay INIT
[INFO] HydrogenApp [showInfoSplash] Selected news: news-051113.html

Fiddling with m-audio evolution mk461c usb keyboard controller then closing:

INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] AlsaMidiDriver [handleNoteOnMessage]
[INFO] AlsaMidiDriver [handleNoteOffMessage]
[INFO] LayerPreview DESTROY
[INFO] WaveDisplay DESTROY
[INFO] DrumkitManager DESTROY
[INFO] Hydrogen [audioEngine_clearNoteQueue()]
[INFO] Hydrogen [audioEngine_stopAudioDrivers]
[INFO] AlsaMidiDriver MIDI Thread DESTROY
[INFO] AlsaMidiDriver DESTROY
[INFO] NullDriver disconnect
[INFO] NullDriver DESTROY
[INFO] Hydrogen *** Hydrogen audio engine shutdown ***
[INFO] Song DESTROY "Untitled Song"
[INFO] Preferences Saving preferences file: /home/brett/.hydrogen/hydrogen.conf
[INFO] Preferences DESTROY

Bye...

.....

So close!

Any help would be greatly appreciated.

Thanks in advance.

kelargo
Offline
Joined: 04/17/2010

I ran into this, too.. :-(

It only appears when using Hydrogen with jack.

and this _use_ to work.. I'm on Gentoo.. and have had a few emerge sync/world since I used this last... :-(

One think I think I noticed, which maybe a clue...
qjackctl error is:
"unknown destination port in attempted connection [alsa_pcm:playback_1]"

Now, in qjackctl's Connection display...
writable clients are headlined "system"
and individually called "playback_1", etc.
I think qjackctl use to display "alsa_pcm" not "system"

Is Hydrogen hard coded for "alsa_pcm" ?

some log messages:

cannot read event response from client [Hydrogen-1] (Connection reset by peer)
bad status for client event handling (type = 5)
cannot send event to client [Hydrogen-1] (Broken pipe)
cannot send event to client [Hydrogen-1] (Broken pipe)
bad status for client event handling (type = 5)
cannot send event to client [Hydrogen-1] (Broken pipe)
cannot send event to client [Hydrogen-1] (Broken pipe)
bad status for client event handling (type = 5)
cannot send event to client [Hydrogen-1] (Broken pipe)
cannot send event to client [Hydrogen-1] (Broken pipe)
20:19:18.333 JACK connection graph change.
20:19:18.362 ALSA connection graph change.
unknown destination port in attempted connection [alsa_pcm:playback_1]

My card is a Emu-1212.
Hydrogen works on its own without Jack. (get sound.. :-)
and jack and ardour play nice together...
I miss hydrogen!

regards,
TIA!

Thorgal
Offline
Joined: 04/17/2010

in $HOME/.hydrogen/hydrogen.conf are hardcoded the default system outputs. Using jack up to 0.103, names are alsa_pcm:... SInce then, names have been system:...

Note that the latest version of jack (0.109) has a workaround so any app using the old names should continue to work without any problem at all.

schivmeister
Offline
Joined: 04/17/2010

Hi

That's right. I have checked out the global hydrogen.default.conf (which writes ~/.hydrogen/hydrogen.conf) and the solution is right there. One has to change the jack port name from alsa_pcm to system as per the following:

system:playback_1
system:playback_2
USE_JACK_TRANSPORT
true
true

The default condition for jack_track_outs was set to false, so change that to true if you'd like to have all the tracks. Version 0.109.0 of jack does not appear to work around this. Furthermore, even 0.107.2 (my previous version) didn't have this problem.

Happy hydrumming!

ebs88keys
Offline
Joined: 04/17/2010

Nice work ! THANK YOU