diff --git a/.gitignore b/.gitignore
index 85d1d3c0..b1abbb3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,13 @@ bin
*_moc.cpp
src/config.h
*.exe
+Makefile.in
+aclocal.m4
+autom4te.cache/
+autotools/
+configure
+data/MacOSX/Makefile.in
+data/Makefile.in
+man/Makefile.in
+src/Makefile.in
+src/config.h.in
diff --git a/.travis.yml b/.travis.yml
index adad8f1b..8122642a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -86,7 +86,6 @@ matrix:
before_install:
- eval "${MATRIX_EVAL}"
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo rm /usr/local/include/c++; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
install:
@@ -99,9 +98,9 @@ before_script:
- autoreconf -vfi
script:
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./configure --enable-app-bundle; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./configure; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./configure --prefix='/usr'; fi
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make dmg; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make && sudo make install; fi
after_failure:
@@ -113,6 +112,7 @@ branches:
- master
- travis-integration
- ssr-windows
+ - mxe
notifications:
email: false
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 33560394..e0df6646 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,15 +44,6 @@ set(SOURCE_FILES
src/xmlparser.cpp
)
-set(MAIN_SOURCE_FILES
- src/ssr_binaural
- src/ssr_brs
- src/ssr_generic
- src/ssr_nfc_hoa
- src/ssr_vbap
- src/ssr_wfs
-)
-
# Libraries
# Add libraries to LINKLIBS
set(LINKLIBS)
@@ -193,7 +184,7 @@ if(GUI)
find_package(Freetype REQUIRED)
list(APPEND QT5PLATFORMSUPPORT_LIBS ${FREETYPE_LIBRARIES})
- message(STATUS "Found Qt5PlatformSupport :" ${QT5PLATFORMSUPPORT_LIBS})
+ message(STATUS "Found Qt5PlatformSupport: " ${QT5PLATFORMSUPPORT_LIBS})
endif(WIN32)
# OpenGL
@@ -259,20 +250,29 @@ configure_file (
# Compiler flags
# Add a few for release builds (MAKE_BUILD_TYPE=RELEASE)
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pipe -Wall -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mmmx -m3dnow -msse -msse2 -msse3 -mfpmath=sse")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pipe -Wall -fomit-frame-pointer -ffast-math -funroll-loops -march=x86-64 -mmmx -msse -msse2 -mfpmath=sse")
message(STATUS "CMAKE Release Flags: " ${CMAKE_CXX_FLAGS_RELEASE})
+# And for debug builds (MAKE_BUILD_TYPE=DEBUG)
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pipe -Wall -ffast-math -march=x86-64 -mmmx -msse -msse2 -mfpmath=sse -Weffc++")
+message(STATUS "CMAKE Debug Flags: " ${CMAKE_CXX_FLAGS_DEBUG})
# Compile executables
set(EXECUTABLES
ssr-binaural
ssr-brs
- ssr-generic
+ ssr-vbap
ssr-wfs
+ ssr-aap
+ ssr-dca
+ ssr-generic
)
add_executable(ssr-binaural src/ssr_binaural.cpp ${SOURCE_FILES})
add_executable(ssr-brs src/ssr_brs.cpp ${SOURCE_FILES})
-add_executable(ssr-generic src/ssr_generic.cpp ${SOURCE_FILES})
+add_executable(ssr-vbap src/ssr_vbap.cpp ${SOURCE_FILES})
add_executable(ssr-wfs src/ssr_wfs.cpp ${SOURCE_FILES})
+add_executable(ssr-aap src/ssr_aap.cpp ${SOURCE_FILES})
+add_executable(ssr-dca src/ssr_dca.cpp ${SOURCE_FILES})
+add_executable(ssr-generic src/ssr_generic.cpp ${SOURCE_FILES})
# Link
@@ -283,10 +283,8 @@ endif(WIN32)
message(STATUS "Linking: " ${LINKLIBS} ${QT5PLATFORMSUPPORT_LIBS})
foreach(executable ${EXECUTABLES})
- target_link_libraries(${executable} Threads::Threads ${LINKLIBS})
target_link_libraries(${executable} Threads::Threads ${LINKLIBS})
if(GUI)
target_link_libraries(${executable} Qt5::Gui Qt5::Core Qt5::Widgets Qt5::OpenGL ${QT5PLATFORMSUPPORT_LIBS})
- target_link_libraries(${executable} Qt5::Gui Qt5::Core Qt5::Widgets Qt5::OpenGL ${QT5PLATFORMSUPPORT_LIBS})
endif(GUI)
-endforeach(executable ${EXECUTABLES})
\ No newline at end of file
+endforeach(executable ${EXECUTABLES})
diff --git a/MXE-settings.mk b/MXE-settings.mk
index a2831f1a..985d0b96 100644
--- a/MXE-settings.mk
+++ b/MXE-settings.mk
@@ -28,6 +28,6 @@ override MXE_PLUGIN_DIRS += plugins/gcc8
#LOCAL_PKG_LIST := boost curl file flac lzo pthreads vorbis wxwidgets
#.DEFAULT_GOAL := local-pkg-list
#local-pkg-list: $(LOCAL_PKG_LIST)
-LOCAL_PKG_LIST := cc cmake pthreads fftw libsndfile jack libxml2 qt5
+LOCAL_PKG_LIST := cc cmake pthreads fftw libsndfile libxml2 qtbase
.DEFAULT_GOAL := local-pkg-list
local-pkg-list: $(LOCAL_PKG_LIST)
diff --git a/Makefile.am b/Makefile.am
index 68b8319f..01a28f59 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,8 @@ dist_noinst_DATA = \
doc/manual/images/ssr_logo_mac_30px.png \
doc/manual/images/screenshot_spd.png \
doc/manual/images/screenshot.png \
+ doc/manual/images/distance_attenuation.png \
+ doc/manual/images/hrir_comp_filters.png \
mex/README.md \
mex/COPYING \
mex/DESCRIPTION \
@@ -42,25 +44,30 @@ dist_noinst_DATA = \
mex/ssr_mex.h \
mex/ssr_aap.cpp \
mex/ssr_binaural.cpp \
- mex/ssr_nfc_hoa.cpp \
+ mex/ssr_brs.cpp \
+ mex/ssr_dca.cpp \
+ mex/ssr_generic.cpp \
mex/ssr_vbap.cpp \
mex/ssr_wfs.cpp \
mex/ssr_helper.m \
mex/test_ssr.m \
+ flext/README.md \
flext/Makefile \
flext/package.txt \
flext/ssr_flext.h \
flext/ssr_aap.cpp \
flext/ssr_binaural.cpp \
- flext/ssr_nfc_hoa.cpp \
+ flext/ssr_dca.cpp \
flext/ssr_vbap.cpp \
flext/ssr_wfs.cpp \
flext/ssr_messages.pd \
flext/ssr_aap~-help.pd \
flext/ssr_binaural~-help.pd \
- flext/ssr_nfc_hoa~-help.pd \
+ flext/ssr_dca~-help.pd \
flext/ssr_vbap~-help.pd \
flext/ssr_wfs~-help.pd \
+ flext/virtual_aap.pd \
+ flext/virtual_dca.pd \
flext/virtual_vbap.pd \
flext/virtual_wfs.pd \
flext/8channels.asd \
@@ -69,7 +76,11 @@ dist_noinst_DATA = \
flext/hrirs_fabian_min_phase_eq.wav \
flext/hrirs_kemar.wav \
flext/hrirs_kemar_min_phase_eq.wav \
- flext/wfs_prefilter_120_1500_44100.wav
+ flext/wfs_prefilter_120_1500_44100.wav \
+ pd/README.md \
+ pd/slaxml.lua \
+ pd/ssrclient-help.pd \
+ pd/ssrclient.pd_lua
dist_noinst_SCRIPTS = flext/startpd.sh
@@ -77,6 +88,8 @@ dist_noinst_SCRIPTS = flext/startpd.sh
MAINTAINERCLEANFILES = aclocal.m4 stamp-h.in \
config.log config.cache config.status
+DISTCLEANFILES = $(SSR_MANUAL_DIST)
+
## TODO: find a way to actually use this location (see autogen.sh)
## # where we keep local rules for automake
## ACLOCAL_M4 = autotools/aclocal.m4
diff --git a/NEWS b/NEWS
index 4523940e..38bb7762 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,21 @@
User-visible changes in the SoundScape Renderer. Recent changes on top.
+0.5.0 (16 November 2018)
+
+ - GUI now uses Qt5
+
+ - the exponent that determines distance attenuation of the amplitude in the
+ virtual space can be set by the user
+
+ - significant extensions of the documentation
+
+ - the former NFC-HOA renderer is back in an experimental version now called
+ distance-coded Ambisonics (DCA)
+
+ - headphone-compensated HRTFs are included
+
+ - the end-of-message character in TCP messages can be selected by the user
+
0.4.2 (24 July 2014)
- the default number of threads is now obtained automatically (but can still be
diff --git a/README b/README
index 0d4e91d7..21a6c80f 100644
--- a/README
+++ b/README
@@ -1,10 +1,13 @@
-This is a fork of the SoundScape Renderer (SSR), which aims at porting the source code to Windows.
+This is a fork of the SoundScape Renderer ([SSR](https://github.com/SoundScapeRenderer/ssr)), which aims at porting the source code to Windows.
The basic idea is to cross-compile on a linux machine an executable (.exe) for Windows.
We use the M cross environment ([MXE](http://mxe.cc/)), which provides cross-compilation scripts for the dependencies and the MinGW64 (GCC) compiler.
Pre-compiled binaries for Windows currently include:
- `ssr-binaural.exe`, `ssr-brs.exe`, `ssr-wfs.exe` and `ssr-generic.exe`.
+ `ssr-binaural.exe`, `ssr-brs.exe`, `ssr-vbap.exe`, `ssr-wfs.exe`, `ssr-aap.exe`, `ssr-dca.exe` and `ssr-generic.exe`.
+
+They should run on all x86-64 CPUs.
+So far, only the Razor and Polhemus head-tracker are ported (and I can only test the recent Razor).
Getting started
@@ -34,7 +37,7 @@ This could look like this:
This is the source distribution of SoundScape Renderer (SSR) licensed under the
GPLv3+. Please consult the file COPYING for more information about this license.
-
+
The user manual in the doc/ directory contains relevant informations about the
SSR, including installation instructions. Additional (very detailed)
installation instructions can be found in the file INSTALL.
@@ -47,8 +50,9 @@ Documentation: http://ssr.readthedocs.io/en/latest/
Copyright (c) 2016-2018 Division of Applied Acoustics
Chalmers University of Technology
-
+
Copyright (c) 2012-2014 Institut für Nachrichtentechnik, Universität Rostock
Copyright (c) 2006-2012 Quality & Usability Lab
- Deutsche Telekom Laboratories, TU Berlin
+Deutsche Telekom Laboratories, TU Berlin
+
diff --git a/README.md b/README.md
index 0d4e91d7..c813b876 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,15 @@
-This is a fork of the SoundScape Renderer (SSR), which aims at porting the source code to Windows.
+[![Build Status](https://travis-ci.com/chris-hld/ssr.svg?branch=ssr-windows)](https://travis-ci.com/chris-hld/ssr)
+
+This is a fork of the SoundScape Renderer ([SSR](https://github.com/SoundScapeRenderer/ssr)), which aims at porting the source code to Windows.
The basic idea is to cross-compile on a linux machine an executable (.exe) for Windows.
We use the M cross environment ([MXE](http://mxe.cc/)), which provides cross-compilation scripts for the dependencies and the MinGW64 (GCC) compiler.
Pre-compiled binaries for Windows currently include:
- `ssr-binaural.exe`, `ssr-brs.exe`, `ssr-wfs.exe` and `ssr-generic.exe`.
+ `ssr-binaural.exe`, `ssr-brs.exe`, `ssr-vbap.exe`, `ssr-wfs.exe`, `ssr-aap.exe`, `ssr-dca.exe` and `ssr-generic.exe`.
+
+They should run on all x86-64 CPUs.
+So far, only the Razor and Polhemus head-tracker are ported (and I can only test the recent Razor).
Getting started
@@ -34,7 +39,7 @@ This could look like this:
This is the source distribution of SoundScape Renderer (SSR) licensed under the
GPLv3+. Please consult the file COPYING for more information about this license.
-
+
The user manual in the doc/ directory contains relevant informations about the
SSR, including installation instructions. Additional (very detailed)
installation instructions can be found in the file INSTALL.
@@ -47,8 +52,9 @@ Documentation: http://ssr.readthedocs.io/en/latest/
Copyright (c) 2016-2018 Division of Applied Acoustics
Chalmers University of Technology
-
+
Copyright (c) 2012-2014 Institut für Nachrichtentechnik, Universität Rostock
Copyright (c) 2006-2012 Quality & Usability Lab
- Deutsche Telekom Laboratories, TU Berlin
+Deutsche Telekom Laboratories, TU Berlin
+
diff --git a/apf/apf/mextools.h b/apf/apf/mextools.h
index 25f632c6..b628912d 100644
--- a/apf/apf/mextools.h
+++ b/apf/apf/mextools.h
@@ -140,6 +140,17 @@ bool convert(const mxArray* in, int& out)
return true;
}
+/// Convert @c mxArray to long int
+bool convert(const mxArray* in, long int& out)
+{
+ if (!mxIsDouble(in) || mxIsComplex(in)) return false;
+ if (mxGetNumberOfElements(in) != 1) return false;
+ double temp = mxGetScalar(in);
+ if (temp != std::floor(temp)) return false;
+ out = temp;
+ return true;
+}
+
/// Convert @c mxArray to @c bool
bool convert(const mxArray* in, bool& out)
{
diff --git a/apf/performance_tests/biquad_count_denormals.cpp b/apf/performance_tests/biquad_count_denormals.cpp
index fe424ac9..9058f9c1 100644
--- a/apf/performance_tests/biquad_count_denormals.cpp
+++ b/apf/performance_tests/biquad_count_denormals.cpp
@@ -74,7 +74,7 @@ int main()
benign_flt.a1 = 0.5f; benign_dbl.a1 = 0.5;
benign_flt.a2 = 0.2f; benign_dbl.a2 = 0.2;
- // HPF similar to the one used in HOA algorithm
+ // HPF similar to the one used in DCA algorithm
malignant_flt.b0 = 0.98f; malignant_dbl.b0 = 0.98;
malignant_flt.b1 = -1.9f; malignant_dbl.b1 = -1.9;
malignant_flt.b2 = 0.93f; malignant_dbl.b2 = 0.93;
diff --git a/apf/performance_tests/biquad_denormals.cpp b/apf/performance_tests/biquad_denormals.cpp
index 77408fe4..87f0500d 100644
--- a/apf/performance_tests/biquad_denormals.cpp
+++ b/apf/performance_tests/biquad_denormals.cpp
@@ -78,7 +78,7 @@ int main()
benign_flt.a1 = 0.5f; benign_dbl.a1 = 0.5;
benign_flt.a2 = 0.2f; benign_dbl.a2 = 0.2;
- // HPF similar to the one used in NFC-HOA algorithm
+ // HPF similar to the one used in DCA algorithm
malignant_flt.b0 = 0.98f; malignant_dbl.b0 = 0.98;
malignant_flt.b1 = -1.9f; malignant_dbl.b1 = -1.9;
malignant_flt.b2 = 0.93f; malignant_dbl.b2 = 0.93;
diff --git a/build.sh b/build.sh
index 1d98ab37..70bfde5f 100755
--- a/build.sh
+++ b/build.sh
@@ -10,10 +10,8 @@ mkdir -p _build && cd _build
#cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
x86_64-w64-mingw32.static.posix-cmake ... -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
make -j8
-#mv ../bin/ssr-binaural.exe ../bin/ssr-binaural-release.exe
#x86_64-w64-mingw32.static.posix-cmake ... -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
-#make -j8
-#mv ../bin/ssr-binaural.exe ../bin/ssr-binaural-debug.exe
+#make
cd ..
diff --git a/configure.ac b/configure.ac
index 5c1ff4cf..98d3f29c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,10 +175,10 @@ ENABLE_AUTO([generic], [generic renderer],
[SSR_executables="$SSR_executables ssr-generic"])
])
-ENABLE_AUTO([nfc-hoa],[Near-Field-Compensated Higher-Order-Ambisonics renderer],
+ENABLE_AUTO([dca],[Distance-coded Ambisonics renderer],
[
- AS_IF([test x$enable_nfc_hoa = xyes -o x$have_all = xyes],
- [SSR_executables="$SSR_executables ssr-nfc-hoa"])
+ AS_IF([test x$enable_dca = xyes -o x$have_all = xyes],
+ [SSR_executables="$SSR_executables ssr-dca"])
])
dnl Note: For what happens with SSR_executables see src/Makefile.am
@@ -250,7 +250,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
])
dnl NOTE: -pthread works on GCC, other compilers may need differnt flags!
-AS_IF([test x$GCC = xyes -a x$usercxxflags = xno],
+AS_IF([test x$GCC = xyes],
[CXXFLAGS="$CXXFLAGS -pthread"])
ENABLE_AUTO([optimization], [code optimization],
@@ -515,7 +515,7 @@ AS_IF([test x$have_gui = xyes],
AC_SUBST(MOCFLAGS)
])
-ENABLE_FORCED([ip-interface], [network (TCP/IP) interface],
+ENABLE_FORCED([ip-interface], [network (TCP/IP) interface (needs Asio, https://think-async.com/)],
[
CPPFLAGS="$CPPFLAGS -DASIO_STANDALONE"
AC_CHECK_HEADER([asio.hpp], , [have_ip_interface=no])
@@ -581,6 +581,7 @@ ENABLE_AUTO([vrpn], [VRPN tracker support],
AC_MSG_CHECKING([various header files for VRPN tracker support])
AC_MSG_RESULT([see below])
AC_CHECK_HEADER([vrpn_Tracker.h], , [have_vrpn=no])
+ AC_SEARCH_LIBS([q_from_axis_angle], [quat], , [have_vrpn=no])
AC_SEARCH_LIBS([vrpn_MAGIC], [vrpn], , [have_vrpn=no])
AC_MSG_CHECKING([VRPN tracker support])
AC_MSG_RESULT([$have_vrpn])
diff --git a/data/MacOSX/Info.plist.in b/data/MacOSX/Info.plist.in
index 7b7e86d5..6f2e5e2b 100644
--- a/data/MacOSX/Info.plist.in
+++ b/data/MacOSX/Info.plist.in
@@ -5,6 +5,10 @@
+ NSPrincipalClass
+ NSApplication
+ NSHighResolutionCapable
+ True
CFBundleExecutable
run-ssr.sh
CFBundleIconFile
diff --git a/data/MacOSX/Makefile.am b/data/MacOSX/Makefile.am
index e74cb0dc..a208d2eb 100644
--- a/data/MacOSX/Makefile.am
+++ b/data/MacOSX/Makefile.am
@@ -54,7 +54,7 @@ install-data-hook:
install_name_tool -id @executable_path/../PlugIns/platforms/libqcocoa.dylib $(DESTDIR)$(contentsdir)/PlugIns/platforms/libqcocoa.dylib
-cd $(DESTDIR)$(dmgrootdir) && $(LN_S) /Applications
- for qtc in QtGui QtCore QtOpenGL QtWidgets QtPrintSupport; do \
+ for qtc in QtGui QtCore QtOpenGL QtWidgets QtPrintSupport QtDBus; do \
install_name_tool -change $(QTLIBDIR)/$$qtc.framework/Versions/5/$$qtc @executable_path/../Frameworks/$$qtc.framework/Versions/5/$$qtc $(DESTDIR)$(contentsdir)/PlugIns/platforms/libqcocoa.dylib \
; mkdir -p $(prefix)/Frameworks/$$qtc.framework/Versions/5 \
; cp $(QTLIBDIR)/$$qtc.framework/Versions/5/$$qtc $(prefix)/Frameworks/$$qtc.framework/Versions/5/ \
@@ -66,13 +66,34 @@ install-data-hook:
; done
for exec in $(SSR_executables); do \
- install_name_tool -change /usr/local/opt/qt5/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $(prefix)/MacOS/$$exec \
- ; install_name_tool -change /usr/local/opt/qt5/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $(prefix)/MacOS/$$exec \
- ; install_name_tool -change /usr/local/opt/qt5/lib/QtOpenGL.framework/Versions/5/QtOpenGL @executable_path/../Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL $(prefix)/MacOS/$$exec \
- ; install_name_tool -change /usr/local/opt/qt5/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $(prefix)/MacOS/$$exec \
- ; install_name_tool -change /usr/local/opt/qt5/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport $(prefix)/MacOS/$$exec \
+ install_name_tool -change /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore $(prefix)/MacOS/$$exec \
+ ; install_name_tool -change /usr/local/opt/qt/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui $(prefix)/MacOS/$$exec \
+ ; install_name_tool -change /usr/local/opt/qt/lib/QtOpenGL.framework/Versions/5/QtOpenGL @executable_path/../Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL $(prefix)/MacOS/$$exec \
+ ; install_name_tool -change /usr/local/opt/qt/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets $(prefix)/MacOS/$$exec \
+ ; install_name_tool -change /usr/local/opt/qt/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport @executable_path/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport $(prefix)/MacOS/$$exec \
+ ; done
+
+# fix linking of libraries
+ install_name_tool -change /usr/local/lib/libogg.0.dylib @executable_path/../Libraries/libogg.0.dylib $(prefix)/Libraries/libvorbis.0.dylib
+ install_name_tool -change /usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib @executable_path/../Libraries/libvorbis.0.dylib $(prefix)/Libraries/libvorbisenc.2.dylib
+ install_name_tool -change /usr/local/lib/libogg.0.dylib @executable_path/../Libraries/libogg.0.dylib $(prefix)/Libraries/libvorbisenc.2.dylib
+
+# fix linking of frameworks
+ for qtc in QtGui QtCore QtOpenGL QtWidgets QtPrintSupport; do \
+ install_name_tool -id @executable_path/../Frameworks/$$qtc.framework/Versions/5/$$qtc $(DESTDIR)$(contentsdir)/Frameworks/$$qtc.framework/Versions/5/$$qtc \
+ ; done
+
+# code sign frameworks
+ for qtc in QtGui QtCore QtOpenGL QtWidgets QtPrintSupport QtDBus; do \
+ mkdir -p $(dmgrootdir)/SoundScapeRenderer-@PACKAGE_VERSION@/SoundScapeRenderer.app/Contents/Frameworks/$$qtc.framework/Resources/ \
+ ; cp /usr/local/opt/qt/lib/$$qtc.framework/Resources/Info.plist $(dmgrootdir)/SoundScapeRenderer-@PACKAGE_VERSION@/SoundScapeRenderer.app/Contents/Frameworks/$$qtc.framework/Resources/ \
+ ; codesign --force --deep --sign "Developer ID Application: Jens Ahrens" $(dmgrootdir)/SoundScapeRenderer-@PACKAGE_VERSION@/SoundScapeRenderer.app/Contents/Frameworks/$$qtc.framework \
; done
+# code sign app
+ codesign --force --deep --sign "Developer ID Application: Jens Ahrens" $(dmgrootdir)/SoundScapeRenderer-@PACKAGE_VERSION@/SoundScapeRenderer.app
+
+
# create a DMG image
dmg:
@test -d "$(dmgrootdir)" || ( echo; echo; \
@@ -89,6 +110,7 @@ dmg:
"$(top_builddir)/SSRTemp.dmg"
$(RM) "$(top_builddir)/SSRTemp.dmg"
$(RM) -r "$(dmgrootdir)"
+ codesign --deep --force --timestamp --sign 'Developer ID Application: Jens Ahrens' $(top_builddir)/$(DMG_NAME)
.PHONY: dmg
diff --git a/data/MacOSX/run-ssr.applescript b/data/MacOSX/run-ssr.applescript
index ac2a2510..2357a1fb 100644
--- a/data/MacOSX/run-ssr.applescript
+++ b/data/MacOSX/run-ssr.applescript
@@ -8,8 +8,8 @@ on run argv
set argv to rest of argv
-- Make list of renderer type names and their parameter equivalents
- set rendererNames to {"Binaural (using HRIRs)", "Binaural Room Synthesis (using BRIRs)", "Wave Field Synthesis", "Ambisonics Amplitude Panning", "Stereophonic (Vector Base Amplitude Panning)", "Generic Renderer"}
- set rendererOptions to {"--binaural", "--brs", "--wfs", "--aap", "--vbap", "--generic"}
+ set rendererNames to {"Binaural (using HRIRs)", "Binaural Room Synthesis (using BRIRs)", "Stereophonic (Vector Base Amplitude Panning)", "Wave Field Synthesis", "Ambisonics Amplitude Panning", "Distance-Coded Ambisonics (experimental)", "Generic Renderer"}
+ set rendererOptions to {"--binaural", "--brs", "--vbap", "--wfs", "--aap", "--dca", "--generic"}
-- Process other given command line options
set pickRendererType to true
diff --git a/data/ssr b/data/ssr
index 7bace322..4b8c4948 100755
--- a/data/ssr
+++ b/data/ssr
@@ -27,8 +27,8 @@ while [[ $1 ]]; do
--generic)
SSR_EXECUTABLE=ssr-generic
;;
- --nfc-hoa)
- SSR_EXECUTABLE=ssr-nfc-hoa
+ --dca)
+ SSR_EXECUTABLE=ssr-dca
;;
*)
OPTIONS+=("$1")
diff --git a/doc/manual/conf.py b/doc/manual/conf.py
index fc630955..62e371d2 100644
--- a/doc/manual/conf.py
+++ b/doc/manual/conf.py
@@ -65,6 +65,11 @@
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
+try:
+ today = check_output(['git', 'show', '-s', '--format=%ad', '--date=short'])
+ today = today.decode().strip()
+except Exception:
+ today = ''
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
diff --git a/doc/manual/operation.rst b/doc/manual/operation.rst
index 3d823e94..73bc0f2b 100644
--- a/doc/manual/operation.rst
+++ b/doc/manual/operation.rst
@@ -37,10 +37,10 @@ Well, first you'll need a proper operating system.
We recommend Debian GNU/Linux (http://www.debian.org/) or something Debian-based
like Ubuntu (http://www.ubuntu.com/).
The SSR should work on most modern Linux-distributions, though.
-You can also try Arch Linux (http://www.archlinux.org/), if you want.
+You can also try Arch Linux (https://www.archlinux.org/), if you want.
If you are reluctant to install a new operating system on your computer, you can
also install any of the above-mentioned operating systems virtually, for example
-using http://www.virtualbox.org/.
+using https://www.virtualbox.org/.
If you happen to have Mac OS X installed on your computer, that's OK, too.
@@ -67,7 +67,7 @@ http://packages.debian.org/soundscaperenderer
.. _stable: http://www.debian.org/releases/stable/
.. _testing: http://www.debian.org/releases/testing/
.. _sid: http://www.debian.org/releases/sid/
- .. _Debian Sources List Generator: http://debgen.simplylinux.ch/
+ .. _Debian Sources List Generator: https://debgen.simplylinux.ch/
You can install the *soundscaperenderer* package using your favorite package
manager (*apt-get*, *aptitude*, *synaptic*, ...), all dependencies should be
@@ -280,9 +280,9 @@ an overview of the command line options and various renderers:
--brs Binaural Room Synthesis (using BRIRs)
--wfs Wave Field Synthesis
--aap Ambisonics Amplitude Panning
+ --dca Distance-coded Ambisonics (experimental!)
--vbap Stereophonic (Vector Base Amplitude Panning)
--generic Generic Renderer
- --nfc-hoa Near-field-corrected Higher Order Ambisonics (experimental!)
Renderer-specific options:
--hrirs=FILE Load the HRIRs for binaural renderer from FILE
@@ -362,8 +362,7 @@ named ``FILE``. The order of channels corresponds to the order of loudspeakers
specifed in the reproduction setup (see Sections
:ref:`Reproduction Setups ` and
:ref:`ASDF `). The recording can then be used to analyze the SSR output or
-to replay it without the SSR using a software player like "ecaplay" (http://
-eca.cx/ecasound/).
+to replay it without the SSR using a software player like "ecaplay" (http://eca.cx/ecasound/).
.. _ssr_configuration_file:
@@ -392,7 +391,7 @@ which a given setting is specified.
3. ``$HOME/Library/SoundScapeRenderer/ssr.conf``
4. ``$HOME/.ssr/ssr.conf``
5. the path(s) specified with the ``--config``/``-c`` option(s) (e.g.,
- ``ssr -c my_config.file``)
+ ``ssr -c my_config.file``)
We explicitly mention one parameter here that might be of immediate
interest for you: ``MASTER_VOLUME_CORRECTION``. This a correction in
@@ -574,6 +573,22 @@ TODO
Mac OS X
--------
+JACK on Mac OS X
+~~~~~~~~~~~~~~~~
+
+Tested with version 0.87 (64 bit) which includes:
+
+- Jackdmp 1.9.6
+- JackRouter 0.9.3
+- JackPilot 1.7.0
+
+Note that the site http://www.jackosx.com/ is outdated. The latest version of JACK is
+available from http://jackaudio.org/downloads/.
+
+Or, you can install JACK using Homebrew_.
+
+If you are using OS X El Capitan or newer, make sure that you are installing the version "jackOSX 0.92_b3" from http://jackaudio.org/downloads/. JACK versions installed from other sources tend not to work on these versions of OS X.
+
Application Bundle
~~~~~~~~~~~~~~~~~~
@@ -605,6 +620,11 @@ You can allow the SoundScapeRender to run from its original location by running:
xattr -d com.apple.quarantine SoundScapeRenderer.app
+The following warning can occur on High Sierra when using the file dialog::
+
+ objc[50474]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa1883c90) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x11f84ccd8). One of the two will be used. Which one is undefined.
+
+It is a bug outside of SSR.
Building from Source
~~~~~~~~~~~~~~~~~~~~
@@ -614,7 +634,7 @@ The following is an overview on how to set up the build environment for SSR on M
What to install first?
::::::::::::::::::::::
-You can make your life much easier with a decent package manager, name Homebrew (http://brew.sh/) or MacPorts (http://www.macports.org/). Both greatly simplify the process of installing and managing dependencies.
+You can make your life much easier with a decent package manager, name Homebrew (https://brew.sh/) or MacPorts (https://www.macports.org/). Both greatly simplify the process of installing and managing dependencies.
.. _Homebrew:
@@ -625,17 +645,25 @@ After installing homebrew, you can simply run the following line to update homeb
internal repository, upgrade itself and install all necessary dependencies::
brew update && brew upgrade && brew install autoconf fftw libsndfile jack ecasound qt asio --c++11
+
+If Qt is not found by the build system, i.e., if the build system proposes to compile without GUI, then run the following commands (using the according paths on your system) or add them to your ``~/.bash_profile`` file::
+
+ export PATH=/usr/local/opt/qt/bin:$PATH
+ export PKG_CONFIG_PATH=/usr/local/opt/qt/lib/pkgconfig
To build the manual and documentation, you can also install help2man and doxygen::
brew install help2man doxygen
+ export LC_CTYPE=en_US.UTF-8
+
+On El Capitan and newer OS X versions, it has happened that only the help2man version installed through MacPorts worked properly.
-MacPorts
-********
+MacPorts (not recommended)
+**************************
Tested with version 1.9.2
-Download here: http://www.macports.org/
+Download here: https://www.macports.org/
Then open a terminal and do an initial ports tree update ::
@@ -689,28 +717,6 @@ ports. Issuing one command to install all ports might be more convenient::
Lastly, you need to install the asio library if you want to compile with the network
interface. You can download it from: http://think-async.com
-JACK on Mac OS X
-****************
-
-Tested with version 0.87 (64 bit) which includes:
-
-- Jackdmp 1.9.6
-- JackRouter 0.9.3
-- JackPilot 1.7.0
-
-Note that the site http://www.jackosx.com/ is outdated. The latest version of JACK is
-available from http://jackaudio.org/downloads/.
-
-Or, you can install JACK using Homebrew_.
-
-OS X El Capitan is a little trickier as there is no official JACK version for it. When
-scrolling down `this thread`_ you'll find a link to a beta version of JACK that works on
-El Capitan. Here's the direct link to this beta version of JACK:
-https://dl.dropboxusercontent.com/u/28869550/JackOSX.0.92_b3.zip
-
-.. _`this thread`:
- https://github.com/jackaudio/jack2/issues/144
-
.. _ecasound:
Ecasound
@@ -723,7 +729,7 @@ http://www.eca.cx/ecasound/. (If you choose to use Homebrew and you're experienc
problems, then you might want to take a look at :ref:`ecasound_cannot_open_a_jack_port`).
It didn't work with 2.9.0 for us, older versions can be found there:
-http://ecasound.seul.org/download/.
+https://ecasound.seul.org/download/.
In Terminal go into the unpacked ecasound folder and do::
@@ -765,7 +771,7 @@ Ecasound -- git version
Note: if you successfully installed Ecasound 2.7.2, you *don't* need this!
If you want to use the newest Ecasound version from their git repository
-(http://ecasound.seul.org/ecasound.git) with OS X 10.9 (Mavericks),
+(https://ecasound.seul.org/ecasound.git) with OS X 10.9 (Mavericks),
you can try this::
./configure CXX="clang++ -stdlib=libc++" CPPFLAGS=-D_DARWIN_C_SOURCE
@@ -860,7 +866,7 @@ Using the GUI
1. Run the JackPilot and hit start.
2. Double-click the SoundScape Renderer icon |icon|, select the renderer type,
- and off you go!
+ and off you go!
.. |icon| image:: images/ssr_logo_mac_30px.png
@@ -1000,7 +1006,7 @@ If you happen not to own a Polhemus or InterSense tracker to do your head-
tracking, an alternative would be to use our DIY low-cost `Razor AHRS tracker`_.
.. _`Razor AHRS tracker`:
- https://dev.qu.tu-berlin.de/projects/sf-razor-9dof-ahrs
+ https://github.com/Razor-AHRS/razor-9dof-ahrs/wiki/Tutorial
If you have Arduino installed on you machine, FTDI drivers will be there too.
Otherwise get the driver from http://www.ftdichip.com/Drivers/VCP.htm .
@@ -1094,7 +1100,7 @@ Only ``WAVE_FORMAT_PCM`` and ``WAVE_FORMAT_IEEE_FLOAT`` are supported.
Multi-channel WAV files would normally use the format
``WAVE_FORMAT_EXTENSIBLE``, see
-http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/wave.html .
+http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html.
However, Ecasound doesn't know this format, that's why we have to use one of
the above mentioned formats, although for files with more than 2 channels this
@@ -1313,14 +1319,12 @@ fully understood goes wrong and the Pohlemus data can not be read. In this
case you can either rename the file isports.ini or change its content.
It might be necessary to execute ``echo C > /dev/ttyS0`` several times in
-order to make the Polhemus tracker operational again. You can check with ``cat
-/dev/ttyS0`` if it delivers data.
+order to make Polhemus Fastrak operational again. Use ``echo -e "C\r" > /dev/ttyS0`` for Polhemus Patriot. You can check with ``cat /dev/ttyS0`` if it delivers data.
Missing GUI Buttons and Timeline
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This issue was resolved in version 0.3.2, the default setting for ``--enable-
-floating-control-panel`` is chosen depending on the installed Qt version.
+This issue was resolved in version 0.3.2, the default setting for ``--enable-floating-control-panel`` is chosen depending on the installed Qt version.
As of version 0.5 (switching to qt5), the floating control panel is always enabled.
Different versions of Qt show different behaviour regarding OpenGL Overlays
diff --git a/doc/manual/renderers.rst b/doc/manual/renderers.rst
index 01526ab2..709ffd27 100644
--- a/doc/manual/renderers.rst
+++ b/doc/manual/renderers.rst
@@ -266,6 +266,8 @@ approach which is computationally significantly more costly.
Binaural Renderer
-----------------
+Executable: ``ssr-binaural``
+
Binaural rendering is an approach where the acoustical influence of the
human head is electronically simulated to position virtual sound sources
in space. **Be sure that you are using headphones to listen.**
@@ -391,13 +393,15 @@ expects. See the script for further information and how to obtain the raw HRIRs.
the KEMAR (CIPIC) HRIRs are not identical to the KEMAR (QU) ones.
.. [AlgaziCIPIC] V. Ralph Algazi. The CIPIC HRTF database.
- http://interface.cipic.ucdavis.edu/CIL_html/CIL_HRTF_database.htm.
+ https://www.ece.ucdavis.edu/cipic/spatial-sound/hrtf-data/.
.. _brs:
Binaural Room Synthesis Renderer
--------------------------------
+Executable: ``ssr-brs``
+
The Binaural Room Synthesis (BRS) renderer is a binaural renderer (refer
to Section :ref:`Binaural Renderer `) which uses one
dedicated
@@ -461,6 +465,8 @@ them in the release. You can obtain the data from [BRIRs]_.
Vector Base Amplitude Panning Renderer
--------------------------------------
+Executable: ``ssr-vbap``
+
The Vector Base Amplitude Panning (VBAP) renderer uses the algorithm
described in [Pulkki1997]_. It tries to find a loudspeaker pair between which
the phantom source is located (in VBAP you speak of a phantom source rather
@@ -532,6 +538,8 @@ setups.
Wave Field Synthesis Renderer
-----------------------------
+Executable: ``ssr-wfs``
+
The Wave Field Synthesis (WFS) renderer is the only renderer so far
that discriminates between virtual point sources and plane waves. It
implements the simple (far-field) driving function given in [Spors2008]_. Note
@@ -631,6 +639,8 @@ respective loudspeaker. It defaults to 1 if it is not specified.
Ambisonics Amplitude Panning Renderer
-------------------------------------
+Executable: ``ssr-aap``
+
The Ambisonics Amplitude Panning (AAP) renderer does very simple
Ambisonics rendering. It does amplitude panning by simultaneously using
all loudspeakers that are not subwoofers to reproduce a virtual source
@@ -716,11 +726,29 @@ section :ref:`Configuration File `) to be
.. [Neukom2007] Martin Neukom. Ambisonic panning. In 123th Convention of the
AES, New York, NY, USA, Oct. 5–8, 2007.
+.. _dca:
+
+Distance-coded Ambisonics Renderer
+----------------------------------
+
+Executable: ``ssr-dca``
+
+
+Distance-coded Ambisonics (DCA) is sometimes also termed "Nearfield Compensated Higher-Order Ambisonics". This renderer implements the driving functions from [Spors2011]_. The difference to the AAP renderer is a long story, which we will elaborate on at a later point.
+
+Note that the DCA renderer is experimental at this stage. It currently supports orders of up to 28. There are some complications regarding how the user specifies the locations of the loudspeakers and how the renderer handles them. The rendered scene might appear mirrored or rotated. If you are experiencing this, you might want to play around with the assignment of the outputs and the loudspeakers to fix it temporarily. Or contact us.
+
+Please bear with us. We are going to take care of this soon.
+
+.. [Spors2011] S. Spors, V. Kuscher, and J. Ahrens. Efficient Realization of Model-Based Rendering for 2.5-dimensional Near-Field Compensated Higher Order Ambisonics. In IEEE WASPAA, New Paltz, NY, USA, 2011.
+
.. _genren:
Generic Renderer
----------------
+Executable: ``ssr-generic``
+
The generic renderer turns the SSR into a multiple-input-multiple-output
convolution engine. You have to use an ASDF file in which the attribute
``properties_file`` of the individual sound source has to be set
diff --git a/flext/Makefile b/flext/Makefile
index f67037fd..cc60fdb0 100644
--- a/flext/Makefile
+++ b/flext/Makefile
@@ -5,7 +5,7 @@
# The flext build system doesn't support compiling multiple externals at once,
# so we work around this with PD_TARGETS and specify NAME here.
-EXTERNALS ?= ssr_binaural ssr_nfc_hoa ssr_aap ssr_wfs ssr_vbap
+EXTERNALS ?= ssr_binaural ssr_dca ssr_aap ssr_wfs ssr_vbap
PD_TARGETS := $(EXTERNALS:%=%_pd)
diff --git a/flext/README.md b/flext/README.md
index 0e386729..2fae7f92 100644
--- a/flext/README.md
+++ b/flext/README.md
@@ -15,7 +15,7 @@ Source positions and other parameters can be controlled by sending messages to
the leftmost inlet of the external.
Each renderer is available as a separate external, namely
-`ssr_binaural~`, `ssr_nfc_hoa~`, `ssr_aap~`, `ssr_wfs~` and `ssr_vbap~`.
+`ssr_binaural~`, `ssr_dca~`, `ssr_aap~`, `ssr_wfs~` and `ssr_vbap~`.
Requirements
------------
diff --git a/flext/ssr_nfc_hoa.cpp b/flext/ssr_dca.cpp
similarity index 94%
rename from flext/ssr_nfc_hoa.cpp
rename to flext/ssr_dca.cpp
index 6582f8ee..faa05642 100644
--- a/flext/ssr_nfc_hoa.cpp
+++ b/flext/ssr_dca.cpp
@@ -24,12 +24,12 @@
* http://spatialaudio.net/ssr ssr@spatialaudio.net *
******************************************************************************/
-// NFC-HOA renderer as Puredata/Max external.
+// DCA renderer as Puredata/Max external.
#include "ssr_flext.h"
-#include "nfchoarenderer.h"
+#include "dcarenderer.h"
-SSR_FLEXT_INSTANCE(nfc_hoa, ssr::NfcHoaRenderer)
+SSR_FLEXT_INSTANCE(dca, ssr::DcaRenderer)
// Settings for Vim (http://www.vim.org/), please do not remove:
// vim:softtabstop=2:shiftwidth=2:expandtab:textwidth=80:cindent
diff --git a/flext/ssr_nfc_hoa~-help.pd b/flext/ssr_dca~-help.pd
similarity index 97%
rename from flext/ssr_nfc_hoa~-help.pd
rename to flext/ssr_dca~-help.pd
index 6b1b3c19..b48a5018 100644
--- a/flext/ssr_nfc_hoa~-help.pd
+++ b/flext/ssr_dca~-help.pd
@@ -6,7 +6,7 @@
#X obj 165 51 noise~;
#X obj 30 71 *~ 0.01;
#X obj 165 73 *~ 0.01;
-#X obj 18 100 ssr_nfc_hoa~ 2 circle.asd;
+#X obj 18 100 ssr_dca~ 2 circle.asd;
#X text 104 14 <-- open this!;
#X obj 19 15 ssr_messages;
#X connect 1 0 3 0;
diff --git a/flext/virtual_nfc_hoa.pd b/flext/virtual_dca.pd
similarity index 98%
rename from flext/virtual_nfc_hoa.pd
rename to flext/virtual_dca.pd
index 4e64f1c9..f8b03299 100644
--- a/flext/virtual_nfc_hoa.pd
+++ b/flext/virtual_dca.pd
@@ -36,7 +36,7 @@ src 49 pos 0.781832 0.62349 \, src 50 pos 0.707107 0.707107 \, src
51 pos 0.62349 0.781831 \, src 52 pos 0.532032 0.846724 \, src 53 pos
0.433884 0.900969 \, src 54 pos 0.330279 0.943883 \, src 55 pos 0.222521
0.974928 \, src 56 pos 0.111964 0.993712;
-#X obj 18 115 ssr_nfc_hoa~ 2 circle.asd;
+#X obj 18 115 ssr_dca~ 2 circle.asd;
#X obj 30 71 *~ 0.002;
#X obj 340 70 *~ 0.001;
#X connect 0 0 13 0;
diff --git a/man/Makefile.am b/man/Makefile.am
index 574122d8..f6a61849 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -21,10 +21,14 @@ RENDERER_TEXT = "manual page for the \
# Note the order of SUBDIRS in the top-level Makefile.
#
# "make" must be called before "make dist", there is no automatic dependency!
+HELP2MAN_LOCALE ?= C.UTF-8
-$(dist_man_MANS): $(top_srcdir)/src/configuration.cpp $(top_srcdir)/configure.ac
- help2man --no-info --name=$(RENDERER_TEXT) --output=$@ --locale=en \
- $(top_builddir)/src/$(@:.1=$(EXEEXT))
+$(dist_man_MANS): $(top_srcdir)/src/configuration.cpp $(top_srcdir)/configure.ac
+ help2man \
+ --no-info \
+ --name=$(RENDERER_TEXT) \
+ --output=$@ \
+ --locale=$(HELP2MAN_LOCALE) $(top_builddir)/src/$(@:.1=$(EXEEXT))
## Settings for Vim (http://www.vim.org/), please do not remove:
## vim:textwidth=80:comments+=bO\:##
diff --git a/mex/Makefile b/mex/Makefile
index 6ab60d12..249c9d6e 100644
--- a/mex/Makefile
+++ b/mex/Makefile
@@ -3,7 +3,7 @@
# Makefile example:
# http://www.klab.caltech.edu/~harel/share/gbvs_scale/sift/Makefile
-MEXFILES ?= ssr_nfc_hoa ssr_binaural ssr_vbap ssr_aap ssr_wfs ssr_generic \
+MEXFILES ?= ssr_dca ssr_binaural ssr_vbap ssr_aap ssr_wfs ssr_generic \
ssr_brs
OBJECTS := ssr_global position orientation directionalpoint xmlparser
@@ -39,7 +39,8 @@ CXXFLAGS += -Wall -Wextra
CXXFLAGS += -pedantic
# warnings are errors
CXXFLAGS += -pedantic-errors
-CXXFLAGS += -Werror
+# TODO: re-enable when deprecated dynamic exception specifications are removed:
+#CXXFLAGS += -Werror
# even more warnings:
CXXFLAGS += -Wpointer-arith
CXXFLAGS += -Wcast-align
diff --git a/mex/README.md b/mex/README.md
index 695b1936..98638ce5 100644
--- a/mex/README.md
+++ b/mex/README.md
@@ -33,25 +33,25 @@ params.sample_rate = 44100;
params.reproduction_setup = '../data/reproduction_setups/circle.asd';
params.threads = 4;
-ssr_nfc_hoa('init', sources, params)
+ssr_dca('init', sources, params)
positions = [0; 2]; % one column for each source
-ssr_nfc_hoa('source_position', positions)
+ssr_dca('source_position', positions)
% for more parameters see test_ssr.m
% process (and discard) one block for interpolation:
-outputblock = ssr_nfc_hoa('process', single(zeros(params.block_size, sources)));
+outputblock = ssr_dca('process', single(zeros(params.block_size, sources)));
% now the source parameters have reached their desired values
-outputblock = ssr_nfc_hoa('process', inputblock);
+outputblock = ssr_dca('process', inputblock);
% do something with 'outputblock' ...
% repeat for each block ...
-ssr_nfc_hoa out_channels
-ssr_nfc_hoa clear
-ssr_nfc_hoa help
+ssr_dca out_channels
+ssr_dca clear
+ssr_dca help
```
diff --git a/mex/ssr_nfc_hoa.cpp b/mex/ssr_dca.cpp
similarity index 94%
rename from mex/ssr_nfc_hoa.cpp
rename to mex/ssr_dca.cpp
index ebf23c62..d1071c0d 100644
--- a/mex/ssr_nfc_hoa.cpp
+++ b/mex/ssr_dca.cpp
@@ -24,12 +24,12 @@
* http://spatialaudio.net/ssr ssr@spatialaudio.net *
******************************************************************************/
-// NFC-HOA renderer as MEX file for GNU Octave and MATLAB.
+// DCA renderer as MEX file for GNU Octave and MATLAB.
#include "ssr_mex.h"
-#include "nfchoarenderer.h"
+#include "dcarenderer.h"
-SsrMex mexobj;
+SsrMex mexobj;
void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
{
diff --git a/mex/ssr_helper.m b/mex/ssr_helper.m
index 83b4c85f..b2e99c96 100644
--- a/mex/ssr_helper.m
+++ b/mex/ssr_helper.m
@@ -1,6 +1,6 @@
function out = ssr_helper(in, func)
% Run the SSR block-wise on an input signal
-% 'func' is the SSR function, e.g. @ssr_nfc_hoa
+% 'func' is the SSR function, e.g. @ssr_dca
% 'func' must be initialized already
block_size = func('block_size');
diff --git a/src/Makefile.am b/src/Makefile.am
index 821b4bc8..e4400861 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,7 +9,7 @@
bin_PROGRAMS = $(SSR_executables)
## All possible optional programs must be listed here
-EXTRA_PROGRAMS = ssr-binaural ssr-wfs ssr-generic ssr-brs ssr-nfc-hoa ssr-vbap ssr-aap
+EXTRA_PROGRAMS = ssr-binaural ssr-wfs ssr-generic ssr-brs ssr-dca ssr-vbap ssr-aap
## CPPFLAGS: preprocessor flags, e.g. -I and -D
## -I., -I$(srcdir), and a -I pointing to the directory holding config.h
@@ -39,7 +39,9 @@ AM_CXXFLAGS = $(WARNING_FLAGS) $(PKG_FLAGS) $(OPT_FLAGS) $(DEBUGGING_FLAGS)
DOXYGEN_DOC_DIR = ../doc/doxygen
# files which should be distributed but not installed
-dist_noinst_DATA = Doxyfile coding_style.txt
+dist_noinst_DATA = Doxyfile coding_style.txt \
+ ../apf/misc/Makefile.dependencies \
+ ../apf/apf/mextools.h
ssr_binaural_SOURCES = ssr_binaural.cpp binauralrenderer.h \
$(SSRSOURCES)
@@ -75,41 +77,43 @@ ssr_brs_SOURCES = ssr_brs.cpp brsrenderer.h \
nodist_ssr_brs_SOURCES = $(SSRMOCFILES)
-ssr_nfc_hoa_SOURCES = ssr_nfc_hoa.cpp nfchoarenderer.h \
- hoacoefficients.h laplace_coeffs_double.h laplace_coeffs_float.h \
+ssr_dca_SOURCES = ssr_dca.cpp dcarenderer.h \
+ dcacoefficients.h laplace_coeffs_double.h laplace_coeffs_float.h \
../apf/apf/biquad.h \
../apf/apf/denormalprevention.h \
$(LOUDSPEAKERSOURCES) \
$(SSRSOURCES)
-nodist_ssr_nfc_hoa_SOURCES = $(SSRMOCFILES)
+nodist_ssr_dca_SOURCES = $(SSRMOCFILES)
LOUDSPEAKERSOURCES = \
loudspeakerrenderer.h \
loudspeaker.h
SSRSOURCES = \
- ../apf/apf/misc.h \
+ ../apf/apf/blockdelayline.h \
+ ../apf/apf/combine_channels.h \
+ ../apf/apf/commandqueue.h \
+ ../apf/apf/container.h \
+ ../apf/apf/convolver.h \
+ ../apf/apf/cxx_thread_policy.h \
+ ../apf/apf/dummy_thread_policy.h \
+ ../apf/apf/fftwtools.h \
+ ../apf/apf/iterator.h \
../apf/apf/jackclient.h \
+ ../apf/apf/jack_policy.h \
../apf/apf/lockfreefifo.h \
../apf/apf/math.h \
+ ../apf/apf/mimoprocessor_file_io.h \
+ ../apf/apf/mimoprocessor.h \
+ ../apf/apf/misc.h \
../apf/apf/parameter_map.h \
- ../apf/apf/stringtools.h \
- ../apf/apf/posix_thread_policy.h \
- ../apf/apf/cxx_thread_policy.h \
- ../apf/apf/jack_policy.h \
../apf/apf/pointer_policy.h \
- ../apf/apf/iterator.h \
- ../apf/apf/mimoprocessor.h \
- ../apf/apf/commandqueue.h \
+ ../apf/apf/posix_thread_policy.h \
../apf/apf/rtlist.h \
../apf/apf/shareddata.h \
- ../apf/apf/container.h \
- ../apf/apf/convolver.h \
- ../apf/apf/blockdelayline.h \
- ../apf/apf/fftwtools.h \
../apf/apf/sndfiletools.h \
- ../apf/apf/combine_channels.h \
+ ../apf/apf/stringtools.h \
configuration.cpp \
configuration.h \
controller.h \
diff --git a/src/controller.h b/src/controller.h
index 07ab0b2e..1dddb00f 100644
--- a/src/controller.h
+++ b/src/controller.h
@@ -1536,10 +1536,11 @@ void
Controller::orient_source_toward_reference(const id_t id)
{
// take reference offset into account?
-
- _publish(&Subscriber::set_source_orientation, id
- , (_scene.get_reference().position -
- *_scene.get_source_position(id)).orientation());
+ if (auto src_pos = _scene.get_source_position(id))
+ {
+ _publish(&Subscriber::set_source_orientation, id
+ , (_scene.get_reference().position - *src_pos).orientation());
+ }
}
template
diff --git a/src/hoacoefficients.h b/src/dcacoefficients.h
similarity index 92%
rename from src/hoacoefficients.h
rename to src/dcacoefficients.h
index cce1fdc1..c590a506 100644
--- a/src/hoacoefficients.h
+++ b/src/dcacoefficients.h
@@ -25,10 +25,10 @@
******************************************************************************/
/// @file
-/// Coefficients for the IIR filters in NfcHoaRenderer
+/// Coefficients for the IIR filters in DcaRenderer
-#ifndef SSR_HOACASCADE_H
-#define SSR_HOACASCADE_H
+#ifndef SSR_DCACASCADE_H
+#define SSR_DCACASCADE_H
#include // for std::pow()
@@ -56,9 +56,9 @@ const float LaplaceCoeffsBase::laplace_coeffs[][2] = {
} // namespace internal
-/// Coefficients for the IIR filters in NfcHoaRenderer
+/// Coefficients for the IIR filters in DcaRenderer
template
-class HoaCoefficients : public std::vector>
+class DcaCoefficients : public std::vector>
, private internal::LaplaceCoeffsBase
{
private:
@@ -69,7 +69,7 @@ class HoaCoefficients : public std::vector>
/// Constructor.
/// @throw std::logic_error if desired order is not supported.
- HoaCoefficients(size_t order, size_t sample_rate, float array_radius
+ DcaCoefficients(size_t order, size_t sample_rate, float array_radius
, float speed_of_sound)
: _base(order == 0 ? 1 : (order + 1) / 2) // round up
// calculate starting index to read Laplace-domain coefficients
@@ -83,7 +83,7 @@ class HoaCoefficients : public std::vector>
if (_coeffs_begin
>= sizeof(this->laplace_coeffs) / sizeof(*this->laplace_coeffs))
{
- throw std::logic_error("HoaCoefficients: Order " + apf::str::A2S(order)
+ throw std::logic_error("DcaCoefficients: Order " + apf::str::A2S(order)
+ " is not supported!");
}
}
@@ -98,7 +98,7 @@ class HoaCoefficients : public std::vector>
std::copy(iter, iter + this->size(), this->begin());
}
- void swap(HoaCoefficients& other)
+ void swap(DcaCoefficients& other)
{
// TODO: actually swap this stuff?
assert(_coeffs_begin == other._coeffs_begin);
@@ -110,7 +110,7 @@ class HoaCoefficients : public std::vector>
}
friend std::ostream&
- operator<<(std::ostream& stream, const HoaCoefficients& c)
+ operator<<(std::ostream& stream, const DcaCoefficients& c)
{
std::copy(c.begin(), c.end()
, std::ostream_iterator(stream, "\n"));
diff --git a/src/nfchoarenderer.h b/src/dcarenderer.h
similarity index 92%
rename from src/nfchoarenderer.h
rename to src/dcarenderer.h
index e9dcdedc..1a5e0243 100644
--- a/src/nfchoarenderer.h
+++ b/src/dcarenderer.h
@@ -27,8 +27,8 @@
/// @file
/// Near Field Compensated Higher Order Ambisonics renderer.
-#ifndef SSR_NFCHOARENDERER_H
-#define SSR_NFCHOARENDERER_H
+#ifndef SSR_DCARENDERER_H
+#define SSR_DCARENDERER_H
#include "apf/math.h" // for apf::math::linear_interpolator
#include "apf/fftwtools.h" // for apf::fftw, apf::fftw_allocator
@@ -37,19 +37,19 @@
#include "ssr_global.h" // for ssr::c
#include "loudspeakerrenderer.h"
-#include "hoacoefficients.h"
+#include "dcacoefficients.h"
namespace ssr
{
-class NfcHoaRenderer : public LoudspeakerRenderer
+class DcaRenderer : public LoudspeakerRenderer
{
private:
- using _base = LoudspeakerRenderer;
- using coeff_t = HoaCoefficients;
+ using _base = LoudspeakerRenderer;
+ using coeff_t = DcaCoefficients;
public:
- static const char* name() { return "NFC-HOA-Renderer"; }
+ static const char* name() { return "DCA-Renderer"; }
using matrix_t = apf::fixed_matrix;
using fft_matrix_t
@@ -65,14 +65,14 @@ class NfcHoaRenderer : public LoudspeakerRenderer
class RenderFunction;
struct Output;
- NfcHoaRenderer(const apf::parameter_map& params)
+ DcaRenderer(const apf::parameter_map& params)
: _base(params)
, _mode_pair_list(_fifo)
, _mode_accumulator_list(_fifo)
, _fft_list(_fifo)
{}
- APF_PROCESS(NfcHoaRenderer, _base)
+ APF_PROCESS(DcaRenderer, _base)
{
this->_process_list(_source_list);
this->_process_list(_mode_pair_list);
@@ -93,7 +93,7 @@ class NfcHoaRenderer : public LoudspeakerRenderer
rtlist_t _mode_pair_list, _mode_accumulator_list, _fft_list;
};
-class NfcHoaRenderer::Source : public _base::Source
+class DcaRenderer::Source : public _base::Source
{
public:
Source(const Params& p);
@@ -131,7 +131,7 @@ class NfcHoaRenderer::Source : public _base::Source
break;
}
- this->angle = apf::math::deg2rad(90 + (source_orientation
+ this->angle = apf::math::deg2rad(180 + (source_orientation
- this->parent.state.reference_orientation).azimuth);
// TODO: calculate delay
@@ -154,7 +154,7 @@ class NfcHoaRenderer::Source : public _base::Source
std::list _mode_pairs;
};
-class NfcHoaRenderer::Mode : public ProcessItem
+class DcaRenderer::Mode : public ProcessItem
, public apf::fixed_vector
{
public:
@@ -190,7 +190,7 @@ class NfcHoaRenderer::Mode : public ProcessItem
coeff_t _coefficients, _old_coefficients;
};
-void NfcHoaRenderer::Mode::_process()
+void DcaRenderer::Mode::_process()
{
// IIR filtering is not done in RenderFunction because workload would be
// distributed very un-evenly between threads!
@@ -285,7 +285,7 @@ void NfcHoaRenderer::Mode::_process()
* Mode%s in a way that each ModePair needs a similar amount of processing
* power.
**/
-class NfcHoaRenderer::ModePair : public ProcessItem
+class DcaRenderer::ModePair : public ProcessItem
{
public:
ModePair(size_t mode_number, size_t order, const Source& source)
@@ -321,7 +321,7 @@ class NfcHoaRenderer::ModePair : public ProcessItem
Mode _second;
};
-NfcHoaRenderer::Source::Source(const Params& p)
+DcaRenderer::Source::Source(const Params& p)
: _base::Source(p)
// Set impossible values to force update in first cycle:
, distance(-1.0f)
@@ -329,7 +329,7 @@ NfcHoaRenderer::Source::Source(const Params& p)
, source_model(coeff_t::source_t(-1))
{}
-class NfcHoaRenderer::RenderFunction
+class DcaRenderer::RenderFunction
{
public:
using result_type = std::pair;
@@ -365,11 +365,13 @@ class NfcHoaRenderer::RenderFunction
result_type operator()(sample_type in)
{
+ in *= _volume_correction;
return std::make_pair(in * _rotation1, in * _rotation2);
}
result_type operator()(sample_type in, sample_type index)
{
+ in *= _volume_correction;
return std::make_pair(in * _interpolator1(index)
, in * _interpolator2(index));
}
@@ -377,10 +379,13 @@ class NfcHoaRenderer::RenderFunction
private:
sample_type _rotation1, _rotation2;
apf::math::linear_interpolator _interpolator1, _interpolator2;
+
+ // TODO: Come up with a less arbitrary factor
+ sample_type _volume_correction = 0.1;
};
// Template-free base class to be used in Source::connect()
-struct NfcHoaRenderer::ModeAccumulatorBase : Item
+struct DcaRenderer::ModeAccumulatorBase : Item
{
using mode_ptrs_t = std::list;
@@ -393,7 +398,7 @@ struct NfcHoaRenderer::ModeAccumulatorBase : Item
// Mode 0 has no negative mode, nor does the highest order if there is an even
// number of loudspeakers.
template
-class NfcHoaRenderer::ModeAccumulator : public ModeAccumulatorBase
+class DcaRenderer::ModeAccumulator : public ModeAccumulatorBase
{
public:
ModeAccumulator(I1 i1, I2 i2, size_t block_size)
@@ -439,14 +444,14 @@ class NfcHoaRenderer::ModeAccumulator : public ModeAccumulatorBase
/// Helper function for automatic template type deduction
template
-NfcHoaRenderer::ModeAccumulator*
+DcaRenderer::ModeAccumulator*
new_mode_accumulator(I1 i1, I2 i2, size_t block_size)
{
- return new NfcHoaRenderer::ModeAccumulator(i1, i2, block_size);
+ return new DcaRenderer::ModeAccumulator(i1, i2, block_size);
}
void
-NfcHoaRenderer::Source::connect()
+DcaRenderer::Source::connect()
{
size_t order = this->parent.order;
@@ -480,7 +485,7 @@ NfcHoaRenderer::Source::connect()
}
void
-NfcHoaRenderer::Source::disconnect()
+DcaRenderer::Source::disconnect()
{
// Note: everything is done in reverse order of connect()
@@ -496,12 +501,12 @@ NfcHoaRenderer::Source::disconnect()
_mode_pairs.clear();
}
-class NfcHoaRenderer::FftProcessor : public ProcessItem
+class DcaRenderer::FftProcessor : public ProcessItem
{
public:
FftProcessor(size_t block_size, sample_type* first)
: _fft_plan(apf::fftw::plan_r2r_1d, block_size, first, first
- , FFTW_R2HC, FFTW_PATIENT)
+ , FFTW_HC2R, FFTW_PATIENT)
{}
APF_PROCESS(FftProcessor, ProcessItem)
@@ -514,7 +519,7 @@ class NfcHoaRenderer::FftProcessor : public ProcessItem
apf::fftw::scoped_plan _fft_plan;
};
-struct NfcHoaRenderer::Output : _base::Output
+struct DcaRenderer::Output : _base::Output
{
Output(const Params& p) : _base::Output(p) {}
@@ -527,7 +532,7 @@ struct NfcHoaRenderer::Output : _base::Output
};
void
-NfcHoaRenderer::load_reproduction_setup()
+DcaRenderer::load_reproduction_setup()
{
_base::load_reproduction_setup();
@@ -555,7 +560,7 @@ NfcHoaRenderer::load_reproduction_setup()
this->array_radius = total / normal_loudspeakers;
- std::cout << "\nWARNING: this is a preliminary implementation of the NFC-HOA "
+ std::cout << "\nWARNING: This is a preliminary implementation of the DCA "
"renderer!\nLoading " << normal_loudspeakers << " loudspeakers with a mean "
"distance of " << this->array_radius << " meters.\n"
"Assuming circular (counterclockwise) setup!\n" << std::endl;
diff --git a/src/gui/qopenglplotter.cpp b/src/gui/qopenglplotter.cpp
index 0444e474..02606434 100644
--- a/src/gui/qopenglplotter.cpp
+++ b/src/gui/qopenglplotter.cpp
@@ -111,8 +111,6 @@ ssr::QOpenGLPlotter::QOpenGLPlotter(Publisher& controller, const Scene& scene
_plot_listener(false),
_devicePixelRatio(1)
{
- _set_zoom(100); // 100%
-
_soloed_sources.clear();
// define possible colors for sources
diff --git a/src/gui/quserinterface.cpp b/src/gui/quserinterface.cpp
index 53dc6acb..5d2b8a53 100644
--- a/src/gui/quserinterface.cpp
+++ b/src/gui/quserinterface.cpp
@@ -242,6 +242,8 @@ ssr::QUserInterface::QUserInterface(Publisher& controller, const Scene& scene
connect(timer, SIGNAL(timeout()), this, SLOT(_update_screen()));
timer->start(static_cast(1.0f/static_cast(update_frequency) * 1000.0f));
+ _set_zoom(100);
+
_resizeControls(_controlsParent->width());
}
diff --git a/src/rendererbase.h b/src/rendererbase.h
index 95f08e28..ce5c97c6 100644
--- a/src/rendererbase.h
+++ b/src/rendererbase.h
@@ -31,6 +31,7 @@
#define SSR_RENDERERBASE_H
#include
+#include // for std::strcmp()
#include "apf/mimoprocessor.h"
#include "apf/shareddata.h"
diff --git a/src/ssr_nfc_hoa.cpp b/src/ssr_dca.cpp
similarity index 94%
rename from src/ssr_nfc_hoa.cpp
rename to src/ssr_dca.cpp
index 25e44487..ad46ce28 100644
--- a/src/ssr_nfc_hoa.cpp
+++ b/src/ssr_dca.cpp
@@ -25,14 +25,14 @@
******************************************************************************/
/// @file
-/// Main file for NFC HOA renderer.
+/// Main file for DCA renderer.
#include "controller.h"
-#include "nfchoarenderer.h"
+#include "dcarenderer.h"
int main(int argc, char* argv[])
{
- ssr::Controller controller(argc, argv);
+ ssr::Controller controller(argc, argv);
controller.run();
}