commit e0cc1ff21afef7d8d2d8428add15c4d99ea4f5fc
parent e36bd57c800e2d71265eeb7a543f3a00d215faa6
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Sat, 21 Feb 2015 11:53:00 -0500
UI: Fix Formant Filter Graph
Diffstat:
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/UI/FormantFilterGraph.H b/src/UI/FormantFilterGraph.H
@@ -21,7 +21,7 @@ class FormantFilterGraph : public Fl_Box, Fl_Osc_Widget {
void draw();
virtual ~FormantFilterGraph(void);
- void OSC_value(char x, const char *) override;
+ void OSC_value(int x, const char *) override;
void OSC_value(unsigned x, void *v) override;
void updateVowel(int);
@@ -30,9 +30,9 @@ class FormantFilterGraph : public Fl_Box, Fl_Osc_Widget {
void update(void);
private:
- int *nvowel,*nformant;
- float *graphpoints;
-
+ int *nvowel,*nformant;
+ float *graphpoints;
+
struct {
struct {
unsigned char freq, amp, q; //frequency,amplitude,Q
diff --git a/src/UI/FormantFilterGraph.cpp b/src/UI/FormantFilterGraph.cpp
@@ -33,7 +33,7 @@ void FormantFilterGraph::init(int *nvowel_,int *nformant_)
oscRegister("Pq");
}
-void FormantFilterGraph::OSC_value(char x, const char *loc)
+void FormantFilterGraph::OSC_value(int x, const char *loc)
{
if(strstr(loc, "Pnumformants"))
Pnumformants = x;
@@ -64,14 +64,14 @@ void FormantFilterGraph::draw_freq_line(float freq,int type)
case 0:fl_line_style(FL_SOLID);break;
case 1:fl_line_style(FL_DOT);break;
case 2:fl_line_style(FL_DASH);break;
- };
+ };
if ((freqx>0.0)&&(freqx<1.0))
fl_line(x()+(int) (freqx*w()),y(),
x()+(int) (freqx*w()),y()+h());
}
-
+
void FormantFilterGraph::update(void)
{
oscWrite("Pvowels");
@@ -109,7 +109,7 @@ void FormantFilterGraph::draw()
if(i==1){
draw_freq_line(i*100.0,0);
draw_freq_line(i*1000.0,0);
- }else
+ }else
if (i==5){
draw_freq_line(i*100.0,2);
draw_freq_line(i*1000.0,2);
@@ -241,8 +241,8 @@ void FormantFilterGraph::formantfilterH(int nvowel, int nfreqs, float *freqs)
const float filter_amp = getformantamp(Pvowels[nvowel].formants[nformant].amp);
- printf("NFORMANT %d\n", nformant);
- printf("CHARACTERISTICS: FREQ %f Q %f AMP %f\n", filter_freq, filter_q, filter_amp);
+ //printf("NFORMANT %d\n", nformant);
+ //printf("CHARACTERISTICS: FREQ %f Q %f AMP %f\n", filter_freq, filter_q, filter_amp);
if(filter_freq <= (synth->samplerate / 2 - 100.0f)) {