From 853764a51ec825581c2495c97497b7c15b307055 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Sun, 3 May 2026 15:14:05 +0100 Subject: [PATCH 01/27] Skip screensaver launch when app is running --- client_generic/Client/client_win32.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/client_generic/Client/client_win32.h b/client_generic/Client/client_win32.h index ada619e5..27c4ff30 100644 --- a/client_generic/Client/client_win32.h +++ b/client_generic/Client/client_win32.h @@ -280,11 +280,21 @@ class CElectricSheep_Win32 : public CElectricSheep m_bAllowFKey = true; } } - + // Stops .scr /s running if .exe is open + if (m_ScrMode == eSaver && + g_SingleInstanceObj.IsAnotherInstanceRunning()) + { + g_Log->Info("Screensaver launch skipped because another " + "infinidream instance is already running."); + m_bConfigMode = true; + return false; + } // Check for multiple instances if we're not specifically asked not - // to. + // to. if (m_ScrMode != eWindowed_AllowMultipleInstances && - m_ScrMode != eSaver && m_ScrMode != eConfig && + m_ScrMode != eSaver && + m_ScrMode != eConfig && + m_ScrMode != ePreview && m_ScrMode != eFullScreenStandalone) { if (g_SingleInstanceObj.IsAnotherInstanceRunning()) From 17bbb349cbcd61b1909d4f69a6eed70c78b075f3 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 08:00:37 +0100 Subject: [PATCH 02/27] Add fake audio reactive signal test --- client_generic/Client/client.h | 43 +++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/client_generic/Client/client.h b/client_generic/Client/client.h index 14e2e6f5..3fb8f71f 100644 --- a/client_generic/Client/client.h +++ b/client_generic/Client/client.h @@ -41,6 +41,7 @@ #include "TextureFlat.h" #include "Timer.h" #include "StringFormat.h" +#include #if defined(WIN32) #include "FirstTimeSetupWin32.h" @@ -193,7 +194,11 @@ class CElectricSheep // We use perceptual FPS here which don't take into account per dream activity level double m_PerceptualFPS; - + double m_AudioReactivePhase = 0.0; + float m_AudioReactiveBass = 0.0f; + float m_AudioReactiveMid = 0.0f; + float m_AudioReactiveHigh = 0.0f; + // internal brightness counter int m_Brightness = 0; @@ -421,6 +426,8 @@ class CElectricSheep spStats->Add( new Hud::CStringStat("activityLevel", "Activity level: ", "1.00")); + spStats->Add( + new Hud::CStringStat("audioReactive", "Audio reactive: ", "off")); spStats->Add(new Hud::CStringStat("playHead", "", "00m00s/00m00s")); int32_t displayMode = @@ -1278,7 +1285,34 @@ class CElectricSheep bool drawNoSheepIntro = false; bool drawn = g_Player().Update(displayUnit); // , drawNoSheepIntro); + // Temporary fake audio-reactive signal. + // This proves the app can update reactive values once per frame + // before we bother wrestling Windows audio capture like a cursed printer driver. + if (displayUnit == 0) + { + m_AudioReactivePhase += 1.0 / 60.0; + + m_AudioReactiveBass = + 0.5f + 0.5f * static_cast( + std::sin(m_AudioReactivePhase * 3.0)); + m_AudioReactiveMid = + 0.5f + 0.5f * static_cast( + std::sin(m_AudioReactivePhase * 5.0)); + m_AudioReactiveHigh = + 0.5f + 0.5f * static_cast( + std::sin(m_AudioReactivePhase * 11.0)); + } + if (displayUnit == 0) + { + const float reactiveBrightness = m_AudioReactiveBass * 0.15f; + + if (auto spRenderer = g_Player().Renderer()) + { + spRenderer->SetBrightness(reactiveBrightness); + } + } + if ((!EDreamClient::IsLoggedIn() && !m_MultipleInstancesMode) || !g_Player().HasStarted()) { drawNoSheepIntro = true; } @@ -1522,6 +1556,13 @@ class CElectricSheep ->SetSample(string_format(" %.2f fps", pFPS)); ((Hud::CStringStat*)spStats->Get("activityLevel")) ->SetSample(string_format(" %.2f", activityLevel)); + if (auto audioReactiveStat = static_cast( + spStats->Get("audioReactive"))) + { + audioReactiveStat->SetSample(string_format( + "bass %.2f | mid %.2f | high %.2f", m_AudioReactiveBass, + m_AudioReactiveMid, m_AudioReactiveHigh)); + } ((Hud::CIntCounter*)spStats->Get("displayfps"))->AddSample(1); // Update playlist info From 96e0cb2c0afc8c36b94775bf71ffbb18bb1a94a9 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:03:45 +0100 Subject: [PATCH 03/27] Move fake audio reactivity into analyzer --- client_generic/Client/AudioAnalyzer.cpp | 20 +++++++++++ client_generic/Client/AudioAnalyzer.h | 24 ++++++++++++++ client_generic/Client/client.h | 33 +++++++------------ client_generic/MSVC/electricsheep.vcxproj | 6 ++-- .../MSVC/electricsheep.vcxproj.filters | 28 ++++++++++++++++ 5 files changed, 87 insertions(+), 24 deletions(-) create mode 100644 client_generic/Client/AudioAnalyzer.cpp create mode 100644 client_generic/Client/AudioAnalyzer.h diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp new file mode 100644 index 00000000..c17a810b --- /dev/null +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -0,0 +1,20 @@ +#include "AudioAnalyzer.h" + +#include + +void AudioAnalyzer::Update(double deltaSeconds) +{ + m_Phase += deltaSeconds; + + m_Features.bass = 0.5f + 0.5f * static_cast(std::sin(m_Phase * 3.0)); + m_Features.mid = 0.5f + 0.5f * static_cast(std::sin(m_Phase * 5.0)); + m_Features.high = + 0.5f + 0.5f * static_cast(std::sin(m_Phase * 11.0)); + + m_Features.volume = + (m_Features.bass + m_Features.mid + m_Features.high) / 3.0f; + + m_Features.hasSignal = true; +} + +const AudioFeatures& AudioAnalyzer::GetFeatures() const { return m_Features; } \ No newline at end of file diff --git a/client_generic/Client/AudioAnalyzer.h b/client_generic/Client/AudioAnalyzer.h new file mode 100644 index 00000000..72d00127 --- /dev/null +++ b/client_generic/Client/AudioAnalyzer.h @@ -0,0 +1,24 @@ +#ifndef AUDIO_ANALYZER_H_INCLUDED +#define AUDIO_ANALYZER_H_INCLUDED + +struct AudioFeatures +{ + float bass = 0.0f; + float mid = 0.0f; + float high = 0.0f; + float volume = 0.0f; + bool hasSignal = false; +}; + +class AudioAnalyzer +{ + public: + void Update(double deltaSeconds); + const AudioFeatures& GetFeatures() const; + + private: + double m_Phase = 0.0; + AudioFeatures m_Features; +}; + +#endif \ No newline at end of file diff --git a/client_generic/Client/client.h b/client_generic/Client/client.h index 3fb8f71f..6505a1a7 100644 --- a/client_generic/Client/client.h +++ b/client_generic/Client/client.h @@ -41,6 +41,7 @@ #include "TextureFlat.h" #include "Timer.h" #include "StringFormat.h" +#include "AudioAnalyzer.h" #include #if defined(WIN32) @@ -194,10 +195,7 @@ class CElectricSheep // We use perceptual FPS here which don't take into account per dream activity level double m_PerceptualFPS; - double m_AudioReactivePhase = 0.0; - float m_AudioReactiveBass = 0.0f; - float m_AudioReactiveMid = 0.0f; - float m_AudioReactiveHigh = 0.0f; + AudioAnalyzer m_AudioAnalyzer; // internal brightness counter int m_Brightness = 0; @@ -1285,27 +1283,15 @@ class CElectricSheep bool drawNoSheepIntro = false; bool drawn = g_Player().Update(displayUnit); // , drawNoSheepIntro); - // Temporary fake audio-reactive signal. - // This proves the app can update reactive values once per frame - // before we bother wrestling Windows audio capture like a cursed printer driver. if (displayUnit == 0) { - m_AudioReactivePhase += 1.0 / 60.0; - - m_AudioReactiveBass = - 0.5f + 0.5f * static_cast( - std::sin(m_AudioReactivePhase * 3.0)); - m_AudioReactiveMid = - 0.5f + 0.5f * static_cast( - std::sin(m_AudioReactivePhase * 5.0)); - m_AudioReactiveHigh = - 0.5f + 0.5f * static_cast( - std::sin(m_AudioReactivePhase * 11.0)); + m_AudioAnalyzer.Update(1.0 / 60.0); } if (displayUnit == 0) { - const float reactiveBrightness = m_AudioReactiveBass * 0.15f; + const AudioFeatures& audio = m_AudioAnalyzer.GetFeatures(); + const float reactiveBrightness = audio.bass * 0.15f; if (auto spRenderer = g_Player().Renderer()) { @@ -1559,10 +1545,13 @@ class CElectricSheep if (auto audioReactiveStat = static_cast( spStats->Get("audioReactive"))) { - audioReactiveStat->SetSample(string_format( - "bass %.2f | mid %.2f | high %.2f", m_AudioReactiveBass, - m_AudioReactiveMid, m_AudioReactiveHigh)); + const AudioFeatures& audio = m_AudioAnalyzer.GetFeatures(); + + audioReactiveStat->SetSample( + string_format("bass %.2f | mid %.2f | high %.2f", + audio.bass, audio.mid, audio.high)); } + ((Hud::CIntCounter*)spStats->Get("displayfps"))->AddSample(1); // Update playlist info diff --git a/client_generic/MSVC/electricsheep.vcxproj b/client_generic/MSVC/electricsheep.vcxproj index dfeec362..11358e68 100644 --- a/client_generic/MSVC/electricsheep.vcxproj +++ b/client_generic/MSVC/electricsheep.vcxproj @@ -219,7 +219,7 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" Disabled - ..\MacBuild;..\ContentDownloader;..\Client;..\Common;..\Common\Math;..\ContentDecoder;..\DisplayOutput\Renderer;..\DisplayOutput;..\Networking;..\TupleStorage;..\socket.io-client-cpp\include;..\websocketpp;..\;%(AdditionalIncludeDirectories) + ..\MacBuild;..\ContentDownloader;..\Client;..\Common;..\Common\Math;..\ContentDecoder;..\DisplayOutput\Renderer;..\DisplayOutput;..\Networking;..\TupleStorage;..\socket.io-client-cpp\include;..\websocketpp;..\;C:\Users\Sanial\client\vcpkg_installed\x64-windows\include;%(AdditionalIncludeDirectories) _WIN32_WINNT=0x0A00;BOOST_BIND_GLOBAL_PLACEHOLDERS;WIN32;_WIN64;_DEBUG;_WINDOWS;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;D3D_DEBUG_INFO;COMPILE_MULTIMON_STUBS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -237,7 +237,7 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" avcodec.lib;avformat.lib;swscale.lib;avdevice.lib;avutil.lib;sioclient.lib;libssl.lib;libcrypto.lib;libpng16d.lib;kernel32.lib;user32.lib;dwrite.lib;shlwapi.lib;libcurl.lib;d3d9.lib;d3d11.lib;d3d12.lib;dxgi.lib;d3dcompiler.lib;dxguid.lib;ws2_32.lib;wldap32.lib;psapi.lib;delayimp.lib;crypt32.lib;bcrypt.lib;pdh.lib;%(AdditionalDependencies) $(OutDir)$(ProjectName)d.exe - ..\socket.io-client-cpp\lib\Debug;%(AdditionalLibraryDirectories) + ..\socket.io-client-cpp\lib\Debug;C:\Users\Sanial\client\vcpkg_installed\x64-windows\lib;%(AdditionalLibraryDirectories) %(IgnoreSpecificDefaultLibraries) wldap32.dll;ws2_32.dll;%(DelayLoadDLLs) true @@ -646,6 +646,7 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" + @@ -695,6 +696,7 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" + diff --git a/client_generic/MSVC/electricsheep.vcxproj.filters b/client_generic/MSVC/electricsheep.vcxproj.filters index 9b5690bb..8d660fba 100644 --- a/client_generic/MSVC/electricsheep.vcxproj.filters +++ b/client_generic/MSVC/electricsheep.vcxproj.filters @@ -186,6 +186,18 @@ DisplayOutput\D3D11 + + ContentDownloader + + + ContentDownloader + + + ContentDownloader + + + ContentDownloader + @@ -440,6 +452,21 @@ DisplayOutput\D3D11 + + Common + + + Common + + + Common + + + Common + + + Common + @@ -448,6 +475,7 @@ Common + From a755497557e8af83c26c47598b7a58d12118e6e5 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:13:50 +0100 Subject: [PATCH 04/27] Add WASAPI input stub --- client_generic/Client/AudioInputWasapi.cpp | 22 +++++++++++++++++++ client_generic/Client/AudioInputWasapi.h | 21 ++++++++++++++++++ client_generic/MSVC/electricsheep.vcxproj | 2 ++ .../MSVC/electricsheep.vcxproj.filters | 6 +++++ 4 files changed, 51 insertions(+) create mode 100644 client_generic/Client/AudioInputWasapi.cpp create mode 100644 client_generic/Client/AudioInputWasapi.h diff --git a/client_generic/Client/AudioInputWasapi.cpp b/client_generic/Client/AudioInputWasapi.cpp new file mode 100644 index 00000000..4773af11 --- /dev/null +++ b/client_generic/Client/AudioInputWasapi.cpp @@ -0,0 +1,22 @@ +#include "AudioInputWasapi.h" + +AudioInputWasapi::AudioInputWasapi() {} + +AudioInputWasapi::~AudioInputWasapi() { Stop(); } + +bool AudioInputWasapi::Start() +{ + m_Running = true; + m_Level = 0.0f; + return true; +} + +void AudioInputWasapi::Stop() +{ + m_Running = false; + m_Level = 0.0f; +} + +bool AudioInputWasapi::IsRunning() const { return m_Running; } + +float AudioInputWasapi::GetLevel() const { return m_Level; } \ No newline at end of file diff --git a/client_generic/Client/AudioInputWasapi.h b/client_generic/Client/AudioInputWasapi.h new file mode 100644 index 00000000..12be75f8 --- /dev/null +++ b/client_generic/Client/AudioInputWasapi.h @@ -0,0 +1,21 @@ +#ifndef AUDIO_INPUT_WASAPI_H_INCLUDED +#define AUDIO_INPUT_WASAPI_H_INCLUDED + +class AudioInputWasapi +{ + public: + AudioInputWasapi(); + ~AudioInputWasapi(); + + bool Start(); + void Stop(); + + bool IsRunning() const; + float GetLevel() const; + + private: + bool m_Running = false; + float m_Level = 0.0f; +}; + +#endif \ No newline at end of file diff --git a/client_generic/MSVC/electricsheep.vcxproj b/client_generic/MSVC/electricsheep.vcxproj index 11358e68..b5a23a9c 100644 --- a/client_generic/MSVC/electricsheep.vcxproj +++ b/client_generic/MSVC/electricsheep.vcxproj @@ -647,6 +647,7 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" + @@ -697,6 +698,7 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" + diff --git a/client_generic/MSVC/electricsheep.vcxproj.filters b/client_generic/MSVC/electricsheep.vcxproj.filters index 8d660fba..90736d44 100644 --- a/client_generic/MSVC/electricsheep.vcxproj.filters +++ b/client_generic/MSVC/electricsheep.vcxproj.filters @@ -198,6 +198,9 @@ ContentDownloader + + ContentDownloader + @@ -467,6 +470,9 @@ Common + + Common + From 1a35785d0f1a10479c44766ad0315713b80b63f9 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:16:43 +0100 Subject: [PATCH 05/27] Initialize WASAPI default output device --- client_generic/Client/AudioInputWasapi.cpp | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/client_generic/Client/AudioInputWasapi.cpp b/client_generic/Client/AudioInputWasapi.cpp index 4773af11..586ea50f 100644 --- a/client_generic/Client/AudioInputWasapi.cpp +++ b/client_generic/Client/AudioInputWasapi.cpp @@ -1,11 +1,44 @@ #include "AudioInputWasapi.h" +#include +#include +#include + +#pragma comment(lib, "Ole32.lib") + AudioInputWasapi::AudioInputWasapi() {} AudioInputWasapi::~AudioInputWasapi() { Stop(); } bool AudioInputWasapi::Start() { + HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED); + if (FAILED(hr) && hr != RPC_E_CHANGED_MODE) + { + return false; + } + + IMMDeviceEnumerator* enumerator = nullptr; + hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr, CLSCTX_ALL, + __uuidof(IMMDeviceEnumerator), + reinterpret_cast(&enumerator)); + + if (FAILED(hr) || !enumerator) + { + return false; + } + + IMMDevice* device = nullptr; + hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device); + enumerator->Release(); + + if (FAILED(hr) || !device) + { + return false; + } + + device->Release(); + m_Running = true; m_Level = 0.0f; return true; From f73ab8a842e27d581532069c8396b55c85d91f22 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:19:13 +0100 Subject: [PATCH 06/27] Open WASAPI loopback audio client --- client_generic/Client/AudioInputWasapi.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client_generic/Client/AudioInputWasapi.h b/client_generic/Client/AudioInputWasapi.h index 12be75f8..7c292fe5 100644 --- a/client_generic/Client/AudioInputWasapi.h +++ b/client_generic/Client/AudioInputWasapi.h @@ -1,6 +1,9 @@ #ifndef AUDIO_INPUT_WASAPI_H_INCLUDED #define AUDIO_INPUT_WASAPI_H_INCLUDED +#include +#include + class AudioInputWasapi { public: @@ -16,6 +19,9 @@ class AudioInputWasapi private: bool m_Running = false; float m_Level = 0.0f; + + IAudioClient* m_AudioClient = nullptr; + IMMDevice* m_Device = nullptr; }; #endif \ No newline at end of file From df88f57d3fdf3f99f4b86c53661b8752d2e0bfd4 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:45:26 +0100 Subject: [PATCH 07/27] Use WASAPI audio level for reactivity --- client_generic/Client/AudioAnalyzer.cpp | 43 ++++++-- client_generic/Client/AudioAnalyzer.h | 4 + client_generic/Client/AudioInputWasapi.cpp | 118 ++++++++++++++++++++- client_generic/Client/AudioInputWasapi.h | 1 + 4 files changed, 154 insertions(+), 12 deletions(-) diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp index c17a810b..93a93e33 100644 --- a/client_generic/Client/AudioAnalyzer.cpp +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -6,15 +6,44 @@ void AudioAnalyzer::Update(double deltaSeconds) { m_Phase += deltaSeconds; - m_Features.bass = 0.5f + 0.5f * static_cast(std::sin(m_Phase * 3.0)); - m_Features.mid = 0.5f + 0.5f * static_cast(std::sin(m_Phase * 5.0)); - m_Features.high = - 0.5f + 0.5f * static_cast(std::sin(m_Phase * 11.0)); + if (!m_AudioInput.IsRunning()) + { + m_AudioInput.Start(); + } - m_Features.volume = - (m_Features.bass + m_Features.mid + m_Features.high) / 3.0f; + float rawLevel = m_AudioInput.GetLevel(); - m_Features.hasSignal = true; + // Boost raw input before smoothing + rawLevel *= 1.5f; + if (rawLevel > 1.0f) + rawLevel = 1.0f; + // Noise floor clamp + if (rawLevel < 0.01f) + rawLevel = 0.0f; + + // Fast rise, slow fall + float attack = 0.35f; + float release = 0.08f; + + float smoothing = rawLevel > m_Features.volume ? attack : release; + + float level = + (m_Features.volume * (1.0f - smoothing)) + (rawLevel * smoothing); + + static float peak = 0.0f; + + // quick peak capture + if (level > peak) + peak = level; + + // decay + peak *= 0.95f; + + m_Features.volume = level; + m_Features.bass = level; + m_Features.mid = level * 0.7f; + m_Features.high = level * 0.4f; + m_Features.hasSignal = level > 0.001f; } const AudioFeatures& AudioAnalyzer::GetFeatures() const { return m_Features; } \ No newline at end of file diff --git a/client_generic/Client/AudioAnalyzer.h b/client_generic/Client/AudioAnalyzer.h index 72d00127..3bce76dd 100644 --- a/client_generic/Client/AudioAnalyzer.h +++ b/client_generic/Client/AudioAnalyzer.h @@ -1,6 +1,8 @@ #ifndef AUDIO_ANALYZER_H_INCLUDED #define AUDIO_ANALYZER_H_INCLUDED +#include "AudioInputWasapi.h" + struct AudioFeatures { float bass = 0.0f; @@ -17,6 +19,8 @@ class AudioAnalyzer const AudioFeatures& GetFeatures() const; private: + + AudioInputWasapi m_AudioInput; double m_Phase = 0.0; AudioFeatures m_Features; }; diff --git a/client_generic/Client/AudioInputWasapi.cpp b/client_generic/Client/AudioInputWasapi.cpp index 586ea50f..6a9c2dbc 100644 --- a/client_generic/Client/AudioInputWasapi.cpp +++ b/client_generic/Client/AudioInputWasapi.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #pragma comment(lib, "Ole32.lib") @@ -28,28 +29,135 @@ bool AudioInputWasapi::Start() return false; } - IMMDevice* device = nullptr; - hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device); + hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole, &m_Device); enumerator->Release(); - if (FAILED(hr) || !device) + if (FAILED(hr) || !m_Device) { return false; } - device->Release(); + hr = m_Device->Activate(__uuidof(IAudioClient), CLSCTX_ALL, nullptr, + reinterpret_cast(&m_AudioClient)); + + if (FAILED(hr) || !m_AudioClient) + { + return false; + } + + WAVEFORMATEX* mixFormat = nullptr; + hr = m_AudioClient->GetMixFormat(&mixFormat); + + if (FAILED(hr) || !mixFormat) + { + return false; + } + + hr = m_AudioClient->Initialize(AUDCLNT_SHAREMODE_SHARED, + AUDCLNT_STREAMFLAGS_LOOPBACK, 0, 0, + mixFormat, nullptr); + + CoTaskMemFree(mixFormat); + + if (FAILED(hr)) + { + return false; + } + + hr = m_AudioClient->GetService(__uuidof(IAudioCaptureClient), + reinterpret_cast(&m_CaptureClient)); + + if (FAILED(hr) || !m_CaptureClient) + { + return false; + } + + hr = m_AudioClient->Start(); + + if (FAILED(hr)) + { + return false; + } m_Running = true; m_Level = 0.0f; + return true; } void AudioInputWasapi::Stop() { + if (m_AudioClient) + { + m_AudioClient->Stop(); + } + + if (m_CaptureClient) + { + m_CaptureClient->Release(); + m_CaptureClient = nullptr; + } + + if (m_AudioClient) + { + m_AudioClient->Release(); + m_AudioClient = nullptr; + } + + if (m_Device) + { + m_Device->Release(); + m_Device = nullptr; + } + m_Running = false; m_Level = 0.0f; } bool AudioInputWasapi::IsRunning() const { return m_Running; } -float AudioInputWasapi::GetLevel() const { return m_Level; } \ No newline at end of file +float AudioInputWasapi::GetLevel() const +{ + if (!m_CaptureClient) + return 0.0f; + + UINT32 packetLength = 0; + HRESULT hr = m_CaptureClient->GetNextPacketSize(&packetLength); + + float level = 0.0f; + int sampleCount = 0; + + while (SUCCEEDED(hr) && packetLength > 0) + { + BYTE* data = nullptr; + UINT32 numFrames = 0; + DWORD flags = 0; + + hr = m_CaptureClient->GetBuffer(&data, &numFrames, &flags, nullptr, + nullptr); + + if (FAILED(hr)) + break; + + // assume float samples (common for WASAPI mix format) + float* samples = reinterpret_cast(data); + + for (UINT32 i = 0; i < numFrames; ++i) + { + float s = samples[i]; + level += s * s; + sampleCount++; + } + + m_CaptureClient->ReleaseBuffer(numFrames); + + hr = m_CaptureClient->GetNextPacketSize(&packetLength); + } + + if (sampleCount > 0) + { + level = std::sqrtf(level / sampleCount); + } + + return level; +} \ No newline at end of file diff --git a/client_generic/Client/AudioInputWasapi.h b/client_generic/Client/AudioInputWasapi.h index 7c292fe5..12893e23 100644 --- a/client_generic/Client/AudioInputWasapi.h +++ b/client_generic/Client/AudioInputWasapi.h @@ -21,6 +21,7 @@ class AudioInputWasapi float m_Level = 0.0f; IAudioClient* m_AudioClient = nullptr; + IAudioCaptureClient* m_CaptureClient = nullptr; IMMDevice* m_Device = nullptr; }; From 96b79adda73786d6a2342bd47a172672898ca5d7 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:46:56 +0100 Subject: [PATCH 08/27] Use WASAPI audio level for reactivity --- client_generic/Client/client.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client_generic/Client/client.h b/client_generic/Client/client.h index 6505a1a7..425d0564 100644 --- a/client_generic/Client/client.h +++ b/client_generic/Client/client.h @@ -1288,10 +1288,14 @@ class CElectricSheep m_AudioAnalyzer.Update(1.0 / 60.0); } - if (displayUnit == 0) + if (displayUnit == 0 && + g_Settings()->Get("settings.player.audio_reactive", true)) { const AudioFeatures& audio = m_AudioAnalyzer.GetFeatures(); - const float reactiveBrightness = audio.bass * 0.15f; + float sensitivity = g_Settings()->Get( + "settings.player.audio_reactive_sensitivity", 0.15f); + + const float reactiveBrightness = audio.bass * sensitivity; if (auto spRenderer = g_Player().Renderer()) { From bd78084a991f69c05db751c0fe03c1eee0cf10b7 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:51:09 +0100 Subject: [PATCH 09/27] Expose WASAPI audio samples --- client_generic/Client/AudioInputWasapi.cpp | 36 ++++++++++++++++++++++ client_generic/Client/AudioInputWasapi.h | 2 ++ 2 files changed, 38 insertions(+) diff --git a/client_generic/Client/AudioInputWasapi.cpp b/client_generic/Client/AudioInputWasapi.cpp index 6a9c2dbc..93514db7 100644 --- a/client_generic/Client/AudioInputWasapi.cpp +++ b/client_generic/Client/AudioInputWasapi.cpp @@ -160,4 +160,40 @@ float AudioInputWasapi::GetLevel() const } return level; +} +std::vector AudioInputWasapi::GetSamples() +{ + std::vector samplesOut; + + if (!m_CaptureClient) + return samplesOut; + + UINT32 packetLength = 0; + HRESULT hr = m_CaptureClient->GetNextPacketSize(&packetLength); + + while (SUCCEEDED(hr) && packetLength > 0) + { + BYTE* data = nullptr; + UINT32 numFrames = 0; + DWORD flags = 0; + + hr = m_CaptureClient->GetBuffer(&data, &numFrames, &flags, nullptr, + nullptr); + + if (FAILED(hr)) + break; + + float* samples = reinterpret_cast(data); + + for (UINT32 i = 0; i < numFrames; ++i) + { + samplesOut.push_back(samples[i]); + } + + m_CaptureClient->ReleaseBuffer(numFrames); + + hr = m_CaptureClient->GetNextPacketSize(&packetLength); + } + + return samplesOut; } \ No newline at end of file diff --git a/client_generic/Client/AudioInputWasapi.h b/client_generic/Client/AudioInputWasapi.h index 12893e23..fb3326c1 100644 --- a/client_generic/Client/AudioInputWasapi.h +++ b/client_generic/Client/AudioInputWasapi.h @@ -3,6 +3,7 @@ #include #include +#include class AudioInputWasapi { @@ -15,6 +16,7 @@ class AudioInputWasapi bool IsRunning() const; float GetLevel() const; + std::vector GetSamples(); private: bool m_Running = false; From f42ec16fe813e3743e13d68daff576fadf1e4e06 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 09:55:40 +0100 Subject: [PATCH 10/27] Drive audio analyzer from WASAPI samples --- client_generic/Client/AudioAnalyzer.cpp | 38 ++++++++++++++++++------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp index 93a93e33..b7059642 100644 --- a/client_generic/Client/AudioAnalyzer.cpp +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -1,6 +1,7 @@ #include "AudioAnalyzer.h" #include +#include void AudioAnalyzer::Update(double deltaSeconds) { @@ -11,17 +12,34 @@ void AudioAnalyzer::Update(double deltaSeconds) m_AudioInput.Start(); } - float rawLevel = m_AudioInput.GetLevel(); + std::vector samples = m_AudioInput.GetSamples(); + + if (samples.empty()) + { + m_Features.volume *= 0.92f; + m_Features.bass *= 0.92f; + m_Features.mid *= 0.92f; + m_Features.high *= 0.92f; + m_Features.hasSignal = false; + return; + } + + float sumSquares = 0.0f; + + for (float sample : samples) + { + sumSquares += sample * sample; + } + + float rawLevel = std::sqrt(sumSquares / samples.size()); + + if (rawLevel < 0.01f) + rawLevel = 0.0f; - // Boost raw input before smoothing rawLevel *= 1.5f; if (rawLevel > 1.0f) rawLevel = 1.0f; - // Noise floor clamp - if (rawLevel < 0.01f) - rawLevel = 0.0f; - // Fast rise, slow fall float attack = 0.35f; float release = 0.08f; @@ -32,17 +50,15 @@ void AudioAnalyzer::Update(double deltaSeconds) static float peak = 0.0f; - // quick peak capture if (level > peak) peak = level; - // decay peak *= 0.95f; m_Features.volume = level; - m_Features.bass = level; - m_Features.mid = level * 0.7f; - m_Features.high = level * 0.4f; + m_Features.bass = peak; + m_Features.mid = level; + m_Features.high = level * 0.5f; m_Features.hasSignal = level > 0.001f; } From 81cae78830aca8fd8322167f0d157ca6ea93d695 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 11:02:36 +0100 Subject: [PATCH 11/27] Use frequency-based band separation --- client_generic/Client/AudioAnalyzer.cpp | 64 +++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp index b7059642..c4671736 100644 --- a/client_generic/Client/AudioAnalyzer.cpp +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -1,5 +1,6 @@ #include "AudioAnalyzer.h" +#include #include #include @@ -33,6 +34,39 @@ void AudioAnalyzer::Update(double deltaSeconds) float rawLevel = std::sqrt(sumSquares / samples.size()); + const int fftSize = std::min(512, static_cast(samples.size())); + float bassEnergy = 0.0f; + float midEnergy = 0.0f; + float highEnergy = 0.0f; + + for (int bin = 1; bin < fftSize / 2; ++bin) + { + float real = 0.0f; + float imag = 0.0f; + + for (int n = 0; n < fftSize; ++n) + { + const float angle = 2.0f * 3.1415926535f * + static_cast(bin * n) / + static_cast(fftSize); + + real += samples[n] * std::cos(angle); + imag -= samples[n] * std::sin(angle); + } + + const float magnitude = std::sqrt(real * real + imag * imag); + + float sampleRate = 48000.0f; + float frequency = (sampleRate * bin) / fftSize; + + if (frequency < 200.0f) + bassEnergy += magnitude; + else if (frequency < 2000.0f) + midEnergy += magnitude; + else + highEnergy += magnitude; + } + if (rawLevel < 0.01f) rawLevel = 0.0f; @@ -55,10 +89,34 @@ void AudioAnalyzer::Update(double deltaSeconds) peak *= 0.95f; + bassEnergy *= 0.004f; + midEnergy *= 0.004f; + highEnergy *= 0.004f; + + bassEnergy = std::sqrt(bassEnergy); + midEnergy = std::sqrt(midEnergy); + highEnergy = std::sqrt(highEnergy); + + if (bassEnergy > 1.0f) + bassEnergy = 1.0f; + if (midEnergy > 1.0f) + midEnergy = 1.0f; + if (highEnergy > 1.0f) + highEnergy = 1.0f; + + auto smoothBand = [](float previous, float current) + { + const float attack = 0.45f; + const float release = 0.12f; + const float amount = current > previous ? attack : release; + + return (previous * (1.0f - amount)) + (current * amount); + }; + m_Features.volume = level; - m_Features.bass = peak; - m_Features.mid = level; - m_Features.high = level * 0.5f; + m_Features.bass = smoothBand(m_Features.bass, bassEnergy); + m_Features.mid = smoothBand(m_Features.mid, midEnergy); + m_Features.high = smoothBand(m_Features.high, highEnergy); m_Features.hasSignal = level > 0.001f; } From cdd4d3f9039b9c39437492c6fee69b1846e3af69 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 12:54:28 +0100 Subject: [PATCH 12/27] Improve audio band analysis --- client_generic/Client/AudioAnalyzer.cpp | 172 +++++++++++++-------- client_generic/Client/AudioInputWasapi.cpp | 15 +- client_generic/Client/AudioInputWasapi.h | 1 + 3 files changed, 122 insertions(+), 66 deletions(-) diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp index c4671736..0f91f958 100644 --- a/client_generic/Client/AudioAnalyzer.cpp +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -4,6 +4,39 @@ #include #include +namespace +{ +constexpr float kPi = 3.1415926535f; +constexpr float kSampleRate = 48000.0f; + +// Bigger than 512 so bass has usable frequency resolution. +// 2048 @ 48kHz = ~23.4 Hz/bin. +constexpr int kAnalysisSize = 2048; + +float Clamp01(float value) +{ + if (value < 0.0f) + return 0.0f; + if (value > 1.0f) + return 1.0f; + return value; +} + +float SmoothAttackRelease(float previous, float current, float attack, + float release) +{ + const float amount = current > previous ? attack : release; + return (previous * (1.0f - amount)) + (current * amount); +} + +float DbToLinear(float db) { return std::pow(10.0f, db / 20.0f); } + +float ApplyFloor(float value, float floor) +{ + return value < floor ? 0.0f : value; +} +} // namespace + void AudioAnalyzer::Update(double deltaSeconds) { m_Phase += deltaSeconds; @@ -17,28 +50,47 @@ void AudioAnalyzer::Update(double deltaSeconds) if (samples.empty()) { - m_Features.volume *= 0.92f; - m_Features.bass *= 0.92f; - m_Features.mid *= 0.92f; - m_Features.high *= 0.92f; + m_Features.volume *= 0.80f; + m_Features.bass *= 0.80f; + m_Features.mid *= 0.80f; + m_Features.high *= 0.80f; m_Features.hasSignal = false; return; } - float sumSquares = 0.0f; + if (samples.size() > kAnalysisSize) + { + samples.erase(samples.begin(), samples.end() - kAnalysisSize); + } - for (float sample : samples) + const int fftSize = + std::min(kAnalysisSize, static_cast(samples.size())); + + float sumSquares = 0.0f; + for (int i = 0; i < fftSize; ++i) { - sumSquares += sample * sample; + sumSquares += samples[i] * samples[i]; } - float rawLevel = std::sqrt(sumSquares / samples.size()); + float rawLevel = std::sqrt(sumSquares / std::max(1, fftSize)); + + // Overall volume gate. -30 dBFS-ish. + if (rawLevel < DbToLinear(-30.0f)) + rawLevel = 0.0f; + + rawLevel = Clamp01(rawLevel * 3.0f); + + const float level = + SmoothAttackRelease(m_Features.volume, rawLevel, 0.35f, 0.08f); - const int fftSize = std::min(512, static_cast(samples.size())); float bassEnergy = 0.0f; float midEnergy = 0.0f; float highEnergy = 0.0f; + int bassBins = 0; + int midBins = 0; + int highBins = 0; + for (int bin = 1; bin < fftSize / 2; ++bin) { float real = 0.0f; @@ -46,77 +98,69 @@ void AudioAnalyzer::Update(double deltaSeconds) for (int n = 0; n < fftSize; ++n) { - const float angle = 2.0f * 3.1415926535f * - static_cast(bin * n) / + // Hann window reduces spectral smear. Yes, finally, less brute-force caveman DSP. + const float window = + 0.5f * (1.0f - std::cos((2.0f * kPi * n) / (fftSize - 1))); + + const float sample = samples[n] * window; + const float angle = 2.0f * kPi * static_cast(bin * n) / static_cast(fftSize); - real += samples[n] * std::cos(angle); - imag -= samples[n] * std::sin(angle); + real += sample * std::cos(angle); + imag -= sample * std::sin(angle); } - const float magnitude = std::sqrt(real * real + imag * imag); + const float magnitude = std::sqrt(real * real + imag * imag) / fftSize; + const float frequency = (kSampleRate * bin) / fftSize; - float sampleRate = 48000.0f; - float frequency = (sampleRate * bin) / fftSize; - - if (frequency < 200.0f) + if (frequency >= 40.0f && frequency < 120.0f) + { bassEnergy += magnitude; - else if (frequency < 2000.0f) + ++bassBins; + } + else if (frequency >= 120.0f && frequency < 2500.0f) + { midEnergy += magnitude; - else + ++midBins; + } + else if (frequency >= 2500.0f && frequency < 12000.0f) + { highEnergy += magnitude; + ++highBins; + } } - if (rawLevel < 0.01f) - rawLevel = 0.0f; - - rawLevel *= 1.5f; - if (rawLevel > 1.0f) - rawLevel = 1.0f; - - float attack = 0.35f; - float release = 0.08f; - - float smoothing = rawLevel > m_Features.volume ? attack : release; - - float level = - (m_Features.volume * (1.0f - smoothing)) + (rawLevel * smoothing); + if (bassBins > 0) + bassEnergy /= bassBins; + if (midBins > 0) + midEnergy /= midBins; + if (highBins > 0) + highEnergy /= highBins; - static float peak = 0.0f; + // Convert tiny spectral magnitudes into usable 0..1-ish values. + bassEnergy = Clamp01(bassEnergy * 28.0f); + midEnergy = Clamp01(midEnergy * 35.0f); + highEnergy = Clamp01(highEnergy * 50.0f); - if (level > peak) - peak = level; + // Floors per band. These are linear thresholds after scaling. + bassEnergy = ApplyFloor(bassEnergy, 0.18f); + midEnergy = ApplyFloor(midEnergy, 0.05f); + highEnergy = ApplyFloor(highEnergy, 0.04f); - peak *= 0.95f; - - bassEnergy *= 0.004f; - midEnergy *= 0.004f; - highEnergy *= 0.004f; - - bassEnergy = std::sqrt(bassEnergy); - midEnergy = std::sqrt(midEnergy); - highEnergy = std::sqrt(highEnergy); - - if (bassEnergy > 1.0f) - bassEnergy = 1.0f; - if (midEnergy > 1.0f) - midEnergy = 1.0f; - if (highEnergy > 1.0f) - highEnergy = 1.0f; - - auto smoothBand = [](float previous, float current) - { - const float attack = 0.45f; - const float release = 0.12f; - const float amount = current > previous ? attack : release; + // Bass should care more about sudden low-end changes than constant rumble. + static float previousBassEnergy = 0.0f; + const float bassRise = std::max(0.0f, bassEnergy - previousBassEnergy); + previousBassEnergy = bassEnergy; - return (previous * (1.0f - amount)) + (current * amount); - }; + const float kickEnergy = Clamp01((bassEnergy * 0.6f) + (bassRise * 1.4f)); m_Features.volume = level; - m_Features.bass = smoothBand(m_Features.bass, bassEnergy); - m_Features.mid = smoothBand(m_Features.mid, midEnergy); - m_Features.high = smoothBand(m_Features.high, highEnergy); + m_Features.bass = m_Features.bass = + SmoothAttackRelease(m_Features.bass, kickEnergy, 0.35f, 0.08f); + m_Features.mid = + SmoothAttackRelease(m_Features.mid, midEnergy, 0.35f, 0.08f); + m_Features.high = + SmoothAttackRelease(m_Features.high, highEnergy, 0.45f, 0.12f); m_Features.hasSignal = level > 0.001f; } diff --git a/client_generic/Client/AudioInputWasapi.cpp b/client_generic/Client/AudioInputWasapi.cpp index 93514db7..aaabadd0 100644 --- a/client_generic/Client/AudioInputWasapi.cpp +++ b/client_generic/Client/AudioInputWasapi.cpp @@ -52,6 +52,9 @@ bool AudioInputWasapi::Start() { return false; } + m_ChannelCount = mixFormat->nChannels; + if (m_ChannelCount <= 0) + m_ChannelCount = 2; hr = m_AudioClient->Initialize(AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_LOOPBACK, 0, 0, @@ -185,9 +188,17 @@ std::vector AudioInputWasapi::GetSamples() float* samples = reinterpret_cast(data); - for (UINT32 i = 0; i < numFrames; ++i) + for (UINT32 frame = 0; frame < numFrames; ++frame) { - samplesOut.push_back(samples[i]); + float mono = 0.0f; + + for (int ch = 0; ch < m_ChannelCount; ++ch) + { + mono += samples[(frame * m_ChannelCount) + ch]; + } + + mono /= static_cast(m_ChannelCount); + samplesOut.push_back(mono); } m_CaptureClient->ReleaseBuffer(numFrames); diff --git a/client_generic/Client/AudioInputWasapi.h b/client_generic/Client/AudioInputWasapi.h index fb3326c1..423abda7 100644 --- a/client_generic/Client/AudioInputWasapi.h +++ b/client_generic/Client/AudioInputWasapi.h @@ -21,6 +21,7 @@ class AudioInputWasapi private: bool m_Running = false; float m_Level = 0.0f; + int m_ChannelCount = 2; IAudioClient* m_AudioClient = nullptr; IAudioCaptureClient* m_CaptureClient = nullptr; From 3c2fa24c93d9228ec4ce1ee3283e609a89e95f8c Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 12:54:56 +0100 Subject: [PATCH 13/27] Improve audio band analysis --- client_generic/Client/client.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/client_generic/Client/client.h b/client_generic/Client/client.h index 425d0564..022f7c81 100644 --- a/client_generic/Client/client.h +++ b/client_generic/Client/client.h @@ -1551,9 +1551,26 @@ class CElectricSheep { const AudioFeatures& audio = m_AudioAnalyzer.GetFeatures(); - audioReactiveStat->SetSample( - string_format("bass %.2f | mid %.2f | high %.2f", - audio.bass, audio.mid, audio.high)); + auto bar = [](float value) + { + int count = static_cast(value * 10.0f); + if (count < 0) + count = 0; + if (count > 10) + count = 10; + + std::string result; + for (int i = 0; i < count; ++i) + result += "|"; + + return result; + }; + + audioReactiveStat->SetSample(string_format( + "B %-10s %.2f | M %-10s %.2f | H %-10s %.2f", + bar(audio.bass).c_str(), audio.bass, + bar(audio.mid).c_str(), audio.mid, + bar(audio.high).c_str(), audio.high)); } ((Hud::CIntCounter*)spStats->Get("displayfps"))->AddSample(1); From be7d14eaeb01e4ff82fcc595211f24efa454a85d Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 19:54:14 +0100 Subject: [PATCH 14/27] Add Kiss FFT source --- client_generic/Client/_kiss_fft_guts.h | 167 +++++++ client_generic/Client/kiss_fft.c | 424 ++++++++++++++++++ client_generic/Client/kiss_fft.h | 160 +++++++ client_generic/Client/kiss_fft_log.h | 36 ++ client_generic/MSVC/electricsheep.vcxproj | 4 + .../MSVC/electricsheep.vcxproj.filters | 12 + 6 files changed, 803 insertions(+) create mode 100644 client_generic/Client/_kiss_fft_guts.h create mode 100644 client_generic/Client/kiss_fft.c create mode 100644 client_generic/Client/kiss_fft.h create mode 100644 client_generic/Client/kiss_fft_log.h diff --git a/client_generic/Client/_kiss_fft_guts.h b/client_generic/Client/_kiss_fft_guts.h new file mode 100644 index 00000000..4bd8d1c1 --- /dev/null +++ b/client_generic/Client/_kiss_fft_guts.h @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + +/* kiss_fft.h + defines kiss_fft_scalar as either short or a float type + and defines + typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ + +#ifndef _kiss_fft_guts_h +#define _kiss_fft_guts_h + +#include "kiss_fft.h" +#include "kiss_fft_log.h" +#include + +#define MAXFACTORS 32 +/* e.g. an fft of length 128 has 4 factors + as far as kissfft is concerned + 4*4*4*2 + */ + +struct kiss_fft_state{ + int nfft; + int inverse; + int factors[2*MAXFACTORS]; + kiss_fft_cpx twiddles[1]; +}; + +/* + Explanation of macros dealing with complex math: + + C_MUL(m,a,b) : m = a*b + C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise + C_SUB( res, a,b) : res = a - b + C_SUBFROM( res , a) : res -= a + C_ADDTO( res , a) : res += a + * */ +#ifdef FIXED_POINT +#include +#if (FIXED_POINT==32) +# define FRACBITS 31 +# define SAMPPROD int64_t +#define SAMP_MAX INT32_MAX +#define SAMP_MIN INT32_MIN +#else +# define FRACBITS 15 +# define SAMPPROD int32_t +#define SAMP_MAX INT16_MAX +#define SAMP_MIN INT16_MIN +#endif + +#if defined(CHECK_OVERFLOW) +# define CHECK_OVERFLOW_OP(a,op,b) \ + if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \ + KISS_FFT_WARNING("overflow (%d " #op" %d) = %ld", (a),(b),(SAMPPROD)(a) op (SAMPPROD)(b)); } +#endif + + +# define smul(a,b) ( (SAMPPROD)(a)*(b) ) +# define sround( x ) (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS ) + +# define S_MUL(a,b) sround( smul(a,b) ) + +# define C_MUL(m,a,b) \ + do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \ + (m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0) + +# define DIVSCALAR(x,k) \ + (x) = sround( smul( x, SAMP_MAX/k ) ) + +# define C_FIXDIV(c,div) \ + do { DIVSCALAR( (c).r , div); \ + DIVSCALAR( (c).i , div); }while (0) + +# define C_MULBYSCALAR( c, s ) \ + do{ (c).r = sround( smul( (c).r , s ) ) ;\ + (c).i = sround( smul( (c).i , s ) ) ; }while(0) + +#else /* not FIXED_POINT*/ + +# define S_MUL(a,b) ( (a)*(b) ) +#define C_MUL(m,a,b) \ + do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ + (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) +# define C_FIXDIV(c,div) /* NOOP */ +# define C_MULBYSCALAR( c, s ) \ + do{ (c).r *= (s);\ + (c).i *= (s); }while(0) +#endif + +#ifndef CHECK_OVERFLOW_OP +# define CHECK_OVERFLOW_OP(a,op,b) /* noop */ +#endif + +#define C_ADD( res, a,b)\ + do { \ + CHECK_OVERFLOW_OP((a).r,+,(b).r)\ + CHECK_OVERFLOW_OP((a).i,+,(b).i)\ + (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \ + }while(0) +#define C_SUB( res, a,b)\ + do { \ + CHECK_OVERFLOW_OP((a).r,-,(b).r)\ + CHECK_OVERFLOW_OP((a).i,-,(b).i)\ + (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \ + }while(0) +#define C_ADDTO( res , a)\ + do { \ + CHECK_OVERFLOW_OP((res).r,+,(a).r)\ + CHECK_OVERFLOW_OP((res).i,+,(a).i)\ + (res).r += (a).r; (res).i += (a).i;\ + }while(0) + +#define C_SUBFROM( res , a)\ + do {\ + CHECK_OVERFLOW_OP((res).r,-,(a).r)\ + CHECK_OVERFLOW_OP((res).i,-,(a).i)\ + (res).r -= (a).r; (res).i -= (a).i; \ + }while(0) + + +#ifdef FIXED_POINT +# define KISS_FFT_COS(phase) floor(.5+SAMP_MAX * cos (phase)) +# define KISS_FFT_SIN(phase) floor(.5+SAMP_MAX * sin (phase)) +# define HALF_OF(x) ((x)>>1) +#elif defined(USE_SIMD) +# define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) ) +# define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) ) +# define HALF_OF(x) ((x)*_mm_set1_ps(.5)) +#else +# define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase) +# define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase) +# define HALF_OF(x) ((x)*((kiss_fft_scalar).5)) +#endif + +#define kf_cexp(x,phase) \ + do{ \ + (x)->r = KISS_FFT_COS(phase);\ + (x)->i = KISS_FFT_SIN(phase);\ + }while(0) + + +/* a debugging function */ +#define pcpx(c)\ + KISS_FFT_DEBUG("%g + %gi\n",(double)((c)->r),(double)((c)->i)) + + +#ifdef KISS_FFT_USE_ALLOCA +// define this to allow use of alloca instead of malloc for temporary buffers +// Temporary buffers are used in two case: +// 1. FFT sizes that have "bad" factors. i.e. not 2,3 and 5 +// 2. "in-place" FFTs. Notice the quotes, since kissfft does not really do an in-place transform. +#include +#define KISS_FFT_TMP_ALLOC(nbytes) alloca(nbytes) +#define KISS_FFT_TMP_FREE(ptr) +#else +#define KISS_FFT_TMP_ALLOC(nbytes) KISS_FFT_MALLOC(nbytes) +#define KISS_FFT_TMP_FREE(ptr) KISS_FFT_FREE(ptr) +#endif + +#endif /* _kiss_fft_guts_h */ + diff --git a/client_generic/Client/kiss_fft.c b/client_generic/Client/kiss_fft.c new file mode 100644 index 00000000..aba63e06 --- /dev/null +++ b/client_generic/Client/kiss_fft.c @@ -0,0 +1,424 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + +#include +#include "_kiss_fft_guts.h" +/* The guts header contains all the multiplication and addition macros that are defined for + fixed or floating point complex numbers. It also delares the kf_ internal functions. + */ + +static void kf_bfly2( + kiss_fft_cpx * Fout, + const size_t fstride, + const kiss_fft_cfg st, + int m + ) +{ + kiss_fft_cpx * Fout2; + kiss_fft_cpx * tw1 = st->twiddles; + kiss_fft_cpx t; + Fout2 = Fout + m; + do{ + C_FIXDIV(*Fout,2); C_FIXDIV(*Fout2,2); + + C_MUL (t, *Fout2 , *tw1); + tw1 += fstride; + C_SUB( *Fout2 , *Fout , t ); + C_ADDTO( *Fout , t ); + ++Fout2; + ++Fout; + }while (--m); +} + +static void kf_bfly4( + kiss_fft_cpx * Fout, + const size_t fstride, + const kiss_fft_cfg st, + const size_t m + ) +{ + kiss_fft_cpx *tw1,*tw2,*tw3; + kiss_fft_cpx scratch[6]; + size_t k=m; + const size_t m2=2*m; + const size_t m3=3*m; + + + tw3 = tw2 = tw1 = st->twiddles; + + do { + C_FIXDIV(*Fout,4); C_FIXDIV(Fout[m],4); C_FIXDIV(Fout[m2],4); C_FIXDIV(Fout[m3],4); + + C_MUL(scratch[0],Fout[m] , *tw1 ); + C_MUL(scratch[1],Fout[m2] , *tw2 ); + C_MUL(scratch[2],Fout[m3] , *tw3 ); + + C_SUB( scratch[5] , *Fout, scratch[1] ); + C_ADDTO(*Fout, scratch[1]); + C_ADD( scratch[3] , scratch[0] , scratch[2] ); + C_SUB( scratch[4] , scratch[0] , scratch[2] ); + C_SUB( Fout[m2], *Fout, scratch[3] ); + tw1 += fstride; + tw2 += fstride*2; + tw3 += fstride*3; + C_ADDTO( *Fout , scratch[3] ); + + if(st->inverse) { + Fout[m].r = scratch[5].r - scratch[4].i; + Fout[m].i = scratch[5].i + scratch[4].r; + Fout[m3].r = scratch[5].r + scratch[4].i; + Fout[m3].i = scratch[5].i - scratch[4].r; + }else{ + Fout[m].r = scratch[5].r + scratch[4].i; + Fout[m].i = scratch[5].i - scratch[4].r; + Fout[m3].r = scratch[5].r - scratch[4].i; + Fout[m3].i = scratch[5].i + scratch[4].r; + } + ++Fout; + }while(--k); +} + +static void kf_bfly3( + kiss_fft_cpx * Fout, + const size_t fstride, + const kiss_fft_cfg st, + size_t m + ) +{ + size_t k=m; + const size_t m2 = 2*m; + kiss_fft_cpx *tw1,*tw2; + kiss_fft_cpx scratch[5]; + kiss_fft_cpx epi3; + epi3 = st->twiddles[fstride*m]; + + tw1=tw2=st->twiddles; + + do{ + C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3); + + C_MUL(scratch[1],Fout[m] , *tw1); + C_MUL(scratch[2],Fout[m2] , *tw2); + + C_ADD(scratch[3],scratch[1],scratch[2]); + C_SUB(scratch[0],scratch[1],scratch[2]); + tw1 += fstride; + tw2 += fstride*2; + + Fout[m].r = Fout->r - HALF_OF(scratch[3].r); + Fout[m].i = Fout->i - HALF_OF(scratch[3].i); + + C_MULBYSCALAR( scratch[0] , epi3.i ); + + C_ADDTO(*Fout,scratch[3]); + + Fout[m2].r = Fout[m].r + scratch[0].i; + Fout[m2].i = Fout[m].i - scratch[0].r; + + Fout[m].r -= scratch[0].i; + Fout[m].i += scratch[0].r; + + ++Fout; + }while(--k); +} + +static void kf_bfly5( + kiss_fft_cpx * Fout, + const size_t fstride, + const kiss_fft_cfg st, + int m + ) +{ + kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4; + int u; + kiss_fft_cpx scratch[13]; + kiss_fft_cpx * twiddles = st->twiddles; + kiss_fft_cpx *tw; + kiss_fft_cpx ya,yb; + ya = twiddles[fstride*m]; + yb = twiddles[fstride*2*m]; + + Fout0=Fout; + Fout1=Fout0+m; + Fout2=Fout0+2*m; + Fout3=Fout0+3*m; + Fout4=Fout0+4*m; + + tw=st->twiddles; + for ( u=0; ur += scratch[7].r + scratch[8].r; + Fout0->i += scratch[7].i + scratch[8].i; + + scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r); + scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r); + + scratch[6].r = S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i); + scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i); + + C_SUB(*Fout1,scratch[5],scratch[6]); + C_ADD(*Fout4,scratch[5],scratch[6]); + + scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r); + scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r); + scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i); + scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i); + + C_ADD(*Fout2,scratch[11],scratch[12]); + C_SUB(*Fout3,scratch[11],scratch[12]); + + ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4; + } +} + +/* perform the butterfly for one stage of a mixed radix FFT */ +static void kf_bfly_generic( + kiss_fft_cpx * Fout, + const size_t fstride, + const kiss_fft_cfg st, + int m, + int p + ) +{ + int u,k,q1,q; + kiss_fft_cpx * twiddles = st->twiddles; + kiss_fft_cpx t; + int Norig = st->nfft; + + kiss_fft_cpx * scratch = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC(sizeof(kiss_fft_cpx)*p); + if (scratch == NULL){ + KISS_FFT_ERROR("Memory allocation failed."); + return; + } + + for ( u=0; u=Norig) twidx-=Norig; + C_MUL(t,scratch[q] , twiddles[twidx] ); + C_ADDTO( Fout[ k ] ,t); + } + k += m; + } + } + KISS_FFT_TMP_FREE(scratch); +} + +static +void kf_work( + kiss_fft_cpx * Fout, + const kiss_fft_cpx * f, + const size_t fstride, + int in_stride, + int * factors, + const kiss_fft_cfg st + ) +{ + kiss_fft_cpx * Fout_beg=Fout; + const int p=*factors++; /* the radix */ + const int m=*factors++; /* stage's fft length/p */ + const kiss_fft_cpx * Fout_end = Fout + p*m; + +#ifdef _OPENMP + // use openmp extensions at the + // top-level (not recursive) + if (fstride==1 && p<=5 && m!=1) + { + int k; + + // execute the p different work units in different threads +# pragma omp parallel for + for (k=0;k floor_sqrt) + p = n; /* no more factors, skip to end */ + } + n /= p; + *facbuf++ = p; + *facbuf++ = n; + } while (n > 1); +} + +/* + * + * User-callable function to allocate all necessary storage space for the fft. + * + * The return value is a contiguous block of memory, allocated with malloc. As such, + * It can be freed with free(), rather than a kiss_fft-specific function. + * */ +kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem ) +{ + KISS_FFT_ALIGN_CHECK(mem) + + kiss_fft_cfg st=NULL; + // check for overflow condition {memneeded > SIZE_MAX}. + if (nfft >= (SIZE_MAX - 2*sizeof(struct kiss_fft_state))/sizeof(kiss_fft_cpx)) + return NULL; + + size_t memneeded = KISS_FFT_ALIGN_SIZE_UP(sizeof(struct kiss_fft_state) + + sizeof(kiss_fft_cpx)*(nfft-1)); /* twiddle factors*/ + + if ( lenmem==NULL ) { + st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded ); + }else{ + if (mem != NULL && *lenmem >= memneeded) + st = (kiss_fft_cfg)mem; + *lenmem = memneeded; + } + if (st) { + int i; + st->nfft=nfft; + st->inverse = inverse_fft; + + for (i=0;iinverse) + phase *= -1; + kf_cexp(st->twiddles+i, phase ); + } + + kf_factor(nfft,st->factors); + } + return st; +} + + +void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride) +{ + if (fin == fout) { + //NOTE: this is not really an in-place FFT algorithm. + //It just performs an out-of-place FFT into a temp buffer + if (fout == NULL){ + KISS_FFT_ERROR("fout buffer NULL."); + return; + } + + kiss_fft_cpx * tmpbuf = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC( sizeof(kiss_fft_cpx)*st->nfft); + if (tmpbuf == NULL){ + KISS_FFT_ERROR("Memory allocation error."); + return; + } + + + + kf_work(tmpbuf,fin,1,in_stride, st->factors,st); + memcpy(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft); + KISS_FFT_TMP_FREE(tmpbuf); + }else{ + kf_work( fout, fin, 1,in_stride, st->factors,st ); + } +} + +void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout) +{ + kiss_fft_stride(cfg,fin,fout,1); +} + + +void kiss_fft_cleanup(void) +{ + // nothing needed any more +} + +int kiss_fft_next_fast_size(int n) +{ + while(1) { + int m=n; + while ( (m%2) == 0 ) m/=2; + while ( (m%3) == 0 ) m/=3; + while ( (m%5) == 0 ) m/=5; + if (m<=1) + break; /* n is completely factorable by twos, threes, and fives */ + n++; + } + return n; +} diff --git a/client_generic/Client/kiss_fft.h b/client_generic/Client/kiss_fft.h new file mode 100644 index 00000000..dce1034a --- /dev/null +++ b/client_generic/Client/kiss_fft.h @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + +#ifndef KISS_FFT_H +#define KISS_FFT_H + +#include +#include +#include +#include + +// Define KISS_FFT_SHARED macro to properly export symbols +#ifdef KISS_FFT_SHARED +# ifdef _WIN32 +# ifdef KISS_FFT_BUILD +# define KISS_FFT_API __declspec(dllexport) +# else +# define KISS_FFT_API __declspec(dllimport) +# endif +# else +# define KISS_FFT_API __attribute__ ((visibility ("default"))) +# endif +#else +# define KISS_FFT_API +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + ATTENTION! + If you would like a : + -- a utility that will handle the caching of fft objects + -- real-only (no imaginary time component ) FFT + -- a multi-dimensional FFT + -- a command-line utility to perform ffts + -- a command-line utility to perform fast-convolution filtering + + Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c + in the tools/ directory. +*/ + +/* User may override KISS_FFT_MALLOC and/or KISS_FFT_FREE. */ +#ifdef USE_SIMD +# include +# define kiss_fft_scalar __m128 +# ifndef KISS_FFT_MALLOC +# define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) +# define KISS_FFT_ALIGN_CHECK(ptr) +# define KISS_FFT_ALIGN_SIZE_UP(size) ((size + 15UL) & ~0xFUL) +# endif +# ifndef KISS_FFT_FREE +# define KISS_FFT_FREE _mm_free +# endif +#else +# define KISS_FFT_ALIGN_CHECK(ptr) +# define KISS_FFT_ALIGN_SIZE_UP(size) (size) +# ifndef KISS_FFT_MALLOC +# define KISS_FFT_MALLOC malloc +# endif +# ifndef KISS_FFT_FREE +# define KISS_FFT_FREE free +# endif +#endif + + +#ifdef FIXED_POINT +#include +# if (FIXED_POINT == 32) +# define kiss_fft_scalar int32_t +# else +# define kiss_fft_scalar int16_t +# endif +#else +# ifndef kiss_fft_scalar +/* default is float */ +# define kiss_fft_scalar float +# endif +#endif + +typedef struct { + kiss_fft_scalar r; + kiss_fft_scalar i; +}kiss_fft_cpx; + +typedef struct kiss_fft_state* kiss_fft_cfg; + +/* + * kiss_fft_alloc + * + * Initialize a FFT (or IFFT) algorithm's cfg/state buffer. + * + * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL); + * + * The return value from fft_alloc is a cfg buffer used internally + * by the fft routine or NULL. + * + * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc. + * The returned value should be free()d when done to avoid memory leaks. + * + * The state can be placed in a user supplied buffer 'mem': + * If lenmem is not NULL and mem is not NULL and *lenmem is large enough, + * then the function places the cfg in mem and the size used in *lenmem + * and returns mem. + * + * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough), + * then the function returns NULL and places the minimum cfg + * buffer size in *lenmem. + * */ + +kiss_fft_cfg KISS_FFT_API kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); + +/* + * kiss_fft(cfg,in_out_buf) + * + * Perform an FFT on a complex input buffer. + * for a forward FFT, + * fin should be f[0] , f[1] , ... ,f[nfft-1] + * fout will be F[0] , F[1] , ... ,F[nfft-1] + * Note that each element is complex and can be accessed like + f[k].r and f[k].i + * */ +void KISS_FFT_API kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); + +/* + A more generic version of the above function. It reads its input from every Nth sample. + * */ +void KISS_FFT_API kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride); + +/* If kiss_fft_alloc allocated a buffer, it is one contiguous + buffer and can be simply free()d when no longer needed*/ +#define kiss_fft_free KISS_FFT_FREE + +/* + Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up + your compiler output to call this before you exit. +*/ +void KISS_FFT_API kiss_fft_cleanup(void); + + +/* + * Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5) + */ +int KISS_FFT_API kiss_fft_next_fast_size(int n); + +/* for real ffts, we need an even size */ +#define kiss_fftr_next_fast_size_real(n) \ + (kiss_fft_next_fast_size( ((n)+1)>>1)<<1) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/client_generic/Client/kiss_fft_log.h b/client_generic/Client/kiss_fft_log.h new file mode 100644 index 00000000..5012474f --- /dev/null +++ b/client_generic/Client/kiss_fft_log.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. + * This file is part of KISS FFT - https://github.com/mborgerding/kissfft + * + * SPDX-License-Identifier: BSD-3-Clause + * See COPYING file for more information. + */ + +#ifndef kiss_fft_log_h +#define kiss_fft_log_h + +#define ERROR 1 +#define WARNING 2 +#define INFO 3 +#define DEBUG 4 + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) + +#if defined(NDEBUG) +# define KISS_FFT_LOG_MSG(severity, ...) ((void)0) +#else +# define KISS_FFT_LOG_MSG(severity, ...) \ + fprintf(stderr, "[" #severity "] " __FILE__ ":" TOSTRING(__LINE__) " "); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n") +#endif + +#define KISS_FFT_ERROR(...) KISS_FFT_LOG_MSG(ERROR, __VA_ARGS__) +#define KISS_FFT_WARNING(...) KISS_FFT_LOG_MSG(WARNING, __VA_ARGS__) +#define KISS_FFT_INFO(...) KISS_FFT_LOG_MSG(INFO, __VA_ARGS__) +#define KISS_FFT_DEBUG(...) KISS_FFT_LOG_MSG(DEBUG, __VA_ARGS__) + + + +#endif /* kiss_fft_log_h */ diff --git a/client_generic/MSVC/electricsheep.vcxproj b/client_generic/MSVC/electricsheep.vcxproj index b5a23a9c..2cc9e462 100644 --- a/client_generic/MSVC/electricsheep.vcxproj +++ b/client_generic/MSVC/electricsheep.vcxproj @@ -648,6 +648,7 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" + @@ -700,7 +701,10 @@ copy /y "..\runtime\*.ttf" "$(OutDir)" + + + diff --git a/client_generic/MSVC/electricsheep.vcxproj.filters b/client_generic/MSVC/electricsheep.vcxproj.filters index 90736d44..f0b9cff9 100644 --- a/client_generic/MSVC/electricsheep.vcxproj.filters +++ b/client_generic/MSVC/electricsheep.vcxproj.filters @@ -201,6 +201,9 @@ ContentDownloader + + ContentDownloader + @@ -473,6 +476,15 @@ Common + + Common + + + Common + + + Common + From ac0ea218765f4293469c8c041bfc7fe4c89adbfc Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Mon, 4 May 2026 22:17:34 +0100 Subject: [PATCH 15/27] Add audio reactive brightness controls --- client_generic/Client/AudioAnalyzer.cpp | 147 +++++++++++++----- client_generic/Client/AudioAnalyzer.h | 8 +- client_generic/Client/client.h | 67 +++++++- .../MSVC/electricsheep.vcxproj.user | 3 + 4 files changed, 179 insertions(+), 46 deletions(-) diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp index 0f91f958..d54f1b7d 100644 --- a/client_generic/Client/AudioAnalyzer.cpp +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -1,16 +1,14 @@ #include "AudioAnalyzer.h" +#include "kiss_fft.h" + #include #include #include namespace { -constexpr float kPi = 3.1415926535f; -constexpr float kSampleRate = 48000.0f; - -// Bigger than 512 so bass has usable frequency resolution. -// 2048 @ 48kHz = ~23.4 Hz/bin. +constexpr float kSampleRate = 44100.0f; constexpr int kAnalysisSize = 2048; float Clamp01(float value) @@ -51,9 +49,20 @@ void AudioAnalyzer::Update(double deltaSeconds) if (samples.empty()) { m_Features.volume *= 0.80f; - m_Features.bass *= 0.80f; + m_Features.bass *= 0.85f; + m_Features.kick *= 0.65f; m_Features.mid *= 0.80f; m_Features.high *= 0.80f; + + if (m_Features.volume < 0.001f) + { + m_Features.volume = 0.0f; + m_Features.bass = 0.0f; + m_Features.kick = 0.0f; + m_Features.mid = 0.0f; + m_Features.high = 0.0f; + } + m_Features.hasSignal = false; return; } @@ -66,6 +75,9 @@ void AudioAnalyzer::Update(double deltaSeconds) const int fftSize = std::min(kAnalysisSize, static_cast(samples.size())); + if (fftSize <= 0) + return; + float sumSquares = 0.0f; for (int i = 0; i < fftSize; ++i) { @@ -74,8 +86,7 @@ void AudioAnalyzer::Update(double deltaSeconds) float rawLevel = std::sqrt(sumSquares / std::max(1, fftSize)); - // Overall volume gate. -30 dBFS-ish. - if (rawLevel < DbToLinear(-30.0f)) + if (rawLevel < DbToLinear(-36.0f)) rawLevel = 0.0f; rawLevel = Clamp01(rawLevel * 3.0f); @@ -83,82 +94,136 @@ void AudioAnalyzer::Update(double deltaSeconds) const float level = SmoothAttackRelease(m_Features.volume, rawLevel, 0.35f, 0.08f); + static kiss_fft_cfg fftConfig = nullptr; + static int configuredSize = 0; + + if (!fftConfig || configuredSize != fftSize) + { + if (fftConfig) + { + kiss_fft_free(fftConfig); + fftConfig = nullptr; + } + + fftConfig = kiss_fft_alloc(fftSize, 0, nullptr, nullptr); + configuredSize = fftSize; + } + + if (!fftConfig) + return; + + std::vector fftIn(fftSize); + std::vector fftOut(fftSize); + + for (int n = 0; n < fftSize; ++n) + { + const float window = + 0.5f * (1.0f - std::cos((2.0f * 3.1415926535f * n) / + static_cast(fftSize - 1))); + + fftIn[n].r = samples[n] * window; + fftIn[n].i = 0.0f; + } + + kiss_fft(fftConfig, fftIn.data(), fftOut.data()); + float bassEnergy = 0.0f; float midEnergy = 0.0f; float highEnergy = 0.0f; + float bassFlux = 0.0f; int bassBins = 0; int midBins = 0; int highBins = 0; + static std::vector previousMagnitude(kAnalysisSize / 2, 0.0f); + for (int bin = 1; bin < fftSize / 2; ++bin) { - float real = 0.0f; - float imag = 0.0f; - - for (int n = 0; n < fftSize; ++n) - { - // Hann window reduces spectral smear. Yes, finally, less brute-force caveman DSP. - const float window = - 0.5f * (1.0f - std::cos((2.0f * kPi * n) / (fftSize - 1))); - - const float sample = samples[n] * window; - const float angle = 2.0f * kPi * static_cast(bin * n) / - static_cast(fftSize); + const float real = fftOut[bin].r; + const float imag = fftOut[bin].i; + const float magnitude = + std::sqrt((real * real) + (imag * imag)) / fftSize; - real += sample * std::cos(angle); - imag -= sample * std::sin(angle); - } - - const float magnitude = std::sqrt(real * real + imag * imag) / fftSize; const float frequency = (kSampleRate * bin) / fftSize; if (frequency >= 40.0f && frequency < 120.0f) { bassEnergy += magnitude; ++bassBins; + + bassFlux += std::max(0.0f, magnitude - previousMagnitude[bin]); } - else if (frequency >= 120.0f && frequency < 2500.0f) + else if (frequency >= 150.0f && frequency < 3500.0f) { midEnergy += magnitude; ++midBins; } - else if (frequency >= 2500.0f && frequency < 12000.0f) + else if (frequency >= 3500.0f && frequency < 12000.0f) { highEnergy += magnitude; ++highBins; } + + previousMagnitude[bin] = magnitude; } if (bassBins > 0) + { bassEnergy /= bassBins; + bassFlux /= bassBins; + } + if (midBins > 0) midEnergy /= midBins; + if (highBins > 0) highEnergy /= highBins; - // Convert tiny spectral magnitudes into usable 0..1-ish values. - bassEnergy = Clamp01(bassEnergy * 28.0f); - midEnergy = Clamp01(midEnergy * 35.0f); + bassEnergy = Clamp01(bassEnergy * 18.0f); + bassFlux = Clamp01(bassFlux * 240.0f); + midEnergy = Clamp01(midEnergy * 150.0f); highEnergy = Clamp01(highEnergy * 50.0f); - // Floors per band. These are linear thresholds after scaling. - bassEnergy = ApplyFloor(bassEnergy, 0.18f); - midEnergy = ApplyFloor(midEnergy, 0.05f); + bassEnergy = ApplyFloor(bassEnergy, 0.65f); + bassFlux = ApplyFloor(bassFlux, 0.08f); + midEnergy = ApplyFloor(midEnergy, 0.03f); highEnergy = ApplyFloor(highEnergy, 0.04f); - // Bass should care more about sudden low-end changes than constant rumble. - static float previousBassEnergy = 0.0f; - const float bassRise = std::max(0.0f, bassEnergy - previousBassEnergy); - previousBassEnergy = bassEnergy; + static float fluxAverage = 0.0f; + fluxAverage = (fluxAverage * 0.94f) + (bassFlux * 0.06f); + + static double kickCooldownSeconds = 0.0; + if (kickCooldownSeconds > 0.0) + { + kickCooldownSeconds -= deltaSeconds; + if (kickCooldownSeconds < 0.0) + kickCooldownSeconds = 0.0; + } + + float kickPulse = 0.0f; + + const bool bassIsPresent = bassEnergy > 0.65f; + const bool fluxIsSignificant = + bassFlux > 0.10f && bassFlux > (fluxAverage * 1.45f); + + if (bassIsPresent && fluxIsSignificant && kickCooldownSeconds <= 0.0) + { + kickPulse = Clamp01((bassFlux - fluxAverage) * 2.2f); + kickCooldownSeconds = 0.08; + } + + const float sustainedBass = + SmoothAttackRelease(m_Features.bass, bassEnergy, 0.30f, 0.08f); - const float kickEnergy = Clamp01((bassEnergy * 0.6f) + (bassRise * 1.4f)); + const float kick = + SmoothAttackRelease(m_Features.kick, kickPulse, 0.45f, 0.08f); m_Features.volume = level; - m_Features.bass = m_Features.bass = - SmoothAttackRelease(m_Features.bass, kickEnergy, 0.35f, 0.08f); + m_Features.bass = sustainedBass; + m_Features.kick = kick; m_Features.mid = - SmoothAttackRelease(m_Features.mid, midEnergy, 0.35f, 0.08f); + SmoothAttackRelease(m_Features.mid, midEnergy, 0.35f, 0.12f); m_Features.high = SmoothAttackRelease(m_Features.high, highEnergy, 0.45f, 0.12f); m_Features.hasSignal = level > 0.001f; diff --git a/client_generic/Client/AudioAnalyzer.h b/client_generic/Client/AudioAnalyzer.h index 3bce76dd..08aa4637 100644 --- a/client_generic/Client/AudioAnalyzer.h +++ b/client_generic/Client/AudioAnalyzer.h @@ -5,10 +5,16 @@ struct AudioFeatures { + float volume = 0.0f; + + // Sustained low-end energy. float bass = 0.0f; + + // Short transient/onset pulse. + float kick = 0.0f; + float mid = 0.0f; float high = 0.0f; - float volume = 0.0f; bool hasSignal = false; }; diff --git a/client_generic/Client/client.h b/client_generic/Client/client.h index 022f7c81..1e91441c 100644 --- a/client_generic/Client/client.h +++ b/client_generic/Client/client.h @@ -1288,19 +1288,78 @@ class CElectricSheep m_AudioAnalyzer.Update(1.0 / 60.0); } - if (displayUnit == 0 && - g_Settings()->Get("settings.player.audio_reactive", true)) + const bool audioReactiveEnabled = + g_Settings()->Get("settings.player.audio_reactive", true); + + const AudioFeatures& audio = m_AudioAnalyzer.GetFeatures(); + + if (audioReactiveEnabled) { - const AudioFeatures& audio = m_AudioAnalyzer.GetFeatures(); float sensitivity = g_Settings()->Get( "settings.player.audio_reactive_sensitivity", 0.15f); - const float reactiveBrightness = audio.bass * sensitivity; + // Bass controls brightness. + const float prescribedBrightness = + TapsToBrightness(m_Brightness); + const float reactiveDarkBrightness = -0.5f; + + const float bassAmount = audio.hasSignal ? audio.bass : 0.0f; + const float kickAmount = audio.hasSignal ? audio.kick : 0.0f; + + // Extra smoothing for brightness only. + // Put this here, after bassAmount/kickAmount, before reactiveBrightness. + static float visualBass = 0.0f; + + const float visualBassAttack = 0.08f; + const float visualBassRelease = 0.025f; + const float visualBassAmount = bassAmount > visualBass + ? visualBassAttack + : visualBassRelease; + + visualBass = (visualBass * (1.0f - visualBassAmount)) + + (bassAmount * visualBassAmount); + + float reactiveBrightness = + reactiveDarkBrightness + + ((prescribedBrightness - reactiveDarkBrightness) * + visualBass) + + (kickAmount * 0.02f); + + if (reactiveBrightness > prescribedBrightness) + reactiveBrightness = prescribedBrightness; + + if (reactiveBrightness < reactiveDarkBrightness) + reactiveBrightness = reactiveDarkBrightness; if (auto spRenderer = g_Player().Renderer()) { spRenderer->SetBrightness(reactiveBrightness); } + // User setting is the base speed. Audio only boosts above it. + const double basePerceptualFps = 4.0; + + const double midAmount = audio.hasSignal ? audio.mid : 0.0; + + double reactiveFps = + basePerceptualFps + (midAmount * 48.0); // 4 → 36 fps + + if (reactiveFps < 4.0) + reactiveFps = 4.0; + + if (reactiveFps > 48.0) + reactiveFps = 48.0; + + g_Player().SetPerceptualFPS(reactiveFps); + } + else + { + if (auto spRenderer = g_Player().Renderer()) + { + spRenderer->SetBrightness(TapsToBrightness(m_Brightness)); + } + + g_Player().SetPerceptualFPS( + g_Settings()->Get("settings.player.perceptual_fps", 16.0)); } if ((!EDreamClient::IsLoggedIn() && !m_MultipleInstancesMode) || !g_Player().HasStarted()) { diff --git a/client_generic/MSVC/electricsheep.vcxproj.user b/client_generic/MSVC/electricsheep.vcxproj.user index 627f9fc3..928a9781 100644 --- a/client_generic/MSVC/electricsheep.vcxproj.user +++ b/client_generic/MSVC/electricsheep.vcxproj.user @@ -16,4 +16,7 @@ $(OutDir) WindowsLocalDebugger + + true + \ No newline at end of file From 6b065dbb800321c35236aa1c9f659d61c4ae52e5 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Wed, 6 May 2026 21:00:54 +0100 Subject: [PATCH 16/27] Add audio reactive analysis: spectral centroid, adaptive normalisation, IIR kick detection, F3 audio debug HUD --- client_generic/Client/AudioAnalyzer.cpp | 273 +++++++++++---------- client_generic/Client/AudioAnalyzer.h | 10 +- client_generic/Client/AudioInputWasapi.cpp | 34 +++ client_generic/Client/AudioInputWasapi.h | 7 + client_generic/Client/client.h | 109 ++++++-- 5 files changed, 275 insertions(+), 158 deletions(-) diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp index d54f1b7d..d73b2449 100644 --- a/client_generic/Client/AudioAnalyzer.cpp +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -4,35 +4,26 @@ #include #include +#include #include namespace { constexpr float kSampleRate = 44100.0f; -constexpr int kAnalysisSize = 2048; +constexpr int kAnalysisSize = 2048; // ~46ms window - enough for bass cycles +constexpr float kPeakDecay = 0.9995f; -float Clamp01(float value) -{ - if (value < 0.0f) - return 0.0f; - if (value > 1.0f) - return 1.0f; - return value; -} +float Clamp01(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0f : v; } float SmoothAttackRelease(float previous, float current, float attack, float release) { - const float amount = current > previous ? attack : release; - return (previous * (1.0f - amount)) + (current * amount); + const float a = current > previous ? attack : release; + return previous * (1.0f - a) + current * a; } float DbToLinear(float db) { return std::pow(10.0f, db / 20.0f); } -float ApplyFloor(float value, float floor) -{ - return value < floor ? 0.0f : value; -} } // namespace void AudioAnalyzer::Update(double deltaSeconds) @@ -40,193 +31,213 @@ void AudioAnalyzer::Update(double deltaSeconds) m_Phase += deltaSeconds; if (!m_AudioInput.IsRunning()) - { m_AudioInput.Start(); - } - std::vector samples = m_AudioInput.GetSamples(); + std::vector newSamples = m_AudioInput.GetSamples(); - if (samples.empty()) - { - m_Features.volume *= 0.80f; - m_Features.bass *= 0.85f; - m_Features.kick *= 0.65f; - m_Features.mid *= 0.80f; - m_Features.high *= 0.80f; + // Accumulate samples into a rolling buffer + // This gives us a stable 2048-sample window regardless of how many + // samples arrive per frame, solving the bass strobing problem + static std::deque sampleBuffer; - if (m_Features.volume < 0.001f) - { - m_Features.volume = 0.0f; - m_Features.bass = 0.0f; - m_Features.kick = 0.0f; - m_Features.mid = 0.0f; - m_Features.high = 0.0f; - } + for (float s : newSamples) + sampleBuffer.push_back(s); - m_Features.hasSignal = false; - return; - } + // Keep buffer at exactly kAnalysisSize + while ((int)sampleBuffer.size() > kAnalysisSize) + sampleBuffer.pop_front(); - if (samples.size() > kAnalysisSize) + m_Features.sampleCount = static_cast(sampleBuffer.size()); + + if (newSamples.empty()) { - samples.erase(samples.begin(), samples.end() - kAnalysisSize); + // No new samples this frame - hold current values + // WASAPI delivers samples every other frame so this is normal + return; } - const int fftSize = - std::min(kAnalysisSize, static_cast(samples.size())); - - if (fftSize <= 0) + // Wait for a full buffer + if ((int)sampleBuffer.size() < kAnalysisSize) return; + // Copy to vector for FFT + std::vector samples(sampleBuffer.begin(), sampleBuffer.end()); + + const int fftSize = kAnalysisSize; + + // ------------------------------------------------------------------- + // RMS volume - use only the newest samples for responsiveness + // ------------------------------------------------------------------- float sumSquares = 0.0f; - for (int i = 0; i < fftSize; ++i) - { + int rmsWindow = static_cast(newSamples.size()); + if (rmsWindow < 1) + rmsWindow = 1; + for (int i = fftSize - rmsWindow; i < fftSize; ++i) sumSquares += samples[i] * samples[i]; - } - float rawLevel = std::sqrt(sumSquares / std::max(1, fftSize)); - - if (rawLevel < DbToLinear(-36.0f)) + float rawLevel = std::sqrt(sumSquares / rmsWindow); + if (rawLevel < DbToLinear(-60.0f)) rawLevel = 0.0f; - rawLevel = Clamp01(rawLevel * 3.0f); const float level = SmoothAttackRelease(m_Features.volume, rawLevel, 0.35f, 0.08f); + // ------------------------------------------------------------------- + // FFT on the full 2048-sample window + // ------------------------------------------------------------------- static kiss_fft_cfg fftConfig = nullptr; - static int configuredSize = 0; - - if (!fftConfig || configuredSize != fftSize) - { - if (fftConfig) - { - kiss_fft_free(fftConfig); - fftConfig = nullptr; - } - + if (!fftConfig) fftConfig = kiss_fft_alloc(fftSize, 0, nullptr, nullptr); - configuredSize = fftSize; - } if (!fftConfig) return; - std::vector fftIn(fftSize); - std::vector fftOut(fftSize); + std::vector fftIn(fftSize), fftOut(fftSize); for (int n = 0; n < fftSize; ++n) { - const float window = - 0.5f * (1.0f - std::cos((2.0f * 3.1415926535f * n) / - static_cast(fftSize - 1))); - - fftIn[n].r = samples[n] * window; + const float w = + 0.5f * (1.0f - std::cos(2.0f * 3.1415926535f * n / (fftSize - 1))); + fftIn[n].r = samples[n] * w; fftIn[n].i = 0.0f; } kiss_fft(fftConfig, fftIn.data(), fftOut.data()); - float bassEnergy = 0.0f; - float midEnergy = 0.0f; - float highEnergy = 0.0f; - float bassFlux = 0.0f; - - int bassBins = 0; - int midBins = 0; - int highBins = 0; - - static std::vector previousMagnitude(kAnalysisSize / 2, 0.0f); + float bassEnergy = 0.0f, midEnergy = 0.0f, highEnergy = 0.0f; + int bassBins = 0, midBins = 0, highBins = 0; + float weightedFreqSum = 0.0f, magnitudeSum = 0.0f; for (int bin = 1; bin < fftSize / 2; ++bin) { - const float real = fftOut[bin].r; - const float imag = fftOut[bin].i; - const float magnitude = - std::sqrt((real * real) + (imag * imag)) / fftSize; + const float r = fftOut[bin].r; + const float im = fftOut[bin].i; + const float mag = std::sqrt(r * r + im * im) / fftSize; + const float f = kSampleRate * bin / fftSize; - const float frequency = (kSampleRate * bin) / fftSize; + if (f >= 20.0f && f < 20000.0f) + { + weightedFreqSum += f * mag; + magnitudeSum += mag; + } - if (frequency >= 40.0f && frequency < 120.0f) + if (f >= 30.0f && f < 150.0f) { - bassEnergy += magnitude; + bassEnergy += mag; ++bassBins; - - bassFlux += std::max(0.0f, magnitude - previousMagnitude[bin]); } - else if (frequency >= 150.0f && frequency < 3500.0f) + else if (f >= 150.0f && f < 3500.0f) { - midEnergy += magnitude; + midEnergy += mag; ++midBins; } - else if (frequency >= 3500.0f && frequency < 12000.0f) + else if (f >= 3500.0f && f < 20000.0f) { - highEnergy += magnitude; + highEnergy += mag; ++highBins; } - - previousMagnitude[bin] = magnitude; } if (bassBins > 0) - { bassEnergy /= bassBins; - bassFlux /= bassBins; - } - if (midBins > 0) midEnergy /= midBins; - if (highBins > 0) highEnergy /= highBins; - bassEnergy = Clamp01(bassEnergy * 18.0f); - bassFlux = Clamp01(bassFlux * 240.0f); - midEnergy = Clamp01(midEnergy * 150.0f); - highEnergy = Clamp01(highEnergy * 50.0f); + // ------------------------------------------------------------------- + // Adaptive normalisation + // ------------------------------------------------------------------- + static float bassPeak = 0.001f, midPeak = 0.001f, highPeak = 0.001f; + static int warmup = 0; - bassEnergy = ApplyFloor(bassEnergy, 0.65f); - bassFlux = ApplyFloor(bassFlux, 0.08f); - midEnergy = ApplyFloor(midEnergy, 0.03f); - highEnergy = ApplyFloor(highEnergy, 0.04f); + bassPeak = std::max(bassEnergy, bassPeak * kPeakDecay); + midPeak = std::max(midEnergy, midPeak * kPeakDecay); + highPeak = std::max(highEnergy, highPeak * kPeakDecay); - static float fluxAverage = 0.0f; - fluxAverage = (fluxAverage * 0.94f) + (bassFlux * 0.06f); - - static double kickCooldownSeconds = 0.0; - if (kickCooldownSeconds > 0.0) + float normBass, normMid, normHigh; + if (warmup < 90) + { + ++warmup; + normBass = Clamp01(bassEnergy * 120.0f); + normMid = Clamp01(midEnergy * 80.0f); + normHigh = Clamp01(highEnergy * 60.0f); + } + else { - kickCooldownSeconds -= deltaSeconds; - if (kickCooldownSeconds < 0.0) - kickCooldownSeconds = 0.0; + normBass = Clamp01((bassEnergy / bassPeak) * 1.4f); + normMid = Clamp01((midEnergy / midPeak) * 2.5f); + normHigh = Clamp01((highEnergy / highPeak) * 1.4f); } + // ------------------------------------------------------------------- + // Spectral centroid + // ------------------------------------------------------------------- + float rawCentroid = 0.0f; + if (magnitudeSum > 0.0f) + rawCentroid = weightedFreqSum / magnitudeSum; + + const float logMin = std::log(20.0f); + const float logMax = std::log(20000.0f); + float logCentroid = 0.0f; + if (rawCentroid > 0.0f) + logCentroid = (std::log(rawCentroid) - logMin) / (logMax - logMin); + + m_Features.spectralCentroid = SmoothAttackRelease( + m_Features.spectralCentroid, Clamp01(logCentroid), 0.3f, 0.1f); + + // ------------------------------------------------------------------- + // Kick detection + // ------------------------------------------------------------------- + static float kickCooldown = 0.0f; + + if (kickCooldown > 0.0f) + kickCooldown -= static_cast(deltaSeconds); + float kickPulse = 0.0f; - const bool bassIsPresent = bassEnergy > 0.65f; - const bool fluxIsSignificant = - bassFlux > 0.10f && bassFlux > (fluxAverage * 1.45f); + const float kickFloor = 0.25f; - if (bassIsPresent && fluxIsSignificant && kickCooldownSeconds <= 0.0) + if (normBass > kickFloor && kickCooldown <= 0.0f) { - kickPulse = Clamp01((bassFlux - fluxAverage) * 2.2f); - kickCooldownSeconds = 0.08; + kickPulse = + Clamp01(((normBass - kickFloor) / (1.0f - kickFloor)) * 2.0f); + kickCooldown = 0.45f; } - const float sustainedBass = - SmoothAttackRelease(m_Features.bass, bassEnergy, 0.30f, 0.08f); + // ------------------------------------------------------------------- + // Write features + // ------------------------------------------------------------------- + m_Features.volume = level; - const float kick = - SmoothAttackRelease(m_Features.kick, kickPulse, 0.45f, 0.08f); + // Two-stage bass smoothing + static float fastBass = 0.0f; + fastBass = SmoothAttackRelease(fastBass, normBass, 0.50f, 0.985f); - m_Features.volume = level; - m_Features.bass = sustainedBass; - m_Features.kick = kick; - m_Features.mid = - SmoothAttackRelease(m_Features.mid, midEnergy, 0.35f, 0.12f); + static float slowBass = 0.0f; + slowBass = SmoothAttackRelease(slowBass, normBass, 0.02f, 0.9999f); + + m_Features.bass = std::max(fastBass, slowBass); + m_Features.kick = + SmoothAttackRelease(m_Features.kick, kickPulse, 0.70f, 0.05f); + m_Features.mid = SmoothAttackRelease(m_Features.mid, normMid, 0.35f, 0.12f); m_Features.high = - SmoothAttackRelease(m_Features.high, highEnergy, 0.45f, 0.12f); - m_Features.hasSignal = level > 0.001f; + SmoothAttackRelease(m_Features.high, normHigh, 0.45f, 0.12f); + + // Signal gate with hysteresis + static double silenceSeconds = 0.0; + if (rawLevel > 0.005f) + { + silenceSeconds = 0.0; + m_Features.hasSignal = true; + } + else + { + silenceSeconds += deltaSeconds; + if (silenceSeconds > 1.5) + m_Features.hasSignal = false; + } } const AudioFeatures& AudioAnalyzer::GetFeatures() const { return m_Features; } \ No newline at end of file diff --git a/client_generic/Client/AudioAnalyzer.h b/client_generic/Client/AudioAnalyzer.h index 08aa4637..d326514a 100644 --- a/client_generic/Client/AudioAnalyzer.h +++ b/client_generic/Client/AudioAnalyzer.h @@ -6,16 +6,13 @@ struct AudioFeatures { float volume = 0.0f; - - // Sustained low-end energy. float bass = 0.0f; - - // Short transient/onset pulse. float kick = 0.0f; - float mid = 0.0f; float high = 0.0f; + float spectralCentroid = 0.0f; bool hasSignal = false; + int sampleCount = 0; }; class AudioAnalyzer @@ -25,8 +22,7 @@ class AudioAnalyzer const AudioFeatures& GetFeatures() const; private: - - AudioInputWasapi m_AudioInput; + AudioInputWasapi m_AudioInput; double m_Phase = 0.0; AudioFeatures m_Features; }; diff --git a/client_generic/Client/AudioInputWasapi.cpp b/client_generic/Client/AudioInputWasapi.cpp index aaabadd0..6e8a98aa 100644 --- a/client_generic/Client/AudioInputWasapi.cpp +++ b/client_generic/Client/AudioInputWasapi.cpp @@ -207,4 +207,38 @@ std::vector AudioInputWasapi::GetSamples() } return samplesOut; +} +StereoSamples AudioInputWasapi::GetStereoSamples() +{ + StereoSamples out; + + if (!m_CaptureClient || m_ChannelCount < 2) + return out; + + UINT32 packetLength = 0; + HRESULT hr = m_CaptureClient->GetNextPacketSize(&packetLength); + + while (SUCCEEDED(hr) && packetLength > 0) + { + BYTE* data = nullptr; + UINT32 numFrames = 0; + DWORD flags = 0; + + hr = m_CaptureClient->GetBuffer(&data, &numFrames, &flags, nullptr, + nullptr); + if (FAILED(hr)) + break; + + float* samples = reinterpret_cast(data); + for (UINT32 frame = 0; frame < numFrames; ++frame) + { + out.left.push_back(samples[(frame * m_ChannelCount) + 0]); + out.right.push_back(samples[(frame * m_ChannelCount) + 1]); + } + + m_CaptureClient->ReleaseBuffer(numFrames); + hr = m_CaptureClient->GetNextPacketSize(&packetLength); + } + + return out; } \ No newline at end of file diff --git a/client_generic/Client/AudioInputWasapi.h b/client_generic/Client/AudioInputWasapi.h index 423abda7..c4f5ac2b 100644 --- a/client_generic/Client/AudioInputWasapi.h +++ b/client_generic/Client/AudioInputWasapi.h @@ -5,6 +5,12 @@ #include #include +struct StereoSamples +{ + std::vector left; + std::vector right; +}; + class AudioInputWasapi { public: @@ -17,6 +23,7 @@ class AudioInputWasapi bool IsRunning() const; float GetLevel() const; std::vector GetSamples(); + StereoSamples GetStereoSamples(); private: bool m_Running = false; diff --git a/client_generic/Client/client.h b/client_generic/Client/client.h index 1e91441c..17d92fba 100644 --- a/client_generic/Client/client.h +++ b/client_generic/Client/client.h @@ -452,6 +452,24 @@ class CElectricSheep 1.0)); spStats->Add(new Hud::CStringStat(std::string("zconnerror"), "", "")); } + void AddAudioStatsHud() + { + m_HudManager->Add("audiostats", std::make_shared( + Base::Math::CRect(1, 1), + m_HudFontName, m_HudFontSize)); + m_HudManager->Hide("audiostats"); + Hud::spCStatsConsole spStats = + std::dynamic_pointer_cast( + m_HudManager->Get("audiostats")); + spStats->Add(new Hud::CStringStat("audio-signal", "Signal: ", "off")); + spStats->Add(new Hud::CStringStat("audio-volume", "Volume: ", "")); + spStats->Add(new Hud::CStringStat("audio-kick", "Kick: ", "")); + spStats->Add(new Hud::CStringStat("audio-bass", "Bass: ", "")); + spStats->Add(new Hud::CStringStat("audio-mid", "Mid: ", "")); + spStats->Add(new Hud::CStringStat("audio-high", "High: ", "")); + spStats->Add(new Hud::CStringStat("audio-centroid", "Centroid:", "")); + spStats->Add(new Hud::CStringStat("audio-samples", "Samples: ", "")); + } void AddCreditsHud() { @@ -725,6 +743,7 @@ class CElectricSheep AddNetworkIndicatorHud(); AddHelpHud(); AddDreamStatsHud(); + AddAudioStatsHud(); AddProgressHud(); AddSplashHud(); AddOSDHud(); @@ -1306,24 +1325,11 @@ class CElectricSheep const float bassAmount = audio.hasSignal ? audio.bass : 0.0f; const float kickAmount = audio.hasSignal ? audio.kick : 0.0f; - // Extra smoothing for brightness only. - // Put this here, after bassAmount/kickAmount, before reactiveBrightness. - static float visualBass = 0.0f; - - const float visualBassAttack = 0.08f; - const float visualBassRelease = 0.025f; - const float visualBassAmount = bassAmount > visualBass - ? visualBassAttack - : visualBassRelease; - - visualBass = (visualBass * (1.0f - visualBassAmount)) + - (bassAmount * visualBassAmount); - float reactiveBrightness = reactiveDarkBrightness + ((prescribedBrightness - reactiveDarkBrightness) * - visualBass) + - (kickAmount * 0.02f); + bassAmount) + + (kickAmount * 0.03f); if (reactiveBrightness > prescribedBrightness) reactiveBrightness = prescribedBrightness; @@ -1625,11 +1631,13 @@ class CElectricSheep return result; }; - audioReactiveStat->SetSample(string_format( - "B %-10s %.2f | M %-10s %.2f | H %-10s %.2f", - bar(audio.bass).c_str(), audio.bass, - bar(audio.mid).c_str(), audio.mid, - bar(audio.high).c_str(), audio.high)); + audioReactiveStat->SetSample( + string_format("B %-10s %.2f | M %-10s %.2f | H " + "%-10s %.2f | SC %.2f", + bar(audio.bass).c_str(), audio.bass, + bar(audio.mid).c_str(), audio.mid, + bar(audio.high).c_str(), audio.high, + audio.spectralCentroid)); } ((Hud::CIntCounter*)spStats->Get("displayfps"))->AddSample(1); @@ -2180,6 +2188,60 @@ class CElectricSheep } } // if (spStats) - dreamstats + + // Update audio stats HUD (F3) + if (auto spAudioStats = + std::dynamic_pointer_cast( + m_HudManager->Get("audiostats"))) + { + static float dVolume = 0.0f, dBass = 0.0f, dMid = 0.0f; + static float dHigh = 0.0f, dCentroid = 0.0f, dKick = 0.0f; + const float dSmooth = 0.12f; + dVolume = dVolume + (audio.volume - dVolume) * dSmooth; + dBass = dBass + (audio.bass - dBass) * dSmooth; + dMid = dMid + (audio.mid - dMid) * dSmooth; + dHigh = dHigh + (audio.high - dHigh) * dSmooth; + dCentroid = dCentroid + + (audio.spectralCentroid - dCentroid) * dSmooth; + dKick = dKick + (audio.kick - dKick) * dSmooth; + + auto bar = [](float value) + { + int count = static_cast(value * 20.0f); + if (count < 0) + count = 0; + if (count > 20) + count = 20; + std::string result; + for (int i = 0; i < count; ++i) + result += "|"; + return result; + }; + + ((Hud::CStringStat*)spAudioStats->Get("audio-signal")) + ->SetSample(dVolume > 0.01f ? "yes" : "no"); + ((Hud::CStringStat*)spAudioStats->Get("audio-volume")) + ->SetSample(string_format( + "%-20s %.3f", bar(dVolume).c_str(), dVolume)); + ((Hud::CStringStat*)spAudioStats->Get("audio-bass")) + ->SetSample(string_format("%-20s %.3f", + bar(dBass).c_str(), dBass)); + ((Hud::CStringStat*)spAudioStats->Get("audio-mid")) + ->SetSample(string_format("%-20s %.3f", + bar(dMid).c_str(), dMid)); + ((Hud::CStringStat*)spAudioStats->Get("audio-high")) + ->SetSample(string_format("%-20s %.3f", + bar(dHigh).c_str(), dHigh)); + ((Hud::CStringStat*)spAudioStats->Get("audio-centroid")) + ->SetSample(string_format( + "%-20s %.3f", bar(dCentroid).c_str(), dCentroid)); + ((Hud::CStringStat*)spAudioStats->Get("audio-kick")) + ->SetSample(string_format("%-20s %.3f", + bar(dKick).c_str(), dKick)); + ((Hud::CStringStat*)spAudioStats->Get("audio-samples")) + ->SetSample(string_format("%d", audio.sampleCount)); + } + // Finally render hud. #if defined(WIN32) if (!FirstTimeSetupWin32_IsWizardVisible()) @@ -2210,6 +2272,7 @@ class CElectricSheep CLIENT_COMMAND_PLAYBACK_FASTER, CLIENT_COMMAND_F1, CLIENT_COMMAND_F2, + CLIENT_COMMAND_F3, CLIENT_COMMAND_SKIP_FW, CLIENT_COMMAND_SKIP_BW, CLIENT_COMMAND_PAUSE, @@ -2448,6 +2511,10 @@ class CElectricSheep g_Log->Info("HUD toggled (F2), syncing state to server"); EDreamClient::SendStateUpdate(); return true; + case CLIENT_COMMAND_F3: + m_F1F4Timer.Reset(); + m_HudManager->Toggle("audiostats"); + return true; case CLIENT_COMMAND_SKIP_FW: if (!g_Player().IsJumpDisabled()) { popOSD(Hud::Forward10); @@ -2571,6 +2638,8 @@ class CElectricSheep return ExecuteCommand(CLIENT_COMMAND_F1); case DisplayOutput::CKeyEvent::KEY_F2: return ExecuteCommand(CLIENT_COMMAND_F2); + case DisplayOutput::CKeyEvent::KEY_F3: + return ExecuteCommand(CLIENT_COMMAND_F3); // Reset playlist case DisplayOutput::CKeyEvent::KEY_N: From b3a69e977528379746b13708a3354b2150c48639 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Thu, 7 May 2026 06:51:31 +0100 Subject: [PATCH 17/27] Improve audio analysis: rolling sample buffer, two-stage bass smoothing, mid/side kick detection, F3 sample count display, remove double smoothing from client.h --- client_generic/Client/AudioAnalyzer.cpp | 12 ++++++------ client_generic/Client/client.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client_generic/Client/AudioAnalyzer.cpp b/client_generic/Client/AudioAnalyzer.cpp index d73b2449..f4ed03a0 100644 --- a/client_generic/Client/AudioAnalyzer.cpp +++ b/client_generic/Client/AudioAnalyzer.cpp @@ -11,7 +11,7 @@ namespace { constexpr float kSampleRate = 44100.0f; constexpr int kAnalysisSize = 2048; // ~46ms window - enough for bass cycles -constexpr float kPeakDecay = 0.9995f; +constexpr float kPeakDecay = 0.999f; float Clamp01(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0f : v; } @@ -122,12 +122,12 @@ void AudioAnalyzer::Update(double deltaSeconds) magnitudeSum += mag; } - if (f >= 30.0f && f < 150.0f) + if (f >= 30.0f && f < 200.0f) { bassEnergy += mag; ++bassBins; } - else if (f >= 150.0f && f < 3500.0f) + else if (f >= 200.0f && f < 3500.0f) { midEnergy += mag; ++midBins; @@ -166,9 +166,9 @@ void AudioAnalyzer::Update(double deltaSeconds) } else { - normBass = Clamp01((bassEnergy / bassPeak) * 1.4f); - normMid = Clamp01((midEnergy / midPeak) * 2.5f); - normHigh = Clamp01((highEnergy / highPeak) * 1.4f); + normBass = Clamp01((bassEnergy / bassPeak) * 1.1f); + normMid = Clamp01((midEnergy / midPeak) * 1.3f); + normHigh = Clamp01((highEnergy / highPeak) * 1.1f); } // ------------------------------------------------------------------- diff --git a/client_generic/Client/client.h b/client_generic/Client/client.h index 17d92fba..8cf0463e 100644 --- a/client_generic/Client/client.h +++ b/client_generic/Client/client.h @@ -1320,7 +1320,7 @@ class CElectricSheep // Bass controls brightness. const float prescribedBrightness = TapsToBrightness(m_Brightness); - const float reactiveDarkBrightness = -0.5f; + const float reactiveDarkBrightness = -0.25f; const float bassAmount = audio.hasSignal ? audio.bass : 0.0f; const float kickAmount = audio.hasSignal ? audio.kick : 0.0f; From ed004c81f57c8f680782eb93501053633caf7268 Mon Sep 17 00:00:00 2001 From: Sanai McCormick Date: Fri, 8 May 2026 19:27:13 +0100 Subject: [PATCH 18/27] feat: audio-reactive system with audioFlux, FPS control, dream cuts, and real-time mixing --- aubio/.appveyor.yml | 78 + aubio/.circleci/config.yml | 121 + aubio/.coveragerc | 3 + aubio/.gitignore | 54 + aubio/.readthedocs.yaml | 16 + aubio/.travis.yml | 126 + aubio/AUTHORS | 1 + aubio/CMakeLists.txt | 10 + aubio/COPYING | 674 +++++ aubio/ChangeLog | 1191 ++++++++ aubio/MANIFEST.in | 22 + aubio/Makefile | 292 ++ aubio/README.md | 115 + aubio/VERSION | 7 + aubio/aubio.pc.in | 10 + aubio/azure-pipelines.yml | 66 + aubio/doc/Makefile | 155 ++ aubio/doc/about.rst | 73 + aubio/doc/android.rst | 9 + aubio/doc/aubio.txt | 141 + aubio/doc/aubiocut.txt | 85 + aubio/doc/aubiomfcc.txt | 71 + aubio/doc/aubionotes.txt | 114 + aubio/doc/aubioonset.txt | 163 ++ aubio/doc/aubiopitch.txt | 144 + aubio/doc/aubioquiet.txt | 71 + aubio/doc/aubiotrack.txt | 97 + aubio/doc/binaries.rst | 15 + aubio/doc/building.rst | 129 + aubio/doc/cli.rst | 73 + aubio/doc/cli_features.rst | 42 + aubio/doc/conf.py | 270 ++ aubio/doc/debian_packages.rst | 16 + aubio/doc/develop.rst | 154 ++ aubio/doc/download.rst | 16 + aubio/doc/full.cfg | 11 + aubio/doc/index.rst | 76 + aubio/doc/installing.rst | 78 + aubio/doc/make.bat | 190 ++ aubio/doc/py_analysis.rst | 15 + aubio/doc/py_datatypes.rst | 43 + aubio/doc/py_examples.rst | 42 + aubio/doc/py_io.rst | 118 + aubio/doc/py_spectral.rst | 34 + aubio/doc/py_synth.rst | 9 + aubio/doc/py_temporal.rst | 8 + aubio/doc/py_utils.rst | 84 + aubio/doc/python.rst | 59 + aubio/doc/python_module.rst | 103 + aubio/doc/requirements.rst | 375 +++ aubio/doc/statuslinks.rst | 20 + aubio/doc/web.cfg | 2464 +++++++++++++++++ aubio/doc/xcode_frameworks.rst | 72 + aubio/examples/CMakeLists.txt | 21 + aubio/examples/aubiomfcc.c | 81 + aubio/examples/aubionotes.c | 105 + aubio/examples/aubioonset.c | 103 + aubio/examples/aubiopitch.c | 91 + aubio/examples/aubioquiet.c | 62 + aubio/examples/aubiotrack.c | 104 + aubio/examples/jackio.c | 380 +++ aubio/examples/jackio.h | 64 + aubio/examples/meson.build | 27 + aubio/examples/parse_args.h | 363 +++ aubio/examples/utils.c | 232 ++ aubio/examples/utils.h | 74 + aubio/examples/wscript_build | 27 + aubio/meson.build | 6 + aubio/python/README.md | 109 + aubio/python/demos/__init__.py | 0 aubio/python/demos/demo_alsa.py | 45 + aubio/python/demos/demo_bench_yin.py | 50 + aubio/python/demos/demo_bpm_extract.py | 79 + aubio/python/demos/demo_create_test_sounds.py | 50 + aubio/python/demos/demo_filter.py | 53 + aubio/python/demos/demo_filterbank.py | 44 + aubio/python/demos/demo_filterbank_slaney.py | 21 + .../demos/demo_filterbank_triangle_bands.py | 47 + aubio/python/demos/demo_keyboard.py | 62 + aubio/python/demos/demo_mel-energy.py | 71 + aubio/python/demos/demo_mfcc.py | 82 + aubio/python/demos/demo_miditofreq.py | 17 + aubio/python/demos/demo_notes.py | 37 + aubio/python/demos/demo_onset.py | 35 + aubio/python/demos/demo_onset_plot.py | 75 + aubio/python/demos/demo_pitch.py | 103 + aubio/python/demos/demo_pitch_sinusoid.py | 71 + aubio/python/demos/demo_pitchshift.py | 52 + aubio/python/demos/demo_pyaudio.py | 75 + aubio/python/demos/demo_pysoundcard_play.py | 24 + aubio/python/demos/demo_pysoundcard_record.py | 30 + aubio/python/demos/demo_reading_speed.py | 139 + aubio/python/demos/demo_simple_robot_voice.py | 29 + .../demos/demo_simple_spectral_weighting.py | 56 + aubio/python/demos/demo_sink.py | 31 + .../demos/demo_sink_create_woodblock.py | 57 + aubio/python/demos/demo_sink_multi.py | 32 + aubio/python/demos/demo_slicing.py | 51 + aubio/python/demos/demo_source.py | 28 + aubio/python/demos/demo_source_simple.py | 20 + aubio/python/demos/demo_specdesc.py | 80 + aubio/python/demos/demo_spectrogram.py | 77 + aubio/python/demos/demo_tapthebeat.py | 78 + aubio/python/demos/demo_tempo.py | 40 + aubio/python/demos/demo_tempo_plot.py | 79 + aubio/python/demos/demo_timestretch.py | 110 + aubio/python/demos/demo_timestretch_online.py | 112 + aubio/python/demos/demo_tss.py | 49 + aubio/python/demos/demo_wav2midi.py | 77 + aubio/python/demos/demo_waveform_plot.py | 56 + aubio/python/demos/demo_yin_compare.py | 175 ++ aubio/python/ext/aubio-docstrings.h | 143 + aubio/python/ext/aubio-types.h | 91 + aubio/python/ext/aubiomodule.c | 490 ++++ aubio/python/ext/aubioproxy.c | 158 ++ aubio/python/ext/py-cvec.c | 281 ++ aubio/python/ext/py-fft.c | 214 ++ aubio/python/ext/py-filter.c | 297 ++ aubio/python/ext/py-filterbank.c | 600 ++++ aubio/python/ext/py-musicutils.c | 237 ++ aubio/python/ext/py-musicutils.h | 371 +++ aubio/python/ext/py-phasevoc.c | 320 +++ aubio/python/ext/py-sink.c | 303 ++ aubio/python/ext/py-source.c | 680 +++++ aubio/python/ext/ufuncs.c | 155 ++ aubio/python/lib/aubio/__init__.py | 85 + aubio/python/lib/aubio/cmd.py | 623 +++++ aubio/python/lib/aubio/cut.py | 163 ++ aubio/python/lib/aubio/midiconv.py | 191 ++ aubio/python/lib/aubio/slicing.py | 153 + aubio/python/lib/gen_code.py | 643 +++++ aubio/python/lib/gen_external.py | 348 +++ aubio/python/lib/moresetuptools.py | 192 ++ aubio/python/tests/_tools.py | 41 + .../tests/a_weighting_test_simple.expected | 2 + .../tests/c_weighting_test_simple.expected | 2 + .../c_weighting_test_simple_8000.expected | 2 + aubio/python/tests/eval_pitch | 143 + .../tests/filterbank_mfcc_16000_512.expected | 40 + aubio/python/tests/test_aubio.py | 18 + aubio/python/tests/test_aubio_cmd.py | 34 + aubio/python/tests/test_aubio_cut.py | 16 + aubio/python/tests/test_cvec.py | 148 + aubio/python/tests/test_dct.py | 72 + aubio/python/tests/test_fft.py | 215 ++ aubio/python/tests/test_filter.py | 97 + aubio/python/tests/test_filterbank.py | 91 + aubio/python/tests/test_filterbank_mel.py | 171 ++ aubio/python/tests/test_fvec.py | 151 + aubio/python/tests/test_fvec_shift.py | 35 + aubio/python/tests/test_hist.py.old | 74 + aubio/python/tests/test_hztomel.py | 121 + aubio/python/tests/test_mathutils.py | 104 + aubio/python/tests/test_mfcc.py | 147 + aubio/python/tests/test_midi2note.py | 44 + aubio/python/tests/test_musicutils.py | 88 + aubio/python/tests/test_note2midi.py | 142 + aubio/python/tests/test_notes.py | 94 + aubio/python/tests/test_onset.py | 119 + aubio/python/tests/test_peakpicker.py.old | 115 + aubio/python/tests/test_phasevoc.py | 208 ++ aubio/python/tests/test_pitch.py | 125 + aubio/python/tests/test_pitchshift.py | 104 + aubio/python/tests/test_scale.py.old | 18 + aubio/python/tests/test_sink.py | 135 + aubio/python/tests/test_slicing.py | 170 ++ aubio/python/tests/test_source.py | 213 ++ aubio/python/tests/test_source_channels.py | 93 + aubio/python/tests/test_specdesc.py | 256 ++ aubio/python/tests/test_tempo.py | 91 + aubio/python/tests/test_zero_crossing_rate.py | 46 + aubio/python/tests/utils.py | 97 + aubio/requirements.txt | 2 + aubio/scripts/apple/Info.plist | 28 + aubio/scripts/apple/Modules/module.modulemap | 6 + aubio/scripts/build_android | 41 + aubio/scripts/build_apple_frameworks | 89 + aubio/scripts/build_cmake | 16 + aubio/scripts/build_emscripten | 18 + aubio/scripts/build_meson | 33 + aubio/scripts/build_mingw | 119 + aubio/scripts/get_waf.sh | 54 + aubio/scripts/setenv_local.sh | 20 + aubio/setup.py | 102 + aubio/src/CMakeLists.txt | 137 + aubio/src/aubio.h | 233 ++ aubio/src/aubio_priv.h | 414 +++ aubio/src/config.h | 22 + aubio/src/config.h.cmake.in | 25 + aubio/src/cvec.c | 169 ++ aubio/src/cvec.h | 247 ++ aubio/src/effects/pitchshift.h | 127 + aubio/src/effects/pitchshift_dummy.c | 73 + aubio/src/effects/pitchshift_rubberband.c | 162 ++ aubio/src/effects/rubberband_utils.c | 150 + aubio/src/effects/timestretch.h | 198 ++ aubio/src/effects/timestretch_dummy.c | 102 + aubio/src/effects/timestretch_rubberband.c | 261 ++ aubio/src/fmat.c | 186 ++ aubio/src/fmat.h | 172 ++ aubio/src/fvec.c | 149 + aubio/src/fvec.h | 178 ++ aubio/src/io/audio_unit.c | 776 ++++++ aubio/src/io/audio_unit.h | 61 + aubio/src/io/ioutils.c | 159 ++ aubio/src/io/ioutils.h | 133 + aubio/src/io/sink.c | 222 ++ aubio/src/io/sink.h | 181 ++ aubio/src/io/sink_apple_audio.c | 368 +++ aubio/src/io/sink_apple_audio.h | 186 ++ aubio/src/io/sink_flac.c | 370 +++ aubio/src/io/sink_sndfile.c | 259 ++ aubio/src/io/sink_sndfile.h | 195 ++ aubio/src/io/sink_vorbis.c | 314 +++ aubio/src/io/sink_wavwrite.c | 316 +++ aubio/src/io/sink_wavwrite.h | 162 ++ aubio/src/io/source.c | 161 ++ aubio/src/io/source.h | 183 ++ aubio/src/io/source_apple_audio.c | 352 +++ aubio/src/io/source_apple_audio.h | 156 ++ aubio/src/io/source_avcodec.c | 691 +++++ aubio/src/io/source_avcodec.h | 155 ++ aubio/src/io/source_sndfile.c | 353 +++ aubio/src/io/source_sndfile.h | 155 ++ aubio/src/io/source_wavread.c | 479 ++++ aubio/src/io/source_wavread.h | 160 ++ aubio/src/io/utils_apple_audio.c | 59 + aubio/src/lvec.c | 80 + aubio/src/lvec.h | 118 + aubio/src/mathutils.c | 681 +++++ aubio/src/mathutils.h | 338 +++ aubio/src/meson.build | 174 ++ aubio/src/musicutils.c | 85 + aubio/src/musicutils.h | 270 ++ aubio/src/notes/notes.c | 279 ++ aubio/src/notes/notes.h | 143 + aubio/src/onset/onset.c | 355 +++ aubio/src/onset/onset.h | 347 +++ aubio/src/onset/peakpicker.c | 199 ++ aubio/src/onset/peakpicker.h | 57 + aubio/src/pitch/pitch.c | 530 ++++ aubio/src/pitch/pitch.h | 197 ++ aubio/src/pitch/pitchfcomb.c | 144 + aubio/src/pitch/pitchfcomb.h | 76 + aubio/src/pitch/pitchmcomb.c | 435 +++ aubio/src/pitch/pitchmcomb.h | 77 + aubio/src/pitch/pitchschmitt.c | 119 + aubio/src/pitch/pitchschmitt.h | 75 + aubio/src/pitch/pitchspecacf.c | 116 + aubio/src/pitch/pitchspecacf.h | 103 + aubio/src/pitch/pitchyin.c | 189 ++ aubio/src/pitch/pitchyin.h | 100 + aubio/src/pitch/pitchyinfast.c | 201 ++ aubio/src/pitch/pitchyinfast.h | 102 + aubio/src/pitch/pitchyinfft.c | 208 ++ aubio/src/pitch/pitchyinfft.h | 99 + aubio/src/spectral/awhitening.c | 121 + aubio/src/spectral/awhitening.h | 125 + aubio/src/spectral/dct.c | 174 ++ aubio/src/spectral/dct.h | 85 + aubio/src/spectral/dct_accelerate.c | 102 + aubio/src/spectral/dct_fftw.c | 130 + aubio/src/spectral/dct_ipp.c | 150 + aubio/src/spectral/dct_ooura.c | 96 + aubio/src/spectral/dct_plain.c | 105 + aubio/src/spectral/fft.c | 572 ++++ aubio/src/spectral/fft.h | 144 + aubio/src/spectral/filterbank.c | 134 + aubio/src/spectral/filterbank.h | 131 + aubio/src/spectral/filterbank_mel.c | 298 ++ aubio/src/spectral/filterbank_mel.h | 119 + aubio/src/spectral/mfcc.c | 179 ++ aubio/src/spectral/mfcc.h | 173 ++ aubio/src/spectral/ooura_fft8g.c | 1672 +++++++++++ aubio/src/spectral/phasevoc.c | 224 ++ aubio/src/spectral/phasevoc.h | 113 + aubio/src/spectral/specdesc.c | 429 +++ aubio/src/spectral/specdesc.h | 204 ++ aubio/src/spectral/statistics.c | 204 ++ aubio/src/spectral/tss.c | 134 + aubio/src/spectral/tss.h | 103 + aubio/src/synth/sampler.c | 140 + aubio/src/synth/sampler.h | 140 + aubio/src/synth/wavetable.c | 201 ++ aubio/src/synth/wavetable.h | 180 ++ aubio/src/tempo/beattracking.c | 449 +++ aubio/src/tempo/beattracking.h | 121 + aubio/src/tempo/tempo.c | 304 ++ aubio/src/tempo/tempo.h | 255 ++ aubio/src/temporal/a_weighting.c | 262 ++ aubio/src/temporal/a_weighting.h | 88 + aubio/src/temporal/biquad.c | 54 + aubio/src/temporal/biquad.h | 75 + aubio/src/temporal/c_weighting.c | 217 ++ aubio/src/temporal/c_weighting.h | 88 + aubio/src/temporal/filter.c | 163 ++ aubio/src/temporal/filter.h | 176 ++ aubio/src/temporal/resampler.c | 100 + aubio/src/temporal/resampler.h | 65 + aubio/src/types.h | 70 + aubio/src/utils/hist.c | 151 + aubio/src/utils/hist.h | 63 + aubio/src/utils/log.c | 92 + aubio/src/utils/log.h | 99 + aubio/src/utils/parameter.c | 141 + aubio/src/utils/parameter.h | 159 ++ aubio/src/utils/scale.c | 79 + aubio/src/utils/scale.h | 80 + aubio/src/utils/strutils.c | 47 + aubio/src/utils/windll.c | 59 + aubio/src/vecutils.c | 36 + aubio/src/vecutils.h | 116 + aubio/src/wscript_build | 54 + aubio/tests/CMakeLists.txt | 78 + aubio/tests/create_tests_source.py | 42 + aubio/tests/meson.build | 69 + aubio/tests/src/effects/test-pitchshift.c | 110 + aubio/tests/src/effects/test-timestretch.c | 153 + aubio/tests/src/io/base-sink_custom.h | 170 ++ aubio/tests/src/io/base-source_custom.h | 172 ++ aubio/tests/src/io/test-sink.c | 154 ++ aubio/tests/src/io/test-sink_apple_audio.c | 29 + aubio/tests/src/io/test-sink_flac.c | 47 + aubio/tests/src/io/test-sink_sndfile.c | 29 + aubio/tests/src/io/test-sink_vorbis.c | 47 + aubio/tests/src/io/test-sink_wavwrite.c | 29 + aubio/tests/src/io/test-source.c | 156 ++ aubio/tests/src/io/test-source_apple_audio.c | 30 + aubio/tests/src/io/test-source_avcodec.c | 30 + aubio/tests/src/io/test-source_sndfile.c | 30 + aubio/tests/src/io/test-source_wavread.c | 30 + aubio/tests/src/notes/test-notes.c | 24 + aubio/tests/src/onset/test-onset.c | 97 + aubio/tests/src/onset/test-peakpicker.c | 23 + aubio/tests/src/pitch/test-pitch.c | 71 + aubio/tests/src/pitch/test-pitchfcomb.c | 29 + aubio/tests/src/pitch/test-pitchmcomb.c | 32 + aubio/tests/src/pitch/test-pitchschmitt.c | 29 + aubio/tests/src/pitch/test-pitchspecacf.c | 29 + aubio/tests/src/pitch/test-pitchyin.c | 30 + aubio/tests/src/pitch/test-pitchyinfft.c | 31 + aubio/tests/src/spectral/test-awhitening.c | 111 + aubio/tests/src/spectral/test-dct.c | 50 + aubio/tests/src/spectral/test-fft.c | 48 + aubio/tests/src/spectral/test-filterbank.c | 51 + .../tests/src/spectral/test-filterbank_mel.c | 38 + aubio/tests/src/spectral/test-mfcc.c | 94 + aubio/tests/src/spectral/test-phasevoc.c | 54 + aubio/tests/src/spectral/test-specdesc.c | 44 + aubio/tests/src/spectral/test-tss.c | 56 + aubio/tests/src/synth/test-sampler.c | 68 + aubio/tests/src/synth/test-wavetable.c | 68 + aubio/tests/src/tempo/test-beattracking.c | 40 + aubio/tests/src/tempo/test-tempo.c | 126 + aubio/tests/src/temporal/test-a_weighting.c | 43 + aubio/tests/src/temporal/test-biquad.c | 32 + aubio/tests/src/temporal/test-c_weighting.c | 42 + aubio/tests/src/temporal/test-filter.c | 49 + aubio/tests/src/temporal/test-resampler.c | 22 + aubio/tests/src/test-cvec.c | 77 + aubio/tests/src/test-fmat.c | 96 + aubio/tests/src/test-fvec.c | 73 + aubio/tests/src/test-lvec.c | 47 + aubio/tests/src/test-mathutils-window.c | 35 + aubio/tests/src/test-mathutils.c | 122 + aubio/tests/src/test-vecutils.c | 65 + aubio/tests/src/utils/test-hist.c | 31 + aubio/tests/src/utils/test-log.c | 60 + aubio/tests/src/utils/test-parameter.c | 70 + aubio/tests/src/utils/test-scale.c | 22 + aubio/tests/utils_tests.h | 188 ++ aubio/tests/wscript_build | 36 + aubio/this_version.py | 107 + aubio/waf_gensyms.py | 40 + aubio/wscript | 768 +++++ audioFlux | 1 + client_generic/Client/AudioAnalyzer.cpp | 365 ++- client_generic/Client/AudioAnalyzer.h | 6 +- client_generic/Client/AudioPanelWin32.cpp | 233 ++ client_generic/Client/AudioPanelWin32.h | 17 + client_generic/Client/Player.cpp | 25 +- client_generic/Client/Player.h | 8 +- client_generic/Client/SettingsDialogWin32.cpp | 55 + client_generic/Client/SettingsDialogWin32.h | 49 + ...ettingsDialogWin32.CommonSettingsState.inl | 91 + .../SettingsDialogWin32.DialogLifecycle.inl | 5 +- .../SettingsDialogWin32.TabAudioReactive.inl | 235 ++ client_generic/Client/client.h | 192 +- .../DisplayOutput/D3D11/DisplayDX11.cpp | 13 +- .../DisplayOutput/D3D11/RendererDX11.cpp | 13 +- client_generic/MSVC/electricsheep.vcxproj | 73 +- .../MSVC/electricsheep.vcxproj.filters | 79 + 392 files changed, 55583 insertions(+), 224 deletions(-) create mode 100644 aubio/.appveyor.yml create mode 100644 aubio/.circleci/config.yml create mode 100644 aubio/.coveragerc create mode 100644 aubio/.gitignore create mode 100644 aubio/.readthedocs.yaml create mode 100644 aubio/.travis.yml create mode 100644 aubio/AUTHORS create mode 100644 aubio/CMakeLists.txt create mode 100644 aubio/COPYING create mode 100644 aubio/ChangeLog create mode 100644 aubio/MANIFEST.in create mode 100644 aubio/Makefile create mode 100644 aubio/README.md create mode 100644 aubio/VERSION create mode 100644 aubio/aubio.pc.in create mode 100644 aubio/azure-pipelines.yml create mode 100644 aubio/doc/Makefile create mode 100644 aubio/doc/about.rst create mode 100644 aubio/doc/android.rst create mode 100644 aubio/doc/aubio.txt create mode 100644 aubio/doc/aubiocut.txt create mode 100644 aubio/doc/aubiomfcc.txt create mode 100644 aubio/doc/aubionotes.txt create mode 100644 aubio/doc/aubioonset.txt create mode 100644 aubio/doc/aubiopitch.txt create mode 100644 aubio/doc/aubioquiet.txt create mode 100644 aubio/doc/aubiotrack.txt create mode 100644 aubio/doc/binaries.rst create mode 100644 aubio/doc/building.rst create mode 100644 aubio/doc/cli.rst create mode 100644 aubio/doc/cli_features.rst create mode 100644 aubio/doc/conf.py create mode 100644 aubio/doc/debian_packages.rst create mode 100644 aubio/doc/develop.rst create mode 100644 aubio/doc/download.rst create mode 100644 aubio/doc/full.cfg create mode 100644 aubio/doc/index.rst create mode 100644 aubio/doc/installing.rst create mode 100644 aubio/doc/make.bat create mode 100644 aubio/doc/py_analysis.rst create mode 100644 aubio/doc/py_datatypes.rst create mode 100644 aubio/doc/py_examples.rst create mode 100644 aubio/doc/py_io.rst create mode 100644 aubio/doc/py_spectral.rst create mode 100644 aubio/doc/py_synth.rst create mode 100644 aubio/doc/py_temporal.rst create mode 100644 aubio/doc/py_utils.rst create mode 100644 aubio/doc/python.rst create mode 100644 aubio/doc/python_module.rst create mode 100644 aubio/doc/requirements.rst create mode 100644 aubio/doc/statuslinks.rst create mode 100644 aubio/doc/web.cfg create mode 100644 aubio/doc/xcode_frameworks.rst create mode 100644 aubio/examples/CMakeLists.txt create mode 100644 aubio/examples/aubiomfcc.c create mode 100644 aubio/examples/aubionotes.c create mode 100644 aubio/examples/aubioonset.c create mode 100644 aubio/examples/aubiopitch.c create mode 100644 aubio/examples/aubioquiet.c create mode 100644 aubio/examples/aubiotrack.c create mode 100644 aubio/examples/jackio.c create mode 100644 aubio/examples/jackio.h create mode 100644 aubio/examples/meson.build create mode 100644 aubio/examples/parse_args.h create mode 100644 aubio/examples/utils.c create mode 100644 aubio/examples/utils.h create mode 100644 aubio/examples/wscript_build create mode 100644 aubio/meson.build create mode 100644 aubio/python/README.md create mode 100644 aubio/python/demos/__init__.py create mode 100644 aubio/python/demos/demo_alsa.py create mode 100644 aubio/python/demos/demo_bench_yin.py create mode 100644 aubio/python/demos/demo_bpm_extract.py create mode 100644 aubio/python/demos/demo_create_test_sounds.py create mode 100644 aubio/python/demos/demo_filter.py create mode 100644 aubio/python/demos/demo_filterbank.py create mode 100644 aubio/python/demos/demo_filterbank_slaney.py create mode 100644 aubio/python/demos/demo_filterbank_triangle_bands.py create mode 100644 aubio/python/demos/demo_keyboard.py create mode 100644 aubio/python/demos/demo_mel-energy.py create mode 100644 aubio/python/demos/demo_mfcc.py create mode 100644 aubio/python/demos/demo_miditofreq.py create mode 100644 aubio/python/demos/demo_notes.py create mode 100644 aubio/python/demos/demo_onset.py create mode 100644 aubio/python/demos/demo_onset_plot.py create mode 100644 aubio/python/demos/demo_pitch.py create mode 100644 aubio/python/demos/demo_pitch_sinusoid.py create mode 100644 aubio/python/demos/demo_pitchshift.py create mode 100644 aubio/python/demos/demo_pyaudio.py create mode 100644 aubio/python/demos/demo_pysoundcard_play.py create mode 100644 aubio/python/demos/demo_pysoundcard_record.py create mode 100644 aubio/python/demos/demo_reading_speed.py create mode 100644 aubio/python/demos/demo_simple_robot_voice.py create mode 100644 aubio/python/demos/demo_simple_spectral_weighting.py create mode 100644 aubio/python/demos/demo_sink.py create mode 100644 aubio/python/demos/demo_sink_create_woodblock.py create mode 100644 aubio/python/demos/demo_sink_multi.py create mode 100644 aubio/python/demos/demo_slicing.py create mode 100644 aubio/python/demos/demo_source.py create mode 100644 aubio/python/demos/demo_source_simple.py create mode 100644 aubio/python/demos/demo_specdesc.py create mode 100644 aubio/python/demos/demo_spectrogram.py create mode 100644 aubio/python/demos/demo_tapthebeat.py create mode 100644 aubio/python/demos/demo_tempo.py create mode 100644 aubio/python/demos/demo_tempo_plot.py create mode 100644 aubio/python/demos/demo_timestretch.py create mode 100644 aubio/python/demos/demo_timestretch_online.py create mode 100644 aubio/python/demos/demo_tss.py create mode 100644 aubio/python/demos/demo_wav2midi.py create mode 100644 aubio/python/demos/demo_waveform_plot.py create mode 100644 aubio/python/demos/demo_yin_compare.py create mode 100644 aubio/python/ext/aubio-docstrings.h create mode 100644 aubio/python/ext/aubio-types.h create mode 100644 aubio/python/ext/aubiomodule.c create mode 100644 aubio/python/ext/aubioproxy.c create mode 100644 aubio/python/ext/py-cvec.c create mode 100644 aubio/python/ext/py-fft.c create mode 100644 aubio/python/ext/py-filter.c create mode 100644 aubio/python/ext/py-filterbank.c create mode 100644 aubio/python/ext/py-musicutils.c create mode 100644 aubio/python/ext/py-musicutils.h create mode 100644 aubio/python/ext/py-phasevoc.c create mode 100644 aubio/python/ext/py-sink.c create mode 100644 aubio/python/ext/py-source.c create mode 100644 aubio/python/ext/ufuncs.c create mode 100644 aubio/python/lib/aubio/__init__.py create mode 100644 aubio/python/lib/aubio/cmd.py create mode 100644 aubio/python/lib/aubio/cut.py create mode 100644 aubio/python/lib/aubio/midiconv.py create mode 100644 aubio/python/lib/aubio/slicing.py create mode 100644 aubio/python/lib/gen_code.py create mode 100644 aubio/python/lib/gen_external.py create mode 100644 aubio/python/lib/moresetuptools.py create mode 100644 aubio/python/tests/_tools.py create mode 100644 aubio/python/tests/a_weighting_test_simple.expected create mode 100644 aubio/python/tests/c_weighting_test_simple.expected create mode 100644 aubio/python/tests/c_weighting_test_simple_8000.expected create mode 100644 aubio/python/tests/eval_pitch create mode 100644 aubio/python/tests/filterbank_mfcc_16000_512.expected create mode 100644 aubio/python/tests/test_aubio.py create mode 100644 aubio/python/tests/test_aubio_cmd.py create mode 100644 aubio/python/tests/test_aubio_cut.py create mode 100644 aubio/python/tests/test_cvec.py create mode 100644 aubio/python/tests/test_dct.py create mode 100644 aubio/python/tests/test_fft.py create mode 100644 aubio/python/tests/test_filter.py create mode 100644 aubio/python/tests/test_filterbank.py create mode 100644 aubio/python/tests/test_filterbank_mel.py create mode 100644 aubio/python/tests/test_fvec.py create mode 100644 aubio/python/tests/test_fvec_shift.py create mode 100644 aubio/python/tests/test_hist.py.old create mode 100644 aubio/python/tests/test_hztomel.py create mode 100644 aubio/python/tests/test_mathutils.py create mode 100644 aubio/python/tests/test_mfcc.py create mode 100644 aubio/python/tests/test_midi2note.py create mode 100644 aubio/python/tests/test_musicutils.py create mode 100644 aubio/python/tests/test_note2midi.py create mode 100644 aubio/python/tests/test_notes.py create mode 100644 aubio/python/tests/test_onset.py create mode 100644 aubio/python/tests/test_peakpicker.py.old create mode 100644 aubio/python/tests/test_phasevoc.py create mode 100644 aubio/python/tests/test_pitch.py create mode 100644 aubio/python/tests/test_pitchshift.py create mode 100644 aubio/python/tests/test_scale.py.old create mode 100644 aubio/python/tests/test_sink.py create mode 100644 aubio/python/tests/test_slicing.py create mode 100644 aubio/python/tests/test_source.py create mode 100644 aubio/python/tests/test_source_channels.py create mode 100644 aubio/python/tests/test_specdesc.py create mode 100644 aubio/python/tests/test_tempo.py create mode 100644 aubio/python/tests/test_zero_crossing_rate.py create mode 100644 aubio/python/tests/utils.py create mode 100644 aubio/requirements.txt create mode 100644 aubio/scripts/apple/Info.plist create mode 100644 aubio/scripts/apple/Modules/module.modulemap create mode 100644 aubio/scripts/build_android create mode 100644 aubio/scripts/build_apple_frameworks create mode 100644 aubio/scripts/build_cmake create mode 100644 aubio/scripts/build_emscripten create mode 100644 aubio/scripts/build_meson create mode 100644 aubio/scripts/build_mingw create mode 100644 aubio/scripts/get_waf.sh create mode 100644 aubio/scripts/setenv_local.sh create mode 100644 aubio/setup.py create mode 100644 aubio/src/CMakeLists.txt create mode 100644 aubio/src/aubio.h create mode 100644 aubio/src/aubio_priv.h create mode 100644 aubio/src/config.h create mode 100644 aubio/src/config.h.cmake.in create mode 100644 aubio/src/cvec.c create mode 100644 aubio/src/cvec.h create mode 100644 aubio/src/effects/pitchshift.h create mode 100644 aubio/src/effects/pitchshift_dummy.c create mode 100644 aubio/src/effects/pitchshift_rubberband.c create mode 100644 aubio/src/effects/rubberband_utils.c create mode 100644 aubio/src/effects/timestretch.h create mode 100644 aubio/src/effects/timestretch_dummy.c create mode 100644 aubio/src/effects/timestretch_rubberband.c create mode 100644 aubio/src/fmat.c create mode 100644 aubio/src/fmat.h create mode 100644 aubio/src/fvec.c create mode 100644 aubio/src/fvec.h create mode 100644 aubio/src/io/audio_unit.c create mode 100644 aubio/src/io/audio_unit.h create mode 100644 aubio/src/io/ioutils.c create mode 100644 aubio/src/io/ioutils.h create mode 100644 aubio/src/io/sink.c create mode 100644 aubio/src/io/sink.h create mode 100644 aubio/src/io/sink_apple_audio.c create mode 100644 aubio/src/io/sink_apple_audio.h create mode 100644 aubio/src/io/sink_flac.c create mode 100644 aubio/src/io/sink_sndfile.c create mode 100644 aubio/src/io/sink_sndfile.h create mode 100644 aubio/src/io/sink_vorbis.c create mode 100644 aubio/src/io/sink_wavwrite.c create mode 100644 aubio/src/io/sink_wavwrite.h create mode 100644 aubio/src/io/source.c create mode 100644 aubio/src/io/source.h create mode 100644 aubio/src/io/source_apple_audio.c create mode 100644 aubio/src/io/source_apple_audio.h create mode 100644 aubio/src/io/source_avcodec.c create mode 100644 aubio/src/io/source_avcodec.h create mode 100644 aubio/src/io/source_sndfile.c create mode 100644 aubio/src/io/source_sndfile.h create mode 100644 aubio/src/io/source_wavread.c create mode 100644 aubio/src/io/source_wavread.h create mode 100644 aubio/src/io/utils_apple_audio.c create mode 100644 aubio/src/lvec.c create mode 100644 aubio/src/lvec.h create mode 100644 aubio/src/mathutils.c create mode 100644 aubio/src/mathutils.h create mode 100644 aubio/src/meson.build create mode 100644 aubio/src/musicutils.c create mode 100644 aubio/src/musicutils.h create mode 100644 aubio/src/notes/notes.c create mode 100644 aubio/src/notes/notes.h create mode 100644 aubio/src/onset/onset.c create mode 100644 aubio/src/onset/onset.h create mode 100644 aubio/src/onset/peakpicker.c create mode 100644 aubio/src/onset/peakpicker.h create mode 100644 aubio/src/pitch/pitch.c create mode 100644 aubio/src/pitch/pitch.h create mode 100644 aubio/src/pitch/pitchfcomb.c create mode 100644 aubio/src/pitch/pitchfcomb.h create mode 100644 aubio/src/pitch/pitchmcomb.c create mode 100644 aubio/src/pitch/pitchmcomb.h create mode 100644 aubio/src/pitch/pitchschmitt.c create mode 100644 aubio/src/pitch/pitchschmitt.h create mode 100644 aubio/src/pitch/pitchspecacf.c create mode 100644 aubio/src/pitch/pitchspecacf.h create mode 100644 aubio/src/pitch/pitchyin.c create mode 100644 aubio/src/pitch/pitchyin.h create mode 100644 aubio/src/pitch/pitchyinfast.c create mode 100644 aubio/src/pitch/pitchyinfast.h create mode 100644 aubio/src/pitch/pitchyinfft.c create mode 100644 aubio/src/pitch/pitchyinfft.h create mode 100644 aubio/src/spectral/awhitening.c create mode 100644 aubio/src/spectral/awhitening.h create mode 100644 aubio/src/spectral/dct.c create mode 100644 aubio/src/spectral/dct.h create mode 100644 aubio/src/spectral/dct_accelerate.c create mode 100644 aubio/src/spectral/dct_fftw.c create mode 100644 aubio/src/spectral/dct_ipp.c create mode 100644 aubio/src/spectral/dct_ooura.c create mode 100644 aubio/src/spectral/dct_plain.c create mode 100644 aubio/src/spectral/fft.c create mode 100644 aubio/src/spectral/fft.h create mode 100644 aubio/src/spectral/filterbank.c create mode 100644 aubio/src/spectral/filterbank.h create mode 100644 aubio/src/spectral/filterbank_mel.c create mode 100644 aubio/src/spectral/filterbank_mel.h create mode 100644 aubio/src/spectral/mfcc.c create mode 100644 aubio/src/spectral/mfcc.h create mode 100644 aubio/src/spectral/ooura_fft8g.c create mode 100644 aubio/src/spectral/phasevoc.c create mode 100644 aubio/src/spectral/phasevoc.h create mode 100644 aubio/src/spectral/specdesc.c create mode 100644 aubio/src/spectral/specdesc.h create mode 100644 aubio/src/spectral/statistics.c create mode 100644 aubio/src/spectral/tss.c create mode 100644 aubio/src/spectral/tss.h create mode 100644 aubio/src/synth/sampler.c create mode 100644 aubio/src/synth/sampler.h create mode 100644 aubio/src/synth/wavetable.c create mode 100644 aubio/src/synth/wavetable.h create mode 100644 aubio/src/tempo/beattracking.c create mode 100644 aubio/src/tempo/beattracking.h create mode 100644 aubio/src/tempo/tempo.c create mode 100644 aubio/src/tempo/tempo.h create mode 100644 aubio/src/temporal/a_weighting.c create mode 100644 aubio/src/temporal/a_weighting.h create mode 100644 aubio/src/temporal/biquad.c create mode 100644 aubio/src/temporal/biquad.h create mode 100644 aubio/src/temporal/c_weighting.c create mode 100644 aubio/src/temporal/c_weighting.h create mode 100644 aubio/src/temporal/filter.c create mode 100644 aubio/src/temporal/filter.h create mode 100644 aubio/src/temporal/resampler.c create mode 100644 aubio/src/temporal/resampler.h create mode 100644 aubio/src/types.h create mode 100644 aubio/src/utils/hist.c create mode 100644 aubio/src/utils/hist.h create mode 100644 aubio/src/utils/log.c create mode 100644 aubio/src/utils/log.h create mode 100644 aubio/src/utils/parameter.c create mode 100644 aubio/src/utils/parameter.h create mode 100644 aubio/src/utils/scale.c create mode 100644 aubio/src/utils/scale.h create mode 100644 aubio/src/utils/strutils.c create mode 100644 aubio/src/utils/windll.c create mode 100644 aubio/src/vecutils.c create mode 100644 aubio/src/vecutils.h create mode 100644 aubio/src/wscript_build create mode 100644 aubio/tests/CMakeLists.txt create mode 100644 aubio/tests/create_tests_source.py create mode 100644 aubio/tests/meson.build create mode 100644 aubio/tests/src/effects/test-pitchshift.c create mode 100644 aubio/tests/src/effects/test-timestretch.c create mode 100644 aubio/tests/src/io/base-sink_custom.h create mode 100644 aubio/tests/src/io/base-source_custom.h create mode 100644 aubio/tests/src/io/test-sink.c create mode 100644 aubio/tests/src/io/test-sink_apple_audio.c create mode 100644 aubio/tests/src/io/test-sink_flac.c create mode 100644 aubio/tests/src/io/test-sink_sndfile.c create mode 100644 aubio/tests/src/io/test-sink_vorbis.c create mode 100644 aubio/tests/src/io/test-sink_wavwrite.c create mode 100644 aubio/tests/src/io/test-source.c create mode 100644 aubio/tests/src/io/test-source_apple_audio.c create mode 100644 aubio/tests/src/io/test-source_avcodec.c create mode 100644 aubio/tests/src/io/test-source_sndfile.c create mode 100644 aubio/tests/src/io/test-source_wavread.c create mode 100644 aubio/tests/src/notes/test-notes.c create mode 100644 aubio/tests/src/onset/test-onset.c create mode 100644 aubio/tests/src/onset/test-peakpicker.c create mode 100644 aubio/tests/src/pitch/test-pitch.c create mode 100644 aubio/tests/src/pitch/test-pitchfcomb.c create mode 100644 aubio/tests/src/pitch/test-pitchmcomb.c create mode 100644 aubio/tests/src/pitch/test-pitchschmitt.c create mode 100644 aubio/tests/src/pitch/test-pitchspecacf.c create mode 100644 aubio/tests/src/pitch/test-pitchyin.c create mode 100644 aubio/tests/src/pitch/test-pitchyinfft.c create mode 100644 aubio/tests/src/spectral/test-awhitening.c create mode 100644 aubio/tests/src/spectral/test-dct.c create mode 100644 aubio/tests/src/spectral/test-fft.c create mode 100644 aubio/tests/src/spectral/test-filterbank.c create mode 100644 aubio/tests/src/spectral/test-filterbank_mel.c create mode 100644 aubio/tests/src/spectral/test-mfcc.c create mode 100644 aubio/tests/src/spectral/test-phasevoc.c create mode 100644 aubio/tests/src/spectral/test-specdesc.c create mode 100644 aubio/tests/src/spectral/test-tss.c create mode 100644 aubio/tests/src/synth/test-sampler.c create mode 100644 aubio/tests/src/synth/test-wavetable.c create mode 100644 aubio/tests/src/tempo/test-beattracking.c create mode 100644 aubio/tests/src/tempo/test-tempo.c create mode 100644 aubio/tests/src/temporal/test-a_weighting.c create mode 100644 aubio/tests/src/temporal/test-biquad.c create mode 100644 aubio/tests/src/temporal/test-c_weighting.c create mode 100644 aubio/tests/src/temporal/test-filter.c create mode 100644 aubio/tests/src/temporal/test-resampler.c create mode 100644 aubio/tests/src/test-cvec.c create mode 100644 aubio/tests/src/test-fmat.c create mode 100644 aubio/tests/src/test-fvec.c create mode 100644 aubio/tests/src/test-lvec.c create mode 100644 aubio/tests/src/test-mathutils-window.c create mode 100644 aubio/tests/src/test-mathutils.c create mode 100644 aubio/tests/src/test-vecutils.c create mode 100644 aubio/tests/src/utils/test-hist.c create mode 100644 aubio/tests/src/utils/test-log.c create mode 100644 aubio/tests/src/utils/test-parameter.c create mode 100644 aubio/tests/src/utils/test-scale.c create mode 100644 aubio/tests/utils_tests.h create mode 100644 aubio/tests/wscript_build create mode 100644 aubio/this_version.py create mode 100644 aubio/waf_gensyms.py create mode 100644 aubio/wscript create mode 160000 audioFlux create mode 100644 client_generic/Client/AudioPanelWin32.cpp create mode 100644 client_generic/Client/AudioPanelWin32.h create mode 100644 client_generic/Client/SettingsDialogWin32/SettingsDialogWin32.TabAudioReactive.inl diff --git a/aubio/.appveyor.yml b/aubio/.appveyor.yml new file mode 100644 index 00000000..e1550061 --- /dev/null +++ b/aubio/.appveyor.yml @@ -0,0 +1,78 @@ +# appveyor configuration. See http://www.appveyor.com/docs/appveyor-yml +# and http://www.appveyor.com/docs/installed-software#python + +environment: + + matrix: + + # pre-installed python version, see: + # http://www.appveyor.com/docs/installed-software#python + - PYTHONDIR: C:\Python27 + PYTHON_VERSION: 2.7.x + PYTHON_ARCH: 32 + + - PYTHONDIR: C:\Python27-x64 + PYTHON_VERSION: 2.7.x + PYTHON_ARCH: 64 + + - PYTHONDIR: C:\Python36 + PYTHON_VERSION: 3.6.x + PYTHON_ARCH: 32 + + - PYTHONDIR: C:\Python36-x64 + PYTHON_VERSION: 3.6.x + PYTHON_ARCH: 64 + + - PYTHONDIR: C:\Python37 + PYTHON_VERSION: 3.7.x + PYTHON_ARCH: 32 + + - PYTHONDIR: C:\Python37-x64 + PYTHON_VERSION: 3.7.x + PYTHON_ARCH: 64 + + - PYTHONDIR: C:\Python38 + PYTHON_VERSION: 3.8.x + PYTHON_ARCH: 32 + + - PYTHONDIR: C:\Python38-x64 + PYTHON_VERSION: 3.8.x + PYTHON_ARCH: 64 + +install: + - ECHO "Installed SDKs:" + - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\"" + + - "SET PATH=%PYTHONDIR%;%PYTHONDIR%\\Scripts;%PATH%" + + # Check that we have the expected version and architecture for Python + - "python --version" + - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" + + - "python -m pip install --disable-pip-version-check --user --upgrade pip" + - "python -m pip install --upgrade setuptools" + + # We need wheel installed to build wheels + - "python -m pip install wheel" + + - "pip install -r requirements.txt" + +before_build: + - "bash scripts/get_waf.sh" + +build_script: + # also build libaubio with waf + - python waf configure build install --verbose --msvc_version="msvc 14.0" + # clean before building python package + - python waf distclean + # build, upload and install wheel (inspired by numpy's appveyor) + - ps: | + pip wheel -v -v -v --wheel-dir=dist . + ls dist -r | Foreach-Object { + Push-AppveyorArtifact $_.FullName + pip install $_.FullName + } + +test_script: + - "python python\\demos\\demo_create_test_sounds.py" + - "pytest --verbose" diff --git a/aubio/.circleci/config.yml b/aubio/.circleci/config.yml new file mode 100644 index 00000000..b2594c7e --- /dev/null +++ b/aubio/.circleci/config.yml @@ -0,0 +1,121 @@ +# python circleci 2.1 configuration +# see https://circleci.com/docs/2.1/language-python/ +version: 2.1 + +apt-run: &apt-install + name: Install apt packages + command: | + sudo apt-get update + sudo apt-get -y install make sox pkg-config libavcodec-dev libavformat-dev libswresample-dev libavutil-dev libsndfile1-dev libsamplerate-dev librubberband-dev libvorbis-dev libflac-dev + +pip-install: &pip-install + name: Install pip dependencies + command: | + pip install --user -r requirements.txt + +build-wheel: &build-wheel + name: Build python wheel + command: | + pip wheel -v -v -v --wheel-dir=dist . + +install-wheel: &install-wheel + name: Install python wheel + command: | + pip install --user dist/aubio*.whl + +test-pytest: &test-pytest + name: Test python wheel + command: | + make create_test_sounds + PATH=/home/circleci/.local/bin:$PATH pytest -v + +test-pytest-nosounds: &test-pytest-nosounds + name: Test python wheel + command: | + PATH=/home/circleci/.local/bin:$PATH pytest -v + +uninstall-wheel: &uninstall-wheel + name: Uninstall python wheel + command: | + pip show -f aubio + pip uninstall --verbose --yes aubio + +jobs: + build-36: + docker: + - image: cimg/python:3.6 + steps: + - checkout + - run: *apt-install + - run: *pip-install + - run: *build-wheel + - run: *install-wheel + - run: *test-pytest + - run: *uninstall-wheel + - store_artifacts: + path: dist/ + + build-310: + docker: + - image: cimg/python:3.10 + steps: + - checkout + - run: *apt-install + - run: *pip-install + - run: *build-wheel + - run: *install-wheel + - run: *test-pytest + - run: *uninstall-wheel + - store_artifacts: + path: dist/ + + build-310-nodeps: + docker: + - image: cimg/python:3.10 + steps: + - checkout + - run: *pip-install + - run: *build-wheel + - run: *install-wheel + - run: *test-pytest-nosounds + - run: *uninstall-wheel + - store_artifacts: + path: dist/ + + build-312: + docker: + - image: cimg/python:3.12 + steps: + - checkout + - run: *apt-install + - run: *pip-install + - run: *build-wheel + - run: *install-wheel + - run: *test-pytest + - run: *uninstall-wheel + - store_artifacts: + path: dist/ + + build-312-nodeps: + docker: + - image: cimg/python:3.12 + steps: + - checkout + - run: *pip-install + - run: *build-wheel + - run: *install-wheel + - run: *test-pytest-nosounds + - run: *uninstall-wheel + - store_artifacts: + path: dist/ + +workflows: + version: 2 + + test-wheel: + jobs: + - build-36 + - build-310 + - build-310-nodeps + - build-312 + - build-312-nodeps diff --git a/aubio/.coveragerc b/aubio/.coveragerc new file mode 100644 index 00000000..66ded4e3 --- /dev/null +++ b/aubio/.coveragerc @@ -0,0 +1,3 @@ +[run] +branch = True +source = aubio diff --git a/aubio/.gitignore b/aubio/.gitignore new file mode 100644 index 00000000..e17a67da --- /dev/null +++ b/aubio/.gitignore @@ -0,0 +1,54 @@ +*.pyc +*.~[0-9]~ +*.swp + +# gcov generated files +*.gcno +*.gcda +python/lib/aubio/_aubio.*.so +.coverage + +# ignore compiled examples +RE:examples/[a-z]* + +# ignore compiled test programs +RE:tests/src/test-[a-z_-]*$ +RE:tests/cpp/test-[a-z_-]*$ + +# only sgml manpages count +doc/*.1 + +# cachegrind/callgrind stuff +**/cachegrind.out.[0-9]* +**/callgrind.out.[0-9]* + +# waf stuff +.lock-waf* +.waf-* +waf +waflib +build/ + +# doxygen +doc/web/ +doc/full/ +doc/_build/ + +python/gen +python/dist +python/MANIFEST +python/*.db +python/*.wav + +pip-delete-this-directory.txt + +aubio-*.tar.bz2 +aubio-*.zip +dist/*.tar.gz +dist/*.whl + +# test sounds +python/tests/sounds +aubio.egg-info +.eggs +.cache diff --git a/aubio/.readthedocs.yaml b/aubio/.readthedocs.yaml new file mode 100644 index 00000000..85253fbc --- /dev/null +++ b/aubio/.readthedocs.yaml @@ -0,0 +1,16 @@ +# see https://docs.readthedocs.io/en/stable/config-file/ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +python: + install: + - requirements: requirements.txt + - method: pip + path: . + +sphinx: + configuration: doc/conf.py diff --git a/aubio/.travis.yml b/aubio/.travis.yml new file mode 100644 index 00000000..30b81e58 --- /dev/null +++ b/aubio/.travis.yml @@ -0,0 +1,126 @@ +language: python + +matrix: + include: + - name: "Linux (Python 3.8)" + python: 3.8 + os: linux + distro: bionic + - name: "Linux (Python 3.6)" + python: 3.6 + os: linux + env: WAFOPTS="--build-type=debug" + - name: "Linux (Python 2.7, nodeps)" + python: 2.7 + os: linux + distro: trusty + env: WAFOPTS="--nodeps" + - name: "Linux (Python pypy3.5)" + language: python + python: "pypy3.5" + os: linux + - name: "Linux (double, fftw3)" + python: 3.8 + os: linux + env: HAVE_AUBIO_DOUBLE=1 CFLAGS="-O3" WAFOPTS="--enable-fftw3" + - name: "Linux (default, dpkg-buildflags)" + os: linux + env: CFLAGS="`dpkg-buildflags --get CFLAGS`" LDFLAGS="`dpkg-buildflags --get LDFLAGS`" + + - name: "macOS (xcode11)" + language: shell + os: osx + osx_image: xcode11 + - name: "macOS (xcode12, lib only)" + language: shell + os: osx + osx_image: xcode12 + script: + - make test_lib_only_clean + - name: "macOS (xcode10, noopt, nodeps)" + language: shell + os: osx + osx_image: xcode10 + env: CFLAGS="-Os" HAVE_AUBIO_DOUBLE=1 WAFOPTS="--disable-accelerate --nodeps" + - name: "iOS" + language: shell + os: osx + env: WAFOPTS="--with-target-platform=ios --nodeps" AUBIO_NOTESTS=1 + - name: "iOSSimulator" + language: shell + os: osx + env: WAFOPTS="--with-target-platform=iosimulator --nodeps" AUBIO_NOTESTS=1 + +# - name: "Windows (Python 3.8.0, lib only)" +# language: shell +# os: windows +# before_install: +# - choco install python --version 3.8.0 +# - choco install make +# - python -m pip install --upgrade pip +# env: PATH=/c/Python38:/c/Python38/Scripts:$PATH AUBIO_NOTESTS=1 + +addons: + apt: + packages: + - bzip2 + - libavcodec-dev + - libavformat-dev + - libswresample-dev + - libavutil-dev + - libsndfile1-dev + - libsamplerate-dev + - libvorbis-dev + - libflac-dev + - libjack-dev + - libasound2-dev + - libfftw3-dev + - librubberband-dev + - sox + - lcov + homebrew: + packages: + - sox + - ffmpeg + - libsndfile + - libvorbis + - flac + - libsamplerate + - rubberband + - lcov + update: true + +install: + - make getwaf deps_python + - which pip + - pip --version + - pip install coverage + +script: + - make create_test_sounds + - | + if [[ -z "$AUBIO_NOTESTS" ]]; then + make test_lib_python_clean + make coverage + else + make test_lib_only_clean + fi; + +after_success: + - | + if [[ -z "$AUBIO_NOTESTS" ]]; then + # upload to codecov + bash <(curl -s https://codecov.io/bash) + fi + +notifications: + irc: + channels: + - "irc.freenode.org#aubio" + use_notice: true + webhooks: + urls: + - https://webhooks.gitter.im/e/81e7733a5b1d977854b4 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always diff --git a/aubio/AUTHORS b/aubio/AUTHORS new file mode 100644 index 00000000..cf252330 --- /dev/null +++ b/aubio/AUTHORS @@ -0,0 +1 @@ +Paul Brossier diff --git a/aubio/CMakeLists.txt b/aubio/CMakeLists.txt new file mode 100644 index 00000000..e97560dd --- /dev/null +++ b/aubio/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required (VERSION 3.13) + +project (aubio LANGUAGES C VERSION 0.5.0) + +enable_testing () + +# enter subdirectories +add_subdirectory (src) +add_subdirectory (examples) +add_subdirectory (tests) diff --git a/aubio/COPYING b/aubio/COPYING new file mode 100644 index 00000000..94a9ed02 --- /dev/null +++ b/aubio/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/aubio/ChangeLog b/aubio/ChangeLog new file mode 100644 index 00000000..24b0af0e --- /dev/null +++ b/aubio/ChangeLog @@ -0,0 +1,1191 @@ +2018-12-19 Paul Brossier + + [ Overview ] + + * VERSION: bump to 0.4.9 + * library: improve stability, fixing potential crashes and memory leaks on + invalid arguments; improve library messages and reporting of system errors + * tests/: major clean-up, check return codes, increase code coverage + * python/tests/: switch to pytest (closes gh-163), check emitted warnings + * python/: add pages to manual with brief descriptions of classes + + [ Fixes ] + + * security: improve arguments validation in new_aubio_filterbank (prevent + possible null-pointer dereference on invalid n_filters, CVE-2018-19801), + new_aubio-tempo (prevent possible buffer overflow, CVE-2018-19800), and + new_aubio_onset (prevent null-pointer dereference, CVE-2018-19802). Thanks + to Guoxiang Niu (@niugx), from the EaglEye Team for reporting these issues. + * tempo: fix delay_ms methods + * filterbank: fix aubio_filterbank_get_power (thanks to @romanbsd who + also noticed this issue) + * dct: creation fail on negative sizes or invalid accelerate radix, + fix typo in error and warning messages, prevent possible memory leak + * pitch: prevent null pointer dereference in yinfast, comment out unused + functions in mcomb and yin, prevent possible leak in specacf + * mfcc: always use dct module, strengthen input validation, change + get_{scale,power} to return smpl_t + * specdesc: improve error message + * notes: prevent null pointer dereference + * hist: add validation for size argument, prevent possible leak + * awhitening: use shortest length available (closes gh-216) + * io: add macros to display system errors, add helpers to validate input + arguments of source and sink methods, always clean-up after failure + * source: validate input sizes to prevent invalid reads + * apple_audio: use native format conversions in source and sink, prevent + possible apple_audio crash on empty string, get_duration returns 0 on failure + * ffmpeg/avcodec: prevent deprecation warnings, read after close, and skipped + samples warnings, improve warning messages, only show a warning when + swr_convert failed, prevent possible memory leak when closing swr context + * wavwrite: copy to all channels if needed, check fseek and fwrite return + values, call fflush in open to return failure on full disk-system + * source_sndfile: fix reading sizes when resampling, set error message when + reading after close + * aubio_priv.h: include blas first (see gh-225), add STRERROR macros + + [ Python ] + + * documentation: add pages to manual, add minimal docstrings for fft, + digital_filter, and generated objects, improve specdesc documentation + * filterbank: add get_norm/power documentation + * source: take a copy of the last frame before resizing it, raise an + exception when read failed, fix compilation warning + * fixes: remove unneeded check convert with PyFloat_FromDouble or + PyFloat_FromDouble, check if sink, digital_filter, were created before + deleting + + [ Tests ] + + * python/tests/: switch to pytest (slightly slower than nose2 but better at + capturing warnings and parametrization), improve coding style and coverage. + Tests should now be run with `pytest`. + * tests/: Each test program in C must now return 0, otherwise the test will + fail. Examples have been modified to run themselves on a test audio file, + but can still be run with arguments. Tests for `source` and `sink` have been + factorised, and some code cleaning. A python script is used to create a + test sound file. Tested on linux, macos, and windows, improvements to + test-mfcc (closes gh-219). + + [ Build system ] + + * waf: upgrade to 2.0.14, check the return code of each test program, + update rules to build manual and api documentation into build/, check + for errno.h + * osx: use -Os in scripts/build_apple_frameworks + * Makefile: improve coverage reports + * appveyor, travis, circleci: switch to pytest, set one travis config to use + sndfile only + * travis: add py3.6, drop py3.4, use py3.5 to test debug mode + * azure: add basic configuration + +2018-11-21 Paul Brossier + + [ Overview ] + + * VERSION: bump to 0.4.8 + * notes: new option release_drop (gh-203) + * spectral: new parameters added to filterbank and mfcc (gh-206) + * python: start documenting module (gh-73, debian #480018), improve build for + win-amd64 (gh-154, gh-199, gh-208) + * fixes: prevent crash when using fft sizes unsupported by vDSP (gh-207), + prevent saturation when down-mixing a multi-channel source (avcodec/ffmpeg) + + [ Fixes ] + + * avcodec: prevent saturation when down-mixing a multi-channel source, emit + a warning if compiling against avutil < 53 (gh-137), wrap long lines + * examples/: avoid hiding global and unreachable code + * fft: limit to r*2*n sizes, with r in [1, 3, 5, 15] (vDSP only) (gh-207) + * fft: fix reconstruction for odd sizes (fftw only) + * pvoc: add missing implementations for aubio_pvoc_get_hop/win + * mathutils: increase ln(2) precision of in freqtomidi/miditofreq + * wavetable: stop sets playing to 0, add dummy implementation for _load + + [ New features ] + + * src/musicutils.h: new aubio_meltohz, aubio_hztomel, with _htk versions + * src/spectral/filterbank.h: new set_mel_coeffs, set_mel_coeffs_htk, + set_power, and set_norm methods, improved set_triangle_bands + * src/spectral/mfcc.h: new set_scale, set_power, set_norm, set_mel_coeffs, + set_mel_coeffs_htk, set_mel_coeffs_slaney + * src/mathutils.h: new fvec_mul + * src/notes: new option release_drop to prevent missing note-offs (gh-203) + + [ Python module ] + + * fix: rounding to nearest integer in midi2note and freq2note + * general: supports code generation of setters with none or multiple + parameters + * documentation: add docstrings do fvec, cvec, source, sink, pvoc, frequency + conversion and level detection routines (gh-73, debian #480018) + * slicing: improve and document slice_source_at_stamps + * module: new note2freq function, recover error log when raising exceptions + on failed set_ methods, prevent cyclic import, coding style improvements + * demos: improve coding style, fix bpm_extract arguments + * MANIFEST.in: exclude *.pyc, improve patterns + + [ Documentation ] + + * doc/: use sphinx autodoc to load docstrings from aubio module, reorganize + python module documentation, add a note about double precision, use https + when possible + * src/spectral/: update Auditory Toolbox url, update copyright year + + [ Tools ] + + * aubionotes: add --release-drop option + * aubio: add --release-drop and --silence options to `aubio notes`, + workaround for -V to really show version (py2) + * aubiocut: add option --create-first to always create first slice + + [ Tests ] + + * tests/, python/tests: add tests for new methods, check source channel + down-mix, improve coverage + + [ Build system ] + + * Makefile: disable docs when measuring coverage, add branch coverage + option, add coverage_zero_counters target, improve html report + * waf: update to 2.0.12, improve wscript style, prevent shipping some + generated files + * python: always show compiler warnings when pre-processing headers, + workaround to fix code generation for win-amd64 (gh-154, gh-199, gh-208). + * continuous integration: add azure pipelines, update and improve + configurations for appveyor, circleci, and travis. + +2018-09-22 Paul Brossier + + [ Overview ] + + * VERSION: bump to 0.4.7 + * src/spectral/dct.h: add dct type II object with optimised versions + * src/io/, src/notes/, src/pitch: prevent crashes on corrupted files + * examples/: fix jack midi output, improve messages when jack disabled + * python/: add dct support, minor bug fixes tests and demos + * wscript: improve support for BLAS/ATLAS + + [ Library fixes ] + + * src/pitch/pitchyinfft.c: fix out of bound read when samplerate > 50kHz + thanks to @fCorleone (closes #189, CVE-2018-14523, debian #904906) + * src/notes/notes.c: bail out if pitch creation failed (see #188) + * src/io/source_wavread.c: + - also exit if samplerate is negative (closes #188, CVE-2018-14522, + debian #904907) + - add some input validation (closes #148 and #158, CVE-2017-17054, + debian #883355) + * src/io/source_avcodec.c: + - give up if resampling context failed opening (see #137, closes #187, + CVE-2018-14521, debian #904908) + - give up reading file if number of channel changes during stream (closes + #137, CVE-2017-17554, debian #884237) + - make sure libavutil > 52 before checking avFrame->channels (see #137) + - fix build with ffmpeg 4.0, thanks to @jcowgill (closes #168, #173) + - avoid deprecated call for ffmpeg >= 4.0 + * src/onset/onset.c: add dummy default parameters for wphase (closes #150) + + [ Tools ] + + * examples/parse_args.h: hide jack options if not available, improve error + message (closes #182) + * examples/utils.h: process_block returns void + * examples/utils.c: fix examples failing to send more than one JACK midi + event per frame, thanks to @cyclopsian (closes #201) + + [ New features ] + + * src/spectral/dct.h: add dct type II object with implementation factory + * src/spectral/dct_plain.c: add plain dct implementation + * src/spectral/dct_ooura.c: add ooura implementation + * src/spectral/dct_fftw.c: add fftw implementation + * src/spectral/dct_ipp.c: add ipp version + * src/spectral/dct_accelerate.c: add vdsp/accelerate dct + * tests/src/spectral/test-dct.c: check reconstruction works + * src/spectral/mfcc.c: use new dct to compute mfcc + + [ Library internals ] + + * src/aubio_priv.h: avoid hard-coded undefs, split BLAS and ATLAS support, + add vdsp scalar add and multiply + + [ Build system ] + + * wscript: + - add options to disable examples and tests + - detect includes for openblas/libblas/atlas + * scripts/get_waf.sh: bump to 2.0.11, verify signature if gpg available + * python/lib/gen_external.py: pass '-x c' to emcc only + + [ Python ] + + * python/lib/gen_code.py: add support for rdo methods + * python/tests/test_dct.py: add tests for new dct + * python/demos/demo_pitch_sinusoid.py: use // to yield an integer, fixing + demo on py3, thanks to @ancorcruz (closes #176) + * python/ext/py-musicutils.*: add shift(fvec) and ishift(fvec) + * python/tests/test_fvec_shift.py: add tests for shift() and ishift() + * python/lib/aubio/cmd.py: fix typo in comment + + [ Documentation ] + + * README.md, doc/statuslinks.rst: use latest for commits-since + * examples/parse_args.h: add yinfast to pitch algorithms + * doc/requirements.rst: add some blas documentation + * doc/requirements.rst: split media/optimisation libraries + * doc/develop.rst: fixed spelling error, thanks to Jon Williams (closes #161) + * doc/aubio{pitch,notes}.txt: add yinfast to list of pitch methods + + [ Continuous integration ] + + * .travis.yml: remove xcode8.2 builds, group osx, add alias pip=pip2 + * .appveyor.yml: upgrade pip first, always use python -m pip + +2017-10-02 Paul Brossier + + [ Overview ] + + * VERSION: bump to 0.4.6 + * src/spectral/fft.c, src/*.c: add support for Intel IPP (many thanks to + Eduard Mueller) + * wscript: add support for emscripten (thanks to Martin Hermant) + * src/pitch/pitchyinfast.h: new fast method to compute YIN algorithm + * src/pitch/pitchyin*.c: improve confidence measure, making sure its value + corresponds to the selected period (thanks to Eduard Mueller) + * python/lib/aubio/cmd.py: add `quiet`, `cut`, and `help` subcommands + + [ Library ] + + * src/aubio_priv.h: add missing aubio_vDSP_vclr (Eduard Mueller) + * src/io/source_avcodec.c: improve error message, prevent un-opened bracket, + no declaration after statements for older compilers, avoid unused variable + * src/mathutils.c: prevent segfault with Accelerate.framework (closes #58, + closes #102) + * src/spectral/phasevoc.h: add aubio_pvoc_set_window to change the windowing + function + * src/mathutils.c: add window type `ones` (no windowing) + + [ Python ] + + * python/demos/demo_tapthebeat.py: add a real-time example to play beats + using pyaudio + * python/lib/gen_external.py: improve parsing and syntax, use results in + emscripten build (Martin Hermant) + * python/lib/aubio/cmd.py: add option `-u` to `aubio pitch`, improve error + messages, add `quiet` subcommand (closes #124), improve syntax, add some + documentation, add `cut` and `help` subcommand, add silence and time format + options + * python/lib/aubio/cut.py: upgrade to argparse, set samplerate as needed + * python/demos/demo_yin_compare.py: add comparison of yin implementations + * python/demos/demo_wav2midi.py: add an example to create a midi from a + sound file using mido (closes: #134) + * python/demos/demo_bpm_extract.py: use argparse, use beats_to_bpm function + * python/ext/py-cvec.c: fix support for pypy by changing setters to return a + negative value on error (closes #17) + + [ Documentation ] + + * src/tempo/beattracking.h: fix typo (thanks to Hannes Fritz) + * doc/requirements.rst: fix broken link (thanks to @ssj71, closes #99) + * doc/aubiomfcc.txt: fix typo in 'coefficients' + + [ Tests ] + + * python/tests/tests_aubio_{cmd,cut}.py: add basic tests + * python/tests/test_filterbank*.py: ignore UserWarnings, clean-up, + improve get_coeff tests + + [ Build system ] + + * wscript: add support for emscripten, see scripts/build_emscripten + * scripts/get_waf.sh: update waf to 2.0.1, build waf from source tarball + * scripts/build_emscripten: update to build aubio.js + * Makefile: add coverage and coverage_report targets, run tests once + + [ Continuous integration ] + + * .travis.yml: add coverage report on osx + * .appveyor.yml: use msvc 14.0 (VS 2015) and scripts/get_waf.sh + * .coveragerc: add minimal python coverage configuration + +2017-04-10 Paul Brossier + + [Overview] + + * VERSION: bump to 0.4.5 + * src/io/source_avcodec.c: add support for libswresample + * aubio: new python command line tool to extract information + * src/onset/onset.c: add spectral whitening and compression, improve default + parameters + * this_version.py: use centralized script to get current version, adding git + sha when building from git repo (thanks to MartinHN) + + [Interface] + + * src/spectral/awhithening.h: add adaptive whitening + * src/{cvec,mathutils,musicutils}.h: add cvec_logmag, fvec_logmag, and fvec_push + * src/onset/onset.h: add aubio_onset_set_default_parameters to load optimal + parameters of each novelty function, _{set,get}_compression and + _{set,get}_awhitening to turn on/off compression and adaptive whitening + * src/spectral/specdesc.h: add weighted phase + + [Library] + + * src/onset/onset.c: improve default onset parameters (thanks to @superbock + for access to his evaluation database), see commit dccfad2 for more details + * src/pitch/pitch.c: avoid segfault when using invalid parameters + * src/temporal/biquad.c: fix biquad parameters initialization (thanks to + @jurlhardt) + + [Tools] + + * examples/aubio{onset,track}.c: add options --miditap-note and + --miditap-velo to set which midi note is triggered at onset/beat (thanks to + @tseaver) + * examples/aubioonset.c: show actual parameters in verbose mode + * examples/utils.c: improve memory usage to emit midi notes + + [Python] + + * python/ext/py-source.c: add with (PEP 343) and iter (PEP 234) interface + * python/ext/py-sink.c: add with interface (PEP 343) + * python/lib/aubio/cmd.py: new `aubio` command line tool + * python/lib/aubio/cut.py: moved from python/scripts/aubiocut + + [Documentation] + + * doc/*.rst: reorganize and improve sphinx manual + * doc/*.txt: update manpages, add simple manpage for aubio command line + * doc/full.cfg: derive from doc/web.cfg + * README.md: simplify and add contribute information + + [Build system] + + * wscript: prefer libswresample over libavsamplerate when available, use + current version in manpages, doxygen, and sphinx, update to newest waf + * setup.py: use entry_points console_scripts to generate scripts, use + centralized version from this_version.py, clean up + * python/lib/moresetuptools.py: detect if libswresample is available + +2017-01-08 Paul Brossier + + [ Overview ] + + * VERSION: bump to 0.4.4 + * src/utils/log.h: new function to redirect log, error, and warnings + * python/: AUBIO_ERR raises python exception, AUBIO_WRN to emit py warning + * doc/: add some documentation, fix errors in manpages + * wscript: new rules to build 'manpages', 'doxygen', and 'sphinx', new + --build-type= option (thanks to Eduard Mueller) + * src/notes/notes.h: add minioi and silence methods + * examples/: add --minioi (minimum inter-onset interval) option + * src/pitch/pitchyin.c: improve msvc compiler optimisations (thanks to + Eduard Mueller) + * python/, src/: improve error messages, fix minor memory leaks + * src/io/source_avcodec.c: improve compatibility with latest ffmpeg and with + older libav/ffmpeg versions + * python/demos/: new demos to capture microphone in real time + + [ Interface] + + * src/aubio.h: include utils/log.h + * src/utils/log.h: add new aubio_log_set_function to redirect log messages + * src/notes/notes.h: add aubio_notes_{get,set}_minioi_ms, add + _{get,set}_silence methods + + [ Library ] + + * src/aubio_priv.h: add AUBIO_INF to print to stdout with header, use new + logging function, add ATAN alias, add stdarg.h, move #include "config.h" + * src/{fmat,fvec}.c: avoid integer division + * src/pitch/pitchyin.c: [msvc] help compiler to optimize aubio_pitchyin_do + by giving it addresses for all arrays which are referenced in inner loops, + thanks to Eduard Mueller. + * src/pitch/pitch.c: declare internal functions as static, fail on wrong + method, warn on wrong unit, improve error messages, fix error string + * src/spectral/specdesc.c: return NULL if wrong mode asked, remove trailing + spaces + * src/onset/onset.c: return null and clean-up if new_aubio_specdesc failed, + fix error message + * src/notes/notes.c: use midi note to store pitch candidate, round to + nearest note, add a variable to define precision, fix out-of-bound write, + fix unset silence_threshold, fix error message + * src/spectral/ooura_fft8g.c: add cast to avoid conversion warnings, prefix + public function with aubio_ooura_ to avoid with other apps using ooura (e.g. + puredata), make internal functions static, + * src/spectral/fft.c: add message about fftw3 being able to do non-power of + two sizes, make calls to fftw_destroy_plan thread-safe, use prefixed + aubio_ooura_rdft + * src/spectral/phasevoc.c: fix error string + * src/temporal/resampler.c: throw an error when using libsamplerate with doubles + * src/io/ioutils.h: add functions to check samplerate and channels, use in sink_*.c + * src/io/source.c: add error message when aubio was compiled with no source, + only show error message from last child source_ + * src/io/source_avcodec.c: call avformat_free_context after + avformat_close_input, keep a reference to packet to remove it when closing + file, avoid deprecation warnings with ffmpeg 3.2, add backward compatibility + for libavcodec55, fix for old libavcodec54, use AV_SAMPLE_FMT_DBL when + compiling with HAVE_AUBIO_DOUBLE, fix missing samples in eof block, avoid + function calls before declarations, improve error messages, replace with new + context before closing old one, make sure s->path is set to null + * src/io/{source_wavread,sink_wavwrite}.c: declare internal functions as static + * src/io/source_wavread.c: fix bytes_read for JUNK headers, improve error + messages, initialize buffer, skip chunks until data is found, or abort, skip + junk chunk + * src/io/source_sndfile.c: add support for multi-channel resampling, set + handle to null after sucessful close, add missing floor in ratio comparison, + improve formatting + * src/io/sink.c: only show error message from last child sink_ + * src/io/sink_apple_audio.c: avoid crash on empty file name + * src/io/sink_sndfile.c: improve error message + * src/io/sink_{sndfile,wavwrite}.c: use AUBIO_MAX_CHANNELS, fix error message + + [ Documentation ] + + * README.md: update copyright dates, use https + * src/aubio.h: add some links to examples, use https + * src/pitch/pitch.h: add aubio_pitch_get_tolerance, add basic description of + unit modes + * src/notes/notes.h: add doxygen header + * src/spectral/fft.h: strip example path + * doc/*.rst: improve sphinx documentation + * doc/android.rst: add reference to it scripts/build_android + * doc/debian_packages.rst: added page on debian packages + * doc/python_module.rst: add demo_source_simple.py, add note on pip, add + `print(aubio.version)` + * doc/cli.rst: include command line manpages + * doc/cli_features.rst: add matrix of command line features + * doc/requirements.rst: add a note about --notests (closes #77), document + --msvc options, improve description of options + * doc/download.rst: added page on download + * doc/installing.rst: update + * doc/xcode_frameworks.rst: added page on xcode frameworks + * doc/**: use https://aubio.org + * doc/conf.py: use pyramid theme, update copyright, remove hardcoded path + * doc/web.cfg: exclude ioutils from doc + * doc/aubionotes.txt: document -M option (see #18), + * doc/aubioonset.txt: add documentation for -M, --minioi, improve threshold + description (thanks to Peter Parker), fix typo (onset, not pitch) + * doc/aubio*.txt: document -T/--timeformat option + + [ Build ] + + * Makefile: add a brief intro, avoid offline operations, add html and dist + targets, add rules for documentation, simplify listing, avoid offline + operations, bump waf to 1.9.6, check for waf before clean, chmod go-w + waflib, improve clean, use pip to install, factorise pip options, generate + more test sounds, improve test_python and test_pure_python, pass build_ext + in test_pure_python{,_wheel}, quieten uninstall_python if already + uninstalled, improve test targets, use bdist_wheel in test_pure_python, + build_ext only for --enable-double, verbose waf rules, add cleanwaf + * wscript: added debug/release build type configurations release (default) + enables optimizations, debug symbols are enabled in both configurations, + thanks to Eduard Mueller. + * wscript: add options to disable source_wavread/sink_wavwrite, add check + for stdarg.h, new rules 'manpages', 'sphinx', and 'doxygen' to build + documentation, add version to sphinx and manpages, disable libsamplerate + if double precision enabled (libsamplerate only supports float), fix typos, + remove trailing spaces, improve tarball creation (./waf dist), remove + full.cfg from tarball, prepend to CFLAGS to honor user cflags + * wscript, src/wscript_build: improve install locations using DATAROOTDIR, + MANDIR, INCLUDEDIR + * wscript: default to no atlas for now + * src/wscript_build: always build static library + * scripts/build_android: add an example script to build aubio on android, + + [ Tools ] + + * examples/aubionotes.c: use new notes, set minioi, send last note off when + needed, add warning for missing options + * examples/aubioonset.c: add minioi option, in seconds + * examples/: only send a last note off when using jack + * examples/: return 1 if object creation failed + * examples/: use PROG_HAS_OUTPUT, add PROG_HAS_SILENCE + + [ Tests ] + + * tests/src/spectral/test-fft.c: fix default size + * tests/src/spectral/test-phasevoc.c: fix typos + * tests/src/utils/test-log.c: add AUBIO_INF, add example for + aubio_log_set_function, improve messages + + [ Python ] + + * python/ext/aubiomodule.c: add aubio._aubio.__version__ and import it as + aubio.version, use custom logging function for errors and warnings, remove + duplicated add_generated_objects, use <> for non local aubio + * python/ext/py-cvec.c: use NPY_INTP_FMT + * python/ext/py-fft.c: use error string set in src/spectral/fft.c + * python/ext/py-phasevoc.c: use error string set in src/spectral/phasevoc.c + * python/ext/py-sink.c: always set samplerate and channels in init + * python/ext/py-source.c: use error string set in src/io/source.c + * python/lib/aubio/midiconv.py: add unicode double sharp and double flat, + improve unicode handling, skip UnicodeEncodeError on python 2.x + + [ Python build ] + + * MANIFEST.in: add src/**.c, exclude full.cfg, include waflib, remove + python/ext/config.h + * setup.py: define AUBIO_VERSION use sorted glob.glob to improve + reproducibility, remove extra quotes, remove status from version string, + update description, use custom build_ext instead of 'generate' command, + define HAVE_AUBIO_DOUBLE to 1 if needed + * python/lib/gen_code.py: add support for multiple _do outputs, fix number + of output, improve del_ function, safer DECREF, fix indentation, emit RuntimeError + * python/lib/gen_external.py: clean-up, enable tss, remove duplicate, + sort generated files + * python/lib/moresetuptools.py: add HAVE_STDARG_H, also check for + HAVE_AUBIO_DOUBLE, cleaner clean, look first for system library, then for + local build, then local sources, mo nore fake config.h here, use + samplerate in single precision only + * python/README.md: add a note about nose2 for python tests (closes #74) + * scripts/setenv_local.sh: python3 compat + + [ Python demos ] + + * python/demos/demo_alsa.py: add example using alsaaudio (closes #72) + * python/demos/demo_mfcc.py: add options to plot first and second + derivatives, and set samplerate/win_s/hop_s, thanks to @jhoelzl (closes #68) + * python/demos/demo_notes.py: add simple notes demos + * python/demos/demo_pyaudio.py: added simple demo for pyaudio, see #6, + closes #78, thanks to @jhoelzl and @notalentgeek, add some comments, avoid + overwriting aubio.pitch + * python/demos/demo_source_simple.py: fix indentation, make executable + * python/demos/demo_timestretch{,_online}.py: fix usage string, remove + unused import, use // to yield an integer (closes #71) + * python/demos/demo_timestretch_online.py: use 512, fix block counter + * python/demos/demo_tss.py: improve default parameters, exit before plotting + + [ Python tests ] + + * python/tests/: use local import, add __init__.py + * python/tests/test_cvec.py: simplify + * python/tests/test_fft.py: skip test fft(zeros).phas == 0 if needed, expected powerpc + * python/tests/test_fvec.py: reduce alpha norm precision to 10.-4 + * python/tests/test_{midi2note,note2midi}.py: use nose2.params, add unicode tests + * python/tests/test_notes.py: add basic tests + * python/tests/test_notes.py: test results are correct for 44100Hz_44100f_sine441.wav + * python/tests/test_sink.py: add more tests, quiet warnings + * python/tests/test_source.py: break long line, check the tail of the file + is non-zero on non silent test files, filter user warnings to avoid spamming + the console, only check if last frames are non silent on brownnoise (weak), + remove fragile brownnoise test, check duration on short files, use nose2 + params to process one sound file per test + * python/tests/test_specdesc.py: RuntimeError is now raised on wrong mode + * python/tests/utils.py: by default, use 5 seconds brownoise + + [ Only in git ] + + * .travis.yml: add debian dpkg-buildflags config, switch from precise to + trusty, sudo required, add ffmpeg on osx, add targets ios, iosimulator, + and osx noopt configs, bump to xcode8, add xcode8.2 config, mimick + build_apple_frameworks options, alway upgrade pip, add pip --version and + which pip after upgrading, remove --user, use expandwaf in install, remove + unused ARCH, shuffle order, remove duplicate, add missing opening quote, + use AUBIO_NOTESTS to build only lib on ios, add gitter webhook + * .appveyor.yml: fix path for windows+python 3.5, fix typo in path, make + nose2 tests verbose + +2016-08-16 Paul Brossier + + [ Interface ] + + * src/io/source.h, src/io/source_*.h: add _get_duration + * src/notes/notes.h: add basic notes object + * src/tempo/beattracking.{c,h}: add _get_period and _get_period_s + * src/mathutils.h: add fvec_ishift + * src/fvec.{c,h}: add fvec_weighted_copy + * src/tempo/tempo.{c,h}: add _get_period and _get_period_s, also add tatum, + a subdivision of the beat period, default to 4, implement get/set_delay + * src/**.{c,h}: use #ifdef HAVE_FOO, not #if _HAVE_FOO, add const qualifiers + to unmodified pointers (see #35) + + [ Library ] + + * src/{fmat,fvec,mathutils}.c: optimisations (using atlas or Accelerate when + available) for fvec_sum, fvec_mean, fvec_shift, aubio_level_lin, + fvec_set_all, fvec_zeros, fvec_weight, fvec_copy, fvec_weighted_copy, + fmat_vecmul + * src/aubio_priv.h: check for atlas cblas, use cblas_xswap, vDSP_dotpr, + protect SQR parameters, avoid redefining MIN/MAX, define PATH_MAX and PI + when needed, use _isnan on windows msvc 9 to avoid linking error, more + windows hacks + * src/mathutils.c: avoid for loop initial declarations [gcc], use + HAVE_ATLAS, use smpl_t for constants + * src/fmat.c: skip asserts + * src/spectral/{filterbank,mfcc}.c: use accelerated fmat_vecmul + * src/spectral/fft.c: fftw can be used odd length sizes, not Ooura, + factorise double / single flags, use memcpy + * src/spectral/phasevoc.c: fix arguments checks, return NULL when fft + creation failed , apply windowing for resynthesized grain, use ishift for + odd windows, fix scaling factors for correct reconstruction at 50 and 75% + overlap + * src/pitch/pitch.c: allow for silence == 0, improve error messages + * src/pitch/pitchmcomb.c: fix candidates sorting function, really comparing + current to next + * src/notes/notes.c: equivalent to previous examples/aubionotes.c results + * src/onset/onset.c: simplify selection of first onset, fix for "conversion + from 'smpl_t' to 'uint_t', possible loss of data" with msvc + * src/pitch/pitchmcomb.c: scan across all spectrum + * src/pitch/pitchyinfft.c: use fvec_weighted_copy + * src/{spectral/*.c,onset/*.c,tempo/*.c}: make sure win_size > 1 + * src/io/*.c: use custom defines for {source,sink}_apple_audio, take a copy + of const char* path + * src/io/source_avcodec.c: + - update to libav10, libavcodec 55.34.1 + - avoid deprecation warning, detect if we use ffmpeg or libav version + - check if the uri is a network stream using av_url_split, call + avformat_network_init() if needed + - check if we still need max_analyze_duration2 (closes #53, thanks to + @anthonylauzon) + * src/io/source_{avcodec,sndfile}.c: avoid modifying input param + * src/io/{sink,source,utils}_apple_audio.c: fix memory leak calling + CFRelease (closes #26, closes #27, and closes #28) + * src/io/sink_apple_audio.c: disable async mode for now, factorise code + * src/io/source_apple_audio.c: check out of bounds _seek, set s->path, quiet + * src/io/source_sndfile.c: fix crash, zero-pad output vector when + upsampling, use sf_read_double when compiling with AUBIO_DOUBLE, approximate + duration when resampling + * src/io/sink_sndfile.c: fix for double precision + * src/synth/sampler.c: fix typo, keeps a copy of uri + * src/tempo/tempo.c: do not write novelty function in output[1] + * src/temporal/resampler.c: make msvc happier adding a dummy variable + * src/temporal/filter.c: check parameters, fix filter_do_outplace to really + avoid modifying input + * src/utils/windll.c: add dll main entry point + + [ Python ] + + * General: + - new build system, new code generator + - Python 3 compatibility (#33), thanks to Nils Philippsen (@nphilipp) + - double precision compatibility + - simplify memory allocations, removed unneeded malloc/free calls + - fix memory leak (#49), check input sizes (#63) and output sizes (#60) + - improve indentation, clean up unused imports and variables + - fix comparison to None and to False + * setup.py: move from python/setup.py, add option to build libaubio inside + python-aubio (for instance with pip), add command 'generate' with option + '--enable-double', build with -Wdeclaration-after-statement -Werror + * python/ext/aubiomodule.c: fix PyMethodDef sentinel + * python/ext/aubioproxy.c: factorize input checks into + PyAubio_IsValidVector, fix windows c89 compilation, use npy_intp, not long + * python/ext: rewrite and simplify, safer and improved memory usage (#49), + improve error strings, verify actual object creation + * python/ext/py-source.c: added duration, check seek is not negative + * python/ext/py-musicutils.c: do not overwrite PyArg_ParseTuple messages + * python/lib/gen_code.py: new generator, switch to using custom PyObjects + instead of fvec, cvec, fmat, ready for double precision (defaults to single) + * python/lib/aubio__init__.py: use new aubio.float_type, make sure length is + not zero and float_type is imported + * python/lib/aubio/midiconv.py: fix instance checks, make sure midi2note + uses midi int (#33) + * python/lib/aubio/slicing.py: fix samplerate + * python/ext/aubio-types.h: add new_py_ functions to create PyObjects + instead of fvec_t, apply to generated and hard-coded objects + * python/lib/gen_external.py: improve compiler detection, fixes build on + windows (#55) + * python/lib/moresetuptools.py: helpers for windows and macos compilations + + [ Python demos ] + + * python/demos/demo_reading_speed.py: new reading speed tests, external + packages disabled by default + * python/demos/demo_timestretch.py: new timescale algorithm + * python/demos/demo_timestretch_online.py: new timescale algorithm (online + version) + * python/demos/demo_create_test_sounds.py: add script to create simple sound + files to test on using sox + * python/demos/demo_a_weighting.py: add simple demo for a_weighting + * python/demos/demo_filter.py: moved from _a_weighting + * python/demos/demo_mfcc.py: use n_coeffs + * python/demos/demo_bpm_extract.py: add exception type, avoid {} as default + argument value + * python/demos/demo_pysoundcard_*: update to pysoundcard 0.5.2 (closes #42) + * python/scripts/aubiocut: fix usage string output + + [ Python tests ] + + * python/tests/run_all_tests,*.py: switch to nose2, fix most prospect warnings + * python/tests/test_fvec.py: add test_pass_to_numpy, cope with accumulated + errors + * python/tests/test_cvec.py: simplify, add more tests + * python/tests/test_fft.py: more tests, fft.do to clash on wrong size + inputs, f.rdo input size, cvec is large enough, memory tests, avoid + VisibleDeprecationWarning + * python/tests/test_filterbank.py: check for wrong values, ValueError raised + * python/tests/test_filter.py: add tests + * python/tests/test_musicutils.py: simplify, check TypeError is raised + * python/tests/test_mfcc.py: more tests, check for wrong input size (see #63) + * python/tests/test_mathutils: fix test_miditobin test, can also raise + NotImplementedError (darwin) + * python/tests/test_note2midi.py: more tests, use unicode_literals + * python/tests/test_phasevoc.py: add a note about ocasional crash check + perfect reconstruction for overlap > 75% add 50% overlap test, fix duplicate + test name, add wrong sized input tests + * python/tests/test_sink.py: remove useless many_sinks_not_closed and cruft + * python/tests/test_source.py: simplify, quieten, skip tests if no test sounds + * python/tests/test_specdesc.py: check for wrong values, skip wrong name + test, use correct input size (see #63) + * python/tests/utils.py: try reopening the file is deleting it fails on windows + * python/VERSION: removed, use same VERSION file for libaubio and python-aubio + * MANIFEST.in: move from python/, update contents + * nose2.cfg: add minimal config, set multiprocess always-on=false (fixes + coverage, pass -N to speed up the tests) + + [ Tools ] + + * examples/*.c: add time format option + * examples/{aubioonset,aubiotrack}.c: also emit midi note, thanks to + @topas-rec (closes #62) + * examples/: use outmsg to print notes (fixes #8) + * examples/aubionotes.c: use new aubio_notes object + * examples/aubiotrack.c: enable -O and -t options, fix is_beat/is_silence + types + * examples/{parse_args,utils}.h: check in config.h if getopt.h was found, or + build without for msvc, more windows hacks + * examples/utils.c: change send_noteon to accept floating point midi note number + + [ Tests ] + + * tests/src/io/test-source_apple_audio.c: shorten long line + * tests/src/io/test-source_avcodec.c: use HAVE_LIBAV, closes #10 + * tests/src/temporal: avoid crash, clarify + * tests/src/tempo/test-tempo.c: tempo back to only one output + * tests/src/test-delnull.c: improve test, avoid segfaults + * tests/src/test-lvec.c: use AUBIO_LSMP_FMT + * tests/utils_tests.h: add VA_ARGS versions of variadic macros + * tests/utils_tests.h: also use custom srandom/random when compiling with + -std=c99 + * tests/utils_tests.h: make sure M_PI and RAND_MAX are defined + + [ Build ] + + * Makefile: set waf to 1.8.22 for now, new targets create_test_sounds, + build_python, test_python, clean_python, build_python3, clean_python3, + test_pure_python, test_pure_python_wheel, (use test_pure_* targets to build + without libaubio), use 'HAVE_DOUBLE=1 make' to build in double precision + * scripts/build_apple_frameworks: add script to build macosx and ios + frameworks (see #34, #43) + * scripts/build_emscripten: add script to build with emcc and co + * scripts/build_mingw: add script to cross-compile using mingw + * scripts/get_waf.sh: added simple script to fetch latest waf + * scripts/setenv_local.sh: set environment to run from built source tree + * scripts/setenv_local.sh: update to new python-aubio build location + * tests/wscript_build: do not install test programs + * tests/wscript_build, src/wscript_build: use 'use =', simplify + * src/wscript_build: enable shared lib on ios, static lib on windows + * wscript: + - update --enable-foo to fail if foo is not found + - add -mmacosx-version-min=10.4 on darwin + - add '-fembed-bitcode' on ios (closes #31), min to 6.1 + - make fat build, add option to not build with Accelerate framework + - add option to not build with CoreAudio/AudioToolbox + - add --disable-docs option + - add -lm detection + - pass HAVE_AUBIO_DOUBLE in compiler arguments + - first check for headers, make getopt.h and unistd.h optional + - check HAVE_AV* from ctx.env + - make msvc compiler quieter, add /MD and /D_CRT_SECURE_NO_WARNINGS + - check if we find atlas/cblas.h + - new build platform emscripten + - more cleanups and updates + + [ Only in git ] + + * .travis.yml: config for https://travis-ci.org/aubio/aubio + * .appveyor.yml: config for https://ci.appveyor.com/project/piem/aubio + * .landscape.yml: config for https://landscape.io/github/aubio/aubio + * conda recipes: see https://github.com/conda/conda-recipes#387 + * .gitignore: add python/tests/sounds and .egg-info + + [ General ] + + * src/: remove trailing spaces, improve doxygen strings, update copyrights, + fix typos + * src/onset/onset.h: fix description of get/set_delay functions + * src/spectral/mfcc.h: add link to reference implementation + * src/spectral/filterbank_mel.h: update reference url + * src/musicutils.h: update link to Bernardini's paper, improve doc + * doc/aubiomfcc.txt: add a note about the output + * doc/*.cfg: update to Doxygen 1.8.8 + * python/README.md: fix typo (thanks to Sam Alexander), document how to + build in a virtualenv (see #2) + * README.md: minor updates, link to python/README.md, switch to https + * VERSION: bump to 0.4.3 + +2015-08-01 Paul Brossier + + [ Interface ] + * src/onset/onset.h: add aubio_onset_get_silence(), fix description of + aubio_onset_get/set_delay functions + * src/tempo/tempo.h: add aubio_tempo_get_silence and aubio_tempo_get_threshold + + [ Library ] + * src/io/audio_unit.c: fix deprecation warning (closes #16) + * src/io/sink_apple_audio.c: avoid opening null path + * src/io/sink_sndfile.c: improve error messages, set nsamples after write + * src/io/sink_wavwrite.c: fail if samplerate is way too large, assume + windows is little endian to build with mingw32 + * src/io/source_apple_audio.c: check out of bounds _seek, set s->path, quiet + * src/io/source_avcodec.c: update to libav10, libavcodec 55.34.1 + * src/io/source_sndfile.c: cast to uint_t for now, clarify some variables + names, fix crash, zero-pad output vector when upsampling, improve seek errors and strings + * src/io/source_wavread.c: avoid orphan parenthesis , cast size_t to int to + avoid warning on win64 , improve seek errors processing , sync error message + * src/onset/onset.c: avoid doubled onset at start, check parameters + * src/pitch/pitch.c: add Hertz as valid unit string, check parameters + * src/pitch/pitchyin.c, src/pitch/pitchyinfft.c: avoid producing NaN on silence (closes #7) + * src/pitch/pitchyin.{c,h}: fix typo, developed + * src/spectral/phasevoc.c: fix argument checks, improve error messages + * src/synth/sampler.c: make sure blocksize > 0 + * src/tempo/beattracking.c: avoid segfault on silence (closes #24) + * src/tempo/tempo.c: add silence detection (closes #23), add old behavior in + examples/aubiotrack.c, check parameters + * src/*.c: fix some useless float conversion + + [ Python ] + * python/ext/aubiomodule.c: improve documentation + * python/ext/py-musicutils.c: add silence_detection (closes #21), + level_detection, db_spl, level_lin, complete window implementation + * python/ext/py-source.c: add channels, add seek (closes #9) + * python/demos/demo_a_weighting.py: add simple demo for a_weighting + * python/demos/demo_sink_multi.py: add multi channel version + * python/demos/, python/demos/: minor improvements, improve syntax (closes #19) + * python/setup.py: use setuptools, add numpy to install_requires + + [ Build ] + * waf: removed, now automatically downloaded with make, updated to 1.8.12 + * Makefile: add target to fetch waf and basic instructions + * .travis.yml: added template for travis continuous integration + * {examples,src,tests}/wscript_build: add external libs and uselib to targets + * src/wscript_build: do not hardocode install path + * wscript, src/io/*.c: use custom defines instead of __APPLE__ + * wscript: make fat build optional, remove iOS sdk versioning + + [ General ] + * examples/: use outmsg to print notes (fixes #8) + * examples/parse_args.h: improve short documentation (closes #12) + * doc/*.cfg: remove html timestamps to make build reproducible (see debian bug #779216) + * doc/aubiocut.txt: improve documentation + * doc/*.rst: add sphinx documentation basis with Makefile and conf.py + * README.md: minor updates + * python.old: removed old code + * tests/: minor bug fixing + +2014-01-31 Paul Brossier + + [ Interface ] + * src/io/{source_wavread,sink_wavwrite}.h: new source and sink objects to + read and write simple wav files when building with no external dependencies + * src/io/{source,sink}*.h: added close functions to explicitly close file + * src/io/sink*.h: added do_multi, preset_channels, preset_samplerate, + get_channels and get_samplerate functions + * src/onset/onset.h: added aubio_onset_get_threshold + * src/mathutils.h: add fvec_quadratic_peak_mag to find the magnitude of + interpolated peaks + + [ Library ] + * src/io/source_avcodec.c: implement _seek function + * src/io/source_sndfile.c: fixed _seek when signal is resampled + * src/spectral/ooura_fft8g.c: use float when double is not needed + * src/io/{source,sink}_apple_audio.c: improve error messages + * src/spectral/phasevoc.c: optimize swapbuffers by using memcpy + * src/lvec.c: add missing lvec_set_sample, improve test + * src/tempo/beattracking.c: improve confidence values by using interpolated + peak magnitude and avoiding nan + * src/tempo/tempo_davies.c: set default novelty function to specflux + + [ Python module ] + * python/ext/py-{sink,source}.c: add do_multi and close functions + * python/ext/aubio-types.h: set NPY_NO_DEPRECATED_API to version 1.7 + * python/lib/aubio/slicing.py: new function to slice a source into a list of + arbitrary regions + * python/scripts/aubiocut: add options --cut-until-nsamples and + --cut-until-nsclices, thanks to Mark Suppes for requesting, sponsoring, + and testing this feature + + [ General code ] + * src/aubio_priv.h: use ifdefs to avoid checking undefined defines + * src/**.c: add missing prototypes, avoid some declarations after statement + * waf, waflib: update to 1.7.15 + +2013-12-08 Paul Brossier + + * Overdue: After more than five years of development behind the curtain, + time has come to release a new version of aubio. + + * General: The library has been completely revised since 0.3.2. The API has + seen a major clean up, and has been thoroughly tested. The following list of + changes is not exhaustive. + + * Memory management: allocation and freeing of memory has been optimized in + many ways. Several memory leaks and out of bound access have been fixed. + + * Optimization: the FFT, central to most algorithms, can now be computed + using different optimized algorithms, depending on what is available on your + platform (FFTW, Ooura, or vDSP). Other simple optimization tricks are + included. Most can be deactivated by configuring the build accordingly. + + * python/: The python interface has been completely rewritten to use numpy C + interface, making the aubio python module order of magnitudes faster than + the previous version. Several demos and tests are included. + + * src/: source and header files are now organized in sub-directories. + + * src/io/source.h: new source readers can now use any or all of libav, + CoreAudio, and libsndfile. This means that aubio can now easily read most + uncompressed and compressed formats. Compiled with libav, aubio can also + read audio from video files, and over the network. + + * src/io/sink.h: a new sink object lets you write wav files with any number + of channels, at any samplerate, using libsndfile or CoreAudio. + + * src/onset, src/tempo/, src/pitch: the different methods for onset, tempo, + and pitch extraction have seen many bug-fixes and optimizations. + + * src/spectral/specdesc.h: new onset distances and statistical measures have + been added. + + * src/spectral/filterbank.h: new filter bank to compute the energy in any + custom-defined frequency bands. + + * src/spectral/mfcc.h, examples/aubiomfcc.c: a standard implementation of + the Mel-Frequency Cepstrum Coefficients algorithm has been added. + + * src/temporal/{a,c}_weighting.h: standard implementation of the C-weighting + and A-weighting pre-processing filters are now provided for most commons + sampling rates. + + * src/synth/wavetable.h, src/synth/sampler.h: provide basic ways to generate + some sounds. + + * src/fvec.h: fvec_t, the vector object central to most aubio algorithms, is + now single channel. This simplifies the code of each algorithm greatly. + + * src/lvec.h: lvec_t provides a double precision vector, required for some + operations to avoid floating point overflow + + * src/fmat.h: fmat_t provides a single precision matrix, useful for + multi-channel operations and to some algorithms such as the spectral filter + bank. + + * examples/: several new options, including new programs, have been + included. Refer to the documentation for details. + + * tests/: several tests and examples programs have been added. This should + be a good place to look at to understand how to use aubio. + + * doc/web.cfg: a simplified Doxygen configuration produces a simpler html + documentation. + + * doc/*.txt: the manpages have been rewritten for txt2man. + + * Build system: the build system has been switched from autotools/automake + to waf. Type './waf' or see README.md for instructions on how to use waf. + +2006-11-10 Paul Brossier + * configure.ac: check c compiler for -Wextra option + * examples/*: add lash support to aubioonset, aubiotrack, and aubionotes + * */Makefile.am: improve compilation on Mac OS X, mingw and cygwin + * src/{onset,tempo}.[ch]: add simple c interfaces to onset and tempo tasks + * src/beattracking.c: allow the use of two beat trackers simultaneously + * examples/tests: add test programs for most c functions + * src/*.c: add most missing free calls + * src/*.c: fix some out of array writes + * src/,ext/: more gcc warning fixes + +2006-27-06 Paul Brossier + * plugins/puredata/Makefile.am: move pd help to pattern-help.pd + - thanks goes to Frank Barknecht + * ext/sndfileio.c src/aubio_priv.h: fixes memset in aubio_priv.h, remove + useless sfinfo.format=0 - thanks karsten wiese + * ext/midi/midi_alsa_seq.c: do not call pthread_ in aubio_midi_direct_output + - thanks karsten wiese + * python/aubio/task/beat.py: task beat() output seconds + * python/aubio/task/beat.py: ugly hack to plot beat track anyway + * examples/aubionotes.c: fix signed/unsigned mismatches in examples + * src/beattracking.c: fix signed/unsigned mismatches in beattracking + * src/pitchfcomb.c: fix signed/unsigned mismatches in pitchfcomb + * src/pitchschmitt.c: fix signed/unsigned mismatches in pitchscmitt + * configure.ac: use -Wextra but unused parameters, fix macos CFLAGS + * plugins/puredata/Makefile.am: simplify puredata Makefile.am + * python/aubio/Makefile.am: avoid overwriting CFLAGS + * examples/Makefile.am: use top_{build,src}dir instead of ../ + * configure.ac: make configure.ac more readable + * python/aubio/task/cut.py: use os.path to derive default output filenames + * VERSION: 0.3.1 + +2006-18-05 Paul Brossier + * src/pitchyinfft.{c,h}: new pitch detection method + * src/beattracking.c: algorithm improved + * plugins/puredata/: new puredata external + * python/tasks: enhancements to the onset detection algorithms + * python/aubiocut: improved, can now slice at beats and silences + * python/aubiopitch: new python program to extract pitch tracks + * python/: plotting features for aubiocut and aubiopitch + * python/: interface refactored + * doc/: updated documentation + * VERSION: 0.3.0 + +2006-18-05 Paul Brossier + * src/beattracking.c: added beattracking.c + * various bug fixes + * VERSION: 0.2.0 + +2005-29-03 Paul Brossier + * python/aubio/gnuplot.py: clean up and add plotsound + * python/aubiocompare-onset: updated + * examples/aubioonset.c: fix text output when nframes<4 + * ext/midi/midi_file.c: by default, int is unsigned on powerpc + * python/aubiocut, python/aubio/aubioclass.py: updated + * ext/midi/midi_alsa_seq.c: activated threading + * configure.ac,Makefile.am: added rules to check presence + of swig, python, puredata and docbook-to-man. + +2005-17-03 Paul Brossier + * examples/utils.{c,h}: corrected usedoubled and -O interactions + * examples/aubioonset.c: added frames>=4 check (thanks Hamish Allan) + +2004-12-11 Paul Brossier + * swig/Makefile.am: instructions moved to python/aubio and cleaned + * python/aubiocut: corrected slicing on multichannel files + * VERSION: bumped to 0.1.8 + +2004-12-06 Paul Brossier + * examples/{midi*,testforclam}.c: removed + * src/{sndfile,midi*,jackio}.[ch]: moved to ext + +2004-12-03 Paul Brossier + * src/{mathutils,pitchyin}.h: got rid of some shadowed declarations + * plugins/puredata: first puredata plugin attempt added + +2004-11-30 Paul Brossier + * configure.ac: added -lmx on macosx + * python/aubiocut: seeks for local minima before peak + added zero crossing search + * src/pitchyinc.c: adds draft for all-in-one faster function + * examples/*.c: added ladcca client (needs work) + * examples/aubioonset.c: cleaned up verbose stdout + * doc/aubio.css: updated + +2004-10-28 Paul Brossier + * src/Makefile.am: added config.h installation + * VERSION: 0.1.7.1 + +2004-10-26 Paul Brossier : + * src/pitchdetection.*: moved to src/pitchmcomb.*, now includes a + draft driver for transparent use of mcomb or yin + * src/pitchmcomb.*: added from old src/pitchdetection.* + * VERSION: 0.1.7 + +2004-10-20 Paul Brossier : + * configure.ac: made fftw3f, alsa and jack optional + * src/fft.{c,h}: now uses FFTW3F_SUPPORT + * src/timer.c: #if 0 on win32 version + +2004-10-18 Paul Brossier : + * src/{fft,cvec,pvoc}.c: fixed fft size (N/2+1) + * src/{onsetdetection,tss}.c: fixed sizes as well + * src/pvoc.c: fixed resynthesis scaling factor (still missing + windowing), windowing added in pvoc_rdo + * src/fft.h: removed FFTW typedef + * configure.ac: removed AC_ISC_POSIX to compile on mingw32 + * src/fft.c: removed useless fftw3.h include + * src/pitchmcomb.c: removed call to vec_adapt_thres (writes out of + bounds) + +2004-10-17 Paul Brossier + * src/sample.c: removed static _malloc, set all 0. (fixes nan bugs) + * examples/*.c: removed useless pvoc inits + * src/pitchyin.c: based on de Cheveigne paper + +2004-09-17 Paul Brossier + * configure.ac,src/Makefile.am: cleaned up autotools process + * examples/aubio*.c: removed some useless code. + * src/sample.c: removed crazy call to memset + +2004-09-02 Paul Brossier + * src/sndfileio.c: removed abusive call to AUBIO_ARRAY, + defined MAX_SIZE instead. + * src/onsetdetection.c: rewritten free_function. + * src/phasevoc.c: in aubio_pvoc_rdo, one way writing only + * swig/, python/aubio: added swig wrapper, played a bit with + python interface. + * src/aubio.h: now includes midi_driver.h + +2004-06-25 Paul Brossier + * src/peakpick.h: + renamed pickparams_t to aubio_pickpeak_t + disabled samer_pp (broken) + added del_aubio_peakpick + added aubio_peakpick_pimrt_wt (thanks mramirez) + * python/aubio/onsetcompare.py: now works on huge list + thanks goes to Nicolas Wack + * examples/aubionotes.c: now outputs NOTEONs + * configure.ac: quick hack to disable jack and alsa + * examples/*usingjack*: more hacking to disable jack + * README: some updates + +2004-06-23 Paul Brossier + * src/*.h: added C++ ifdefs in header files + * src/fft.h: removed complex.h include in header + * src/hist.c: fixed out of array indexes + thanks Miguel Ramirez! + * src/Makefile.am: added install headers + * doc/Makefile.am: removed dist-hook to update-docs + * sounds/Makefile.am: added install hooks + * aubio.pc.in: added aubio.pc generation for pkg-config + * python: added some evaluation functions + * src/aubio_priv.h: moved AUBIO_DBG to stderr + * examples/utils.h: now outputs on stdout + * examples/midi*.c: fixed compilation with gcc-2.95 + * VERSION: 0.1.4 + +2004-04-27 Paul Brossier + * pitchdetection.c: fixed, still not great + * Makefile.am: fixed missing headers (thank you Charbel) + * aubioonset,aubionotes: renamed for install (were *demo files) + * First working release: 0.1.3 + +2004-01-31 Paul Brossier + * pitchdetection.c: working, still a bit too picky + * filter.c: sizeable biquad, fixed via pitchtest.c + * types.h: added file, all generic system wide types. + * tss.c: added some speed improvements + +2004-01-20 Paul Brossier + * peakpick.c: working real time onset detection + * biquad.c: needs fixing + +2004-01-10 Paul Brossier + * long time i didn't touch this file + * added various objects + * working onsetdetectors + * various examples + * splitted in a dynamic library + * functions renamed (new_. del_. aubio_._do) + * VERSION: 0.1.0_alpha + +2003-11-04 Paul Brossier + * aubio.h: degrouping in modules + * VERSION: 0.0.6_alpha + +2003-11-03 Paul Brossier + * phasevoc.c: fixed memory acces + * jackio.c: moving to ringbuffer type implementation + * VERSION: 0.0.4_alpha + +2003-11-03 Paul Brossier + * jackio.c: added jack support + * aubioenc.c: fixed memory freeing bugs + * VERSION: 0.0.3_alpha + +2003-10-29 Paul Brossier + * aubio.h: Grouping all headers + * makefile.am: Running first make dist + * VERSION: 0.0.2alpha + +2003-10-18 Paul Brossier + * aubioenc.c: Working phase vocoder + * VERSION: 0.0.1alpha diff --git a/aubio/MANIFEST.in b/aubio/MANIFEST.in new file mode 100644 index 00000000..85edbdf1 --- /dev/null +++ b/aubio/MANIFEST.in @@ -0,0 +1,22 @@ +include AUTHORS COPYING README.md VERSION ChangeLog +include python/README.md +include this_version.py +include waf_gensyms.py +include waf +recursive-include waflib *.py +include Makefile wscript */wscript_build +include aubio.pc.in +include requirements.txt +include src/*.c src/*.h +include src/*/*.c src/*/*.h +include examples/*.c examples/*.h +recursive-include tests *.h *.c *.py +include python/ext/*.h +recursive-include python *.py +include python/README.md +include python/tests/eval_pitch +include python/tests/*.expected +include doc/*.txt doc/*.rst doc/*.cfg doc/Makefile doc/make.bat doc/conf.py +exclude doc/full.cfg +include scripts/* scripts/apple/Info.plist scripts/apple/Modules/module.modulemap +exclude python/gen/* diff --git a/aubio/Makefile b/aubio/Makefile new file mode 100644 index 00000000..51cfe4c3 --- /dev/null +++ b/aubio/Makefile @@ -0,0 +1,292 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# +# This makefile contains simple rules to prepare, compile, test, and install +# aubio. Try one of the following rules: +# +# $ make configure +# $ make build +# $ make install +# $ make test_python + +WAFCMD=python waf + +#WAFOPTS:= +# turn on verbose mode +WAFOPTS += --verbose +# build wafopts +WAFOPTS += --destdir $(DESTDIR) +# multiple jobs +WAFOPTS += --jobs 4 +# if HAVE_AUBIO_DOUBLE is defined, pass --enable-double to waf +# python/lib/moresetuptools.py also checks for HAVE_AUBIO_DOUBLE +WAFOPTS += $(shell [ -z $(HAVE_AUBIO_DOUBLE) ] || echo --enable-double ) + +PIPOPTS += --verbose + +DESTDIR:=$(PWD)/build/dist +PYDESTDIR:=$(PWD)/build/pydist + +# default install locations +PREFIX?=/usr/local +EXEC_PREFIX?=$(PREFIX) +LIBDIR?=$(PREFIX)/lib +INCLUDEDIR?=$(PREFIX)/include +DATAROOTDIR?=$(PREFIX)/share +MANDIR?=$(DATAROOTDIR)/man + +# default python test command +PYTEST?=pytest --verbose + +SOX=sox + +TESTSOUNDS := python/tests/sounds + +LCOVOPTS += --rc lcov_branch_coverage=1 + +all: build + +checkwaf: + @[ -f waf ] || make getwaf + +getwaf: + ./scripts/get_waf.sh + +expandwaf: getwaf + [ -d wafilb ] || rm -fr waflib + $(WAFCMD) --help > /dev/null + mv .waf*/waflib . && rm -fr .waf* + sed -i.orig '/^#==>$$/,$$d' waf + rm -f waf.orig + chmod +x waf && chmod -R go-w waflib + +cleanwaf: + rm -rf waf waflib .waf* + +configure: checkwaf + $(WAFCMD) configure $(WAFOPTS) + +build: configure + $(WAFCMD) build $(WAFOPTS) + +install: + # install + $(WAFCMD) install $(WAFOPTS) + +list_installed: + find $(DESTDIR) -ls | sed 's|$(DESTDIR)|/«destdir»|' + +list_installed_python: + pip show -f aubio + +list_all_installed: list_installed list_installed_python + +uninstall: + # uninstall + $(WAFCMD) uninstall $(WAFOPTS) + +delete_install: + rm -rf $(PWD)/dist/test + +build_python: + # build python-aubio, using locally built libaubio if found + python ./setup.py build + +build_python_extlib: + # build python-aubio using (locally) installed libaubio + [ -f $(DESTDIR)/$(INCLUDEDIR)/aubio/aubio.h ] + [ -d $(DESTDIR)/$(LIBDIR) ] + [ -f $(DESTDIR)/$(LIBDIR)/pkgconfig/aubio.pc ] + PKG_CONFIG_PATH=$(DESTDIR)/$(LIBDIR)/pkgconfig \ + CFLAGS="-I$(DESTDIR)/$(INCLUDEDIR)" \ + LDFLAGS="-L$(DESTDIR)/$(LIBDIR)" \ + make build_python + +deps_python: + # install or upgrade python requirements + pip install $(PIPOPTS) --requirement requirements.txt + +# use pip or distutils? +install_python: install_python_with_pip +uninstall_python: uninstall_python_with_pip +#install_python: install_python_with_distutils +#uninstall_python: uninstall_python_with_distutils + +install_python_with_pip: + # install package + pip install $(PIPOPTS) . + +uninstall_python_with_pip: + # uninstall package + ( pip show aubio | grep -l aubio > /dev/null ) && \ + pip uninstall -y -v aubio || echo "info: aubio package is not installed" + +install_python_with_distutils: + ./setup.py install $(PIPOPTS) $(DISTUTILSOPTS) + +uninstall_python_with_distutils: + #./setup.py uninstall + [ -d $(PYDESTDIR)/$(LIBDIR) ] && echo Warning: did not clean $(PYDESTDIR)/$(LIBDIR) || true + +force_uninstall_python: + # ignore failure if not installed + -make uninstall_python + +local_dylib: + # DYLD_LIBRARY_PATH is no more on mac os + # create links from ~/lib/lib* to build/src/lib* + [ -f $(PWD)/build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.[0-9].dylib ~/lib ) || true + +test_python: export LD_LIBRARY_PATH=$(DESTDIR)/$(LIBDIR) +test_python: export PYTHONPATH=$(PYDESTDIR)/$(LIBDIR) +test_python: local_dylib + # run test with installed package + $(PYTEST) + +clean_python: + ./setup.py clean + +check_clean_python: + # check cleaning a second time works + make clean_python + make clean_python + +clean: checkwaf + # optionnaly clean before build + -$(WAFCMD) clean + # remove possible left overs + -rm -rf doc/_build + +check_clean: + # check cleaning after build works + $(WAFCMD) clean + # check cleaning a second time works + $(WAFCMD) clean + +distclean: + $(WAFCMD) distclean + -rm -rf doc/_build/ + -rm -rf doc/web/ + +check_distclean: + make distclean + +distcheck: checkwaf + $(WAFCMD) distcheck $(WAFOPTS) + +help: + $(WAFCMD) --help + +create_test_sounds: + -[ -z `which $(SOX)` ] && ( echo $(SOX) could not be found) || true + -mkdir -p $(TESTSOUNDS) + -$(SOX) -r 44100 -b 16 -n "$(TESTSOUNDS)/44100Hz_1f_silence.wav" trim 0 1s + -$(SOX) -r 22050 -b 16 -n "$(TESTSOUNDS)/22050Hz_5s_brownnoise.wav" synth 5 brownnoise vol 0.9 + -$(SOX) -r 32000 -b 16 -n "$(TESTSOUNDS)/32000Hz_127f_sine440.wav" synth 127s sine 440 vol 0.9 + -$(SOX) -r 8000 -b 16 -n "$(TESTSOUNDS)/8000Hz_30s_silence.wav" trim 0 30 + -$(SOX) -r 48000 -b 16 -n "$(TESTSOUNDS)/48000Hz_60s_sweep.wav" synth 60 sine 100-20000 vol 0.9 + -$(SOX) -r 44100 -b 16 -n "$(TESTSOUNDS)/44100Hz_44100f_sine441.wav" synth 44100s sine 441 vol 0.9 + -$(SOX) -r 44100 -b 16 -n "$(TESTSOUNDS)/44100Hz_100f_sine441.wav" synth 100s sine 441 vol 0.9 + +# build only libaubio, no python-aubio +test_lib_only: clean distclean configure build install list_installed +# additionally, clean after a fresh build +test_lib_only_clean: test_lib_only uninstall check_clean check_distclean + +# build libaubio, build and test python-aubio against it +test_lib_python: force_uninstall_python deps_python \ + clean_python clean distclean \ + configure build build_python \ + install install_python \ + test_python \ + list_all_installed + +test_lib_python_clean: test_lib_python \ + uninstall_python uninstall \ + check_clean_python \ + check_clean \ + check_distclean + +# build libaubio, install it, build python-aubio against it +test_lib_install_python: force_uninstall_python deps_python \ + clean_python distclean \ + configure build \ + install \ + build_python_extlib \ + install_python \ + test_python \ + list_all_installed + +test_lib_install_python_clean: test_lib_install_python \ + uninstall_python \ + delete_install \ + check_clean_python \ + check_distclean + +# build a python-aubio that includes libaubio +test_python_only: force_uninstall_python deps_python \ + clean_python clean distclean \ + build_python \ + install_python \ + test_python \ + list_installed_python + +test_python_only_clean: test_python_only \ + uninstall_python \ + check_clean_python + +coverage_cycle: coverage_zero_counters coverage_report + +coverage_zero_counters: + lcov --zerocounters --directory . + +coverage: export CFLAGS=--coverage +coverage: export LDFLAGS=--coverage +coverage: export PYTHONPATH=$(PWD)/python/lib +coverage: export LD_LIBRARY_PATH=$(PWD)/build/src +coverage: force_uninstall_python deps_python \ + clean_python clean distclean build local_dylib + # capture coverage after running c tests + lcov $(LCOVOPTS) --capture --no-external --directory . \ + --output-file build/coverage_lib.info + # build and test python + pip install -v -e . + # run tests, with python coverage + coverage run `which pytest` + # capture coverage again + lcov $(LCOVOPTS) --capture --no-external --directory . \ + --output-file build/coverage_python.info + # merge both coverage info files + lcov $(LCOVOPTS) -a build/coverage_python.info -a build/coverage_lib.info \ + --output-file build/coverage.info + # remove tests + lcov $(LCOVOPTS) --remove build/coverage.info '*/ooura_fft8g*' \ + --output-file build/coverage_lib.info + +# make sure we don't build the doc, which builds a temporary python module +coverage_report: export WAFOPTS += --disable-docs +coverage_report: coverage + # generate report with lcov's genhtml + genhtml build/coverage_lib.info --output-directory build/coverage_c \ + --branch-coverage --highlight --legend + # generate python report with coverage python package + coverage report + coverage html -d build/coverage_python + # show links to generated reports + for i in $$(ls build/coverage_*/index.html); do echo file://$(PWD)/$$i; done + +sphinx: configure + $(WAFCMD) sphinx $(WAFOPTS) + +doxygen: configure + $(WAFCMD) doxygen $(WAFOPTS) + +manpages: configure + $(WAFCMD) manpages $(WAFOPTS) + +html: doxygen sphinx + +docs: html manpages + +dist: distclean expandwaf + $(WAFCMD) dist diff --git a/aubio/README.md b/aubio/README.md new file mode 100644 index 00000000..c3cbabbf --- /dev/null +++ b/aubio/README.md @@ -0,0 +1,115 @@ +aubio +===== + +[![CircleCI build status](https://circleci.com/gh/aubio/aubio.svg?style=shield)](https://circleci.com/gh/aubio/aubio "CircleCI build status") +[![Azure Pipelines](https://dev.azure.com/aubio/aubio/_apis/build/status/aubio.aubio)](https://dev.azure.com/aubio/aubio "Azure build status") +[![Appveyor build status](https://img.shields.io/appveyor/ci/piem/aubio/master.svg)](https://ci.appveyor.com/project/piem/aubio "Appveyor build status") +[![Pypi Downloads](https://img.shields.io/pypi/dm/aubio.svg?label=Pypi%20downloads)](https://pypi.org/project/aubio/) +[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/aubio.svg?label=Conda%20downloads)](https://anaconda.org/conda-forge/aubio) + +[![Documentation](https://readthedocs.org/projects/aubio/badge/?version=latest)](http://aubio.readthedocs.io/en/latest/?badge=latest "Latest documentation") +[![DOI](https://zenodo.org/badge/396389.svg)](https://zenodo.org/badge/latestdoi/396389) +[![Commits since last release](https://img.shields.io/github/commits-since/aubio/aubio/latest.svg)](https://github.com/aubio/aubio "Commits since last release") + +aubio is a library to label music and sounds. It listens to audio signals and +attempts to detect events. For instance, when a drum is hit, at which frequency +is a note, or at what tempo is a rhythmic melody. + +Its features include segmenting a sound file before each of its attacks, +performing pitch detection, tapping the beat and producing midi streams from +live audio. + +aubio provide several algorithms and routines, including: + + - several onset detection methods + - different pitch detection methods + - tempo tracking and beat detection + - MFCC (mel-frequency cepstrum coefficients) + - FFT and phase vocoder + - up/down-sampling + - digital filters (low pass, high pass, and more) + - spectral filtering + - transient/steady-state separation + - sound file read and write access + - various mathematics utilities for music applications + +The name aubio comes from _audio_ with a typo: some errors are likely to be +found in the results. + +Python module +------------- + +A python module for aubio is provided. For more information on how to use it, +please see the file [`python/README.md`](python/README.md) and the +[manual](https://aubio.org/manual/latest/) . + +Tools +----- + +The python module comes with the following command line tools: + + - `aubio` extracts informations from sound files + - `aubiocut` slices sound files at onset or beat timestamps + +Additional command line tools are included along with the library: + + - `aubioonset` outputs the time stamp of detected note onsets + - `aubiopitch` attempts to identify a fundamental frequency, or pitch, for + each frame of the input sound + - `aubiomfcc` computes Mel-frequency Cepstrum Coefficients + - `aubiotrack` outputs the time stamp of detected beats + - `aubionotes` emits midi-like notes, with an onset, a pitch, and a duration + - `aubioquiet` extracts quiet and loud regions + +Documentation +------------- + + - [manual](https://aubio.org/manual/latest/), generated with sphinx + - [developer documentation](https://aubio.org/doc/latest/), generated with Doxygen + +The latest version of the documentation can be found at: + + https://aubio.org/documentation + +Build Instructions +------------------ + +aubio compiles on Linux, Mac OS X, Windows, Cygwin, and iOS. + +To compile aubio, you should be able to simply run: + + make + +To compile the python module: + + ./setup.py build + +See the [manual](https://aubio.org/manual/latest/) for more information about +[installing aubio](https://aubio.org/manual/latest/installing.html). + +Citation +-------- + +Please use the DOI link above to cite this release in your publications. For +more information, see also the [about +page](https://aubio.org/manual/latest/about.html) in [aubio +manual](https://aubio.org/manual/latest/). + +Homepage +-------- + +The home page of this project can be found at: https://aubio.org/ + +License +------- + +aubio is free software: you can redistribute it and/or modify it under the +terms of the GNU General Public License as published by the Free Software +Foundation, either version 3 of the License, or (at your option) any later +version. + +Contributing +------------ + +Patches are welcome: please fork the latest git repository and create a feature +branch. Submitted requests should pass all continuous integration tests. diff --git a/aubio/VERSION b/aubio/VERSION new file mode 100644 index 00000000..5a03d28d --- /dev/null +++ b/aubio/VERSION @@ -0,0 +1,7 @@ +AUBIO_MAJOR_VERSION=0 +AUBIO_MINOR_VERSION=5 +AUBIO_PATCH_VERSION=0 +AUBIO_VERSION_STATUS='-alpha' +LIBAUBIO_LT_CUR=5 +LIBAUBIO_LT_REV=4 +LIBAUBIO_LT_AGE=8 diff --git a/aubio/aubio.pc.in b/aubio/aubio.pc.in new file mode 100644 index 00000000..16a892f5 --- /dev/null +++ b/aubio/aubio.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: aubio +Description: a library for audio labelling +Version: @VERSION@ +Libs: -L${libdir} -laubio +Cflags: -I${includedir} diff --git a/aubio/azure-pipelines.yml b/aubio/azure-pipelines.yml new file mode 100644 index 00000000..974dffa2 --- /dev/null +++ b/aubio/azure-pipelines.yml @@ -0,0 +1,66 @@ +# configuration file for azure continuous integration +jobs: + +- job: linux + pool: + vmImage: 'ubuntu-latest' + steps: + - script: | + sudo apt update + sudo apt install libsndfile-dev libavformat-dev librubberband-dev libvorbis-dev libflac-dev + displayName: 'deps' + - script: | + make + displayName: 'make' + env: + CFLAGS: -Werror + +- job: linux_double + pool: + vmImage: 'ubuntu-latest' + steps: + - script: | + sudo apt update + sudo apt install libfftw3-dev libsndfile-dev libavformat-dev librubberband-dev libvorbis-dev libflac-dev + displayName: 'deps' + - script: | + HAVE_AUBIO_DOUBLE=1 WAFOPTS="--enable-fftw3" make + displayName: 'make' + env: + CFLAGS: -Werror + +- job: linux_nodeps + pool: + vmImage: 'ubuntu-latest' + steps: + - script: | + make + displayName: 'make' + env: + CFLAGS: -Werror + +- job: windows + pool: + vmImage: 'windows-latest' + steps: + - script: | + make + displayName: 'make' + env: + # fail on error + CFLAGS: /WX + +- job: macos + pool: + vmImage: 'macos-latest' + steps: + - script: | + brew update + brew install pkg-config gnupg + brew install sox ffmpeg libsndfile libvorbis flac lcov + displayName: 'brew install' + - script: | + make + displayName: 'make' + env: + CFLAGS: -Werror diff --git a/aubio/doc/Makefile b/aubio/doc/Makefile new file mode 100644 index 00000000..b93571d0 --- /dev/null +++ b/aubio/doc/Makefile @@ -0,0 +1,155 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf _static + -rm -rf $(BUILDDIR)/* + +html: + mkdir -p _static + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/aubio.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/aubio.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/aubio" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/aubio" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/aubio/doc/about.rst b/aubio/doc/about.rst new file mode 100644 index 00000000..65083f89 --- /dev/null +++ b/aubio/doc/about.rst @@ -0,0 +1,73 @@ +About +===== + +This library gathers a collection of music signal processing algorithms written +by several people. The documentation of each algorithms contains a brief +description and references to the corresponding papers. + +Credits +------- + +Many thanks to everyone who contributed to aubio, including: + + - Martin Hermant (`MartinHN `_) + - Eduard Müller (`emuell `_) + - Nils Philippsen (`nphilipp `_) + - Tres Seaver (`tseaver `_) + - Dirkjan Rijnders (`dirkjankrijnders `_) + - Jeffrey Kern (`anwserman `_) + - Sam Alexander (`sxalexander `_) + +Special thanks to Juan Pablo Bello, Chris Duxbury, Samer Abdallah, Alain de +Cheveigne for their help. Also many thanks to Miguel Ramirez and Nicolas Wack +for their advices and help fixing bugs. + +Publications +------------ + +Substantial informations about several of the algorithms and their evaluation +are gathered in: + + - Paul Brossier, `Automatic annotation of musical audio for interactive + systems `_, PhD thesis, Centre for Digital music, + Queen Mary University of London, London, UK, 2006. + +Additional results obtained with this software were discussed in the following +papers: + + - P. M. Brossier and J. P. Bello and M. D. Plumbley, `Real-time temporal + segmentation of note objects in music signals + `_ in *Proceedings of + the International Computer Music Conference*, 2004, Miami, Florida, ICMA + + - P. M. Brossier and J. P. Bello and M. D. Plumbley, `Fast labelling of note + objects in music signals + `, in *Proceedings of + the International Symposium on Music Information Retrieval*, 2004, + Barcelona, Spain + +Citation +-------- + +Please refer to the Zenodo link in the file README.md to cite this release. + +Copyright +--------- + +Copyright © 2003-2017 Paul Brossier + +License +------- + +aubio is a `free `_ and `open source +`_ software; **you** can +redistribute it and/or modify it under the terms of the `GNU +`_ `General Public License +`_ as published by the `Free Software +Foundation `_, either version 3 of the License, or (at your +option) any later version. + +.. note:: + + aubio is not MIT or BSD licensed. Contact us if you need it in your + commercial product. diff --git a/aubio/doc/android.rst b/aubio/doc/android.rst new file mode 100644 index 00000000..732cfe51 --- /dev/null +++ b/aubio/doc/android.rst @@ -0,0 +1,9 @@ +.. _android: + +Android build +------------- + +To compile aubio for android, you will need to get the `Android Native +Development Toolkit (NDK) `_, prepare a +standalone toolchain, and tell waf to use the NDK toolchain. An example script +to complete these tasks is available in ``scripts/build_android``. diff --git a/aubio/doc/aubio.txt b/aubio/doc/aubio.txt new file mode 100644 index 00000000..cd1138fd --- /dev/null +++ b/aubio/doc/aubio.txt @@ -0,0 +1,141 @@ +NAME + aubio - a command line tool to extract information from sound files + +SYNOPSIS + + aubio [-h] [-V] ... + +COMMANDS + + The general syntax is "aubio [options]". The following + commands are available: + + onset get onset times + pitch extract fundamental frequency + beat get locations of beats + tempo get overall tempo in bpm + notes get midi-like notes + mfcc extract mel-frequency cepstrum coefficients + melbands extract mel-frequency energies per band + + For a list of available commands, use "aubio -h". For more info about each + command, use "aubio --help". + +GENERAL OPTIONS + + These options can be used before any command has been specified. + + -h, --help show help message and exit + + -V, --version show version + +COMMON OPTIONS + + The following options can be used with all commands: + + , -i , --input input sound file to + analyse (required) + + -r , --samplerate samplerate at which the file should be + represented (default: 0, e.g. samplerate of the input sound) + + -H , --hopsize overlap size, number of samples between two + consecutive analysis (default: 256) + + -B , --bufsize buffer size, number of samples used for each + analysis, (e.g. FFT length, default: 512) + + -h, --help show help message and exit + + -T format, --time-format format select time values output format (samples, + ms, seconds) (default: seconds) + + -v, --verbose be verbose (increment verbosity by 1, default: 1) + + -q, --quiet be quiet (set verbosity to 0) + +ONSET + + The following additional options can be used with the "onset" subcommand. + + -m , --method onset novelty function + (default: + default) + + -t , --threshold threshold (default: unset) + + -s , --silence silence threshold, in dB (default: -70) + + -M , --minioi minimum Inter-Onset Interval (default: 12ms) + +PITCH + + The following additional options can be used with the "pitch" subcommand. + + -m , --method pitch detection method + (default: default, e.g. yinfft) + + -t , --threshold tolerance (default: unset) + + -s , --silence silence threshold, in dB (default: -70) + + The default buffer size for the beat algorithm is 2048. The default hop size + is 256. + +BEAT + + The "beat" command accepts all common options and no additional options. + + The default buffer size for the beat algorithm is 1024. The default hop size + is 512. + +TEMPO + + The "tempo" command accepts all common options and no additional options. + + The default buffer size for the beat algorithm is 1024. The default hop size + is 512. + +NOTES + + The following additional options can be used with the "notes" subcommand. + + -s , --silence silence threshold, in dB (default: -70) + + -d , --release-drop release drop level, in dB. If the level + drops more than this amount since the last note started, the note will be + turned off (default: 10). + +MFCC + + The "mfcc" command accepts all common options and no additional options. + +MELBANDS + + The "melbands" command accepts all common options and no additional options. + +EXAMPLES + + Extract onsets using a minimum inter-onset interval of 30ms: + + aubio onset /path/to/input_file -M 30ms + + Extract pitch with method "mcomb" and a silence threshold of -90dB: + + aubio pitch /path/to/input_file -m mcomb -s -90.0 + + Extract MFCC using the standard Slaney implementation: + + aubio mfcc /path/to/input_file -r 44100 + + +SEE ALSO + + aubiocut(1) + +AUTHOR + + This manual page was written by Paul Brossier . Permission is + granted to copy, distribute and/or modify this document under the terms of + the GNU General Public License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any later version. diff --git a/aubio/doc/aubiocut.txt b/aubio/doc/aubiocut.txt new file mode 100644 index 00000000..c5781333 --- /dev/null +++ b/aubio/doc/aubiocut.txt @@ -0,0 +1,85 @@ +NAME + aubiocut - a command line tool to slice sound files at onset or beat timestamps + +SYNOPSIS + + aubiocut source + aubiocut [[-i] source] + [-r rate] [-B win] [-H hop] + [-O method] [-t thres] + [-b] [-c] + [-v] [-q] [-h] + +OPTIONS + + This program follows the usual GNU command line syntax, with long options + starting with two dashes (--). A summary of options is included below. + + -i, --input source Run analysis on this audio file. Most uncompressed and + compressed are supported, depending on how aubio was built. + + -r, --samplerate rate Fetch the input source, resampled at the given + sampling rate. The rate should be specified in Hertz as an integer. If set + to 0, the sampling rate of the original source will be used. Defaults to 0. + + -B, --bufsize win The size of the buffer to analyze, that is the length + of the window used for spectral and temporal computations. Defaults to 512. + + -H, --hopsize hop The number of samples between two consecutive analysis. + Defaults to 256. + + -O, --onset method The onset detection method to use. See ONSET METHODS + below. Defaults to 'default'. + + -b, --beat Use beat locations instead of onset locations. + + -t, --onset-threshold thres Set the threshold value for the onset peak + picking. Values are typically in the range [0.001, 0.900]. Lower threshold + values imply more onsets detected. Increasing this threshold should reduce + the number of incorrect detections. Defaults to 0.3. + + -c, --cut Cut input sound file at detected labels. A new sound files for + each slice will be created in the current directory. + + -o, --output directory Specify the directory path where slices of the + original source should be created. + + --cut-until-nsamples n How many extra samples should be added at the end of + each slice (default 0). + + --cut-until-nslices n How many extra slices should be added at the end of + each slice (default 0). + + --create-first Alway create first slice. + + -h, --help Print a short help message and exit. + + -v, --verbose Be verbose. + + -q, --quiet Be quiet. + + +ONSET METHODS + + Available methods: default, energy, hfc, complex, phase, specdiff, kl, mkl, + specflux. + + See aubioonset(1) for details about these methods. + + +SEE ALSO + + aubioonset(1), + aubiopitch(1), + aubiotrack(1), + aubionotes(1), + aubioquiet(1), + and + aubiomfcc(1). + +AUTHOR + + This manual page was written by Paul Brossier . Permission is + granted to copy, distribute and/or modify this document under the terms of + the GNU General Public License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any later version. diff --git a/aubio/doc/aubiomfcc.txt b/aubio/doc/aubiomfcc.txt new file mode 100644 index 00000000..7ef93f78 --- /dev/null +++ b/aubio/doc/aubiomfcc.txt @@ -0,0 +1,71 @@ +NAME + aubiomfcc - a command line tool to compute Mel-Frequency Cepstrum Coefficients + +SYNOPSIS + + aubiomfcc source + aubiomfcc [[-i] source] + [-r rate] [-B win] [-H hop] + [-T time-format] + [-v] [-h] + +DESCRIPTION + + aubiomfcc compute the Mel-Frequency Cepstrum Coefficients (MFCC). + + MFCCs are coefficients that make up for the mel-frequency spectrum, a + representation of the short-term power spectrum of a sound. By default, 13 + coefficients are computed using 40 filters. + + When started with an input source (-i/--input), the coefficients are given on + the console, prefixed by their timestamps in seconds. + +OPTIONS + + This program follows the usual GNU command line syntax, with long options + starting with two dashes (--). A summary of options is included below. + + -i, --input source Run analysis on this audio file. Most uncompressed and + compressed are supported, depending on how aubio was built. + + -r, --samplerate rate Fetch the input source, resampled at the given + sampling rate. The rate should be specified in Hertz as an integer. If 0, + the sampling rate of the original source will be used. Defaults to 0. + + -B, --bufsize win The size of the buffer to analyze, that is the length + of the window used for spectral and temporal computations. Defaults to 512. + + -H, --hopsize hop The number of samples between two consecutive analysis. + Defaults to 256. + + -T, --timeformat format Set time format (samples, ms, seconds). Defaults to + seconds. + + -h, --help Print a short help message and exit. + + -v, --verbose Be verbose. + +REFERENCES + + Using the default parameters, the filter coefficients will be computed + according to Malcolm Slaney's Auditory Toolbox, available at the following + url: + + https://engineering.purdue.edu/~malcolm/interval/1998-010/ (see file mfcc.m) + +SEE ALSO + + aubioonset(1), + aubiopitch(1), + aubiotrack(1), + aubionotes(1), + aubioquiet(1), + and + aubiocut(1). + +AUTHOR + + This manual page was written by Paul Brossier . Permission is + granted to copy, distribute and/or modify this document under the terms of + the GNU General Public License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any later version. diff --git a/aubio/doc/aubionotes.txt b/aubio/doc/aubionotes.txt new file mode 100644 index 00000000..37010565 --- /dev/null +++ b/aubio/doc/aubionotes.txt @@ -0,0 +1,114 @@ +NAME + aubionotes - a command line tool to extract musical notes + +SYNOPSIS + + aubionotes source + aubionotes [[-i] source] + [-r rate] [-B win] [-H hop] + [-O method] [-t thres] [-d drop] + [-p method] [-u unit] [-l thres] + [-T time-format] + [-s sil] + [-j] [-v] [-h] + +DESCRIPTION + + aubionotes attempts to detect notes by looking for note onsets and pitches. + Consecutive events are segmented using onset detection, while a fundamental + frequency extraction algorithm determines their pitch. + + When started with an input source (-i/--input), the detected notes are + printed on standard output, in seconds and midi note number. + + When started without an input source, or with the jack option (-j/--jack), + aubionotes starts in jack mode. + +OPTIONS + + This program follows the usual GNU command line syntax, with long options + starting with two dashes (--). A summary of options is included below. + + -i, --input source Run analysis on this audio file. Most uncompressed and + compressed are supported, depending on how aubio was built. + + -r, --samplerate rate Fetch the input source, resampled at the given + sampling rate. The rate should be specified in Hertz as an integer. If 0, + the sampling rate of the original source will be used. Defaults to 0. + + -B, --bufsize win The size of the buffer to analyze, that is the length + of the window used for spectral and temporal computations. Defaults to 512. + + -H, --hopsize hop The number of samples between two consecutive analysis. + Defaults to 256. + + -O, --onset method The onset detection method to use. See ONSET METHODS + below. Defaults to 'default'. + + -t, --onset-threshold thres Set the threshold value for the onset peak + picking. Typical values are typically within 0.001 and 0.900. Defaults to + 0.1. Lower threshold values imply more onsets detected. Try 0.5 in case of + over-detections. Defaults to 0.3. + + -M, --minioi value Set the minimum inter-onset interval, in seconds, the + shortest interval between two consecutive notes. Defaults to 0.030 + + -p, --pitch method The pitch detection method to use. See PITCH METHODS + below. Defaults to 'default'. + + -u, --pitch-unit unit The unit to be used to print frequencies. Possible + values include midi, bin, cent, and Hz. Defaults to 'Hz'. + + -l, --pitch-tolerance thres Set the tolerance for the pitch detection + algorithm. Typical values range between 0.2 and 0.9. Pitch candidates found + with a confidence less than this threshold will not be selected. The higher + the threshold, the more confidence in the candidates. Defaults to unset. + + -s, --silence sil Set the silence threshold, in dB, under which the pitch + will not be detected. A value of -20.0 would eliminate most onsets but the + loudest ones. A value of -90.0 would select all onsets. Defaults to -90.0. + + -d, --release-drop Set the release drop threshold, in dB. If the level drops + more than this amount since the last note started, the note will be turned + off. Defaults to 10. + + -T, --timeformat format Set time format (samples, ms, seconds). Defaults to + seconds. + + -j, --jack Use Jack input/output. You will need a Jack connection + controller to feed aubio some signal and listen to its output. + + -h, --help Print a short help message and exit. + + -v, --verbose Be verbose. + +ONSET METHODS + + Available methods: default, energy, hfc, complex, phase, specdiff, kl, mkl, + specflux. + + See aubioonset(1) for details about these methods. + +PITCH METHODS + + Available methods: default, schmitt, fcomb, mcomb, specacf, yin, yinfft, + yinfast. + + See aubiopitch(1) for details about these methods. + +SEE ALSO + + aubioonset(1), + aubiopitch(1), + aubiotrack(1), + aubioquiet(1), + aubiomfcc(1), + and + aubiocut(1). + +AUTHOR + + This manual page was written by Paul Brossier . Permission is + granted to copy, distribute and/or modify this document under the terms of + the GNU General Public License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any later version. diff --git a/aubio/doc/aubioonset.txt b/aubio/doc/aubioonset.txt new file mode 100644 index 00000000..e3cb5601 --- /dev/null +++ b/aubio/doc/aubioonset.txt @@ -0,0 +1,163 @@ +NAME + aubioonset - a command line tool to extract musical onset times + +SYNOPSIS + + aubioonset source + aubioonset [[-i] source] [-o sink] + [-r rate] [-B win] [-H hop] + [-O method] [-t thres] + [-T time-format] + [-s sil] [-m] [-f] + [-j] [-N miditap-note] [-V miditap-velo] + [-v] [-h] + +DESCRIPTION + + aubioonset attempts to detect onset times, the beginning of discrete sound + events, in audio signals. + + When started with an input source (-i/--input), the detected onset times are + given on the console, in seconds. + + When started without an input source, or with the jack option (-j/--jack), + aubioonset starts in jack mode. + +OPTIONS + + This program follows the usual GNU command line syntax, with long options + starting with two dashes (--). A summary of options is included below. + + -i, --input source Run analysis on this audio file. Most uncompressed and + compressed are supported, depending on how aubio was built. + + -o, --output sink Save results in this file. The file will be created on + the model of the input file. Onset times are marked by a short wood-block + like sound. + + -r, --samplerate rate Fetch the input source, resampled at the given + sampling rate. The rate should be specified in Hertz as an integer. If 0, + the sampling rate of the original source will be used. Defaults to 0. + + -B, --bufsize win The size of the buffer to analyze, that is the length + of the window used for spectral and temporal computations. Defaults to 512. + + -H, --hopsize hop The number of samples between two consecutive analysis. + Defaults to 256. + + -O, --onset method The onset detection method to use. See ONSET METHODS + below. Defaults to 'default'. + + -t, --onset-threshold thres Set the threshold value for the onset peak + picking. Values are typically in the range [0.001, 0.900]. Lower threshold + values imply more onsets detected. Increasing this threshold should reduce + the number of incorrect detections. Defaults to 0.3. + + -M, --minioi value Set the minimum inter-onset interval, in seconds, the + shortest interval between two consecutive onsets. Defaults to 0.020 + + -s, --silence sil Set the silence threshold, in dB, under which the onset + will not be detected. A value of -20.0 would eliminate most onsets but the + loudest ones. A value of -90.0 would select all onsets. Defaults to -90.0. + + -T, --timeformat format Set time format (samples, ms, seconds). Defaults to + seconds. + + -m, --mix-input Mix source signal to the output signal before writing to + sink. + + -f, --force-overwrite Overwrite output file if it already exists. + + -j, --jack Use Jack input/output. You will need a Jack connection + controller to feed aubio some signal and listen to its output. + + -N, --miditap-note Override note value for MIDI tap. Defaults to 69. + + -V, --miditap-velop Override velocity value for MIDI tap. Defaults to 65. + + -h, --help Print a short help message and exit. + + -v, --verbose Be verbose. + +ONSET METHODS + + Available methods are: + + default Default distance, currently hfc + + Default: 'default' (currently set to hfc) + + energy Energy based distance + + This function calculates the local energy of the input spectral frame. + + hfc High-Frequency content + + This method computes the High Frequency Content (HFC) of the input + spectral frame. The resulting function is efficient at detecting + percussive onsets. + + Paul Masri. Computer modeling of Sound for Transformation and Synthesis of + Musical Signal. PhD dissertation, University of Bristol, UK, 1996. + + complex Complex domain onset detection function + + This function uses information both in frequency and in phase to determine + changes in the spectral content that might correspond to musical onsets. + It is best suited for complex signals such as polyphonic recordings. + + Christopher Duxbury, Mike E. Davies, and Mark B. Sandler. Complex domain + onset detection for musical signals. In Proceedings of the Digital Audio + Effects Conference, DAFx-03, pages 90-93, London, UK, 2003. + + phase Phase based onset detection function + + This function uses information both in frequency and in phase to determine + changes in the spectral content that might correspond to musical onsets. It + is best suited for complex signals such as polyphonic recordings. + + Juan-Pablo Bello, Mike P. Davies, and Mark B. Sandler. Phase-based note + onset detection for music signals. In Proceedings of the IEEE International + Conference on Acoustics Speech and Signal Processing, pages 441­444, + Hong-Kong, 2003. + + specdiff Spectral difference onset detection function + + Jonhatan Foote and Shingo Uchihashi. The beat spectrum: a new approach to + rhythm analysis. In IEEE International Conference on Multimedia and Expo + (ICME 2001), pages 881­884, Tokyo, Japan, August 2001. + + kl Kulback-Liebler onset detection function + + Stephen Hainsworth and Malcom Macleod. Onset detection in music audio + signals. In Proceedings of the International Computer Music Conference + (ICMC), Singapore, 2003. + + mkl Modified Kulback-Liebler onset detection function + + Paul Brossier, ``Automatic annotation of musical audio for interactive + systems'', Chapter 2, Temporal segmentation, PhD thesis, Centre for + Digital music, Queen Mary University of London, London, UK, 2006. + + specflux Spectral flux + + Simon Dixon, Onset Detection Revisited, in ``Proceedings of the 9th + International Conference on Digital Audio Effects'' (DAFx-06), Montreal, + Canada, 2006. + +SEE ALSO + + aubiopitch(1), + aubiotrack(1), + aubionotes(1), + aubioquiet(1), + aubiomfcc(1), + and + aubiocut(1). + +AUTHOR + + This manual page was written by Paul Brossier . Permission is + granted to copy, distribute and/or modify this document under the terms of + the GNU General Public License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any later version. diff --git a/aubio/doc/aubiopitch.txt b/aubio/doc/aubiopitch.txt new file mode 100644 index 00000000..a521ce17 --- /dev/null +++ b/aubio/doc/aubiopitch.txt @@ -0,0 +1,144 @@ +NAME + aubiopitch - a command line tool to extract musical pitch + +SYNOPSIS + + aubiopitch source + aubiopitch [[-i] source] [-o sink] + [-r rate] [-B win] [-H hop] + [-p method] [-u unit] [-l thres] + [-T time-format] + [-s sil] [-f] + [-v] [-h] [-j] + +DESCRIPTION + + aubiopitch attempts to detect the pitch, the perceived height of a musical + note. + + When started with an input source (-i/--input), the detected pitch are + printed on the console, prefixed by a timestamp in seconds. If no pitch + candidate is found, the output is 0. + + When started without an input source, or with the jack option (-j/--jack), + aubiopitch starts in jack mode. + +OPTIONS + + This program follows the usual GNU command line syntax, with long options + starting with two dashes (--). A summary of options is included below. + + -i, --input source Run analysis on this audio file. Most uncompressed and + compressed are supported, depending on how aubio was built. + + -o, --output sink Save results in this file. The file will be created on + the model of the input file. The detected frequency is played at the + detected loudness. + + -r, --samplerate rate Fetch the input source, resampled at the given + sampling rate. The rate should be specified in Hertz as an integer. If 0, + the sampling rate of the original source will be used. Defaults to 0. + + -B, --bufsize win The size of the buffer to analyze, that is the length + of the window used for spectral and temporal computations. Defaults to 2048. + + -H, --hopsize hop The number of samples between two consecutive analysis. + Defaults to 256. + + -p, --pitch method The pitch detection method to use. See PITCH METHODS + below. Defaults to 'default'. + + -u, --pitch-unit unit The unit to be used to print frequencies. Possible + values include midi, bin, cent, and Hz. Defaults to 'Hz'. + + -l, --pitch-tolerance thres Set the tolerance for the pitch detection + algorithm. Typical values range between 0.2 and 0.9. Pitch candidates found + with a confidence less than this threshold will not be selected. The higher + the threshold, the more confidence in the candidates. Defaults to unset. + + -s, --silence sil Set the silence threshold, in dB, under which the onset + will not be detected. A value of -20.0 would eliminate most onsets but the + loudest ones. A value of -90.0 would select all onsets. Defaults to -90.0. + + -T, --timeformat format Set time format (samples, ms, seconds). Defaults to + seconds. + + -m, --mix-input Mix source signal to the output signal before writing to + sink. + + -f, --force-overwrite Overwrite output file if it already exists. + + -j, --jack Use Jack input/output. You will need a Jack connection + controller to feed aubio some signal and listen to its output. + + -h, --help Print a short help message and exit. + + -v, --verbose Be verbose. + +PITCH METHODS + + Available methods are: + + default use the default method + + Currently, the default method is set to yinfft. + + schmitt Schmitt trigger + + This pitch extraction method implements a Schmitt trigger to estimate the + period of a signal. It is computationally very inexpensive, but also very + sensitive to noise. + + fcomb a fast harmonic comb filter + + This pitch extraction method implements a fast harmonic comb filter to + determine the fundamental frequency of a harmonic sound. + + mcomb multiple-comb filter + + This fundamental frequency estimation algorithm implements spectral + flattening, multi-comb filtering and peak histogramming. + + specacf Spectral auto-correlation function + + yin YIN algorithm + + This algorithm was developed by A. de Cheveigne and H. Kawahara and + was first published in: + + De Cheveigné, A., Kawahara, H. (2002) "YIN, a fundamental frequency + estimator for speech and music", J. Acoust. Soc. Am. 111, 1917-1930. + + yinfft Yinfft algorithm + + This algorithm was derived from the YIN algorithm. In this implementation, a + Fourier transform is used to compute a tapered square difference function, + which allows spectral weighting. Because the difference function is tapered, + the selection of the period is simplified. + + Paul Brossier, Automatic annotation of musical audio for interactive systems, + Chapter 3, Pitch Analysis, PhD thesis, Centre for Digital music, Queen Mary + University of London, London, UK, 2006. + + yinfast YIN algorithm (accelerated) + + An optimised implementation of the YIN algorithm, yielding results identical + to the original YIN algorithm, while reducing its computational cost from + O(n^2) to O(n log(n)). + +SEE ALSO + + aubioonset(1), + aubiotrack(1), + aubionotes(1), + aubioquiet(1), + aubiomfcc(1), + and + aubiocut(1). + +AUTHOR + + This manual page was written by Paul Brossier . Permission is + granted to copy, distribute and/or modify this document under the terms of + the GNU General Public License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any later version. diff --git a/aubio/doc/aubioquiet.txt b/aubio/doc/aubioquiet.txt new file mode 100644 index 00000000..94283158 --- /dev/null +++ b/aubio/doc/aubioquiet.txt @@ -0,0 +1,71 @@ +NAME + aubioquiet - a command line tool to extracts quiet and loud regions from a file + +SYNOPSIS + + aubioquiet source + aubioquiet [[-i] source] + [-r rate] [-B win] [-H hop] + [-T time-format] + [-s sil] + [-v] [-h] + +DESCRIPTION + + aubioquiet will print a timestamp each time it detects a new silent region or + a new loud region in a sound file. + + When started with an input source (-i/--input), the detected timestamps are + printed on the console, in seconds. + +OPTIONS + + This program follows the usual GNU command line syntax, with long options + starting with two dashes (--). A summary of options is included below. + + -i, --input source Run analysis on this audio file. Most uncompressed and + compressed are supported, depending on how aubio was built. + + -r, --samplerate rate Fetch the input source, resampled at the given + sampling rate. The rate should be specified in Hertz as an integer. If 0, + the sampling rate of the original source will be used. Defaults to 0. + + -B, --bufsize win The size of the buffer to analyze, that is the length + of the window used for spectral and temporal computations. Defaults to 512. + + -H, --hopsize hop The number of samples between two consecutive analysis. + Defaults to 256. + + -s, --silence sil Set the silence threshold, in dB, under which the pitch + will not be detected. Defaults to -90.0. + + -T, --timeformat format Set time format (samples, ms, seconds). Defaults to + seconds. + + -h, --help Print a short help message and exit. + + -v, --verbose Be verbose. + +EXAMPLE OUTPUT + + NOISY: 28.775330 + + QUIET: 28.914648 + + +SEE ALSO + + aubioonset(1), + aubiopitch(1), + aubiotrack(1), + aubionotes(1), + aubiomfcc(1), + and + aubiocut(1). + +AUTHOR + + This manual page was written by Paul Brossier . Permission + is granted to copy, distribute and/or modify this document under the terms + of the GNU General Public License, Version 3 any later version published + by the Free Software Foundation. diff --git a/aubio/doc/aubiotrack.txt b/aubio/doc/aubiotrack.txt new file mode 100644 index 00000000..4b7aba46 --- /dev/null +++ b/aubio/doc/aubiotrack.txt @@ -0,0 +1,97 @@ +NAME + aubiotrack - a command line tool to extract musical beats from audio signals + +SYNOPSIS + + aubiotrack source + aubiotrack [[-i] source] [-o sink] + [-r rate] [-B win] [-H hop] + [-T time-format] + [-s sil] [-m] + [-j] [-N miditap-note] [-V miditap-velo] + [-v] [-h] + +DESCRIPTION + + aubiotrack attempts to detect beats, the time where one would intuitively be + tapping his foot. + + When started with an input source (-i/--input), the detected beats are given + on the console, in seconds. + + When started without an input source, or with the jack option (-j/--jack), + aubiotrack starts in jack mode. + +OPTIONS + + This program follows the usual GNU command line syntax, with long options + starting with two dashes (--). A summary of options is included below. + + -i, --input source Run analysis on this audio file. Most uncompressed and + compressed are supported, depending on how aubio was built. + + -o, --output sink Save results in this file. The file will be created on the + model of the input file. Beats are marked by a short wood-block like sound. + + -r, --samplerate rate Fetch the input source, resampled at the given + sampling rate. The rate should be specified in Hertz as an integer. If 0, + the sampling rate of the original source will be used. Defaults to 0. + + -B, --bufsize win The size of the buffer to analyze, that is the length + of the window used for spectral and temporal computations. Defaults to 512. + + -H, --hopsize hop The number of samples between two consecutive analysis. + Defaults to 256. + + -s, --silence sil Set the silence threshold, in dB, under which the pitch + will not be detected. A value of -20.0 would eliminate most onsets but the + loudest ones. A value of -90.0 would select all onsets. Defaults to -90.0. + + -m, --mix-input Mix source signal to the output signal before writing to + sink. + + -f, --force-overwrite Overwrite output file if it already exists. + + -j, --jack Use Jack input/output. You will need a Jack connection + controller to feed aubio some signal and listen to its output. + + -N, --miditap-note Override note value for MIDI tap. Defaults to 69. + + -V, --miditap-velop Override velocity value for MIDI tap. Defaults to 65. + + -T, --timeformat format Set time format (samples, ms, seconds). Defaults to + seconds. + + -h, --help Print a short help message and exit. + + -v, --verbose Be verbose. + +BEAT TRACKING METHODS + + Aubio currently implements one the causal beat tracking algorithm designed by + Matthew Davies and described in the following articles: + + Matthew E. P. Davies and Mark D. Plumbley. Causal tempo tracking of audio. + In Proceedings of the International Symposium on Music Information Retrieval + (ISMIR), pages 164­169, Barcelona, Spain, 2004. + + Matthew E. P. Davies, Paul Brossier, and Mark D. Plumbley. Beat tracking + towards automatic musical accompaniment. In Proceedings of the Audio + Engineering Society 118th Convention, Barcelona, Spain, May 2005. + +SEE ALSO + + aubioonset(1), + aubiopitch(1), + aubionotes(1), + aubioquiet(1), + aubiomfcc(1), + and + aubiocut(1). + +AUTHOR + + This manual page was written by Paul Brossier . Permission is + granted to copy, distribute and/or modify this document under the terms of + the GNU General Public License as published by the Free Software Foundation, + either version 3 of the License, or (at your option) any later version. diff --git a/aubio/doc/binaries.rst b/aubio/doc/binaries.rst new file mode 100644 index 00000000..2e649b3b --- /dev/null +++ b/aubio/doc/binaries.rst @@ -0,0 +1,15 @@ +Pre-compiled binaries +--------------------- + +`Pre-compiled binaries `_ +are available for +`macOS `_, +`iOS `_, +and +`windows `_ + +For Windows, aubio is also available from `vcpkg +`_. + +To use aubio in a macOS or iOS application, see :ref:`xcode-frameworks-label`. + diff --git a/aubio/doc/building.rst b/aubio/doc/building.rst new file mode 100644 index 00000000..3a11e4e1 --- /dev/null +++ b/aubio/doc/building.rst @@ -0,0 +1,129 @@ +.. highlight:: bash + +.. _building: + +Building aubio +============== + +.. note:: + To download a prebuilt version of aubio, see :ref:`download`. + +aubio uses `waf`_ to configure, compile, and test the source. +A copy of waf is included in aubio tarball, so all you need is a terminal, +a compiler, and a recent version of python installed. + +.. note:: + Make sure you have all the :ref:`requirements` you want before building. + +Latest release +-------------- + +The **latest stable release** can be downloaded from https://aubio.org/download:: + + $ curl -O http://aubio.org/pub/aubio-.tar.bz2 + $ tar xf aubio-.tar.bz2 + $ cd aubio-/ + +Git repository +-------------- + +The **latest git branch** can be obtained with:: + + $ git clone git://git.aubio.org/git/aubio + $ cd aubio/ + +The following command will fetch the correct `waf`_ version (not included in +aubio's git):: + + $ ./scripts/get_waf.sh + +.. note:: + + Windows users without `Git Bash`_ installed will want to use the following + commands instead: + + .. code:: bash + + $ curl -fsS -o waf https://waf.io/waf-1.8.22 + $ curl -fsS -o waf.bat https://raw.githubusercontent.com/waf-project/waf/master/utils/waf.bat + + +Compiling +--------- + +To compile the C library, examples programs, and tests, run:: + + $ ./waf configure + +Check out the available options using ``./waf configure --help``. Once +you are done with configuration, you can start building:: + + $ ./waf build + +To install the freshly built C library and tools, simply run the following +command:: + + $ sudo ./waf install + +.. note:: + Windows users should simply run ``waf``, without the leading ``./``. For + instance: + + .. code:: bash + + $ waf configure build + + +Running as a user +----------------- + +To use aubio without actually installing, for instance if you don't have root +access to install libaubio on your system, + +On Linux or macOS, sourcing the script ``scripts/setenv_local.sh`` should help:: + + $ source ./scripts/setenv_local.sh + +This script sets ``LD_LIBRARY_PATH``, for libaubio, and ``PYTHONPATH`` for the +python module. + +On Linux, you should be able to set ``LD_LIBRARY_PATH`` with:: + + $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/build/src + +On Mac OS X, a copy or a symlink can be made in ``~/lib``:: + + $ mkdir -p ~/lib + $ ln -sf $PWD/build/src/libaubio*.dylib ~/lib/ + +Note on Mac OS X systems older than El Capitan (10.11), the ``DYLD_LIBRARY_PATH`` +variable can be set as follows:: + + $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/build/src + +Cleaning +-------- + +If you wish to uninstall the files installed by the ``install`` command, use +``uninstall``:: + + $ sudo ./waf uninstall + +To clean the source directory, use the ``clean`` command:: + + $ ./waf clean + +To also forget the options previously passed to the last ``./waf configure`` +invocation, use the ``distclean`` command:: + + $ ./waf distclean + +.. _waf: https://waf.io/ + +.. _Git Bash: https://git-for-windows.github.io/ + +.. _xcode-frameworks-label: + +.. include:: xcode_frameworks.rst + +.. include:: android.rst diff --git a/aubio/doc/cli.rst b/aubio/doc/cli.rst new file mode 100644 index 00000000..5df3b537 --- /dev/null +++ b/aubio/doc/cli.rst @@ -0,0 +1,73 @@ +.. _manpages: + +Command line tools +================== + +The python module comes with the following tools: + + - ``aubio`` estimate and extract descriptors from sound files + - ``aubiocut`` slices sound files at onset or beat timestamps + +More command line tools are included along with the library. + + - ``aubioonset`` outputs the time stamp of detected note onsets + - ``aubiopitch`` attempts to identify a fundamental frequency, or pitch, for + each frame of the input sound + - ``aubiomfcc`` computes Mel-frequency Cepstrum Coefficients + - ``aubiotrack`` outputs the time stamp of detected beats + - ``aubionotes`` emits midi-like notes, with an onset, a pitch, and a duration + - ``aubioquiet`` extracts quiet and loud regions + + +``aubio`` +--------- + +.. literalinclude:: aubio.txt + :language: text + + +``aubiocut`` +-------------- + +.. literalinclude:: aubiocut.txt + :language: text + + +``aubioonset`` +-------------- + +.. literalinclude:: aubioonset.txt + :language: text + +``aubiopitch`` +-------------- + +.. literalinclude:: aubiopitch.txt + :language: text + +``aubiomfcc`` +-------------- + +.. literalinclude:: aubiomfcc.txt + :language: text + +``aubiotrack`` +-------------- + +.. literalinclude:: aubiotrack.txt + :language: text + +``aubionotes`` +-------------- + +.. literalinclude:: aubionotes.txt + :language: text + +``aubioquiet`` +-------------- + +.. literalinclude:: aubioquiet.txt + :language: text + + +.. include:: cli_features.rst diff --git a/aubio/doc/cli_features.rst b/aubio/doc/cli_features.rst new file mode 100644 index 00000000..770a0272 --- /dev/null +++ b/aubio/doc/cli_features.rst @@ -0,0 +1,42 @@ +Command line features +--------------------- + ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| feat vs. prg | onset | pitch | mfcc | track | notes | quiet | cut1 | short options | ++==============+=======+=======+======+=======+=======+=======+======+==================+ +| input | Y | Y | Y | Y | Y | Y | Y | -i | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| output | Y | Y | N | Y | Y | N | Y!1 | -o,-m,-f | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| Hz/buf/hop | Y | Y | Y | Y | Y | Y!2 | Y | -r,-B-,H | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| jack | Y | Y | N | Y | Y | N!3 | N | -j | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| onset | Y | N | N | Y!8 | Y!6 | N | Y | -O,-t,-M | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| pitch | N | Y | N | N | Y!6 | N | N!5 | -p,-u,-l | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| silence | Y | Y | N | Y | Y!7 | Y | N!4 | -s | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| timefmt | Y | Y | Y | Y | Y | Y | ! | -T | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| help | Y | Y | Y | Y | Y | Y | Y | -h | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ +| verbose | Y | Y | Y | Y | Y | Y | Y | -v | ++--------------+-------+-------+------+-------+-------+-------+------+------------------+ + +1. ``aubiocut --output`` is used to specify a directory, not a file. + +2. Option ``--bufsize`` is useless for ``aubioquiet`` + +3. ``aubioquiet`` could have a jack output + +4. Regression, re-add slicing at silences to ``aubiocut`` + +5. ``aubiocut`` could cut on notes + +6. ``aubionotes`` needs onset/pitch setters. + +7. Silence was different for pitch and onset, test. + +8. Some ``aubiotrack`` options should be disabled (minioi, threshold). diff --git a/aubio/doc/conf.py b/aubio/doc/conf.py new file mode 100644 index 00000000..7d491b05 --- /dev/null +++ b/aubio/doc/conf.py @@ -0,0 +1,270 @@ +# -*- coding: utf-8 -*- +# +# aubio documentation build configuration file, created by +# sphinx-quickstart on Sun Jan 26 20:43:11 2014. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# get version using this_version.py +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) +from this_version import get_aubio_version + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('../../python/build/...')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.viewcode', 'sphinx.ext.autodoc', + 'sphinx.ext.napoleon', 'sphinx.ext.intersphinx'] + +autodoc_member_order = 'groupwise' + +intersphinx_mapping = { + 'numpy': ('https://docs.scipy.org/doc/numpy/', None), + } + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'aubio' +copyright = u'2018, Paul Brossier' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. + +version = get_aubio_version()[:3] +# The full version, including alpha/beta/rc tags. +release = get_aubio_version() + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build', + 'statuslinks.rst', + 'download.rst', + 'binaries.rst', + 'debian_packages.rst', + 'building.rst', + 'android.rst', + 'xcode_frameworks.rst', + 'requirements.rst', + 'cli_features.rst', + ] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'colorful' + +# A list of ignored prefixes for module index sorting. +modindex_common_prefix = ['aubio.'] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +#html_theme = 'agogo' +#html_theme = 'default' +#html_theme = 'haiku' +html_theme = 'pyramid' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = [] #['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = False + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'aubiodoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'aubio.tex', u'aubio Documentation', + u'Paul Brossier', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'aubio', u'aubio Documentation', + [u'Paul Brossier'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'aubio', u'aubio Documentation', + u'Paul Brossier', 'aubio', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +def setup(app): + if release.endswith('~alpha'): app.tags.add('devel') diff --git a/aubio/doc/debian_packages.rst b/aubio/doc/debian_packages.rst new file mode 100644 index 00000000..9bc7ab77 --- /dev/null +++ b/aubio/doc/debian_packages.rst @@ -0,0 +1,16 @@ +Debian/Ubuntu packages +---------------------- + +For the latest Debian packages, see https://packages.debian.org/src:aubio. + +For the latest Ubuntu packages, see http://packages.ubuntu.com/src:aubio. + +For the latest version of the packages, see +https://anonscm.debian.org/cgit/collab-maint/aubio.git/. Use +``git-buildpackage`` to build from the git repository. For instance: + +.. code-block:: console + + $ git clone git://anonscm.debian.org/collab-maint/aubio.git + $ cd aubio + $ git buildpackage diff --git a/aubio/doc/develop.rst b/aubio/doc/develop.rst new file mode 100644 index 00000000..3e88987e --- /dev/null +++ b/aubio/doc/develop.rst @@ -0,0 +1,154 @@ +.. _develop: + +Developing with aubio +===================== + +Here is a brief overview of the C library. + +For a more detailed list of available functions, see the `API documentation +`_. + +To report issues, ask questions, and request new features, use `Github Issues +`_ + +Design Basics +------------- + +The library is written in C and is optimised for speed and portability. + +All memory allocations take place in the `new_` methods. Each successful call +to `new_` should have a matching call to `del_` to deallocate the object. + +.. code-block:: C + + // new_ to create an object foobar + aubio_foobar_t * new_aubio_foobar(void * args); + // del_ to delete foobar + void del_aubio_foobar (aubio_foobar_t * foobar); + +The main computations are done in the `_do` methods. + +.. code-block:: C + + // _do to process output = foobar(input) + audio_foobar_do (aubio_foobar_t * foobar, fvec_t * input, cvec_t * output); + +Most parameters can be read and written at any time: + +.. code-block:: C + + // _get_param to get foobar.param + smpl_t aubio_foobar_get_a_parameter (aubio_foobar_t * foobar); + // _set_param to set foobar.param + uint_t aubio_foobar_set_a_parameter (aubio_foobar_t * foobar, smpl_t a_parameter); + +In some case, more functions are available: + +.. code-block:: C + + // non-real time functions + uint_t aubio_foobar_reset(aubio_foobar_t * t); + +Basic Types +----------- + +.. code-block:: C + + // integers + uint_t n = 10; // unsigned + sint_t delay = -90; // signed + + // float + smpl_t a = -90.; // simple precision + lsmp_t f = 0.024; // double precision + + // vector of floats (simple precision) + fvec_t * vec = new_fvec(n); + vec->data[0] = 1; + vec->data[vec->length-1] = 1.; // vec->data has n elements + fvec_print(vec); + del_fvec(vec); + + // complex data + cvec_t * fftgrain = new_cvec(n); + vec->norm[0] = 1.; // vec->norm has n/2+1 elements + vec->phas[n/2] = 3.1415; // vec->phas as well + del_cvec(fftgrain); + + // matrix + fmat_t * mat = new_fmat (height, length); + mat->data[height-1][0] = 1; // mat->data has height rows + mat->data[0][length-1] = 10; // mat->data[0] has length columns + del_fmat(mat); + + +Reading a sound file +-------------------- + +In this example, `aubio_source `_ +is used to read a media file. + +First, define a few variables and allocate some memory. + +.. literalinclude:: ../tests/src/io/test-source.c + :language: C + :lines: 24-26, 30, 32-34 + +.. note:: + With ``samplerate = 0``, ``aubio_source`` will be created with the file's + original samplerate. + +Now for the processing loop: + +.. literalinclude:: ../tests/src/io/test-source.c + :language: C + :lines: 41-45 + +At the end of the processing loop, memory is deallocated: + +.. literalinclude:: ../tests/src/io/test-source.c + :language: C + :lines: 55-58 + +See the complete example: :download:`test-source.c +<../tests/src/io/test-source.c>`. + +Computing a spectrum +-------------------- + +Now let's create a phase vocoder: + +.. literalinclude:: ../tests/src/spectral/test-phasevoc.c + :language: C + :lines: 6-11 + +The processing loop could now look like: + +.. literalinclude:: ../tests/src/spectral/test-phasevoc.c + :language: C + :lines: 27-44 + +Time to clean up the previously allocated memory: + +.. literalinclude:: ../tests/src/spectral/test-phasevoc.c + :language: C + :lines: 47-50 + +See the complete example: :download:`test-phasevoc.c +<../tests/src/spectral/test-phasevoc.c>`. + +.. _doxygen-documentation: + +Doxygen documentation +--------------------- + +The latest version of the API documentation is built using `Doxygen +`_ and is available at: + + https://aubio.org/doc/latest/ + +Contribute +---------- + +Please report any issue and feature request at the `Github issue tracker +`_. Patches and pull-requests welcome! diff --git a/aubio/doc/download.rst b/aubio/doc/download.rst new file mode 100644 index 00000000..ceb33771 --- /dev/null +++ b/aubio/doc/download.rst @@ -0,0 +1,16 @@ +.. _download: + +Downloading aubio +================= + +A number of distributions already include aubio. Check your favorite package +management system, or have a look at the `aubio download page +`_ for more options. + +To use aubio in an android project, see :ref:`android`. + +To compile aubio from source, read :ref:`building`. + +.. include:: binaries.rst + +.. include:: debian_packages.rst diff --git a/aubio/doc/full.cfg b/aubio/doc/full.cfg new file mode 100644 index 00000000..2fd1a42d --- /dev/null +++ b/aubio/doc/full.cfg @@ -0,0 +1,11 @@ +@INCLUDE_PATH = ./doc +@INCLUDE = web.cfg + +OUTPUT_DIRECTORY = full +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +FILE_PATTERNS = *.h *.c +EXCLUDE = +INCLUDE_FILE_PATTERNS = +HIDE_UNDOC_RELATIONS = NO diff --git a/aubio/doc/index.rst b/aubio/doc/index.rst new file mode 100644 index 00000000..5581f73b --- /dev/null +++ b/aubio/doc/index.rst @@ -0,0 +1,76 @@ +Welcome +======= + +aubio is a collection of algorithms and tools to label and transform music and +sounds. It scans or `listens` to audio signals and attempts to detect musical +events. For instance, when a drum is hit, at which frequency is a note, or at +what tempo is a rhythmic melody. + +aubio features include segmenting a sound file before each of its attacks, +performing pitch detection, tapping the beat and producing midi streams from +live audio. + +Quick links +=========== + +* :ref:`python` +* :ref:`manpages` +* :ref:`develop` +* :ref:`building` + +.. only:: devel + + .. include:: statuslinks.rst + +Project pages +============= + +* `Project homepage`_: https://aubio.org +* `aubio on github`_: https://github.com/aubio/aubio +* `aubio on pypi`_: https://pypi.python.org/pypi/aubio +* `Doxygen documentation`_: https://aubio.org/doc/latest/ +* `Mailing lists`_: https://lists.aubio.org + +.. _Project homepage: https://aubio.org +.. _aubio on github: https://github.com/aubio/aubio +.. _aubio on pypi: https://pypi.python.org/pypi/aubio +.. _Doxygen documentation: https://aubio.org/doc/latest/ +.. _Mailing lists: https://lists.aubio.org/ + +* `Travis Continuous integration page `_ +* `Appveyor Continuous integration page `_ +* `Landscape python code validation `_ +* `ReadTheDocs documentation `_ + +Features +======== + +aubio provides several algorithms and routines, including: + +- several onset detection methods +- different pitch detection methods +- tempo tracking and beat detection +- MFCC (mel-frequency cepstrum coefficients) +- FFT and phase vocoder +- up/down-sampling +- digital filters (low pass, high pass, and more) +- spectral filtering +- transient/steady-state separation +- sound file read and write access +- various mathematics utilities for music applications + +The name aubio comes from *audio* with a typo: some errors are likely to be +found in the results. + +Content +======= + +.. toctree:: + :maxdepth: 2 + + installing + python_module + python + cli + develop + about diff --git a/aubio/doc/installing.rst b/aubio/doc/installing.rst new file mode 100644 index 00000000..2044c0b9 --- /dev/null +++ b/aubio/doc/installing.rst @@ -0,0 +1,78 @@ +Installing aubio +================ + +aubio runs on Linux, Windows, macOS, iOS, Android, and probably a few others +operating systems. + +Aubio is available as a C library and as a python module. + +Cheat sheet +----------- + +- :ref:`get aubio latest source code `:: + + # official repo + git clone https://git.aubio.org/aubio/aubio + # mirror + git clone https://github.com/aubio/aubio + # latest release + wget https://aubio.org/pub/aubio-.tar.gz + + +- :ref:`build aubio from source `:: + + # 1. simple + cd aubio + make + + # 2. step by step + ./scripts/get_waf.sh + ./waf configure + ./waf build + sudo ./waf install + +- :ref:`install python-aubio from source `:: + + # from git + pip install git+https://git.aubio.org/aubio/aubio/ + # mirror + pip install git+https://github.com/aubio/aubio/ + # from latest release + pip install https://aubio.org/pub/aubio-latest.tar.bz2 + # from pypi + pip install aubio + # from source directory + cd aubio + pip install -v . + +- :ref:`install python-aubio from a pre-compiled binary `:: + + # conda [osx, linux, win] + conda install -c conda-forge aubio + # .deb (debian, ubuntu) [linux] + sudo apt-get install python3-aubio python-aubio aubio-tools + # brew [osx] + brew install aubio --with-python + +- :ref:`get a pre-compiled version of libaubio `:: + + # .deb (linux) WARNING: old version + sudo apt-get install aubio-tools + + # python module + ./setup.py install + # using pip + pip install . + +- :ref:`check the list of optional dependencies `:: + + # debian / ubuntu + dpkg -l libavcodec-dev libavutil-dev libavformat-dev libswresample-dev \ + libsamplerate-dev libsndfile-dev \ + txt2man doxygen + +.. include:: download.rst + +.. include:: building.rst + +.. include:: requirements.rst diff --git a/aubio/doc/make.bat b/aubio/doc/make.bat new file mode 100644 index 00000000..1ac885c1 --- /dev/null +++ b/aubio/doc/make.bat @@ -0,0 +1,190 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\aubio.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\aubio.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +:end diff --git a/aubio/doc/py_analysis.rst b/aubio/doc/py_analysis.rst new file mode 100644 index 00000000..47d7ab18 --- /dev/null +++ b/aubio/doc/py_analysis.rst @@ -0,0 +1,15 @@ +.. currentmodule:: aubio +.. default-domain:: py + +Analysis +-------- + +.. members of generated classes are not shown + +.. autoclass:: onset + +.. autoclass:: pitch + +.. autoclass:: tempo + +.. autoclass:: notes diff --git a/aubio/doc/py_datatypes.rst b/aubio/doc/py_datatypes.rst new file mode 100644 index 00000000..21fad692 --- /dev/null +++ b/aubio/doc/py_datatypes.rst @@ -0,0 +1,43 @@ +.. default-domain:: py +.. currentmodule:: aubio + +Data-types +---------- + +This section contains the documentation for :data:`float_type`, +:class:`fvec`, and :class:`cvec`. + +.. defined in rst only + +.. data:: float_type + + A string constant describing the floating-point representation used in + :class:`fvec`, :class:`cvec`, and elsewhere in this module. + + Defaults to `"float32"`. + + If `aubio` was built specifically with the option `--enable-double`, this + string will be defined to `"float64"`. See :ref:`py-doubleprecision` in + :ref:`python-install` for more details on building aubio in double + precision mode. + + .. rubric:: Examples + + >>> aubio.float_type + 'float32' + >>> numpy.zeros(10).dtype + 'float64' + >>> aubio.fvec(10).dtype + 'float32' + >>> np.arange(10, dtype=aubio.float_type).dtype + 'float32' + +.. defined in `python/lib/aubio/__init__.py` + +.. autoclass:: fvec + :members: + +.. defined in `python/ext/py-cvec.h` + +.. autoclass:: cvec + :members: diff --git a/aubio/doc/py_examples.rst b/aubio/doc/py_examples.rst new file mode 100644 index 00000000..cd20901e --- /dev/null +++ b/aubio/doc/py_examples.rst @@ -0,0 +1,42 @@ +.. default-domain:: py +.. currentmodule:: aubio + +Examples +-------- + +Below is a short selection of examples using the aubio module. + +Read a sound file +................. + +Here is a simple script, :download:`demo_source_simple.py +<../python/demos/demo_source_simple.py>` that reads all the samples from a +media file using :class:`source`: + +.. literalinclude:: ../python/demos/demo_source_simple.py + :language: python + +Filter a sound file +................... + +Here is another example, :download:`demo_filter.py +<../python/demos/demo_filter.py>`, which applies a filter to a sound file +and writes the filtered signal in another file: + +* read audio samples from a file with :class:`source` + +* filter them using an `A-weighting `_ + filter using :class:`digital_filter` + +* write the filtered samples to a new file with :class:`sink`. + +.. literalinclude:: ../python/demos/demo_filter.py + :language: python + +More examples +............. + +For more examples showing how to use other components of the module, see +the `python demos folder`_. + +.. _python demos folder: https://github.com/aubio/aubio/blob/master/python/demos diff --git a/aubio/doc/py_io.rst b/aubio/doc/py_io.rst new file mode 100644 index 00000000..6be251f4 --- /dev/null +++ b/aubio/doc/py_io.rst @@ -0,0 +1,118 @@ +.. currentmodule:: aubio +.. default-domain:: py + +Input/Output +------------ + +This section contains the documentation for two classes: +:class:`source`, to read audio samples from files, and :class:`sink`, +to write audio samples to disk. + +.. defined in `python/ext` + +.. + Note: __call__ docstrings of objects defined in C must be written + specifically in RST, since there is no known way to add them to + their C implementation. + +.. + TODO: remove special-members documentation + +.. defined in py-source.c + +.. autoclass:: source + :members: + :special-members: __enter__ + :no-special-members: + + .. function:: __call__() + + Read at most `hop_size` new samples from self, return them in + a tuple with the number of samples actually read. + + The returned tuple contains: + + - a vector of shape `(hop_size,)`, filled with the `read` next + samples available, zero-padded if `read < hop_size` + - `read`, an integer indicating the number of samples read + + If opened with more than one channel, the frames will be + down-mixed to produce the new samples. + + :returns: A tuple of one array of samples and one integer. + :rtype: (array, int) + + .. seealso:: :meth:`__next__` + + .. rubric:: Example + + >>> src = aubio.source('stereo.wav') + >>> while True: + ... samples, read = src() + ... if read < src.hop_size: + ... break + + .. function:: __next__() + + Read at most `hop_size` new frames from self, return them in + an array. + + If source was opened with one channel, next(self) returns + an array of shape `(read,)`, where `read` is the actual + number of frames read (`0 <= read <= hop_size`). + + If `source` was opened with more then one channel, the + returned arrays will be of shape `(channels, read)`, where + `read` is the actual number of frames read (`0 <= read <= + hop_size`). + + :return: A tuple of one array of frames and one integer. + :rtype: (array, int) + + .. seealso:: :meth:`__call__` + + .. rubric:: Example + + >>> for frames in aubio.source('song.flac') + ... print(samples.shape) + + .. function:: __iter__() + + Implement iter(self). + + .. seealso:: :meth:`__next__` + + .. function:: __enter__() + + Implement context manager interface. The file will be opened + upon entering the context. See `with` statement. + + .. rubric:: Example + + >>> with aubio.source('loop.ogg') as src: + ... src.uri, src.samplerate, src.channels + + .. function:: __exit__() + + Implement context manager interface. The file will be closed + before exiting the context. See `with` statement. + + .. seealso:: :meth:`__enter__` + +.. py-sink.c + TODO: remove special-members documentation + +.. autoclass:: aubio.sink + :members: + + .. function:: __call__(vec, length) + + Write `length` samples from `vec`. + + :param array vec: input vector to write from + :param int length: number of samples to write + :example: + + >>> with aubio.sink('foo.wav') as snk: + ... snk(aubio.fvec(1025), 1025) + diff --git a/aubio/doc/py_spectral.rst b/aubio/doc/py_spectral.rst new file mode 100644 index 00000000..1697041c --- /dev/null +++ b/aubio/doc/py_spectral.rst @@ -0,0 +1,34 @@ +.. currentmodule:: aubio +.. default-domain:: py + +.. members of generated classes are not yet documented + +Spectral features +----------------- + +This section contains the documentation for: + +- :class:`dct` +- :class:`fft` +- :class:`filterbank` +- :class:`mfcc` +- :class:`pvoc` +- :class:`specdesc` +- :class:`tss` + +.. autoclass:: dct + +.. autoclass:: fft + :members: + +.. autoclass:: filterbank + :members: + +.. autoclass:: mfcc + +.. autoclass:: pvoc + :members: + +.. autoclass:: specdesc + +.. autoclass:: tss diff --git a/aubio/doc/py_synth.rst b/aubio/doc/py_synth.rst new file mode 100644 index 00000000..d7afb24b --- /dev/null +++ b/aubio/doc/py_synth.rst @@ -0,0 +1,9 @@ +.. currentmodule:: aubio +.. default-domain:: py + +Synthesis +--------- + +.. autoclass:: sampler + +.. autoclass:: wavetable diff --git a/aubio/doc/py_temporal.rst b/aubio/doc/py_temporal.rst new file mode 100644 index 00000000..9a0bb39f --- /dev/null +++ b/aubio/doc/py_temporal.rst @@ -0,0 +1,8 @@ +.. currentmodule:: aubio +.. default-domain:: py + +Digital filters +--------------- + +.. autoclass:: digital_filter + :members: diff --git a/aubio/doc/py_utils.rst b/aubio/doc/py_utils.rst new file mode 100644 index 00000000..94debf88 --- /dev/null +++ b/aubio/doc/py_utils.rst @@ -0,0 +1,84 @@ +.. default-domain:: py +.. currentmodule:: aubio + +Utilities +--------- + +This section documents various helper functions included in the aubio library. + +Note name conversion +.................... + +.. midiconv.py + +.. autofunction:: note2midi + +.. autofunction:: midi2note + +.. autofunction:: freq2note + +.. autofunction:: note2freq + +Frequency conversion +.................... + +.. python/ext/ufuncs.c + +.. autofunction:: freqtomidi + +.. autofunction:: miditofreq + +.. python/ext/py-musicutils.h + +.. autofunction:: meltohz + +.. autofunction:: hztomel + +.. python/ext/aubiomodule.c + +.. autofunction:: bintomidi +.. autofunction:: miditobin +.. autofunction:: bintofreq +.. autofunction:: freqtobin + +Audio file slicing +.................. + +.. slicing.py + +.. autofunction:: slice_source_at_stamps + +Windowing +......... + +.. python/ext/py-musicutils.h + +.. autofunction:: window + +Audio level detection +..................... + +.. python/ext/py-musicutils.h + +.. autofunction:: level_lin +.. autofunction:: db_spl +.. autofunction:: silence_detection +.. autofunction:: level_detection + +Vector utilities +................ + +.. python/ext/aubiomodule.c + +.. autofunction:: alpha_norm +.. autofunction:: zero_crossing_rate +.. autofunction:: min_removal + +.. python/ext/py-musicutils.h + +.. autofunction:: shift +.. autofunction:: ishift + +.. python/ext/ufuncs.c + +.. autofunction:: unwrap2pi diff --git a/aubio/doc/python.rst b/aubio/doc/python.rst new file mode 100644 index 00000000..cc912441 --- /dev/null +++ b/aubio/doc/python.rst @@ -0,0 +1,59 @@ +.. make sure our default-domain is python here +.. default-domain:: py + +.. set current module +.. currentmodule:: aubio + +.. + we follow numpy type docstrings, see: + https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard +.. + note: we do not import aubio's docstring, which will be displayed from an + interpreter. + +.. .. automodule:: aubio + + +.. _python: + +Python documentation +==================== + +This module provides a number of classes and functions for the analysis of +music and audio signals. + +Contents +-------- + +.. toctree:: + :maxdepth: 1 + + py_datatypes + py_io + py_temporal + py_spectral + py_analysis + py_synth + py_utils + py_examples + +Introduction +------------ + +This document provides a reference guide. For documentation on how to +install aubio, see :ref:`python-install`. + +Examples included in this guide and within the code are written assuming +both `aubio` and `numpy`_ have been imported: + +.. code-block:: python + + >>> import aubio + >>> import numpy as np + +`Changed in 0.4.8` : Prior to this version, almost no documentation was +provided with the python module. This version adds documentation for some +classes, including :class:`fvec`, :class:`cvec`, :class:`source`, and +:class:`sink`. + +.. _numpy: https://www.numpy.org diff --git a/aubio/doc/python_module.rst b/aubio/doc/python_module.rst new file mode 100644 index 00000000..cd04f18b --- /dev/null +++ b/aubio/doc/python_module.rst @@ -0,0 +1,103 @@ +.. _python-install: + +Installing aubio for Python +=========================== + +aubio is available as a package for Python 2.7 and Python 3. The aubio +extension is written C using the `Python/C`_ and the `Numpy/C`_ APIs. + +.. _Python/C: https://docs.python.org/c-api/index.html +.. _Numpy/C: https://docs.scipy.org/doc/numpy/reference/c-api.html + +For general documentation on how to install Python packages, see `Installing +Packages`_. + +Installing aubio with pip +------------------------- + +aubio can be installed from `PyPI`_ using ``pip``: + +.. code-block:: console + + $ pip install aubio + +See also `Installing from PyPI`_ for general documentation. + +.. note:: + + aubio is currently a `source only`_ package, so you will need a compiler to + install it from `PyPI`_. See also `Installing aubio with conda`_ for + pre-compiled binaries. + +.. _PyPI: https://pypi.python.org/pypi/aubio +.. _Installing Packages: https://packaging.python.org/tutorials/installing-packages/ +.. _Installing from PyPI: https://packaging.python.org/tutorials/installing-packages/#installing-from-pypi +.. _source only: https://packaging.python.org/tutorials/installing-packages/#source-distributions-vs-wheels + +Installing aubio with conda +--------------------------- + +`Conda packages`_ are available through the `conda-forge`_ channel for Linux, +macOS, and Windows: + +.. code-block:: console + + $ conda config --add channels conda-forge + $ conda install -c conda-forge aubio + +.. _Conda packages: https://anaconda.org/conda-forge/aubio +.. _conda-forge: https://conda-forge.org/ + +.. _py-doubleprecision: + +Double precision +---------------- + +This module can be compiled in double-precision mode, in which case the +default type for floating-point samples will be 64-bit. The default is +single precision mode (32-bit, recommended). + +To build the aubio module with double precision, use the option +`--enable-double` of the `build_ext` subcommand: + +.. code:: bash + + $ ./setup.py clean + $ ./setup.py build_ext --enable-double + $ pip install -v . + +**Note**: If linking against `libaubio`, make sure the library was also +compiled in :ref:`doubleprecision` mode. + + +Checking your installation +-------------------------- + +Once the python module is installed, its version can be checked with: + +.. code-block:: console + + $ python -c "import aubio; print(aubio.version, aubio.float_type)" + +The command line `aubio` is also installed: + +.. code-block:: console + + $ aubio -h + + +Python tests +------------ + +A number of Python tests are provided in the `python/tests`_ folder. To run +them, install `pytest`_ and run it from the aubio source directory: + +.. code-block:: console + + $ pip install pytest + $ git clone https://git.aubio.org/aubio/aubio + $ cd aubio + $ pytest + +.. _python/tests: https://github.com/aubio/aubio/blob/master/python/tests +.. _pytest: https://pytest.org diff --git a/aubio/doc/requirements.rst b/aubio/doc/requirements.rst new file mode 100644 index 00000000..905855f5 --- /dev/null +++ b/aubio/doc/requirements.rst @@ -0,0 +1,375 @@ +.. _requirements: + +Build options +============= + +If built without any external dependencies aubio can be somewhat useful, for +instance to read, process, and write simple wav files. + +To support more media input formats and add more features to aubio, you can use +one or all of the following `external libraries`_. + +You may also want to know more about the `other options`_ and the `platform +notes`_ + +The configure script will automatically for these extra libraries. To make sure +the library or feature is used, pass the `--enable-flag` to waf. To disable +this feature, use `--disable-feature`. + +To find out more about the build commands, use the `--verbose` option. + +External libraries +------------------ + +External libraries are checked for using ``pkg-config``. Set the +``PKG_CONFIG_PATH`` environment variable if you have them installed in an +unusual location. + + +.. note:: + + If ``pkg-config`` is not found in ``PATH``, the configure step will + succeed, but none of the external libraries will be used. + +To build aubio with no external libraries, use the ``--nodeps`` build option. + +Media libraries +--------------- + +libav +..... + + `libav.org `_, open source audio and video processing + tools. + +If all of the following libraries are found, they will be used to compile +``aubio_source_avcodec``. so that ``aubio_source`` will be able to decode audio +from all formats supported by `libav +`_. + +* libavcodec +* libavformat +* libavutil +* libswresample + +To enable this option, configure with ``--enable-avcodec``. The build will then +failed if the required libraries are not found. To disable this option, +configure with ``--disable-avcodec`` + + +libsndfile +.......... + + `libsndfile `_, a C library for reading + and writing sampled sound files. + +With libsndfile built in, ``aubio_source_sndfile`` will be built in and used by +``aubio_source``. + +To enable this option, configure with ``--enable-sndfile``. The build will then +fail if the required library is not found. To disable this option, configure +with ``--disable-sndfile`` + +libsamplerate +............. + + `libsamplerate `_, a sample rate converter for + audio. + +With libsamplerate built in, ``aubio_source_sndfile`` will support resampling, +and ``aubio_resample`` will be fully functional. + +To enable this option, configure with ``--enable-samplerate``. The build will +then fail if the required library is not found. To disable this option, +configure with ``--disable-samplerate`` + +Optimisation libraries +---------------------- + +libfftw3 +........ + + `FFTW `_, a C subroutine for computing the discrete Fourier + transform + +With libfftw3 built in, ``aubio_fft`` will use `FFTW`_ to +compute Fast Fourier Transform (FFT), allowing aubio to compute FFT on length +that are not a power of 2. + +To enable this option, configure with ``--enable-fftw3``. The build will +then fail if the required library is not found. To disable this option, +configure with ``--disable-fftw3`` + +blas +.... + +On macOs/iOS, `blas +`_ are made +available through the Accelerate framework. + +On Linux, they can be enabled with ``--enable-blas``. On Debian (etch), +`atlas`_, `openblas`_, and `libblas`_ have been successfully tested. + +When enabled, ``waf`` will check for the current blas configuration by running +``pkg-config --libs blas``. Depending of the library path returned by +``pkg-config``, different headers will be searched for. + +.. note:: + + On Debian systems, `multiple versions of BLAS and LAPACK + `_ can be + installed. To configure which libblas is being used: + + .. code-block:: console + + $ sudo update-alternatives --config libblas.so + +.. + Expected pkg-config output for each alternative: + /usr/lib/atlas-base/atlas/libblas.so + -L/usr/lib/atlas-base/atlas -lblas + /usr/lib/openblas-base/libblas.so + -L/usr/lib/openblas-base -lblas + /usr/lib/libblas/libblas.so + -lblas + +atlas +..... + +`ATLAS BLAS APIs `_ will be used the path +returned by ``pkg-config --libs blas`` contains ``atlas``. + +.. + ```` will be included. + +Example: + +.. code-block:: console + + $ pkg-config --libs blas + -L/usr/lib/atlas-base/atlas -lblas + $ ./waf configure --enable-atlas + [...] + Checking for 'blas' : yes + Checking for header atlas/cblas.h : yes + +openblas +........ + +`OpenBlas libraries `_ will be used when the output +of ``pkg-config --libs blas`` contains 'openblas', + +.. + ```` will be included. + +Example: + +.. code-block:: console + + $ pkg-config --libs blas + -L/usr/lib/openblas-base -lblas + $ ./waf configure --enable-atlas + [...] + Checking for 'blas' : yes + Checking for header openblas/cblas.h : yes + +libblas +....... + +`Netlib's libblas (LAPACK) `_ will be used if +no specific library path is specified by ``pkg-config`` + +.. + ```` will be included. + +Example: + +.. code-block:: console + + $ pkg-config --libs blas + -lblas + $ ./waf configure --enable-atlas + [...] + Checking for 'blas' : yes + Checking for header cblas.h : yes + + +Platform notes +-------------- + +On all platforms, you will need to have installed: + + - a compiler (gcc, clang, msvc, ...) + - python (any version >= 2.7, including 3.x) + - a terminal to run command lines in + +Linux +..... + +The following `External libraries`_ will be used if found: `libav`_, +`libsamplerate`_, `libsndfile`_, `libfftw3`_. + +macOS +..... + +The following system frameworks will be used on Mac OS X systems: + + - `Accelerate `_ to compute + FFTs and other vectorized operations optimally. + + - `CoreAudio `_ and + `AudioToolbox `_ to + decode audio from files and network streams. + +.. note:: + + To build a fat binary for both ``i386`` and ``x86_64``, use ``./waf configure + --enable-fat``. + +The following `External libraries`_ will also be checked: `libav`_, +`libsamplerate`_, `libsndfile`_, `libfftw3`_. + +To build a fat binary on a darwin like system (macOS, tvOS, appleOS, ...) +platforms, configure with ``--enable-fat``. + +Windows +....... + +To use a specific version of the compiler, ``--msvc_version``. To build for a +specific architecture, use ``--msvc_target``. For instance, to build aubio +for ``x86`` using ``msvc 12.0``, use: + +.. code:: bash + + waf configure --msvc_version='msvc 12.0' --msvc_target='x86' + + +The following `External libraries`_ will be used if found: `libav`_, +`libsamplerate`_, `libsndfile`_, `libfftw3`_. + +iOS +... + +The following system frameworks will be used on iOS and iOS Simulator. + + - `Accelerate `_ to compute + FFTs and other vectorized operations optimally. + + - `CoreAudio `_ and + `AudioToolbox `_ to + decode audio from files and network streams. + +To build aubio for iOS, configure with ``--with-target-platform=ios``. For the +iOS Simulator, use ``--with-target-platform=iosimulator`` instead. + +By default, aubio is built with the following flags on iOS: + +.. code:: bash + + CFLAGS="-fembed-bitcode -arch arm64 -arch armv7 -arch armv7s -miphoneos-version-min=6.1" + +and on iOS Simulator: + +.. code:: + + CFLAGS="-arch i386 -arch x86_64 -mios-simulator-version-min=6.1" + +Set ``CFLAGS`` and ``LINKFLAGS`` to change these default values, or edit +``wscript`` directly. + +Other options +------------- + +Some additional options can be passed to the configure step. For the complete +list of options, run: + +.. code:: bash + + $ ./waf --help + +Here is an example of a custom command: + +.. code:: bash + + $ ./waf --verbose configure build install \ + --enable-avcodec --enable-wavread --disable-wavwrite \ + --enable-sndfile --enable-samplerate --enable-docs \ + --destdir $PWD/build/destdir --testcmd="echo %s" \ + --prefix=/opt --libdir=/opt/lib/multiarch \ + --manpagesdir=/opt/share/man \ + uninstall clean distclean dist distcheck + +.. _doubleprecision: + +Double precision +................ + +The datatype used to store real numbers in aubio is named `smpl_t`. By default, +`smpl_t` is defined as `float`, a `single-precision format +`_ +(32-bit). Some algorithms require a floating point representation with a +higher precision, for instance to prevent arithmetic underflow in recursive +filters. In aubio, these special samples are named `lsmp_t` and defined as +`double` by default (64-bit). + +Sometimes it may be useful to compile aubio in `double-precision`, for instance +to reproduce numerical results obtained with 64-bit routines. In this case, +`smpl_t` will be defined as `double`. + +The following table shows how `smpl_t` and `lsmp_t` are defined in single- and +double-precision modes: + +.. list-table:: Single and double-precision modes + :align: center + + * - + - single + - double + * - `smpl_t` + - ``float`` + - ``double`` + * - `lsmp_t` + - ``double`` + - ``long double`` + +To compile aubio in double precision mode, configure with ``--enable-double``. + +To compile in single-precision mode (default), use ``--disable-double`` (or +simply none of these two options). + +Disabling the tests +................... + +In some case, for instance when cross-compiling, unit tests should not be run. +Option ``--notests`` can be used for this purpose. The tests will not be +executed, but the binaries will be compiled, ensuring that linking against +libaubio works as expected. + +.. note:: + + The ``--notests`` option should be passed to both ``build`` and ``install`` + targets, otherwise waf will try to run them. + +Edit wscript +............ + +Many of the options are gathered in the file `wscript`. a good starting point +when looking for additional options. + +.. _build_docs: + +Building the docs +----------------- + +If the following command line tools are found, the documentation will be built +built: + + - `doxygen `_ to build the :ref:`doxygen-documentation`. + - `txt2man `_ to build the :ref:`manpages` + - `sphinx `_ to build this document + +These tools are searched for in the current ``PATH`` environment variable. +By default, the documentation is built only if the tools are found. + +To disable the documentation, configure with ``--disable-docs``. To build with +the documentation, configure with ``--enable-docs``. diff --git a/aubio/doc/statuslinks.rst b/aubio/doc/statuslinks.rst new file mode 100644 index 00000000..b9e6719f --- /dev/null +++ b/aubio/doc/statuslinks.rst @@ -0,0 +1,20 @@ +Current status +============== + +.. image:: https://travis-ci.org/aubio/aubio.svg?branch=master + :target: https://travis-ci.org/aubio/aubio + :alt: Travis build status + +.. image:: https://ci.appveyor.com/api/projects/status/f3lhy3a57rkgn5yi?svg=true + :target: https://ci.appveyor.com/project/piem/aubio/ + :alt: Appveyor build status + +.. image:: https://readthedocs.org/projects/aubio/badge/?version=latest + :target: https://aubio.readthedocs.io/en/latest/?badge=latest + :alt: Documentation status + +.. image:: https://img.shields.io/github/commits-since/aubio/aubio/latest.svg + :target: https://github.com/aubio/aubio + :alt: Commits since last release + + diff --git a/aubio/doc/web.cfg b/aubio/doc/web.cfg new file mode 100644 index 00000000..ccd6233a --- /dev/null +++ b/aubio/doc/web.cfg @@ -0,0 +1,2464 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = aubio + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = "latest" + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = web + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = ../src + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ../src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. + +FILE_PATTERNS = *.h + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = ../src/aubio_priv.h \ + ../src/mathutils.h \ + ../src/io/ioutils.h \ + ../src/io/audio_unit.h \ + ../src/io/source_sndfile.h \ + ../src/io/source_apple_audio.h \ + ../src/io/source_avcodec.h \ + ../src/io/source_wavread.h \ + ../src/io/sink_sndfile.h \ + ../src/io/sink_apple_audio.h \ + ../src/io/sink_wavwrite.h \ + ../src/onset/peakpicker.h \ + ../src/pitch/pitchmcomb.h \ + ../src/pitch/pitchyin.h \ + ../src/pitch/pitchyinfft.h \ + ../src/pitch/pitchyinfast.h \ + ../src/pitch/pitchschmitt.h \ + ../src/pitch/pitchfcomb.h \ + ../src/pitch/pitchspecacf.h \ + ../src/tempo/beattracking.h \ + ../src/utils/hist.h \ + ../src/utils/scale.h \ + ../src/utils.h + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = ../examples \ + ../tests/src + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.aubio.aubio + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.aubio.aubio.Maintainer + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.aubio.aubio + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = YES + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /