From 10a3fd828512907e52f3eabdd7c69b3eaa98757f Mon Sep 17 00:00:00 2001 From: Davide Morelli Date: Mon, 16 Jan 2006 00:56:01 +0000 Subject: fixed bugs in evaluating indices svn path=/trunk/externals/frankenstein/; revision=4410 --- voicing_analyzer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'voicing_analyzer.c') diff --git a/voicing_analyzer.c b/voicing_analyzer.c index c1ab8e3..703b74f 100755 --- a/voicing_analyzer.c +++ b/voicing_analyzer.c @@ -127,7 +127,9 @@ void analyze_it(t_voicing_analyzer *x, float *wideness, float *i_like_parallelis // now i can compute parallelism *i_like_parallelism = (float) -1; *i_like_parallelism += sameDirection; - *i_like_parallelism += (float) ( ((float)(VOICES*(VOICES-1))) / ((float)parallel8_5) ); + if (parallel8_5) + *i_like_parallelism += (float) ( ((float)parallel8_5) / ((float)(VOICES*(VOICES-1))) ); + // is voice spacing uniform ?(except for the bass) // TODO: use notes[] @@ -145,9 +147,9 @@ void analyze_it(t_voicing_analyzer *x, float *wideness, float *i_like_parallelis tmp=0; for (i=0; ii_like_parallelism_out, i_like_parallelism); - outlet_float(x->small_intervals_out, small_intervals); outlet_float(x->wideness_out, wideness); + outlet_float(x->small_intervals_out, small_intervals); outlet_float(x->center_note_out, center_note); } -- cgit v1.2.1