score
Home
Classes
Namespaces
Files
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
8
namespace
Analysis
9
{
10
struct
Centroid
:
Analysis::GistState
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
}
Analysis::Centroid
Definition
Centroid.hpp:11
Analysis::GistState
Definition
GistState.hpp:26
Analysis::audio_in
Definition
Helpers.hpp:27
Analysis::gain_slider
Definition
Helpers.hpp:34
Analysis::gate_slider
Definition
Helpers.hpp:43
Analysis::value_out
Definition
Helpers.hpp:19