MFCC.hpp
1 #pragma once
2 #include <Analysis/GistState.hpp>
3 #include <Analysis/Helpers.hpp>
4 #include <halp/audio.hpp>
5 #include <halp/callback.hpp>
6 #include <halp/controls.hpp>
7 #include <halp/meta.hpp>
8 
9 namespace Analysis
10 {
12 {
13  halp_meta(name, "Spectrum")
14  halp_meta(c_name, "Spectrum")
15  halp_meta(category, "Analysis/Spectrum")
16  halp_meta(author, "ossia score, Gist library")
17  halp_meta(manual_url, "https://ossia.io/score-docs/processes/analysis.html#spectrum-extraction")
18  halp_meta(description, "Get the magnitude spectrum of a signal")
19  halp_meta(uuid, "422a1f92-821c-4073-ae50-e7c21487e27d");
20 
21  struct
22  {
23  audio_in audio;
24  gain_slider gain;
25  gate_slider gate;
26  } inputs;
27 
28  struct
29  {
30  halp::dynamic_audio_bus<"spectrum", double> result;
31  } outputs;
32 
33  void operator()(int frames)
34  {
35  processVector<&Gist<double>::getMagnitudeSpectrum>(
36  inputs.audio, inputs.gain, inputs.gate, outputs.result, frames);
37  }
38 };
39 
41 {
42 
43  halp_meta(name, "Complex Spectral Difference")
44  halp_meta(c_name, "CSD")
45  halp_meta(category, "Analysis/Spectrum")
46  halp_meta(author, "ossia score, Gist library")
47  halp_meta(manual_url, "https://ossia.io/score-docs/processes/analysis.html#spectrum-extraction")
48  halp_meta(description, "Get the Mel frequency spectrum of a signal")
49  halp_meta(uuid, "f2b62e47-0e67-476f-b757-ef6a48610a78");
50 
51  struct
52  {
53  audio_in audio;
54  gain_slider gain;
55  gate_slider gate;
56  } inputs;
57 
58  struct
59  {
60  audio_out result;
61  } outputs;
62 
63  void operator()(int frames)
64  {
65  processVector<&Gist<double>::getMelFrequencySpectrum>(
66  inputs.audio, inputs.gain, inputs.gate, outputs.result, frames);
67  }
68 };
69 
71 {
72 
73  halp_meta(name, "MFCC")
74  halp_meta(c_name, "MFCC")
75  halp_meta(category, "Analysis/Spectrum")
76  halp_meta(author, "ossia score, Gist library")
77  halp_meta(manual_url, "https://ossia.io/score-docs/processes/analysis.html#spectrum-extraction")
78  halp_meta(description, "Get the mel-frequency cepstral coefficients of a signal")
79  halp_meta(uuid,"26684acb-36f5-4a8b-8ed3-f32f9ffb436b");
80 
81  struct
82  {
83  audio_in audio;
84  gain_slider gain;
85  gate_slider gate;
86  } inputs;
87 
88  struct
89  {
90  audio_out result;
91  } outputs;
92 
93  void operator()(int frames)
94  {
95  processVector<&Gist<double>::getMelFrequencyCepstralCoefficients>(
96  inputs.audio, inputs.gain, inputs.gate, outputs.result, frames);
97  }
98 };
99 }
Definition: GistState.hpp:26
Definition: MFCC.hpp:71
Definition: MFCC.hpp:41
Definition: MFCC.hpp:12
Definition: Helpers.hpp:27
Definition: Helpers.hpp:30
Definition: Helpers.hpp:34
Definition: Helpers.hpp:43