2014-04-03 12:16:16 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "motifs/motifs.h"
|
|
|
|
#include "melodie/melodie.h"
|
|
|
|
|
|
|
|
#define DEF_NBR_TMP 16
|
2014-04-06 20:08:43 +02:00
|
|
|
#define MAX_PATTERNS 256
|
|
|
|
|
|
|
|
// Les fonctions de ce fichiers autres que main sont des fonction de débug.
|
|
|
|
|
|
|
|
void afficherMotif(Motif* m, int nbrPortees){
|
|
|
|
printf("%s :\n",m->nom);
|
2014-04-06 20:24:35 +02:00
|
|
|
for (int tmp = 0; tmp < m->nbrTmp; tmp++){
|
|
|
|
for (int portee = 0; portee < nbrPortees; portee++){
|
|
|
|
printf("%d ",getNote(m,portee,tmp));
|
2014-04-06 20:08:43 +02:00
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
}
|
2014-04-03 12:16:16 +02:00
|
|
|
|
|
|
|
int main(){
|
2014-04-06 20:08:43 +02:00
|
|
|
Motif* melodie[MAX_PATTERNS] = {NULL};
|
2014-04-03 12:16:16 +02:00
|
|
|
Motif* liste = NULL;
|
2014-04-06 20:08:43 +02:00
|
|
|
int nbrPortees = 1;
|
|
|
|
courant = 0;
|
|
|
|
taille = 0;
|
|
|
|
ajouterMotif(&liste, DEF_NBR_TMP, nbrPortees);
|
|
|
|
Motif* m = liste;
|
2014-04-06 20:24:35 +02:00
|
|
|
definirNote(m,0,4,5);
|
2014-04-06 20:08:43 +02:00
|
|
|
ajouterMotifVirtuel(melodie,0,m);
|
|
|
|
afficherMotif(m,nbrPortees);
|
2014-04-03 12:16:16 +02:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|