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);
|
|
|
|
for (int i = 0; i < m->nbrTmp; i++){
|
|
|
|
for (int j = 0; j < nbrPortees; j++){
|
|
|
|
printf("%d ",(*m->motif)[j][i].note);
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
printf("abwabwa %d\n", getIdMotif(liste));
|
|
|
|
ajouterMotif(&liste, DEF_NBR_TMP, nbrPortees);
|
|
|
|
printf("abwabwa %d\n", getIdMotif(liste));
|
|
|
|
printf("caca %d\n", liste->nbrTmp);
|
|
|
|
Motif* m = liste;
|
|
|
|
ajouterMotifVirtuel(melodie,0,m);
|
|
|
|
afficherMotif(m,nbrPortees);
|
2014-04-03 12:16:16 +02:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|