Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional jack channels audio output #524

Open
DoosC opened this issue Mar 27, 2014 · 17 comments
Open

Additional jack channels audio output #524

DoosC opened this issue Mar 27, 2014 · 17 comments

Comments

@DoosC
Copy link

DoosC commented Mar 27, 2014

It would be nice to have a possiblity to add jack channels output in LMMS (as it exists in Hydrogen), this would allow for routing audio to external mixer (like non-mixer which has ambisonics) or effects (like rakarrack) to further expand LMMS capabilities and modularities. This would take the form of additional jack channels audio output. A typical implementation would for example consist in adding a checkbox labelled "jack send" on each mixer strip (off by default) that would activate two additional (stereo) jack channels output for the current channel mixer (each L/R channel would be prefixed with the related mixer strip label, those which are by default "FX 1", "FX 2",etc).

@grammoboy2
Copy link

+1

@Sti2nd
Copy link
Contributor

Sti2nd commented Jan 31, 2015

Implemented

@badosu
Copy link
Contributor

badosu commented Jan 31, 2015

What is this request about? How was it implemented?

@Sti2nd
Copy link
Contributor

Sti2nd commented Jan 31, 2015

Darnit, I think I'll head off to bed now, I read "per instrument audio export".

@badosu
Copy link
Contributor

badosu commented Jan 31, 2015

I still don't know what's this issue about, is it solo mode? Because solo mode was indeed implemented.

@Sti2nd
Copy link
Contributor

Sti2nd commented Jan 31, 2015

It is about sending signals from LMMS to other programs.

@badosu
Copy link
Contributor

badosu commented Jan 31, 2015

Oh, so this issue is about showing output jack channels for each instrument.

This issue need better title and description if this is the case.

@DoosC DoosC changed the title [enhancement] Per instrument audio output [enhancement] Additional jack channels audio output Jan 31, 2015
@DoosC
Copy link
Author

DoosC commented Jan 31, 2015

@badosu : Okay, updated title and description. How about now => fine or still confusing ?

@badosu
Copy link
Contributor

badosu commented Jan 31, 2015

@DoosC Yes, thanks!

@unfa
Copy link
Contributor

unfa commented Feb 4, 2015

What about the FX-mixer outputs?
31 sty 2015 02:15 "Amadeus Folego" notifications@github.com napisał(a):

Oh, so this issue is about showing output jack channels for each
instrument.

This issue need better title and description if this is the case.


Reply to this email directly or view it on GitHub
#524 (comment).

@badosu
Copy link
Contributor

badosu commented Feb 4, 2015

This is not my area of expertise, it's probably viable but we need to consider 3 things:

  1. If this adds too much overhead so that more processing is required.
  2. If this passes the first one, then we need to figure out what would be the functionality and how this can be useful for artists, instruments, only mixers? Etc... This is where a demanding LMMS artist would help.
  3. Whether it's practical to have 30+ JACK outputs related to bigger projects for LMMS. This can be a usability and/or a performance issue.

There are some solutions for all these issues:

  1. Enable a single instrument/mixer output to be provided for JACK manually, this would make a lot of sense instead of being automatic.
  2. If automatic output for JACK is desired, making this an opt-out feature that must be enabled via Settings.

@DoosC
Copy link
Author

DoosC commented Feb 5, 2015

As the typical use case would be to send specific audio streams out of LMMS for further processing I have zero doubt that this should not automatically be activated by default.
As I proposed this should be a per mixer channel option that's all.
I probably have no idea what I'm talking about, because I'm no dev but I don't see why there would be any overhead as all those audio streams already exist inside LMMS. As for jack scalabilty I have no worries either, ardour is using it extensively and also non-mixer and none seems to have any known scalability issue.
Now I have no idea if this is difficult to implement or not with the current state of the audio engine. Probably easier said than done, and I'm the one saying 😉

@badosu
Copy link
Contributor

badosu commented Feb 7, 2015

@DoosC A per mixer action looks like the best proposal for me.

@tresf tresf mentioned this issue Feb 7, 2015
13 tasks
@Umcaruje Umcaruje changed the title [enhancement] Additional jack channels audio output Additional jack channels audio output Jun 27, 2015
@Umcaruje Umcaruje added the core label Jun 27, 2015
@PhysSong
Copy link
Member

If I remember correctly, it was implemented very long time ago but disabled for some reason. One can enable that by defining AUDIO_PORT_SUPPORT, but it failed to build.
With these little changes, it at least builds:

diff --git a/src/core/audio/AudioJack.cpp b/src/core/audio/AudioJack.cpp
index bca41356b..5dd2a8512 100644
--- a/src/core/audio/AudioJack.cpp
+++ b/src/core/audio/AudioJack.cpp
@@ -328,8 +328,12 @@ void AudioJack::renamePort( AudioPort * _port )
 					_port->name() + " R" };
 		for( ch_cnt_t ch = 0; ch < DEFAULT_CHANNELS; ++ch )
 		{
+			// FIXME: jack_port_set_name is deprecated in favor of jack_port_rename
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 			jack_port_set_name( m_portMap[_port].ports[ch],
 					name[ch].toLatin1().constData() );
+#pragma GCC diagnostic pop
 		}
 	}
 #endif
@@ -358,22 +362,22 @@ int AudioJack::processCallback( jack_nframes_t _nframes, void * _udata )
 
 #ifdef AUDIO_PORT_SUPPORT
 	const int frames = qMin<int>( _nframes, mixer()->framesPerPeriod() );
-	for( jackPortMap::iterator it = m_portMap.begin();
+	for( JackPortMap::iterator it = m_portMap.begin();
 						it != m_portMap.end(); ++it )
 	{
 		for( ch_cnt_t ch = 0; ch < channels(); ++ch )
 		{
-			if( it.data().ports[ch] == NULL )
+			if( it.value().ports[ch] == NULL )
 			{
 				continue;
 			}
 			jack_default_audio_sample_t * buf =
 			(jack_default_audio_sample_t *) jack_port_get_buffer(
-							it.data().ports[ch],
+							it.value().ports[ch],
 								_nframes );
 			for( int frame = 0; frame < frames; ++frame )
 			{
-				buf[frame] = it.key()->firstBuffer()[frame][ch];
+				buf[frame] = it.key()->buffer()[frame][ch];
 			}
 		}
 	}

@fogti
Copy link
Contributor

fogti commented Dec 11, 2020

I opened #5841 which fixes the compilation issue based upon the above patch.

@luzpaz
Copy link
Contributor

luzpaz commented Jul 1, 2023

What's the status of this ticket ?

@netzgestaltung
Copy link

netzgestaltung commented May 11, 2024

I just came across the same issue(LMMS 1.2.2/Fedora 39) - i wanted to get every instrument as seperate tracks in ardour (and edit/effects there with calf plugins).
There is somehow a setting "output channels" but the hint on it says: select 2 of 2 channels.

Otherwise, LMMS seems to not have JACK master support so it doesn't start to play remotly with ardour(like hydrogen does).
Finaly i seperated each Instrument to a single Beat/Bassline and found "Export Tracks" and just added these files to the ardour project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests