1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name>
5 * Copyright (C) 2002-2005 Nasca Octavian Paul
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *****************************************************************************/
22 #ifndef PORTAMENTO_H__83CC72B6_3F89_4791_ACEF_098A31CB368A__INCLUDED
23 #define PORTAMENTO_H__83CC72B6_3F89_4791_ACEF_098A31CB368A__INCLUDED
27 bool enabled
; // whether portamento is enabled
31 // the threshold of enabling protamento
32 // Minimum or max. difference of the notes in order to do the portamento (x 100 cents)
33 float pitch_threshold
;
35 // whether to enable the portamento only below (false) or above (true) the threshold
36 bool pitch_threshold_above
;
38 // 'up portanemto' means when the frequency is rising (eg: the portamento is from 200Hz to 300 Hz)
39 // 'down portanemto' means when the frequency is lowering (eg: the portamento is from 300Hz to 200 Hz)
41 // Portamento time stretch (up/down)
42 // this value represent how the portamento time is reduced
43 // -1.0 - for down portamento
44 // (-1.0,0) - the up portamento's time is smaller than the down portamento
45 // 0 - the portamento time is always the same
46 // (0,1.0) - the down portamento's time is smaller than the up portamento
47 // 1.0 - for upper portamento
48 float up_down_time_stretch
;
50 // this value is used to compute the actual portamento
53 // whether portamento is used by a note
56 // x is from 0.0 (start portamento) to 1.0 (finished portamento)
62 // this is used for computing oldfreq value from x
70 } /* Adjust editor indent */
75 struct zyn_portamento
* portamento_ptr
);
77 // returns true if the portamento's conditions are true, else returns false
81 struct zyn_portamento
* portamento_ptr
,
85 // update portamento values
87 zyn_portamento_update(
88 struct zyn_portamento
* portamento_ptr
);
91 { /* Adjust editor indent */
97 #endif /* #ifndef PORTAMENTO_H__83CC72B6_3F89_4791_ACEF_098A31CB368A__INCLUDED */