Suppression des lignes de debug, ajout de setters
This commit is contained in:
parent
9a8c5c711a
commit
835e0422e2
|
@ -11,9 +11,9 @@
|
|||
|
||||
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);
|
||||
for (int tmp = 0; tmp < m->nbrTmp; tmp++){
|
||||
for (int portee = 0; portee < nbrPortees; portee++){
|
||||
printf("%d ",getNote(m,portee,tmp));
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
@ -25,11 +25,9 @@ int main(){
|
|||
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;
|
||||
definirNote(m,0,4,5);
|
||||
ajouterMotifVirtuel(melodie,0,m);
|
||||
afficherMotif(m,nbrPortees);
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
@ -63,3 +63,23 @@ void definirEffet(Motif* m, int portee, int tmp, int effet){
|
|||
void supprimerNote(Motif* m, int portee, int tmp){
|
||||
(*(*m->motif)[portee])[tmp].note = 0;
|
||||
}
|
||||
|
||||
int getNote(Motif* m, int portee, int tmp){
|
||||
return (*(*m->motif)[portee])[tmp].note;
|
||||
}
|
||||
|
||||
int getOctave(Motif* m, int portee, int tmp){
|
||||
return (*(*m->motif)[portee])[tmp].octave;
|
||||
}
|
||||
|
||||
int getInstrument(Motif* m, int portee, int tmp){
|
||||
return (*(*m->motif)[portee])[tmp].instrument;
|
||||
}
|
||||
|
||||
int getVolume(Motif* m, int portee, int tmp){
|
||||
return (*(*m->motif)[portee])[tmp].volume;
|
||||
}
|
||||
|
||||
int getEffet(Motif* m, int portee, int tmp){
|
||||
return (*(*m->motif)[portee])[tmp].note;
|
||||
}
|
||||
|
|
|
@ -49,4 +49,16 @@ void definirEffet(Motif* m, int portee, int tmp, int effet);
|
|||
|
||||
void supprimerNote(Motif* m, int portee, int tmp);
|
||||
|
||||
// Maintenant, voici les getters (qui intéressent entre autres Majora)
|
||||
|
||||
int getNote(Motif* m, int portee, int tmp);
|
||||
|
||||
int getOctave(Motif* m, int portee, int tmp);
|
||||
|
||||
int getInstrument(Motif* m, int portee, int tmp);
|
||||
|
||||
int getVolume(Motif* m, int portee, int tmp);
|
||||
|
||||
int getEffet(Motif* m, int portee, int tmp);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue