12#ifndef __AUDIO_CURVE_H__
13#define __AUDIO_CURVE_H__
19#include <glib/gi18n.h>
27#define CURVE_OPTIONS_SCHEMA_VERSION 1
30#define CURVE_SUPERELLIPSE_CURVINESS_BOUND 0.82
31#define CURVE_EXPONENT_CURVINESS_BOUND 0.95
32#define CURVE_VITAL_CURVINESS_BOUND 1.00
97static const cyaml_strval_t curve_algorithm_strings[] = {
120static const cyaml_schema_field_t curve_options_fields_schema[] = {
122 YAML_FIELD_ENUM (
CurveOptions, algo, curve_algorithm_strings),
128static const cyaml_schema_value_t curve_options_schema = {
129 CYAML_VALUE_MAPPING (
132 curve_options_fields_schema),
160curve_algorithm_get_g_settings_mapping (
166curve_algorithm_set_g_settings_mapping (
167 const GValue * value,
168 const GVariantType * expected_type,
void curve_algorithm_get_localized_name(CurveAlgorithm algo, char *buf)
Stores the localized name of the algorithm in buf.
CurveAlgorithm
The algorithm to use for curves.
HOT NONNULL double curve_get_normalized_y(double x, CurveOptions *opts, int start_higher)
Returns the Y value on a curve specified by algo.
RETURNS_NONNULL GPtrArray * curve_get_fade_presets(void)
Returns an array of CurveFadePreset.
@ CURVE_ALGORITHM_VITAL
(e^(nx) - 1) / (e^n - 1) -10 <= n <= 10 where positive tilts down and negative tilts up (when startin...
@ CURVE_ALGORITHM_LOGARITHMIC
a = log (n) b = 1 / (log (1 + (1 / n)))
@ CURVE_ALGORITHM_PULSE
Pulse (square).
@ CURVE_ALGORITHM_SUPERELLIPSE
y = 1 - (1 - x^n)^(1/n) 0 < n <= 1, where the whole thing is tilting up and 0 is full tilt and 1 is s...
@ CURVE_ALGORITHM_EXPONENT
y = x^n 0 < n <= 1, where the whole thing is tilting up and 0 is full tilt and 1 is straight line (wh...
double curviness
Curviness between -1 and 1, where < 0 tils downwards, > 0 tilts upwards and 0 is a straight line.
CurveAlgorithm algo
Curve algorithm to use.