aboutsummaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2005-12-22 23:21:04 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2005-12-22 23:21:04 +0000
commitf428146b3bf8d4b3073b4fa826c250743f20fe7f (patch)
treec016025a2289e61a90427f1a4cc1c00cc2911971 /common.c
parent6b999630484e02b53c0bc71d0bcc5da1919728c8 (diff)
fixed a bug in duration2int, now rhythms_memory working
svn path=/trunk/externals/frankenstein/; revision=4286
Diffstat (limited to 'common.c')
-rwxr-xr-xcommon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common.c b/common.c
index c98b92b..9fe2c36 100755
--- a/common.c
+++ b/common.c
@@ -46,7 +46,7 @@ unsigned short int duration2int(t_duration dur)
{
for (j=0; j<i; j++)
{
- if ((dur.numerator==j) && (dur.denominator==i))
+ if ((dur.numerator==j) && (dur.denominator==possible_denominators[i]))
{
return curr;
} else
@@ -612,14 +612,14 @@ void rhythm_memory_evaluate(t_rhythm_memory_representation *rep_list, // the mem
// decide if add to the memory or if return the closest
- if (root_closeness_found>=min_to_be_same_rhythm)
+ if (root_closeness_found >= (float)min_to_be_same_rhythm)
{
// is close enough to be considered a rhythm
post("DEBUG: rhythm found");
*new_rhythm = 0;
*id = id_found;
*root_closeness = root_closeness_found;
- if (sub_closeness_found>=min_to_be_same_subrhythm)
+ if (sub_closeness_found >= (float)min_to_be_same_subrhythm)
{
// this is a known subrhythm
post("DEBUG: sub-rhythm found");