SpectralDifference.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, "Spectral Difference")
14  halp_meta(c_name, "SpectralDiff")
15  halp_meta(category, "Analysis/Onsets")
16  halp_meta(author, "ossia score, Gist library")
17  halp_meta(manual_url, "https://ossia.io/score-docs/processes/analysis.html#onset-detection")
18  halp_meta(description, "Get the spectral difference of a signal")
19  halp_meta(uuid, "0871dd59-c77c-45c9-b229-0ff69dd211e3");
20 
21  struct
22  {
23  audio_in audio;
24  gain_slider gain;
25  gate_slider gate;
26  } inputs;
27 
28  struct
29  {
30  value_out result;
31  pulse_out pulse;
32  } outputs;
33 
34  void operator()(int frames)
35  {
36  process<&Gist<double>::spectralDifference>(
37  inputs.audio, inputs.gain, inputs.gate, outputs.result, outputs.pulse, frames);
38  }
39 };
40 }
Definition: GistState.hpp:26
Definition: SpectralDifference.hpp:12
Definition: Helpers.hpp:27
Definition: Helpers.hpp:34
Definition: Helpers.hpp:43
Definition: Helpers.hpp:23
Definition: Helpers.hpp:19