Maintenant ça compile (ne commitez jamais quand ça compile pas, mea culpa)
This commit is contained in:
parent
096746efbb
commit
392c1c25b5
|
@ -16,4 +16,5 @@ documentation/latex/refman.log
|
|||
documentation/latex/refman.pdf
|
||||
documentation/latex/refman.toc
|
||||
sources/motifs/.motifs.c.swp
|
||||
sources/motifs/.motifs.h.swp
|
||||
sources/motifs/.motifs.h.swp
|
||||
sources/motifs/motifs.o
|
|
@ -13,8 +13,10 @@ void ajouterMotif(int nbrPortees, int nbrTmp){
|
|||
Motif* m = malloc(sizeof(Motif));
|
||||
m->nbrTmp = nbrTmp;
|
||||
m->suivant = liste;
|
||||
m->motif = malloc(nbrPortees*sizeof(portee));
|
||||
m->nom = strcat("Motif %d", getIdMotif(m));
|
||||
m->motif = malloc(nbrPortees*sizeof(Portee));
|
||||
char* nombre = NULL;
|
||||
sprintf(nombre,"%d",getIdMotif(m));
|
||||
m->nom = strcat("Motif ", nombre);
|
||||
int i;
|
||||
for (i=0; i<nbrPortees; i++) {
|
||||
m->motif[i] = calloc(nbrTmp,sizeof(Note));
|
||||
|
@ -38,25 +40,25 @@ void supprimerMotif(Motif** cellule){
|
|||
}
|
||||
|
||||
void definirNote(Motif* m, int portee, int tmp, int note){
|
||||
m->Motif[portee][tmp]->note = note;
|
||||
m->motif[portee][tmp]->note = note;
|
||||
}
|
||||
|
||||
void definirOctave(Motif m, int portee, int tmp, int octave){
|
||||
m->Motif[portee][tmp]->octave = octave;
|
||||
void definirOctave(Motif* m, int portee, int tmp, int octave){
|
||||
m->motif[portee][tmp]->octave = octave;
|
||||
}
|
||||
|
||||
void definirInstrument(Motif m, int portee, int tmp, int intrument){
|
||||
m->Motif[portee][tmp]->instrument = instrument;
|
||||
void definirInstrument(Motif* m, int portee, int tmp, int instrument){
|
||||
m->motif[portee][tmp]->instrument = instrument;
|
||||
}
|
||||
|
||||
void definirVolume(Motif m, int portee, int tmp, int volume){
|
||||
m->Motif[portee][tmp]->volume = volume;
|
||||
void definirVolume(Motif* m, int portee, int tmp, int volume){
|
||||
m->motif[portee][tmp]->volume = volume;
|
||||
}
|
||||
|
||||
void definirEffet(Motif m, int portee, int tmp, int effet){
|
||||
m->Motif[portee][tmp]->effet = effet;
|
||||
void definirEffet(Motif* m, int portee, int tmp, int effet){
|
||||
m->motif[portee][tmp]->effet = effet;
|
||||
}
|
||||
|
||||
void supprimerNote(Motif m, int portee, int tmp){
|
||||
void supprimerNote(Motif* m, int portee, int tmp){
|
||||
m->motif[portee][tmp]->note = 0;
|
||||
}
|
|
@ -18,14 +18,14 @@ typedef struct _motif{
|
|||
char* nom;
|
||||
int nbrTmp;
|
||||
Portee* motif;
|
||||
struct _motif suivant;
|
||||
struct _motif* suivant;
|
||||
} Motif;
|
||||
|
||||
Motif* liste = NULL;
|
||||
|
||||
int nbrTmp = 16;
|
||||
|
||||
int nbrMotif = 16;
|
||||
int nbrPortees = 4;
|
||||
|
||||
int getIdMotif(Motif* m);
|
||||
|
||||
|
@ -33,18 +33,18 @@ void ajouterMotif(int nbrPortees, int nbrTmp);
|
|||
|
||||
void definirNomMotif(char* nom, Motif* m);
|
||||
|
||||
void supprimerMotif(Liste** cellule, int nbrPortees); // cellule correspond à l'adresse de l'élément de la liste (avec &)
|
||||
void supprimerMotif(Motif** cellule); // cellule correspond à l'adresse de l'élément de la liste (avec &)
|
||||
|
||||
void definirNote(Motif* m, int portee, int tmp, int note);
|
||||
|
||||
void definirOctave(Motif m, int portee, int tmp, int octave)
|
||||
void definirOctave(Motif* m, int portee, int tmp, int octave);
|
||||
|
||||
void definirInstrument(Motif m, int portee, int tmp, int intrument);
|
||||
void definirInstrument(Motif* m, int portee, int tmp, int intrument);
|
||||
|
||||
void definirVolume(Motif m, int portee, int tmp, int volume);
|
||||
void definirVolume(Motif* m, int portee, int tmp, int volume);
|
||||
|
||||
void definirEffet(Motif m, int portee, int tmp, int effet);
|
||||
void definirEffet(Motif* m, int portee, int tmp, int effet);
|
||||
|
||||
void supprimerNote(Motif m, int portee, int tmp);
|
||||
void supprimerNote(Motif* m, int portee, int tmp);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue