début fichier
This commit is contained in:
@@ -115,17 +115,16 @@ void lecture (int nombreChaines, int nombreInst, int tempo, Instrument* inst[],
|
||||
|
||||
for (int courant = 0; courant < taille; courant++) {
|
||||
for (int i = 0; i < melodie[courant] -> nbrTmp; i++) {
|
||||
printf("lecture temps %d : N=%d I=%d\n",i,getNote(melodie[courant],0,i),getInstrument(melodie[courant],0,i));
|
||||
|
||||
// D<>BUT DU COPIER COLLER POTENTIELLEMENT FOIREUX
|
||||
|
||||
m = melodie[courant];
|
||||
for (int chaine = 0; chaine < nombreChaines; chaine++) { // On va lire les chaines une <20> une par num<75>ro croissant
|
||||
if (m != NULL) {
|
||||
if (getInstrument(m,0,i) == -1) FMOD_Channel_Stop(chan[chaine]); // Si la note est un silence, la chaine s'arr<72>te
|
||||
if (getInstrument(m,chaine,i) == -1) FMOD_Channel_Stop(chan[chaine]); // Si la note est un silence, la chaine s'arr<72>te
|
||||
else {
|
||||
|
||||
if (getNote(m,0,i) != -1) {
|
||||
if (getNote(m,chaine,i) != -1) {
|
||||
|
||||
FMOD_Channel_Stop(chan[chaine]);
|
||||
FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sample[getInstrument(m,chaine,i)], 0, &chan[chaine]);
|
||||
@@ -133,7 +132,7 @@ void lecture (int nombreChaines, int nombreInst, int tempo, Instrument* inst[],
|
||||
//Ici on va s'occuper du pitch
|
||||
FMOD_DSP *pitch;
|
||||
FMOD_System_CreateDSPByType(system, FMOD_DSP_TYPE_PITCHSHIFT, &pitch);
|
||||
FMOD_DSP_SetParameter(pitch, FMOD_DSP_PITCHSHIFT_PITCH, rapportPitch(inst[getInstrument(m,0,i)],getNote(m,0,i),4));
|
||||
FMOD_DSP_SetParameter(pitch, FMOD_DSP_PITCHSHIFT_PITCH, rapportPitch(inst[getInstrument(m,chaine,i)],getNote(m,chaine,i),getOctave(m,chaine,i)));
|
||||
FMOD_Channel_AddDSP(chan[chaine], pitch, 0); // C'est quoi chan1 ??? Je l'ai remplac<61> par chan[1], vu que chan1 est as d<>clar<61>...
|
||||
// On va passer une bonne journ<72>e...
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user