how to separate the click-track?

hello!

i have Edirol UA-25 soundcard and i want to use it for live-performance - output loops to main output and have metronome click in my headphones.
how can i disable metronome click in main output while still having it in the headphone output?

that’s easily done with qjackctl: just (dis)connect ardour’s “click” out (from)to the (un)desired outputs!

Use a seperate bus for your headphone outputs. Route to the appropriate hardware output. And route the click to the same output.

 Seablade

I also have an Edirol UA-25. It seems to me that the headphone output is the same as the main output, so I don’t think it is possible to do this.
It could possibly be done by having two sound cards, but you will have to look into that because I don’t know.

I assumed that you COULD route to the outputs individually, if you cannot as the post above says, then this cannot be done with this interface in stereo. You could however route the loops to the Left side of the main outputs, and the click to the Right side, and only give the Left to the PA. Would result in that case with click in one ear and loops in the other unless you wired up an adaptor for your headphones.

   Seablade

ok, thank You for the advices!
christophski, seems like You are right - the UA-25 sound card does not separate the output for headphones and main output.
actually, i could use UA-25 for loop output and built-in soundcard for metronome output.
in alsamixer, when i press F2, it shows that there are 2 soundcards: 0 - HDA-Intel [the built-in] and 1 - USB-Audio [UA-25]
can You share some knowledge, how can i make Ardour to work with 2 soundcards?
Seablade, i suppose that Your first post contains the answer to this question. please accept my apologies, but i do not understand, how do You mean that, because of my complete beginner status in Ardour and Linux as well.

Simple answer, Jack doesn’t like working with more than one soundcard sorry. If you wanted to run a metronome ALSA app separately from jack that is a possibility.

My first post was made assuming that the main outs and headphone outs could be controlled separately by your hardware, which according to your post and one above, this is not the case. As such your best bet is my second post.

 Seablade

thanks!
yes, after some search and reading about my soundcard, unfortunately it turned out, that main output and headphone output are not controlled separately.
i have done some search in the web and there are instructions, how to set up ALSA with several sound cards. i do not know for sure, if i have done it right, but both sound cards are working - VLC player uses built-in sound card, Ardour uses USB sound card.
i do not have that much understanding, how this sound creation process is organized in Linux - how exactly ALSA, Jack and Ardour (or any other software) interacts each with other and what exactly are the tasks for each element, so i have a question - is there any other alternative besides Jack, that i can use so that Ardour uses both sound cards? or is it the situation that Ardour is not created to use several sound cards?
my goal is to be able to play loops in perfect synchronisation with metronome, that i need in my headphones. i think, that the best way to do it, is having one application (e.g. Ardour) that plays them both. are there any other ways, options and alternatives to achieve this goal?

@viesturs: ALSA is the software that provides (1) low level kernel drivers to interact with the audio interface hardware and (2) a software library to “smooth out” interaction with the drivers.

JACK is layer that provides a simpler (and arguably more powerful) abstraction to applications for routing audio from A to B. Unlike ALSA, which is concerned only with getting audio to/from the audio interface hardware, JACK allows applications to route audio to/from the hardware, other applications, the network … anywhere, basically. Applications using JACK do not interact with the audio h/w, and there is no difference for them whether their outputs are another app, the audio h/w, the network or some combination of all of these. They just see a uniform, simple programming model where audio flows to/from “ports”, and they don’t have to care about what these “ports” represent.

Ardour uses JACK. As such it doesn’t know anything about your audio h/w. To use multiple soundcards, you’d need to get JACK to use multiple soundcards - Ardour doesn’t care. But … what you want to do is fundamentally misguided. There are a lot of people out there who think that if they need more channels for some reason, the thing to do is to buy another soundcard. Its very hard to get people clear that this just isn’t the right thing to do. If you want N channels of audio, you really need an N channel soundcard. Second best backup plan is to have 2 soundcards that can share their sample clock. But using two soundcards without a shared clock is just … not what you want.

However, JACK does provide a way to do something like this. Newer versions of JACK include two utility applications called alsa_in and alsa_out that will provide audio I/O from/to some soundcard other than the one that JACK itself is talking to. So, you can start up JACK using one soundcard. Then start alsa_in and/or alsa_out so that it uses the other soundcard (it will do all the nasty work of trying to keep things synchronized). Then start up Ardour and connect things up appropriately. You will have ports available that will correspond to both soundcards this way.

But to repeat: this is a hack - its a very very useful hack (and thanks are due to Torben Hohn for his work on these two applications), but if you actually care about audio and need 4 channels for some reason, go get a 4 channel soundcard and do it right.

Paul, You have my sincerest gratitude for the explanation. i have obtained at least general understanding, what is what…

i tried to follow Your suggestion to use alsa_out.
in http://ubuntuforums.org/showthread.php?t=1198297 third post from the top are commands, how to download and compile the programm. it worked for me, and i copied alsa_in and alsa_out from “tools” folder to /bin folder.

and that is all - i do not understand, how to start the alsa_out. i typed “alsa_out -d hw:1” in terminal and i get “alsa_out: command not found”. what did i do wrong?

actually, seems like i am having trouble with Jack itself. it does not start, i get “could not connect to JACK server as client” error message.
this is what i get in the message screen:

12:59:46.230 Patchbay deactivated.
12:59:46.234 Statistics reset.
12:59:46.255 Startup script…
12:59:46.256 artsshell -q terminate
12:59:46.264 ALSA connection graph change.
sh: artsshell: not found
12:59:46.716 Startup script terminated with exit status=32512.
12:59:46.717 JACK is starting…
12:59:46.718 /usr/bin/jackd -R -dalsa -dhw:0 -r44100 -p1024 -n2
12:59:46.734 JACK was started with PID=7768.
no message buffer overruns
jackd 0.116.1
Copyright 2001-2005 Paul Davis and others.
jackd 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
JACK compiled with System V SHM support.
cannot use real-time scheduling (FIFO at priority 10) [for thread -1215494464, from thread -1215494464] (1: Operation not permitted)
cannot create engine
12:59:46.756 JACK was stopped successfully.
12:59:46.756 Post-shutdown script…
12:59:46.757 killall jackd
12:59:46.934 ALSA connection change.
jackd: no process found
12:59:47.178 Post-shutdown script terminated with exit status=256.
12:59:48.950 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.

i am searching the web for a solution, but all the cases i have found have slightly different output in the message screen. still i tried to suspend pulse-audio, but it didn’t work, i changed everything to “default” in setup screen.
is there any way i can fix it?

cannot use real-time scheduling (FIFO at priority 10) [for thread -1215494464, from thread -1215494464] (1: Operation not permitted)

You don’t have a properly configured machine for realtime permissions for your users. Google /etc/security/limits.conf and linux realtime permissions.

  Seablade

thank You for a suggestion, the solution for Jack was to uncheck “realtime” in settings and to add myself to “audio” group. i already had changed /etc/security/limits.conf

seems like Jack is working - it starts without errors and Ardour switches from one soundcard to another, if i change output device in Jack settings and restart both programms. so far so good :slight_smile:

now i have question about alsa_out
i have looked here for instructions, how to use it:
http://trac.jackaudio.org/wiki/WalkThrough/User/AlsaInOut

following to instructions there, entering following command in terminal should start the programm:
alsa_out -d hw:1

what i get is:
alsa_out: command not found

what should i do differently?

@Viesturs

I REALLY do not recommend you uncheck realtime in QJackCTL. I would much more strongly recommend you fix the other issues preventing you from running with realtime preemption privileges, as otherwise any time you record you will be much more likely to get xruns(dropouts). Chances are by adding yourself to the audio group from your post, you fixed what was preventing you from running with realtime preemption privileges.

 Seablade

@viesturs: you don’t have a new enough version of JACK.

thank You!
from the KPackageKit (i use Kubuntu) - i have latest qjackctl
and when i enter “jackd --version” in terminal, i receive “jackd version 0.116.1”

which is the version i need to get?

@viesturs: 0.118.2 would be ideal.

Seablade, thank You for warning, now “realtime” is checked and there are no errors. seems like You are right - the problem was fixed by adding me as user to audio group.
but anyway, i want to play the sound and metronome, not record anything, so i do not feel it to be crucial, but i want to thank You anyway - i shall keep it in mind for situation, if i will have a need to record something.

Paul, i tried to follow Your suggestion and to get the newest Jack version.
http://jackaudio.org/download has the 0.118.0 version available as tar.gz file, which i downloaded and after 3 hours of trials and errors i finally managed to install it - complete removal of previous version was my biggest problem.
0.118.2 version would be ideal, but unfortunately even official Jack homepage does not have it :slight_smile:

anyway, i still get the error message “alsa_out: command not found” after i have started Jack and then entered “alsa_out -d hw:0” in terminal

where am i making the mistake? what is the required procedure to start the alsa_out program? are there any one-time actions to be taken after installation (like copying some files somewhere, some settings to be changed or anything else)?

@viesturs: my guess is that you don’t have the required library for resampling that alsa_in and alsa_out requires. That would be libsamplerate, and you would need the development version of this (since you are compiling JACK against it).

Paul, i am sorry, but i do not understand, what You mean by “you would need the development version of this (since you are compiling JACK against it)”.

i just checked the package manager - i already have installed libsamplerate, and just in case i also installed libasmplerate development files.

do I need to recompile and reinstall the Jack?