Path: blob/master/libs/fluidsynth/src/rvoice/fluid_chorus.h
4396 views
/* FluidSynth - A Software Synthesizer1*2* Copyright (C) 2003 Peter Hanappe and others.3*4* This library is free software; you can redistribute it and/or5* modify it under the terms of the GNU Lesser General Public License6* as published by the Free Software Foundation; either version 2.1 of7* the License, or (at your option) any later version.8*9* This library is distributed in the hope that it will be useful, but10* WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12* Lesser General Public License for more details.13*14* You should have received a copy of the GNU Lesser General Public15* License along with this library; if not, write to the Free16* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA17* 02110-1301, USA18*/192021#ifndef _FLUID_CHORUS_H22#define _FLUID_CHORUS_H2324#include "fluidsynth_priv.h"252627typedef struct _fluid_chorus_t fluid_chorus_t;2829/* enum describing each chorus parameter */30enum fluid_chorus_param31{32FLUID_CHORUS_NR, /**< number of delay line */33FLUID_CHORUS_LEVEL, /**< output level */34FLUID_CHORUS_SPEED, /**< lfo frequency */35FLUID_CHORUS_DEPTH, /**< modulation depth */36FLUID_CHORUS_TYPE, /**< type of waveform */37FLUID_CHORUS_PARAM_LAST /* number of enum fluid_chorus_param */38};3940/* return a bit flag from param: 2^param */41#define FLUID_CHORPARAM_TO_SETFLAG(param) (1 << param)4243/** Flags for fluid_chorus_set() */44typedef enum45{46FLUID_CHORUS_SET_NR = FLUID_CHORPARAM_TO_SETFLAG(FLUID_CHORUS_NR),47FLUID_CHORUS_SET_LEVEL = FLUID_CHORPARAM_TO_SETFLAG(FLUID_CHORUS_LEVEL),48FLUID_CHORUS_SET_SPEED = FLUID_CHORPARAM_TO_SETFLAG(FLUID_CHORUS_SPEED),49FLUID_CHORUS_SET_DEPTH = FLUID_CHORPARAM_TO_SETFLAG(FLUID_CHORUS_DEPTH),50FLUID_CHORUS_SET_TYPE = FLUID_CHORPARAM_TO_SETFLAG(FLUID_CHORUS_TYPE),5152/** Value for fluid_chorus_set() which sets all chorus parameters. */53FLUID_CHORUS_SET_ALL = FLUID_CHORUS_SET_NR54| FLUID_CHORUS_SET_LEVEL55| FLUID_CHORUS_SET_SPEED56| FLUID_CHORUS_SET_DEPTH57| FLUID_CHORUS_SET_TYPE,58} fluid_chorus_set_t;5960/*61* chorus62*/63fluid_chorus_t *new_fluid_chorus(fluid_real_t sample_rate);64void delete_fluid_chorus(fluid_chorus_t *chorus);65void fluid_chorus_reset(fluid_chorus_t *chorus);6667void fluid_chorus_set(fluid_chorus_t *chorus, int set, int nr, fluid_real_t level,68fluid_real_t speed, fluid_real_t depth_ms, int type);69void70fluid_chorus_samplerate_change(fluid_chorus_t *chorus, fluid_real_t sample_rate);7172void fluid_chorus_processmix(fluid_chorus_t *chorus, const fluid_real_t *in,73fluid_real_t *left_out, fluid_real_t *right_out);74void fluid_chorus_processreplace(fluid_chorus_t *chorus, const fluid_real_t *in,75fluid_real_t *left_out, fluid_real_t *right_out);76777879#endif /* _FLUID_CHORUS_H */808182