commit 1b9603a5bf353fecea3c1e7d0a51a7ef36eb7082
parent 8ee1dfbaf5a4f6e7ed8435506addf37d40694343
Author: Olivier Jolly <olivier@pcedev.com>
Date: Tue, 5 Jan 2016 11:13:40 +0100
Confirm removal of timestamp in vowel/format params
To keep the OSC API stable (*/Pvowels:), we don't introduce extra fields in the
middle of structures. As a consequence, there is no fine timestamping when
changing individual vowels or formant params, but the outer timestamp on
the containing FilterParams instance.
Diffstat:
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/src/Params/FilterParams.cpp b/src/Params/FilterParams.cpp
@@ -38,14 +38,11 @@ constexpr int sizeof_pvowels = sizeof(FilterParams::Pvowels);
#define rObject FilterParams::Pvowels_t::formants_t
-//#undef rChangeCb
-//#define rChangeCb if (obj->time) { obj->last_update_timestamp = obj->time->time(); }
static const rtosc::Ports subsubports = {
rParamZyn(freq, "Formant frequency"),
rParamZyn(amp, "Strength of formant"),
rParamZyn(q, "Quality Factor"),
};
-//#undef rChangeCb
#undef rObject
static const rtosc::Ports subports = {
@@ -59,7 +56,6 @@ static const rtosc::Ports subports = {
FilterParams::Pvowels_t *obj = (FilterParams::Pvowels_t *) d.obj;
d.obj = (void*) &obj->formants[idx];
subsubports.dispatch(msg, d);
-// if (obj->time) { obj->last_pdate_timestamp = obj->time->time(); }
}},
};
@@ -189,13 +185,10 @@ void FilterParams::defaults(int n)
{
int j = n;
-// Pvowels[j].time = time;
-
for(int i = 0; i < FF_MAX_FORMANTS; ++i) {
Pvowels[j].formants[i].freq = (int)(RND * 127.0f); //some random freqs
Pvowels[j].formants[i].q = 64;
Pvowels[j].formants[i].amp = 127;
-// Pvowels[j].formants[i].time = time;
}
}
diff --git a/src/Params/FilterParams.h b/src/Params/FilterParams.h
@@ -68,20 +68,11 @@ class FilterParams:public PresetsArray
unsigned char Pcenterfreq, Poctavesfreq; //the center frequency of the res. func., and the number of octaves
struct Pvowels_t {
-// Pvowels_t() : last_update_timestamp(0) {}
struct formants_t {
-// formants_t() : last_update_timestamp(0) {}
unsigned char freq, amp, q; //frequency,amplitude,Q
-
-// const AbsTime *time;
-// int64_t last_update_timestamp;
} formants[FF_MAX_FORMANTS];
-
-// const AbsTime *time;
-// int64_t last_update_timestamp;
} Pvowels[FF_MAX_VOWELS];
-
unsigned char Psequencesize; //how many vowels are in the sequence
unsigned char Psequencestretch; //how the sequence is stretched (how the input from filter envelopes/LFOs/etc. is "stretched")
unsigned char Psequencereversed; //if the input from filter envelopes/LFOs/etc. is reversed(negated)
@@ -104,7 +95,8 @@ class FilterParams:public PresetsArray
bool changed;
const AbsTime *time;
- int64_t last_update_timestamp;
+ int64_t last_update_timestamp; // timestamp of last update to this structure,
+ // including any change to the vowels/formats
static const rtosc::Ports ports;
private: