The answer here may be jack sinks.
These create interfaces between jack and pulse. Let's say you wanted to record the audio from a youtube video.
- Start Jack
- Make your sinks (see below)
- Open Ardour
- Create a new stereo track
- Right click on it to get the popup menu and select "inputs..."
- There's a list of tabs along the right. Click on other.
- Find your sink
- Click on the right and left in the grid so as to send them to ardour (and unclick the hardware)
- Cue the youtube video
- Open pulse audio volume control
- Go to the playback tab
- Your webrowser and the YT video will be on the list.
- There's a drop down menu on the right. Select your sink. (The same one as in step 8)
The video audio is now routed to ardour. The steps for discord should be nearly identical (but starting with youtube allows you to try this without anyone else around).
For other jack applications, you can also connect them together or to the sinks by using the graph window in qjackctl.
To create a sink, after jack starts, run the following commands:
pactl load-module module-jack-sink channels=2;
pactl load-module module-jack-source channels=2;
pacmd set-default-sink jack_out;
pacmd set-default-source jack_in
You can create extra sinks or sources by adding lines:
pactl load-module module-jack-sink sink_name=Discord-output client_name=Discord-output;
pactl load-module module-jack-source source_name=Discord-input client_name=Discord_input;
You can see the results of these commands in qjackctl's graph view. You can also run them automatically when you start jack via qjackctl. Click the setup button, then the options tab and paste it in to the Execute script after startup line.