changeset 365:112766f4c34b

Merge
author Chris Cannam
date Wed, 07 Oct 2015 16:51:54 +0100
parents 78ed74fa177b (diff) 1d6b5e0bed94 (current diff)
children 5d0a2ebb4d17
files
diffstat 6 files changed, 177 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Mon Sep 07 16:42:27 2015 +0100
+++ b/.hgignore	Wed Oct 07 16:51:54 2015 +0100
@@ -6,3 +6,9 @@
 *.bak
 *.so
 
+*.obj
+*.tlog
+*.pdb
+*.idb
+*.lib
+*.dll
--- a/.hgsubstate	Mon Sep 07 16:42:27 2015 +0100
+++ b/.hgsubstate	Wed Oct 07 16:51:54 2015 +0100
@@ -1,3 +1,3 @@
 7a48704e9a0fac1486240f9f7b7e31436a588064 bqvec
-554d7e86608a5ee72b82e6686dd45e67985561d7 constant-q-cpp
+100430c32a259ac2f80776da0f8484029dc705c1 constant-q-cpp
 d25a2e91e9d84aaff25e5d746398232d182d127d flattendynamics
--- a/.hgtags	Mon Sep 07 16:42:27 2015 +0100
+++ b/.hgtags	Wed Oct 07 16:51:54 2015 +0100
@@ -14,3 +14,5 @@
 eee4c7fd15abdd0142cef229f87f81f46845f471 mirex2015
 eee4c7fd15abdd0142cef229f87f81f46845f471 mirex2015
 071fd5e7b168a77b26883614fc786e487f4907ff mirex2015
+b1dc04c74671bfc56e5fa94272aa1a3dda941414 v1.1
+e24a6d8f00a476604a321c3362b03b81d31b6218 v1.1.0.1_win32
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/silvet.vcxproj	Wed Oct 07 16:51:54 2015 +0100
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{047E24B5-2891-4DAD-A094-B853DDF56867}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SILVET_EXPORTS;USE_OWN_ALIGNED_MALLOC=1;kiss_fft_scalar=double;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\vamp-plugin-sdk;.;.\constant-q-cpp;.\constant-q-cpp\cq;.\flattendynamics;.\bqvec;.\constant-q-cpp\src\ext\kissfft;.\constant-q-cpp\src\ext\kissfft\tools;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <TargetMachine>MachineX86</TargetMachine>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SILVET_EXPORTS;USE_OWN_ALIGNED_MALLOC=1;kiss_fft_scalar=double;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <AdditionalIncludeDirectories>..\vamp-plugin-sdk;.;.\constant-q-cpp;.\constant-q-cpp\cq;.\flattendynamics;.\bqvec;.\constant-q-cpp\src\ext\kissfft;.\constant-q-cpp\src\ext\kissfft\tools;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <TargetMachine>MachineX86</TargetMachine>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>..\vamp-plugin-sdk\build\Release\VampPluginSDK.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalOptions>/EXPORT:vampGetPluginDescriptor %(AdditionalOptions)</AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="bqvec\src\Allocators.cpp" />
+    <ClCompile Include="bqvec\src\VectorOpsComplex.cpp" />
+    <ClCompile Include="constant-q-cpp\src\ConstantQ.cpp" />
+    <ClCompile Include="constant-q-cpp\src\CQInverse.cpp" />
+    <ClCompile Include="constant-q-cpp\src\CQKernel.cpp" />
+    <ClCompile Include="constant-q-cpp\src\CQSpectrogram.cpp" />
+    <ClCompile Include="constant-q-cpp\src\dsp\FFT.cpp" />
+    <ClCompile Include="constant-q-cpp\src\dsp\KaiserWindow.cpp" />
+    <ClCompile Include="constant-q-cpp\src\dsp\MathUtilities.cpp" />
+    <ClCompile Include="constant-q-cpp\src\dsp\Resampler.cpp" />
+    <ClCompile Include="constant-q-cpp\src\dsp\SincWindow.cpp" />
+    <ClCompile Include="constant-q-cpp\src\ext\kissfft\kiss_fft.c" />
+    <ClCompile Include="constant-q-cpp\src\ext\kissfft\tools\kiss_fftr.c" />
+    <ClCompile Include="constant-q-cpp\src\Pitch.cpp" />
+    <ClCompile Include="flattendynamics\flattendynamics-ladspa.cpp" />
+    <ClCompile Include="src\EM.cpp" />
+    <ClCompile Include="src\Instruments.cpp" />
+    <ClCompile Include="src\libmain.cpp" />
+    <ClCompile Include="src\LiveInstruments.cpp" />
+    <ClCompile Include="src\Silvet.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="bqvec\bqvec\Allocators.h" />
+    <ClInclude Include="bqvec\bqvec\ComplexTypes.h" />
+    <ClInclude Include="bqvec\bqvec\Restrict.h" />
+    <ClInclude Include="bqvec\bqvec\VectorOps.h" />
+    <ClInclude Include="bqvec\bqvec\VectorOpsComplex.h" />
+    <ClInclude Include="bqvec\test\TestVectorOps.h" />
+    <ClInclude Include="constant-q-cpp\cq\ConstantQ.h" />
+    <ClInclude Include="constant-q-cpp\cq\CQBase.h" />
+    <ClInclude Include="constant-q-cpp\cq\CQInverse.h" />
+    <ClInclude Include="constant-q-cpp\cq\CQKernel.h" />
+    <ClInclude Include="constant-q-cpp\cq\CQParameters.h" />
+    <ClInclude Include="constant-q-cpp\cq\CQSpectrogram.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\FFT.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\KaiserWindow.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\MathUtilities.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\nan-inf.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\pi.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\Resampler.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\SincWindow.h" />
+    <ClInclude Include="constant-q-cpp\src\dsp\Window.h" />
+    <ClInclude Include="constant-q-cpp\src\ext\kissfft\kiss_fft.h" />
+    <ClInclude Include="constant-q-cpp\src\ext\kissfft\tools\kiss_fftr.h" />
+    <ClInclude Include="constant-q-cpp\src\Pitch.h" />
+    <ClInclude Include="data\include\templates.h" />
+    <ClInclude Include="flattendynamics\flattendynamics-ladspa.h" />
+    <ClInclude Include="src\EM.h" />
+    <ClInclude Include="src\Instruments.h" />
+    <ClInclude Include="src\LiveInstruments.h" />
+    <ClInclude Include="src\MedianFilter.h" />
+    <ClInclude Include="src\Silvet.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
--- a/src/EM.cpp	Mon Sep 07 16:42:27 2015 +0100
+++ b/src/EM.cpp	Wed Oct 07 16:51:54 2015 +0100
@@ -245,6 +245,8 @@
         }
     }
 
+    deallocate(contributions);
+    
     if (m_pitchSparsity != 1.0) {
         for (int n = 0; n < m_noteCount; ++n) {
             m_updatePitches[n] = 
--- a/src/Silvet.cpp	Mon Sep 07 16:42:27 2015 +0100
+++ b/src/Silvet.cpp	Wed Oct 07 16:51:54 2015 +0100
@@ -1020,7 +1020,12 @@
         active[j] = strength;
 
         if (shiftCount > 1) {
-            activeShifts[j] = bestShifts[j];
+            if (!bestShifts.empty()) {
+                activeShifts[j] = bestShifts[j];
+            } else {
+                // can happen if column was below threshold
+                activeShifts[j] = 0;
+            }
         }
     }