Maintenant ça compile (ne commitez jamais quand ça compile pas, mea culpa)
This commit is contained in:
parent
096746efbb
commit
392c1c25b5
|
@ -17,3 +17,4 @@ documentation/latex/refman.pdf
|
||||||
documentation/latex/refman.toc
|
documentation/latex/refman.toc
|
||||||
sources/motifs/.motifs.c.swp
|
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));
|
Motif* m = malloc(sizeof(Motif));
|
||||||
m->nbrTmp = nbrTmp;
|
m->nbrTmp = nbrTmp;
|
||||||
m->suivant = liste;
|
m->suivant = liste;
|
||||||
m->motif = malloc(nbrPortees*sizeof(portee));
|
m->motif = malloc(nbrPortees*sizeof(Portee));
|
||||||
m->nom = strcat("Motif %d", getIdMotif(m));
|
char* nombre = NULL;
|
||||||
|
sprintf(nombre,"%d",getIdMotif(m));
|
||||||
|
m->nom = strcat("Motif ", nombre);
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<nbrPortees; i++) {
|
for (i=0; i<nbrPortees; i++) {
|
||||||
m->motif[i] = calloc(nbrTmp,sizeof(Note));
|
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){
|
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){
|
void definirOctave(Motif* m, int portee, int tmp, int octave){
|
||||||
m->Motif[portee][tmp]->octave = octave;
|
m->motif[portee][tmp]->octave = octave;
|
||||||
}
|
}
|
||||||
|
|
||||||
void definirInstrument(Motif m, int portee, int tmp, int intrument){
|
void definirInstrument(Motif* m, int portee, int tmp, int instrument){
|
||||||
m->Motif[portee][tmp]->instrument = instrument;
|
m->motif[portee][tmp]->instrument = instrument;
|
||||||
}
|
}
|
||||||
|
|
||||||
void definirVolume(Motif m, int portee, int tmp, int volume){
|
void definirVolume(Motif* m, int portee, int tmp, int volume){
|
||||||
m->Motif[portee][tmp]->volume = volume;
|
m->motif[portee][tmp]->volume = volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
void definirEffet(Motif m, int portee, int tmp, int effet){
|
void definirEffet(Motif* m, int portee, int tmp, int effet){
|
||||||
m->Motif[portee][tmp]->effet = 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;
|
m->motif[portee][tmp]->note = 0;
|
||||||
}
|
}
|
|
@ -18,14 +18,14 @@ typedef struct _motif{
|
||||||
char* nom;
|
char* nom;
|
||||||
int nbrTmp;
|
int nbrTmp;
|
||||||
Portee* motif;
|
Portee* motif;
|
||||||
struct _motif suivant;
|
struct _motif* suivant;
|
||||||
} Motif;
|
} Motif;
|
||||||
|
|
||||||
Motif* liste = NULL;
|
Motif* liste = NULL;
|
||||||
|
|
||||||
int nbrTmp = 16;
|
int nbrTmp = 16;
|
||||||
|
|
||||||
int nbrMotif = 16;
|
int nbrPortees = 4;
|
||||||
|
|
||||||
int getIdMotif(Motif* m);
|
int getIdMotif(Motif* m);
|
||||||
|
|
||||||
|
@ -33,18 +33,18 @@ void ajouterMotif(int nbrPortees, int nbrTmp);
|
||||||
|
|
||||||
void definirNomMotif(char* nom, Motif* m);
|
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 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
|
#endif
|
Loading…
Reference in New Issue