aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2005-12-06 00:34:07 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2005-12-06 00:34:07 +0000
commit4d5984b7a5eaad28251a1b801afb6c4291d69779 (patch)
treec229eb7eeeaff6b09c8a47186353fddaf55fbe57 /common.h
parent773dd5fb3f0e68744cb7400f7b10176d99b768bd (diff)
finding rhythm functions ready
svn path=/trunk/externals/frankenstein/; revision=4149
Diffstat (limited to 'common.h')
-rwxr-xr-xcommon.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/common.h b/common.h
index 75bd3fb..2e33d5f 100755
--- a/common.h
+++ b/common.h
@@ -80,6 +80,9 @@ struct t_rhythm_memory_arc
#define num_possible_denominators 11
static unsigned short int possible_denominators[] = {1,2,3,4,6,8,12,16,18,24,32};
+// the minimum percentage for a beat to be considered part of the main rhythm
+#define min_to_be_main_rhythm_beat 0.7
+
// this defines a space for rhythms, variations, transitions and representations
typedef struct t_rhythm_memory_representation t_rhythm_memory_representation;
typedef struct t_rhythm_memory_element t_rhythm_memory_element;
@@ -106,6 +109,9 @@ struct t_rhythm_memory_representation
t_rhythm_memory_representation *next;
} ;
+// define a return value to express "rhythm not found in this representation"
+#define INVALID_RHYTHM 65535
+
// ------------------------------------------------ functions
// ----------- rhythm manipolation functions
@@ -140,6 +146,9 @@ void freeBeats(t_rhythm_event *currentEvent);
// --- memory representation of rhythms
+// create an array of nodes (without arcs?) to express the beats in this rhythm (the noteon moments)
+void create_array_beats(unsigned short int **this_array, t_rhythm_event *currentEvent);
+
// add an arc to this node
void add_t_rhythm_memory_arc(t_rhythm_memory_node *srcNode, unsigned short int dstNode);
@@ -147,9 +156,6 @@ void add_t_rhythm_memory_arc(t_rhythm_memory_node *srcNode, unsigned short int d
// I must pass its id also
void create_rhythm_memory_representation(t_rhythm_memory_representation **this_rep, unsigned short int id);
-// define a return value to express "rhythm not found in this representation"
-#define INVALID_RHYTHM 65535
-
// add a new rhythm in the list of similar rhythms related to one main rhythm
// the sub id is auto-generated and returned
unsigned short int add_similar_rhythm(t_rhythm_memory_representation *this_rep, t_rhythm_event *new_rhythm);