Coder Social home page Coder Social logo

mbrucher / audiotk Goto Github PK

View Code? Open in Web Editor NEW
251.0 251.0 37.0 13.14 MB

An audio digital processing toolbox based on a workflow/pipeline principle

Home Page: https://github.com/AudioTK/AudioTK

License: BSD 3-Clause "New" or "Revised" License

CMake 4.40% C++ 82.63% C 1.13% Python 11.64% Objective-C++ 0.20% Shell 0.01%

audiotk's People

Contributors

mbrucher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

audiotk's Issues

Enhance graph connections

If we know the number and the type of connections, we should statically defined these in order to avoid the unnecessary virtual calls.

Python modules can not be imported due to use of absolute imports

ATK/Core/__init__.py etc. use

from Core import *

That's not valid on newer Python versions, since the sub-modules of the ATK package are not directly on the Python module search path. You have to use:

from .Core import *

i.e. a relative import.

Here's a patch:

diff --git a/Python/Core/__init__.py b/Python/Core/__init__.py
index ae072fa..f312fd4 100644
--- a/Python/Core/__init__.py
+++ b/Python/Core/__init__.py
@@ -1,2 +1,2 @@

-from Core import *
+from .Core import *
diff --git a/Python/Delay/__init__.py b/Python/Delay/__init__.py
index 347b7c6..c062b3b 100644
--- a/Python/Delay/__init__.py
+++ b/Python/Delay/__init__.py
@@ -1,2 +1,2 @@

-from Delay import *
+from .Delay import *
diff --git a/Python/Distortion/__init__.py b/Python/Distortion/__init__.py
index 7784bf9..01ff699 100644
--- a/Python/Distortion/__init__.py
+++ b/Python/Distortion/__init__.py
@@ -1,2 +1,2 @@

-from Distortion import *
+from .Distortion import *
diff --git a/Python/Dynamic/__init__.py b/Python/Dynamic/__init__.py
index df5b7f3..3638816 100644
--- a/Python/Dynamic/__init__.py
+++ b/Python/Dynamic/__init__.py
@@ -1,2 +1,2 @@

-from Dynamic import *
+from .Dynamic import *
diff --git a/Python/EQ/__init__.py b/Python/EQ/__init__.py
index 63df28b..e625b2d 100644
--- a/Python/EQ/__init__.py
+++ b/Python/EQ/__init__.py
@@ -1,2 +1,2 @@

-from EQ import *
+from .EQ import *
diff --git a/Python/IO/__init__.py b/Python/IO/__init__.py
index f306660..bf8835e 100644
--- a/Python/IO/__init__.py
+++ b/Python/IO/__init__.py
@@ -1,2 +1,2 @@

-from IO import *
+from .IO import *
diff --git a/Python/Tools/__init__.py b/Python/Tools/__init__.py
index 982f5da..5f46dc0 100644
--- a/Python/Tools/__init__.py
+++ b/Python/Tools/__init__.py
@@ -1,2 +1,2 @@

-from Tools import *
+from .Tools import *

Possible issue in ScalarNewtonRalphson.h ?

Maybe I'm missing something, but:

optimize() does
output[0] = optimize_impl(input, output);

and optimize_impl does (in some rare cases):
return output[-1];

if that last return happens on the very first call, doesn't the entire state get initialized with bad data ? Maybe there's something in place to prevent reading before the first value of the array, but I couldn't see it.

Python chorus examples use non-existent filter class DoubleLowPassCoefficientsIIRFilter

The example scripts Examples/delay/chorus.py and Examples/delay/display_chorus.py want to import the DoubleLowPassCoefficientsIIRFilter from the ATK.EQ module. This module doesn't have a class of that name (anymore?).

I looked a the filter classes in ATK/EQ.py, but I wasn't clear to me what would be a suitable replacement class. I tried DoubleRobertBristowJohnsonLowPassFilter and the scripts seem to work with it, but I'm not sure whether the effect is comparable.

python wrapper requirements

Hi, this is a great package

I wonder what are the requirements for python wrapper? Do you support python 2 and 3?

cookiecutter template for ATK projects using DISTRHO plugin framework

This is not a bug or a feature request, just a headsup:

I have created a template for the (Python) tool cookiecutter, which allows to set up an audio effect plugin project using ATK and the DISTRHO Plugin Framework (DPF very quickly.

https://github.com/SpotlightKid/cookiecutter-dpf-audiotk

DPF helps to create audio plugins for multiple platforms (Linux, Windows, OS X) and multiple formats (LV2, VST, LADSPA, DSSI) from the same source. To create a new plugin project , you just get cookiecutter and then run:

cookiecutter https://github.com/SpotlightKid/cookiecutter-dpf-effect

The tool will then ask you about some information about your plugin, like the project, repository and plugin name, the author's name, email and domain, the plugin description, license and so forth.

A directory named after the value you gave for repo_name will be created and initialized as a git repository and DPF added as a git submodule.

Then just enter the directory and run make:

cd <repo_name>
make

The project template sets up the plugin source for a simple stereo delay effect. The make command compiles the plugin for all supported formats and places the binaries in the bin directory.

You can change the implementation in the source (plugins/<plugin_name>/Plugin<plugin_name>.cpp) to your need.

Share & Enjoy!

ATK/EQ/FourthOrderFilter.cpp is missing?

I am getting a compile error Cannot open include file: 'ATK/EQ/FourthOrderFilter.cpp': No such file or directory (compiling source file ....\JuceLibraryCode\include_atk_eq.cpp)

Linux compilation issues

I had to jump through a few hoops to manage to get AudioTK compiled on Arch Linux with GCC 5.3.0. Here's what I did to successfully compile:

patch -p1 -N -r - -i exp-cstddef.patch

rm -rf build
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-std=c++11" \
      -DENABLE_PYTHON=1 \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DENABLE_TESTS=0 \
      ..
make

The exp-cstdef.patch:

diff --git a/ATK/Utility/exp.cpp b/ATK/Utility/exp.cpp
index 5447602..9af5802 100644
--- a/ATK/Utility/exp.cpp
+++ b/ATK/Utility/exp.cpp
@@ -4,6 +4,7 @@

 #include <ATK/Utility/exp.h>

+#include <cstddef>
 #include <cmath>

 namespace ATK

Without this patch I get this error:

<...>/AudioTK/ATK/Utility/exp.cpp:29:5: error: 'size_t' was not declared in this scope

When enabling tests I get the following error:

<...>/AudioTK/tests/IO/libsndfile/InSndFileFilter.cpp:9:21: fatal error: ATK/git.h: No such file or directory

error MSB3073 when trying to INSTALL (CMake, VS2013).

This is a continuation from: #2

Have downloaded latest develop branch. Generated with CMake for VS2013 using settings ENABLE_SHARED_LIBRARIES and ENABLE_TESTS.

After building (the ALL_BUILD project) I believe I need to build the INSTALL project in VS2013.

However this produces:

------- Rebuild All started: Project: INSTALL, Configuration: Release Win32 ------
--Install configuration: "Release"
CMake Error at ATK/cmake_install.cmake:39 (file):
file cannot create directory: C:/Program Files (x86)/AudioTK/include/ATK.
Maybe need administrative privileges.
Call Stack (most recent call first):
cmake_install.cmake:32 (include)

Followed by an error:

Error 1 error MSB3073: The command "setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd :VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 132 5 INSTALL

Running VS2013 with administrative privileges doesn't help.

Several test failures

$ cd build; make test
Running tests...
Test project /home/chris/src/AudioTK/build
      Start  1: AudioTKUTILITY
 1/14 Test  #1: AudioTKUTILITY ...................   Passed    0.01 sec
      Start  2: AudioTKCore
 2/14 Test  #2: AudioTKCore ......................   Passed    3.17 sec
      Start  3: AudioTKMock
 3/14 Test  #3: AudioTKMock ......................   Passed    0.18 sec
      Start  4: AudioTKTools
 4/14 Test  #4: AudioTKTools .....................***Failed   31.31 sec
      Start  5: AudioTKIO
 5/14 Test  #5: AudioTKIO ........................***Failed    0.02 sec
      Start  6: AudioTKEQ
 6/14 Test  #6: AudioTKEQ ........................   Passed    1.40 sec
      Start  7: AudioTKDelay
 7/14 Test  #7: AudioTKDelay .....................   Passed    0.39 sec
      Start  8: AudioTKDynamic
 8/14 Test  #8: AudioTKDynamic ...................   Passed    0.76 sec
      Start  9: AudioTKDistortion
 9/14 Test  #9: AudioTKDistortion ................   Passed    0.01 sec
      Start 10: AudioTKSpecial
10/14 Test #10: AudioTKSpecial ...................   Passed    0.25 sec
      Start 11: AudioTKSpecial
11/14 Test #11: AudioTKSpecial ...................   Passed   22.55 sec
      Start 12: PyAudioTKCore
12/14 Test #12: PyAudioTKCore ....................***Failed    0.47 sec
      Start 13: PyAudioATKTools
13/14 Test #13: PyAudioATKTools ..................***Failed    0.45 sec
      Start 14: PyAudioATKEQ
14/14 Test #14: PyAudioATKEQ .....................***Failed    0.39 sec

64% tests passed, 5 tests failed out of 14

Total Test time (real) =  61.37 sec

The following tests FAILED:
      4 - AudioTKTools (Failed)
      5 - AudioTKIO (Failed)
     12 - PyAudioTKCore (Failed)
     13 - PyAudioATKTools (Failed)
     14 - PyAudioATKEQ (Failed)
Errors while running CTest
Makefile:105: die Regel für Ziel „test“ scheiterte
make: *** [test] Fehler 8

Attached is a log file with the output from

$ cd build
$ /usr/bin/ctest --force-new-ctest-process --output-on-failure -O testlog.txt

ATK compiled on Arch Linux x86_64 with GCC 5.3.0, build type Release.

testlog.txt

Enabling BUILD_DOC breaks cmake

Fix:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f273543..c698cdc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -334,7 +334,7 @@ endif(ENABLE_PYTHON)
 
 IF (BUILD_DOC)
 
-  FIND_PACKAGE(Doxygen Required)
+  FIND_PACKAGE(Doxygen REQUIRED)
 
   SET(DOXYGEN_INPUT Doxyfile)
   SET(DOXYGEN_OUTPUT Doxygen)

XCode build failed

Hi Matthiew.

I'm trying to build AudioTK on XCode.

I installed Boost, libsndfile et fftw via macports and the CMake generation process seem to work more or less, except for FFTW but I tried to run a build and hoped to see work not every module but at least get ATK Core to build.

My cmake output is :

_INFO Build shared libraries: ON
INFO Build static libraries: OFF
INFO Build tests: ON
Could NOT find FFTW (missing: FFTW_LIBRARY_FFTW3 FFTW_LIBRARY_FFTW3F FFTW_LIBRARIES FFTW_INCLUDES)
Boost version: 1.61.0
Boost version: 1.61.0
Found the following Boost libraries:
unit_test_framework
system
Boost version: 1.61.0
Found the following Boost libraries:
unit_test_framework
timer
system
chrono
Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

ATKAdaptive
ATKCore
ATKDelay
ATKDistortion
ATKDynamic
ATKEQ
ATKIO
ATKMock
ATKPreamplifier
ATKReverberation
ATKSpecial
ATKTools
ATKUtility

This warning is for project developers. Use -Wno-dev to suppress it.

Generating done_

the build fails in TypedBaseFilter.cpp and there was to issue there :
At first in the with RValue constructor
template<typename DataType> TypedBaseFilter<DataType>::TypedBaseFilter(TypedBaseFilter&& other) :Parent(static_cast<Parent &&>(std::move(other))),

There was an error if I was not casting std::move(other) to RValue type.

I confess I'm not fluent at all with C++11 Feature and I'm lost there.

I hope you have a OS X and you could try a build on your machine, or maybe you got an idea of what's happenning ?

I'm on OS X El-Capitain. I use LLVM.

Thank you

Unable to build from git checkout (no CMakeLists.txt in pybind11 directory)

I'm trying to build the latest AudioTK version from a git checkout for the audiotk-git AUR package. I get the following error at the cmake stage:

-- The C compiler identification is GNU 7.1.1
-- The CXX compiler identification is GNU 7.1.1
-- Check for working C compiler: /usr/lib/ccache/bin/cc
-- Check for working C compiler: /usr/lib/ccache/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
INFO Build shared libraries: ON
INFO Build static libraries: OFF
INFO Build tests: 1
-- Performing Test COMPILER_SUPPORTS_CXX14
-- Performing Test COMPILER_SUPPORTS_CXX14 - Success
-- Performing Test COMPILER_SUPPORTS_PTHREAD
-- Performing Test COMPILER_SUPPORTS_PTHREAD - Success
-- Performing Test COMPILER_SUPPORTS_restrict
-- Performing Test COMPILER_SUPPORTS_restrict - Failed
-- The compiler /usr/lib/ccache/bin/c++ doesn't support -restrict.
-- Performing Test COMPILER_SUPPORTS_ftz
-- Performing Test COMPILER_SUPPORTS_ftz - Failed
-- The compiler /usr/lib/ccache/bin/c++ doesn't support -ftz.
-- Performing Test COMPILER_SUPPORTS_ftpz
-- Performing Test COMPILER_SUPPORTS_ftpz - Failed
-- The compiler /usr/lib/ccache/bin/c++ doesn't support -fdenormal-fp-math=positive-zero.
-- Performing Test COMPILER_SUPPORTS_ftree_vectorize
-- Performing Test COMPILER_SUPPORTS_ftree_vectorize - Success
-- Performing Test COMPILER_SUPPORTS_AVX
-- Performing Test COMPILER_SUPPORTS_AVX - Failed
-- The compiler /usr/lib/ccache/bin/c++ doesn't support -xAVX -axCORE-AVX2.
-- Performing Test HAS_STD_ALIGN2
-- Performing Test HAS_STD_ALIGN2 - Success
-- Found Git: /usr/bin/git  
-- Found LIBSNDFILE: /usr/include  
-- Boost version: 1.64.0
-- Found Eigen: /usr/include/eigen3 (found version "3.3.4") 
-- Found FFTW: /usr/lib/libfftw3.so  
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   unit_test_framework
--   system
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   unit_test_framework
--   system
-- Found PythonInterp: /usr/bin/python (found version "3.6.1") 
-- Found NumPy: /usr/lib/python3.6/site-packages/numpy/core/include (found version "1.13.0") 
CMake Error at Python/CMakeLists.txt:4 (add_subdirectory):
  The source directory

    /home/chris/src/arch/aur/audiotk-git/src/audiotk/Python/pybind11

  does not contain a CMakeLists.txt file.


CMake Error at Python/CMakeLists.txt:7 (FIND_PACKAGE):
  By not providing "FindPythonLibsNew.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "PythonLibsNew", but CMake did not find one.

  Could not find a package configuration file provided by "PythonLibsNew"
  with any of the following names:

    PythonLibsNewConfig.cmake
    pythonlibsnew-config.cmake

  Add the installation prefix of "PythonLibsNew" to CMAKE_PREFIX_PATH or set
  "PythonLibsNew_DIR" to a directory containing one of the above files.  If
  "PythonLibsNew" provides a separate development package or SDK, be sure it
  has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/chris/src/arch/aur/audiotk-git/src/audiotk/build/CMakeFiles/CMakeOutput.log".
See also "/home/chris/src/arch/aur/audiotk-git/src/audiotk/build/CMakeFiles/CMakeError.log".

Here are the commands I'm using (adapted from the examples found in the .travis.yml file:

rm -rf build
mkdir build
git checkout develop
git pull
cd build
local py_ver=$(python -c 'import sys; print("%s.%s.%s" % sys.version_info[:3])')
local py_maj_ver=$(python -c 'import sys; print("%s.%s" % sys.version_info[:2])')
cmake .. \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DDISABLE_EIGEN_WARNINGS=1 \
  -DENABLE_PYTHON=1 \
  -DPYTHON_VERSION=${py_maj_ver} \
  -DPYTHON=python${py_maj_ver} \
  -DPython_ADDITIONAL_VERSIONS=${py_ver} \
  -DENABLE_TESTS=1 \
  -DBUILD_DOC=1 \
  -DENABLE_GPL=1

The Python/pybind11 directory is empty in the git checkout . What am I missing?

Undefined symbol when importing ATK.Core Python module

>>> import ATK.Core
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/ATK/Core/__init__.py", line 2, in <module>
    from .Core import *
  File "/usr/lib/python3.5/site-packages/ATK/Core/Core.py", line 30, in <module>
    _Core = swig_import_helper()
  File "/usr/lib/python3.5/site-packages/ATK/Core/Core.py", line 26, in swig_import_helper
    _mod = imp.load_module('_Core', fp, pathname, description)
  File "/usr/lib/python3.5/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: /usr/lib/python3.5/site-packages/ATK/Core/_Core.so: undefined symbol: _ZN3ATK16OutPointerFilterIxEC1EPxilb

Note: I moved /usr/lib/site-packages/ATK to /usr/lib/python3.5/site-packages since /usr/lib/site-packages is not a valid Python module directory on non-debian-based systems.

Python tests do not work without AudioTK Python libraries installed

The Python tests do not work without the Python libraries installed, so the test can not be run from the source or build tree without installing first, which is a problem e.g. for distribution packagers.

The reason is that they import the ATK modules in the form from ATK.Xyz import xyz, but the directory for the ATK python package is only created on installation of the modules. In the build tree there is no ATK directory and hence no ATK package. So even adding the build/Python directory to PYTHONPATH for the tests wouldn't work.

I don't see a quick solution for this. IMHO either the build process should be altered in such a way that the modules are created in a proper package directory structure under build/Python/ATK or a testing environment should be used, that creates a temporary installation of the Python package (like e.g. tox.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.