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

jack does not build #105

Closed
ycollet opened this issue Sep 20, 2018 · 17 comments
Closed

jack does not build #105

ycollet opened this issue Sep 20, 2018 · 17 comments

Comments

@ycollet
Copy link
Contributor

ycollet commented Sep 20, 2018

In the current cmake branch, the jack version of projectm is not buildable.
The CMakeLists.txt file is missing in the jack directory.

@revmischa
Copy link
Collaborator

it uses autotools now. a makefile and configure needs to be added for jack.

@ycollet
Copy link
Contributor Author

ycollet commented Sep 21, 2018 via email

@ionenwks
Copy link

ionenwks commented Oct 9, 2018

Is the jack specific version even necessary anymore? I tried to build this again recently (been a few years since last used it) and was annoyed by this at first but then I realized SDL2 has full Jack support now (I did need to build my own libsdl since current Debian omitted the jack support). Set the SDL_AUDIODRIVER=jack connected the ports and there it was, reading the audio seemingly fine. Not that I experimented much with this yet.

@revmischa
Copy link
Collaborator

revmischa commented Oct 9, 2018

add back the CMakeLists.txt file

Not sure if that's how it works... I think it requires the rest of the project be built with cmake

@ycollet
Copy link
Contributor Author

ycollet commented Oct 9, 2018 via email

@revmischa
Copy link
Collaborator

What is the use case for having a dedicated jack version? What do you think about what @ionenwks said?
Feel free to contribute a Makefile.am for the jack version

@revmischa
Copy link
Collaborator

Added jack makefile here - #163 please give it a try!

@TildeSlashC0re
Copy link

TildeSlashC0re commented Feb 10, 2019

qprojectM-jack.cpp: In function ‘std::__cxx11::string read_config()’:
qprojectM-jack.cpp:95:10: warning: declaration of ‘out’ shadows a global declaration [-Wshadow]
    FILE *out;
          ^~~
qprojectM-jack.cpp:47:29: note: shadowed declaration is here
 jack_default_audio_sample_t out[1024*1000];
                             ^~~
qprojectM-jack.cpp:91:8: warning: unused variable ‘n’ [-Wunused-variable]
    int n;
        ^
qprojectM-jack.cpp: In function ‘int main(int, char**)’:
qprojectM-jack.cpp:204:7: warning: unused variable ‘projectM_data’ [-Wunused-variable]
  char projectM_data[1024];
       ^~~~~~~~~~~~~
depbase=`echo ConfigFile.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I../..  -Wall -Wchar-subscripts -Wformat-security -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits -DDATADIR_PATH=\""/usr/local/share/projectM"\" -I../../vendor  -include ../../config.h -DSYSCONFDIR=\""/usr/local/etc"\" -DPROJECTM_PREFIX=\""/usr/local"\" -DRESOURCE_PREFIX=\""share/projectM"\" -I../../src/libprojectM -I../../src/libprojectM/Renderer -I../../src/projectM-qt  -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5  -fPIC -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5   -g -O2 -pthread -std=c++11 -MT ConfigFile.o -MD -MP -MF $depbase.Tpo -c -o ConfigFile.o ConfigFile.cpp &&\
mv -f $depbase.Tpo $depbase.Po
/bin/bash ../../libtool  --tag=CXX   --mode=link g++  -g -O2 -pthread -std=c++11 -static -fPIC   -o projectM_jack qprojectM-jack.o ConfigFile.o ../projectM-qt/libprojectM_qt.a -ljack -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Core -lGL  -ldl  -pthread ../libprojectM/libprojectM.la -lSDL -lGL  -ldl  -pthread
libtool: link: g++ -g -O2 -pthread -std=c++11 -fPIC -o projectM_jack qprojectM-jack.o ConfigFile.o -pthread -pthread  ../projectM-qt/libprojectM_qt.a -ljack -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Core ../libprojectM/.libs/libprojectM.a -lSDL -lGL -ldl -pthread
/usr/bin/ld: cannot find -lSDL
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:481: projectM_jack] Error 1
make[3]: Leaving directory '/home/c0re/.build/projectm/src/projectM-jack'
make[2]: *** [Makefile:451: all-recursive] Error 1
make[2]: Leaving directory '/home/c0re/.build/projectm/src'
make[1]: *** [Makefile:521: all-recursive] Error 1
make[1]: Leaving directory '/home/c0re/.build/projectm'
make: *** [Makefile:411: all] Error 2

my result so far :<

EDIT: Being on debian buster a quick apt-get install libsdl1.2-dev resolved the roadblock shown above :)

@tank-trax
Copy link

@revmischa

I managed to build your JACK version

projecm screen jack

It works but only has a mono input

the 'n' key for next, 'r' for random and 'p' for previous all are active and functional

r/clicking on screen does not bring up the menu
double clicking does not enable full screen
has xruns on exit

ERROR: JackEngine::XRun: client = projectM_jack was not finished, state = Triggered
ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error

@tank-trax
Copy link

this is the output when run from the terminal

user@hostname:$ /usr/local/bin/projectM_jack
dir:/usr/local/share/projectM/config.inp
reading ~/.projectM/config.inp
[projectM] config file: /home/user/.projectM/config.inp
[PresetFactory] url is idle://Geiss & Sperl - Feedback (projectM idle HDR mix).milk
No Textures Loaded from /usr/local/share/projectM/textures
No Textures Loaded from /usr/local/share/projectM/textures
engine sample rate: 48000
Connecting to Jack port system:capture_1
Connecting to Jack port system:capture_2
Connecting to Jack port a2j:Midi Through [14] (capture): Midi Through Port-0
Connecting to Jack port a2j:Midi Through [14] (capture): Midi Through Port-1
Connecting to Jack port a2j:Midi Through [14] (capture): Midi Through Port-2
Connecting to Jack port a2j:Midi Through [14] (capture): Midi Through Port-3
Connecting to Jack port a2j:FastTrack Pro [16] (capture): FastTrack Pro MIDI 1

it will start to load the presets once 'n' is pressed

[PresetFactory] url is /usr/share/projectM/presets/Aderrasi - Agitator.milk
[PresetFactory] url is /usr/share/projectM/presets/Aderrasi - Aimless (Gravity Directive Mix).milk
[PresetFactory] url is /usr/share/projectM/presets/Aderrasi - Aimless (Spirogravity Mix).milk
[PresetFactory] url is /usr/share/projectM/presets/Aderrasi - Airhandler (Menagerie Mix).milk

@revmischa
Copy link
Collaborator

cool!

@tank-trax
Copy link

The visualizations work when audio is pumped through the projectM_jack input.

if I may add some suggestions:

  1. a stereo input would be nice :-)

  2. to figure out how to not have the a2j recognized as Audio (I think this may be the cause of the xrun on closing), as those are connections that would normally be seen in ALSA MIDI but with a2jmidid enabled they can be used with JACK

Note: a few DAWS list this a2j in their Audio configuration sections but it should be in the MIDI section.

======================

Are you planning on developing it further for JACK? if so I would be interested to assist with testing. FYI, I use Debian 9 with KXStudio repos added.

@tank-trax
Copy link

I also had to install the following to complete the build

sudo apt-get install libsdl-image1.2-dev libsdl-ttf2.0-dev

@revmischa
Copy link
Collaborator

PRs very welcome! :)

@tank-trax
Copy link

tank-trax commented Mar 1, 2019

built this successfully, installation went well but had to create a shortcut/menu entry for KDE for quick launch

all keyboard shortcuts work (CTRL+M, CTRL+E...)

under Settings -> there is one entry -> Configure projectM (all good)
there is no entry for Audio settings
Audio is still mono -> ideally it would be stereo

first time I built it with ./configure the visualizations would not load or play
second time used ./configure --enable-gles and it worked

my apologies I do not know how to create/open a new a PR

@revmischa
Copy link
Collaborator

revmischa commented Mar 3, 2019

second time used ./configure --enable-gles and it worked

Noted in #168

@revmischa
Copy link
Collaborator

Jack build support is in master now. Please test it out!
If you have feature requests feel free to open tickets for them specifically so we can track them. Or better yet, contribute some code!
You can read about PRs on GitHub's help pages

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

5 participants