2014-04-01 13:48:39 +02:00
|
|
|
#ifndef _motif_h
|
|
|
|
#define _motif_h
|
|
|
|
|
2014-03-29 17:47:13 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
typedef struct _note{
|
2014-04-01 13:48:39 +02:00
|
|
|
int note;
|
|
|
|
int octave;
|
|
|
|
int instrument;
|
|
|
|
int volume;
|
|
|
|
int effet;
|
|
|
|
} Note;
|
2014-03-29 17:47:13 +01:00
|
|
|
|
2014-03-31 18:57:26 +02:00
|
|
|
typedef Note** Portee;
|
2014-03-29 17:47:13 +01:00
|
|
|
|
2014-04-01 13:48:39 +02:00
|
|
|
typedef struct _motif{
|
|
|
|
char* nom;
|
|
|
|
int nbrTmp;
|
|
|
|
Portee* motif;
|
|
|
|
struct _motif suivant;
|
|
|
|
} Motif;
|
|
|
|
|
|
|
|
Motif* liste = NULL;
|
2014-03-29 17:47:13 +01:00
|
|
|
|
2014-04-01 13:48:39 +02:00
|
|
|
int nbrTmp = 16;
|
2014-03-29 17:47:13 +01:00
|
|
|
|
2014-04-01 13:48:39 +02:00
|
|
|
int nbrMotif = 16;
|
|
|
|
|
|
|
|
int getIdMotif(Motif* m);
|
2014-03-29 17:47:13 +01:00
|
|
|
|
|
|
|
void ajouterMotif(int nbrPortees, int nbrTmp);
|
|
|
|
|
2014-04-01 13:48:39 +02:00
|
|
|
void definirNomMotif(char* nom, Motif* m);
|
|
|
|
|
2014-03-29 17:47:13 +01:00
|
|
|
void supprimerMotif(Liste** cellule, int nbrPortees); // cellule correspond à l'adresse de l'élément de la liste (avec &)
|
2014-03-29 18:00:23 +01:00
|
|
|
|
2014-04-01 13:48:39 +02:00
|
|
|
void definirNote(Motif* m, int portee, int tmp, int note);
|
|
|
|
|
|
|
|
void definirOctave(Motif m, int portee, int tmp, int octave)
|
|
|
|
|
|
|
|
void definirInstrument(Motif m, int portee, int tmp, int intrument);
|
|
|
|
|
|
|
|
void definirVolume(Motif m, int portee, int tmp, int volume);
|
|
|
|
|
|
|
|
void definirEffet(Motif m, int portee, int tmp, int effet);
|
2014-03-29 18:00:23 +01:00
|
|
|
|
|
|
|
void supprimerNote(Motif m, int portee, int tmp);
|
2014-04-01 13:48:39 +02:00
|
|
|
|
|
|
|
#endif
|