Loading...
Searching...
No Matches
Centroid.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
8namespace Analysis
9{
11{
12 halp_meta(name, "Centroid")
13 halp_meta(c_name, "Centroid")
14 halp_meta(category, "Analysis/Spectrum")
15 halp_meta(author, "ossia score, Gist library")
16 halp_meta(manual_url, "https://ossia.io/score-docs/processes/analysis.html#spectral-parameters")
17 halp_meta(description, "Get the centroid of a signal")
18 halp_meta(uuid, "9d26b429-a417-4c98-a4c6-70af90a5c4ab");
19
20 struct
21 {
22 audio_in audio;
23 gain_slider gain;
24 gate_slider gate;
25 } inputs;
26 struct
27 {
28 value_out result;
29 } outputs;
30
31 void operator()(int frames)
32 {
33 process<&Gist<double>::spectralCentroid>(
34 inputs.audio, inputs.gain, inputs.gate, outputs.result, frames);
35 }
36};
37}
Definition Centroid.hpp:11
Definition GistState.hpp:26
Definition Helpers.hpp:27
Definition Helpers.hpp:34
Definition Helpers.hpp:43
Definition Helpers.hpp:19