Skip to content

Commit

Permalink
Merge branch 'pre-max6.1-compatible'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHarker committed Jul 15, 2022
2 parents 2fa3efb + 0e466a0 commit 8c728d2
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 30 deletions.
16 changes: 16 additions & 0 deletions descriptors/descriptors~/Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ General and Small

* Confirm the changes to returns for invalid/empty frames etc.
* Check all arguments and defaults (and note where they've changed)
* Check all get_params!!
* How to deal with padding


Expand All @@ -98,3 +99,18 @@ Bug fixes [no questions]:
Bug fixes [questions]:
[3] contents - spectral_peaks / inharmonicity / roughness - spurious peaks
[2] sfm / spectral_crest (should there be a power option and how to convert the final ratio? - should sfm report in db?)

Speeds:

Faster / comparable (16)

abs / peakamp / rms / energy / energy_ratio / loudness / lin shape (4) / log shape (4) / spectral_crest / rolloff

Slightly slower

flux / foote / mkl (3)

Slower or tbc (10) - median filter / peak finding (log is the cost) / pitch with increased FFT size

sfm / noise_ratio / harmonic_ratio / pitch / confidence / lin_brightness / log_brightness / spectral_peaks / inharmonicity / roughness

32 changes: 16 additions & 16 deletions descriptors/descriptors~/descriptors~.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

/* Begin PBXFileReference section */
B80C537227BD11D100A7637C /* edges.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = edges.hpp; sourceTree = "<group>"; };
B81F571D0D2422E0000D5E50 /* descriptorstest~.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "descriptorstest~.mxo"; sourceTree = BUILT_PRODUCTS_DIR; };
B81F571D0D2422E0000D5E50 /* descriptors~.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "descriptors~.mxo"; sourceTree = BUILT_PRODUCTS_DIR; };
B839615B2868D6F900275ECE /* modules_summary.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = modules_summary.hpp; sourceTree = "<group>"; };
B8472B9327B52F5200C60F79 /* descriptors_modules.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = descriptors_modules.hpp; sourceTree = "<group>"; };
B8472B9527B533D000C60F79 /* descriptors_graph.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = descriptors_graph.hpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -71,7 +71,7 @@
B8F3820B0F23B58E00B7D3E0 /* median_filter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = median_filter.hpp; sourceTree = "<group>"; };
B8F382280F23B6AE00B7D3E0 /* conversion_helpers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = conversion_helpers.hpp; sourceTree = "<group>"; };
B8F382580F23B80000B7D3E0 /* sort.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sort.hpp; sourceTree = "<group>"; };
B8FE3F3210986C1000780AF9 /* descriptorsrttest~.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "descriptorsrttest~.mxo"; sourceTree = BUILT_PRODUCTS_DIR; };
B8FE3F3210986C1000780AF9 /* descriptorsrt~.mxo */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "descriptorsrt~.mxo"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -125,8 +125,8 @@
19C28FB4FE9D528D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
B81F571D0D2422E0000D5E50 /* descriptorstest~.mxo */,
B8FE3F3210986C1000780AF9 /* descriptorsrttest~.mxo */,
B81F571D0D2422E0000D5E50 /* descriptors~.mxo */,
B8FE3F3210986C1000780AF9 /* descriptorsrt~.mxo */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -192,9 +192,9 @@
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
8D01CCC60486CAD60068D4B7 /* descriptorstest~ */ = {
8D01CCC60486CAD60068D4B7 /* descriptors~ */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0FFBC540097463A900D78707 /* Build configuration list for PBXNativeTarget "descriptorstest~" */;
buildConfigurationList = 0FFBC540097463A900D78707 /* Build configuration list for PBXNativeTarget "descriptors~" */;
buildPhases = (
8D01CCC70486CAD60068D4B7 /* Headers */,
8D01CCC90486CAD60068D4B7 /* Resources */,
Expand All @@ -206,15 +206,15 @@
);
dependencies = (
);
name = "descriptorstest~";
name = "descriptors~";
productInstallPath = "$(HOME)/Library/Bundles";
productName = MSPExternal;
productReference = B81F571D0D2422E0000D5E50 /* descriptorstest~.mxo */;
productReference = B81F571D0D2422E0000D5E50 /* descriptors~.mxo */;
productType = "com.apple.product-type.bundle";
};
B8FE3F1910986C1000780AF9 /* descriptorsrttest~ */ = {
B8FE3F1910986C1000780AF9 /* descriptorsrt~ */ = {
isa = PBXNativeTarget;
buildConfigurationList = B8FE3F2E10986C1000780AF9 /* Build configuration list for PBXNativeTarget "descriptorsrttest~" */;
buildConfigurationList = B8FE3F2E10986C1000780AF9 /* Build configuration list for PBXNativeTarget "descriptorsrt~" */;
buildPhases = (
B8FE3F1A10986C1000780AF9 /* Headers */,
B8FE3F1C10986C1000780AF9 /* Resources */,
Expand All @@ -226,10 +226,10 @@
);
dependencies = (
);
name = "descriptorsrttest~";
name = "descriptorsrt~";
productInstallPath = "$(HOME)/Library/Bundles";
productName = MSPExternal;
productReference = B8FE3F3210986C1000780AF9 /* descriptorsrttest~.mxo */;
productReference = B8FE3F3210986C1000780AF9 /* descriptorsrt~.mxo */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
Expand All @@ -255,8 +255,8 @@
projectDirPath = "";
projectRoot = "";
targets = (
8D01CCC60486CAD60068D4B7 /* descriptorstest~ */,
B8FE3F1910986C1000780AF9 /* descriptorsrttest~ */,
8D01CCC60486CAD60068D4B7 /* descriptors~ */,
B8FE3F1910986C1000780AF9 /* descriptorsrt~ */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -496,7 +496,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
0FFBC540097463A900D78707 /* Build configuration list for PBXNativeTarget "descriptorstest~" */ = {
0FFBC540097463A900D78707 /* Build configuration list for PBXNativeTarget "descriptors~" */ = {
isa = XCConfigurationList;
buildConfigurations = (
0FFBC541097463A900D78707 /* Development */,
Expand All @@ -516,7 +516,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Default;
};
B8FE3F2E10986C1000780AF9 /* Build configuration list for PBXNativeTarget "descriptorsrttest~" */ = {
B8FE3F2E10986C1000780AF9 /* Build configuration list for PBXNativeTarget "descriptorsrt~" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B8FE3F2F10986C1000780AF9 /* Development */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B8FE3F1910986C1000780AF9"
BuildableName = "descriptorsrttest~.mxo"
BlueprintName = "descriptorsrttest~"
BuildableName = "descriptorsrt~.mxo"
BlueprintName = "descriptorsrt~"
ReferencedContainer = "container:descriptors~.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand Down Expand Up @@ -56,8 +56,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B8FE3F1910986C1000780AF9"
BuildableName = "descriptorsrttest~.mxo"
BlueprintName = "descriptorsrttest~"
BuildableName = "descriptorsrt~.mxo"
BlueprintName = "descriptorsrt~"
ReferencedContainer = "container:descriptors~.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "descriptorstest~.mxo"
BlueprintName = "descriptorstest~"
BuildableName = "descriptors~.mxo"
BlueprintName = "descriptors~"
ReferencedContainer = "container:descriptors~.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand Down Expand Up @@ -55,8 +55,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "descriptorstest~.mxo"
BlueprintName = "descriptorstest~"
BuildableName = "descriptors~.mxo"
BlueprintName = "descriptors~"
ReferencedContainer = "container:descriptors~.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
2 changes: 1 addition & 1 deletion descriptors/descriptors~/library/peak_finder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class peak_set
uintptr_t num_peaks() const { return m_num_peaks; }

const peak_data& by_value(size_t idx) const { return m_peaks[m_indices[idx]]; }
const peak_data& operator [](size_t idx) const { return m_peaks[idx]; }
const peak_data& by_position(size_t idx) const { return m_peaks[idx]; }

void resize(uintptr_t max_size)
{
Expand Down
6 changes: 3 additions & 3 deletions descriptors/descriptors~/modules/modules_content.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct module_spectral_peaks : user_module_vector<module_spectral_peaks>
module_spectral_peaks(long num_peaks, long median_span, double median_gain, double range, bool report_db)
: m_num_peaks(num_peaks), m_median_span(median_span), m_median_gain(median_gain), m_range(range), m_report_db(report_db) {}

auto get_params() const { return std::make_tuple(m_num_peaks, m_median_span); }
auto get_params() const { return std::make_tuple(m_num_peaks, m_median_span, m_median_gain, m_range, m_report_db); }

void add_requirements(graph& g) override;
void prepare(const global_params& params) override;
Expand All @@ -94,7 +94,7 @@ struct module_inharmonicity : user_module_single<module_inharmonicity>
module_inharmonicity(long num_peaks, long median_span, double median_gain, double range, double threshold)
: m_num_peaks(num_peaks), m_median_span(median_span), m_median_gain(median_gain), m_range(range), m_threshold(threshold) {}

auto get_params() const { return std::make_tuple(m_num_peaks, m_threshold); }
auto get_params() const { return std::make_tuple(m_num_peaks, m_median_span, m_median_gain, m_range, m_threshold); }

void add_requirements(graph& g) override;
void calculate(const global_params& params, const double *frame, long size) override;
Expand All @@ -120,7 +120,7 @@ struct module_roughness : user_module_single<module_roughness>
module_roughness(long num_peaks, long median_span, double median_gain, double range)
: m_num_peaks(num_peaks), m_median_span(median_span), m_median_gain(median_gain), m_range(range) {}

auto get_params() const { return std::make_tuple(m_num_peaks); }
auto get_params() const { return std::make_tuple(m_num_peaks, m_median_span, m_median_gain, m_range); }

void add_requirements(graph& g) override;
void calculate(const global_params& params, const double *frame, long size) override;
Expand Down
4 changes: 2 additions & 2 deletions descriptors/descriptors~/modules/modules_summary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct summary_module_duration : summary_module_single<summary_module_duration>

static user_module *setup(const global_params& params, module_arguments& args);

auto get_params() const { return std::make_tuple(summary_module::get_index()); }
auto get_params() const { return std::make_tuple(); }

void calculate(const global_params& params, const double *data, long size) override;

Expand Down Expand Up @@ -90,7 +90,7 @@ struct summary_module_spectral_peaks : summary_module_vector<summary_module_spec

static user_module *setup(const global_params& params, module_arguments& args);

auto get_params() const { return std::make_tuple(summary_module::get_index(), m_num_peaks); }
auto get_params() const { return std::make_tuple(summary_module::get_index(), m_num_peaks, m_num_peaks, m_median_width, m_median_gain, m_range, m_report_db); }

void add_requirements(graph& g) override;
void prepare(const global_params& params) override;
Expand Down

0 comments on commit 8c728d2

Please sign in to comment.