ponytracker/sources/motifs/motifs.h

54 lines
1.1 KiB
C
Raw Normal View History

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>
#define DEFNBRTMP 16
2014-03-29 17:47:13 +01:00
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;
2014-04-01 13:48:39 +02:00
} Motif;
Motif* liste = NULL;
2014-03-29 17:47:13 +01:00
int nbrPortees = 4;
2014-04-01 13:48:39 +02:00
int getIdMotif(Motif* m);
2014-03-29 17:47:13 +01:00
void ajouterMotif();
void definirNomMotif(Motif* m, char* nom);
2014-03-29 17:47:13 +01:00
// void definirNbrTmp(Motif* m, int nbrTmp);
// C'est chiant de changer le nomre de temps en cours de route,
// donc on le fera après le proto.
2014-04-01 13:48:39 +02:00
void supprimerMotif(Motif** cellule); // 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);
2014-04-01 13:48:39 +02:00
void definirInstrument(Motif* m, int portee, int tmp, int intrument);
2014-04-01 13:48:39 +02:00
void definirVolume(Motif* m, int portee, int tmp, int volume);
2014-04-01 13:48:39 +02:00
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