ComplexSpectralDifference.hpp
1 #pragma once
2 #include <Analysis/GistState.hpp>
3 #include <Analysis/Helpers.hpp>
4 #include <halp/audio.hpp>
5 #include <halp/controls.hpp>
6 #include <halp/meta.hpp>
7 
8 namespace Analysis
9 {
11 {
12  halp_meta(name, "Complex Spectral Difference")
13  halp_meta(c_name, "CSD")
14  halp_meta(category, "Analysis/Onsets")
15  halp_meta(author, "ossia score, Gist library")
16  halp_meta(manual_url, "https://ossia.io/score-docs/processes/analysis.html#onset-detection")
17  halp_meta(description, "Get the complex spectral difference of a signal")
18  halp_meta(uuid, "a542f819-e062-4f52-8c54-7e49a9bad5b8");
19 
20 
21  struct
22  {
23  audio_in audio;
24  gain_slider gain;
25  gate_slider gate;
26  } inputs;
27  struct
28  {
29  value_out result;
30  pulse_out pulse;
31  } outputs;
32 
33  void operator()(int frames)
34  {
35  process<&Gist<double>::complexSpectralDifference>(
36  inputs.audio, inputs.gain, inputs.gate, outputs.result, outputs.pulse, frames);
37  }
38 };
39 }
Definition: ComplexSpectralDifference.hpp:11
Definition: GistState.hpp:26
Definition: Helpers.hpp:27
Definition: Helpers.hpp:34
Definition: Helpers.hpp:43
Definition: Helpers.hpp:23
Definition: Helpers.hpp:19