Code : Tout sélectionner
;**************données pour les graphiques*****************
#e=26 ;grandeur de référence
#angle=55
Enumeration
#spr_compo_accord
#spr_doigt
#spr_manche
#spr_affichage
#spr_affichage3D
#spr_purenote
EndEnumeration
;*************données pour les calculs des accords************
Structure note
valeur.b
resultat.b
visible.b
hauteur.b
nom.s
priorite.b
nombre.b
intervalle.s
intervalle_valeur.b
couleur.f
EndStructure
Structure accord
intervalles.b
nom.s
priorites.b
EndStructure
;*********************************
Global Dim accord.accord(60,6)
Global Dim note.note (6,17);"7ième" corde pour les composantes de l'accord
Global Dim corde_traitee.b(5); tableau utilisé dans la gestion des cordes à vides
;************************************************************
; total=fondamentale+intervalle_accord
Global fondamentale.b,nom_accord.s,numero_accord.b, corde.b,kaz.b,composante_accord.b,total.b,numero_accord.b,droitier.b,taille_cadre.f,calcul_cadre.f, nom_intervalle.s,corde_a_vide.b
Global x_centre_rotation.l,y_centre_rotation.l, x_purenote.l,y_purenote.l,taille.f,calcul.f,affichage_fondamendale.b,affichage_accord.b,affichage_position.b,affichage_grille.b, position.b,position_romaine.s,nombre_cases_cadre.b
;*************************************************************
Declare selection_notes()
;***********Données initiales******************************
fondamentale=4 ;exemple fondamentale Mi *
numero_accord=0; accord de Mi majeur *
corde_a_vide=1 ; *
droitier=1 ; *
position=0; *
position_romaine=" "; *
nombre_cases_cadre=4 ; *
;*************************************************************
x_control.l
y_control.l
;**************************Procédures************************************
;*****************lecture des datas *************************
Procedure.b lecture_datas()
Restore intervalles
For i=0 To 55
For j=0 To 6
Read accord(i,j)\intervalles
Next j
Next i
Restore nom
For i=0 To 55
Read accord(i,1)\nom
Next i
Restore priorites
For i=0 To 55
For j=0 To 6
Read accord(i,j)\priorites
Next j
Next i
EndProcedure
;*******************initialisation du manche de la guitare*******************
Procedure.b initialisation()
;initialisation des 6 cordes
For kaz=0 To 14
note(0,kaz)\valeur=4+kaz ;mi
note(1,kaz)\valeur=9+kaz ;la
note(2,kaz)\valeur=14+kaz;re
note(3,kaz)\valeur=19+kaz;sol
note(4,kaz)\valeur=23+kaz;si
note(5,kaz)\valeur=28+kaz;mi
Next kaz
;initialisation à 99 de note(corde,kaz)\resultat (99=pas de note!)
For corde=0 To 5
For kaz=0 To 14
note(corde,kaz)\resultat=99
note(corde,kaz)\hauteur=3
note(corde,kaz)\visible=0
Next kaz
Next corde
; limitation des valeurs entre 0 et 11 et introduction de la hauteur des notes
For corde=0 To 5
For kaz=0 To 14
While note(corde,kaz)\valeur>11
note(corde,kaz)\valeur-12;on enlève une octave
note(corde,kaz)\hauteur+1; hauteur+1 toutes les octaves
Wend
Next kaz
Next corde
EndProcedure
;************************position en chiffres romains***********
Procedure.b chiffre_romains(chiffre.b)
Select chiffre
Case 1
position_romaine="I"
Case 2
position_romaine="II"
Case 3
position_romaine="III"
Case 4
position_romaine="IV"
Case 5
position_romaine="V"
Case 6
position_romaine="VI"
Case 7
position_romaine="VII"
Case 8
position_romaine="VIII"
Case 9
position_romaine="IX"
Case 10
position_romaine="X"
Case 11
position_romaine="XI"
Case 12
position_romaine="XII"
EndSelect
EndProcedure
;****************identification de l'accord*************
Procedure.b identification_accord()
Select fondamentale
Case 0
nom_accord=" Do "
Case 1
nom_accord=" Do# "
Case 2
nom_accord=" Re "
Case 3
nom_accord=" Re# "
Case 4
nom_accord=" Mi "
Case 5
nom_accord=" Fa "
Case 6
nom_accord=" Fa# "
Case 7
nom_accord=" Sol "
Case 8
nom_accord="Sol#"
Case 9
nom_accord=" La "
Case 10
nom_accord=" La# "
Case 11
nom_accord=" Si "
EndSelect
nom_accord=nom_accord+ accord(numero_accord,1)\nom
EndProcedure
;*************************choix de la couleur des doigts***********************
Procedure.b couleur_doigts()
Select (note(corde,kaz)\resultat-fondamentale);couleurs des doigts
Case 0
note(corde,kaz)\couleur=RGB(255, 0, 0) ;en fonction de l'intervalle
Case 1
note(corde,kaz)\couleur=RGB(255, 128, 0)
Case 2
note(corde,kaz)\couleur=RGB(255, 255, 0)
Case 3
note(corde,kaz)\couleur=RGB(128, 255, 0)
Case 4
note(corde,kaz)\couleur=RGB( 0,255, 0)
Case 5
note(corde,kaz)\couleur=RGB(0,255, 128)
Case 6
note(corde,kaz)\couleur=RGB(0,255,255)
Case 7
note(corde,kaz)\couleur=RGB(0,128,255)
Case 8
note(corde,kaz)\couleur=RGB(0,0,255)
Case 9
note(corde,kaz)\couleur=RGB(128,0, 255)
Case 10
note(corde,kaz)\couleur=RGB(128, 0, 128)
Case 11
note(corde,kaz)\couleur=RGB(128,0, 0)
EndSelect
EndProcedure
;****************************dessin d'un "doigt"***************************
Procedure.f doigts(a.b,b.b,texte.s)
;******************sprite doigts****************************************
CreateSprite(#spr_doigt,#e,#e)
StartDrawing(SpriteOutput(#spr_doigt))
Box(0,0,#e,#e,RGB(12,9,0))
Circle(#e/2,#e/2,#e/2,note(a,b)\couleur)
DrawingMode(1)
DrawingFont(FontID(1))
FrontColor(RGB(255,255,255))
DrawText(2,5,texte)
StopDrawing()
EndProcedure
;******************passage des valeurs numériques aux notes*********************
Procedure.b identification()
For corde=0 To 5
For kaz=0 To 14
Select note(corde,kaz)\valeur;identification des notes
Case 0
note(corde,kaz)\nom=" Do "
Case 1
note(corde,kaz)\nom=" Do# "
Case 2
note(corde,kaz)\nom=" Re "
Case 3
note(corde,kaz)\nom=" Re# "
Case 4
note(corde,kaz)\nom=" Mi "
Case 5
note(corde,kaz)\nom=" Fa "
Case 6
note(corde,kaz)\nom=" Fa# "
Case 7
note(corde,kaz)\nom=" Sol "
Case 8
note(corde,kaz)\nom="Sol#"
Case 9
note(corde,kaz)\nom=" La "
Case 10
note(corde,kaz)\nom=" La# "
Case 11
note(corde,kaz)\nom=" Si "
EndSelect
Next kaz
Next corde
EndProcedure
;************************** calcul du placement des notes de l'accord sur le manche****************
Procedure.b calcul_resultat()
For composante_accord=0 To 6
For corde=0 To 5
For kaz=0 To 14
If accord(numero_accord,composante_accord)\intervalles<>20
total=fondamentale+accord(numero_accord,composante_accord)\intervalles
EndIf
While total>11
total=total-12
Wend
If note(corde,kaz)\valeur = total
note(corde,kaz)\resultat=note(corde,kaz)\valeur
If (note(corde,kaz)\resultat-fondamentale)<0
note(corde,kaz)\resultat+12
EndIf
couleur_doigts(); procédure qui nécessite des valeurs entre 0 et 12
EndIf
Next kaz
Next corde
Next composante_accord
; limitation des valeurs entre 0 et 11
For corde=0 To 5
For kaz=0 To 14
If note(corde,kaz)\resultat<>99
While note(corde,kaz)\resultat>11
note(corde,kaz)\resultat-12;on enlève une octave
Wend
EndIf
Next kaz
Next corde
EndProcedure
;**********************dessin purenote*************************
Procedure.b dessin_purenote()
CreateSprite(#spr_purenote,24,26)
StartDrawing(SpriteOutput(#spr_purenote))
DrawingMode(4)
Ellipse(9,19,9,7,RGB(128,255,255))
FillArea(9,19,RGB(128,255,255),RGB(255,255,255))
DrawingMode(1)
Circle(5,18,2,RGB(0,0,10))
Circle(13,18,2,RGB(0,0,10))
Plot(5,17,RGB(255,255,255))
Plot(13,17,RGB(255,255,255))
Plot(4,21,RGB(0,0,10))
Plot(13,21,RGB(0,0,10))
Plot(3,15,RGB(0,0,10))
Plot(14,15,RGB(0,0,10))
LineXY(4,14,5,14,RGB(0,0,10))
LineXY(12,14,13,14,RGB(0,0,10))
LineXY(5,22,12,22,RGB(0,0,10))
LineXY(6,23,11,23,RGB(0,0,10))
LineXY(16,15,16,0,RGB(128,255,255))
LineXY(17,0,23,6,RGB(128,255,255))
LineXY(17,4,23,10,RGB(128,255,255))
LineXY(17,5,17,16,RGB(128,255,255))
LineXY(23,7,23,9,RGB(128,255,255))
FillArea(19,4,RGB(128,255,255),RGB(255,255,255))
Plot(22,10,RGB(128,255,255))
Plot(22,11,RGB(128,255,255))
Plot(21,11,RGB(128,255,255))
StopDrawing()
EndProcedure
;**************gestion des intervalles diminués**************
Procedure.b intervalle_diminue(valeur.b)
If valeur=6
If (numero_accord=1) Or (numero_accord=4) Or (numero_accord=9) Or (numero_accord=27) Or (numero_accord=32) Or (numero_accord=34) Or (numero_accord=35) Or (numero_accord=36) Or (numero_accord=41) Or (numero_accord=47)
nom_intervalle="5dim"
Else
nom_intervalle="4aug"
EndIf
EndIf
If valeur=8
If (numero_accord=28) Or (numero_accord=30)
nom_intervalle="6mi"
Else
nom_intervalle="5aug"
EndIf
EndIf
If valeur=9
If (numero_accord=35)
nom_intervalle="7dim"
Else
nom_intervalle="6Ma"
EndIf
EndIf
EndProcedure
;*******fabrication du sprite composante_accord**********
Procedure.b dessin_composantaccord()
CreateSprite(#spr_compo_accord,12*#e,26)
UseBuffer(#spr_compo_accord)
For composante_accord=0 To 6
For kaz=0 To 14
Select accord(numero_accord,composante_accord)\intervalles
Case 0
note(6,kaz)\couleur=RGB(255, 0, 0)
doigts(6,kaz," F")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,0,0)
Case 1
note(6,kaz)\couleur=RGB(255, 128, 0)
doigts(6,kaz,"2mi")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,#e,0)
Case 2
note(6,kaz)\couleur=RGB(255, 255, 0)
doigts(6,kaz,"2Ma")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,2*#e,0)
Case 3
note(6,kaz)\couleur=RGB(128, 255, 0)
doigts(6,kaz,"3mi")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,3*#e,0)
Case 4
note(6,kaz)\couleur=RGB( 0,255, 0)
doigts(6,kaz,"3Ma")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,4*#e,0)
Case 5
note(6,kaz)\couleur=RGB(0,255, 128)
doigts(6,kaz," 4 ")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,5*#e,0)
Case 6
note(6,kaz)\couleur=RGB(0,255,255)
intervalle_diminue(6)
doigts(6,kaz,nom_intervalle)
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,6*#e,0)
Case 7
note(6,kaz)\couleur=RGB(0,128,255)
doigts(6,kaz," 5")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,7*#e,0)
Case 8
note(6,kaz)\couleur=RGB(0,0,255)
intervalle_diminue(8)
doigts(6,kaz,nom_intervalle)
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,8*#e,0)
Case 9
note(6,kaz)\couleur=RGB(128,0, 255)
intervalle_diminue(9)
doigts(6,kaz,nom_intervalle)
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,9*#e,0)
Case 10
note(6,kaz)\couleur=RGB(128, 0, 128)
doigts(6,kaz,"7mi")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,10*#e,0)
Case 11
note(6,kaz)\couleur=RGB(128,0, 0)
doigts(6,kaz,"7Ma")
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0))
DisplayTransparentSprite(#spr_doigt,11*#e,0)
EndSelect
Next kaz
Next composante_accord
UseBuffer(-1)
EndProcedure
;*******************recherche de l'intervalle correspondant à une note**********
Procedure.b recherche_intervalle()
For corde=0 To 5
For kaz=0 To 14
intervalle.b=note(corde,kaz)\valeur-fondamentale
If intervalle>11
intervalle-12
EndIf
If intervalle<0
intervalle+12
EndIf
note(corde,kaz)\intervalle_valeur=intervalle
Select intervalle
Case 0
note(corde,kaz)\intervalle="F"
Case 1
note(corde,kaz)\intervalle="2mi"
Case 2
note(corde,kaz)\intervalle="2Ma"
Case 3
note(corde,kaz)\intervalle="3mi"
Case 4
note(corde,kaz)\intervalle="3Ma"
Case 5
note(corde,kaz)\intervalle="4"
Case 6
intervalle_diminue(6)
note(corde,kaz)\intervalle=nom_intervalle
Case 7
note(corde,kaz)\intervalle="5"
Case 8
intervalle_diminue(8)
note(corde,kaz)\intervalle=nom_intervalle
Case 9
intervalle_diminue(9)
note(corde,kaz)\intervalle=nom_intervalle
Case 10
note(corde,kaz)\intervalle="7mi"
Case 11
note(corde,kaz)\intervalle="7Ma"
EndSelect
Next kaz
Next corde
;***************affectation des priorites des notes sur le manche en fonction des intervalles*******
For corde=0 To 5
For kaz=0 To 14
If note(corde,kaz)\resultat<>99
For composante_accord=0 To 6
If note(corde,kaz)\intervalle_valeur=accord(numero_accord, composante_accord)\intervalles
note(corde,kaz)\priorite=accord(numero_accord, composante_accord)\priorites
EndIf
Next composante_accord
EndIf
Next kaz
Next corde
EndProcedure
;******************dessin des boules infos**********************
Procedure.b dessin_boule_infos()
;**********************boules pour affichage des données************
;cadre info
For i =0 To 100 Step 3
Circle(117*(1-droitier)+867*droitier,200,100-i,RGB(90+i,155+i,155+i)); boule "grille"
Circle(2*x_centre_rotation-(117*(1-droitier)+867*droitier),2*y_centre_rotation-200,100-i,RGB(90+i,155+i,155+i))
Next i
; dessin de la grille en fonction du nombre de cases choisies
For i=0 To 5
LineXY(117*(1-droitier)+867*droitier-60+24*i,140,117*(1-droitier)+867*droitier-60+24*i,260,RGB(0,0,0))
Next i
For i=0 To nombre_cases_cadre
LineXY(117*(1-droitier)+867*droitier-60,140+120/nombre_cases_cadre*i,117*(1-droitier)+867*droitier+60,140+120/nombre_cases_cadre*i,RGB(0,0,0))
Next i
For i=0 To 5; dessin de l'accord sur la grille
For j=position+1 To (position+nombre_cases_cadre)
If note(i,j)\resultat<>99 And note(i,j)\visible=1
Circle(117*(1-droitier)+867*droitier-60+24*i,140+(j-(position+1))*120/nombre_cases_cadre+60/nombre_cases_cadre,13-nombre_cases_cadre,RGB(0,0,0))
EndIf
Next j
Next i
;***************************bouton du menu*******************
For i =0 To 20 Step 2
Circle(117*(1-droitier)+867*droitier,340,20-i,RGB(90+i*3,155+i*3,155+i*3));droitier/gaucher
Circle(117*(1-droitier)+867*droitier+70*Pow(-1,droitier),321,20-i,RGB(90+i*3,155+i*3,155+i*3));fondamentale
Circle(117*(1-droitier)+867*droitier+121*Pow(-1,droitier),270,20-i,RGB(90+i*3,155+i*3,155+i*3));accord
Circle(117*(1-droitier)+867*droitier+140*Pow(-1,droitier),200,20-i,RGB(90+i*3,155+i*3,155+i*3));position
Circle(117*(1-droitier)+867*droitier+121*Pow(-1,droitier),130,20-i,RGB(90+i*3,155+i*3,155+i*3));grille
Circle(117*(1-droitier)+867*droitier+70*Pow(-1,droitier),79,20-i,RGB(90+i*3,155+i*3,155+i*3));quitter
Circle (117*(1-droitier)+867*droitier,280,16-i/2,RGB(90+i*3,155+i*3,155+i*3));corde à vide
Next i
FrontColor(RGB(64,128,128))
DrawText(117*(1-droitier)+867*droitier-9,332,"D/G")
DrawText(117*(1-droitier)+867*droitier-9+70*Pow(-1,droitier),313,"Fon")
DrawText(117*(1-droitier)+867*droitier-10+121*Pow(-1,droitier),262,"Acc")
DrawText(117*(1-droitier)+867*droitier-10+140*Pow(-1,droitier),192,"Pos")
DrawText(117*(1-droitier)+867*droitier-14+121*Pow(-1,droitier),122,"Grille")
DrawText(117*(1-droitier)+867*droitier-8+70*Pow(-1,droitier),70,"Fin")
DrawText (116*(1-droitier)+867*droitier,272,"!")
EndProcedure
;****************************dessin des cordes*****************
Procedure.b dessin_cordes()
StartDrawing(SpriteOutput(#spr_manche))
DrawingMode(1); dessin des cordes métal et nylon
j=0
k=0
For i= 0 To 5;cordes
Box(640-#e*(2.5-i),640-taille/2-#e,(1+j+k)*(1-droitier)+(4-j-k)*droitier,taille+2*#e,RGB(136, 154, 159))
If i<3
Line(640-#e*(2.5-i),640-taille/2-#e,1,taille+2*#e,RGB(droitier*232, 232, 232))
Else
Line(640-#e*(2.5-i),640-taille/2-#e,1,taille+2*#e,RGB((1-droitier)*232, 232, 232))
EndIf
If j<2
j=j+1
Else
j=0
k=1
EndIf
Next i
StopDrawing()
EndProcedure
;******************dessin du cadre "position"***************
Procedure.b cadre_position()
calcul=0
calcul_cadre=0
taille_cadre=0
For i=0 To (position-1)
calcul=calcul+4.44*#e*Pow(2,-i/12)
Next i
For i=0 To (position+nombre_cases_cadre-1)
calcul_cadre=calcul_cadre+4.44*#e*Pow(2,-i/12)
Next i
taille_cadre=calcul_cadre-calcul
StartDrawing(SpriteOutput(#spr_affichage))
DrawingMode(4)
For i=0 To 20
Box(640-3*#e-i,640-taille/2+calcul,6*#e+2*i,taille_cadre,RGB(90+i*3,155+i*3,155+i*3))
Next i
FrontColor(RGB(255,255,255))
DrawingMode(1)
chiffre_romains(position+1); position correspond à la nième barre de fret d'où n+1ième case
DrawText(640+4*#e,640-taille/2+calcul,position_romaine)
StopDrawing()
EndProcedure
;*******fabrication du sprite manche************************
Procedure.b sprite_manche()
CreateSprite(#spr_manche,1280,1280)
StartDrawing(SpriteOutput(#spr_manche))
Box(0,0,1280,1280,RGB(64,128,128))
taille=0
calcul=0
For i=0 To 14 ;calcul de la taille du manche avec 15 frets
taille=taille+4.44*#e*Pow(2,-i/12)
Next i
Box(640-3*#e,640-taille/2-#e,6*#e,#e,RGB(252, 253, 204));sillet
Box(640-3*#e,640-taille/2,6*#e,taille+2*#e,RGB(12, 9, 0));manche
DrawingMode(4);dessin des frets
calcul_old.f=0
For i=0 To 14;fret
calcul=calcul+4.44*#e*Pow(2,-i/12)
Ellipse(640,640-taille/2+calcul,3*#e,3,RGB(220, 185, 82))
FillArea(641,641-taille/2+calcul,RGB(220, 185, 82),RGB(229, 202, 125))
DrawingMode(1)
Select i
Case 2
Circle(641,640-taille/2+calcul-(calcul-calcul_old)/2,9,RGB(252, 253, 204))
Case 4
Circle(641,640-taille/2+calcul-(calcul-calcul_old)/2,9,RGB(252, 253, 204))
Case 6
Circle(641,640-taille/2+calcul-(calcul-calcul_old)/2,9,RGB(252, 253, 204))
Case 8
Circle(641,640-taille/2+calcul-(calcul-calcul_old)/2,9,RGB(252, 253, 204))
Case 11
Circle(641-1.5*#e,640-taille/2+calcul-(calcul-calcul_old)/2,9,RGB(252, 253, 204))
Circle(641+1.5*#e,640-taille/2+calcul-(calcul-calcul_old)/2,9,RGB(252, 253, 204))
Case 14
Circle(641,640-taille/2+calcul-(calcul-calcul_old)/2,9,RGB(252, 253, 204))
EndSelect
calcul_old=calcul
Next i
StopDrawing()
dessin_cordes()
EndProcedure
;********************sprite final************************
Procedure.b sprite_final()
CreateSprite(#spr_affichage,1280,1280,#PB_Sprite_Texture)
UseBuffer(#spr_affichage)
DisplaySprite(#spr_manche,0,0)
For i=0 To 5
calcul=0
For j=1 To 14;fret
calcul=calcul+4.44*#e*Pow(2,-(j-1)/12)
If note(i,j)\resultat<>99
doigts(i,j,note(i,j)\nom)
TransparentSpriteColor(#spr_doigt,RGB(12, 9, 0) )
DisplayTransparentSprite(#spr_doigt,640-3*#e+((1-droitier)*(5-i)+droitier*i)*#e,648-taille/2+calcul-1.5*#e)
EndIf
Next j
Next i
UseBuffer(-1)
cadre_position()
CreateSprite3D(#spr_affichage3D,#spr_affichage)
RotateSprite3D(#spr_affichage3D,#angle*Pow(-1,droitier),1)
EndProcedure
;*****************************changement de vue*******************
Procedure.b droitier_gaucher()
If MouseButton(1)<>0
droitier=droitier+1
affichage_position=0
affichage_accord=0
affichage_fondamendale=0
affichage_grille=0
If droitier>1
droitier=0
EndIf
Delay(128)
FreeSprite(#spr_affichage)
FreeSprite3D(#spr_affichage3D)
sprite_manche()
sprite_final()
EndIf
EndProcedure
;************choix de la fondamentale*************************
Procedure.b choix_fondamentale()
If MouseButton(1)<>0
affichage_fondamendale.b=affichage_fondamendale+1
affichage_accord=0
affichage_position=0
affichage_grille=0
Delay(128)
If affichage_fondamendale>1
affichage_fondamendale=0
EndIf
EndIf
EndProcedure
;*************affichage de la liste des fondamentales***************
Procedure.b affiche_fond()
x_box_fondamentale.l=117*(1-droitier)+867*droitier-90*droitier+50*(1-droitier)
If affichage_fondamendale=1
StartDrawing(ScreenOutput())
DrawingMode(1)
For i=0 To 20
Box(x_box_fondamentale,361,40,12*(20-i),RGB(70+i*4,135+i*4,135+i*4))
Next i
For kaz=1 To 12
FrontColor(RGB(255,255,255))
DrawText(117*(1-droitier)+867*droitier-90*droitier+50*(1-droitier),361+(kaz-1)*20,note(4,kaz)\nom)
Next kaz
StopDrawing()
If x_purenote>x_box_fondamentale And x_purenote<x_box_fondamentale+40 And y_purenote>361 And y_purenote<601
If MouseButton(1)<> 0
affichage_fondamendale=0
fondamentale=Int((y_purenote-361)/20)
Delay(128)
initialisation()
calcul_resultat()
identification()
recherche_intervalle()
selection_notes()
FreeSprite(#spr_compo_accord)
FreeSprite(#spr_affichage)
FreeSprite3D(#spr_affichage3D)
dessin_composantaccord()
sprite_manche()
sprite_final()
EndIf
EndIf
EndIf
EndProcedure
;*********************choix de l'accord***********************************
Procedure.b choix_accord()
If MouseButton(1)<>0
affichage_fondamendale=0
affichage_position=0
affichage_grille=0
affichage_accord.b=affichage_accord+1
Delay(128)
If affichage_accord>1
affichage_accord=0
EndIf
EndIf
EndProcedure
;*******affichage de la liste des accords************
Procedure.b affiche_acc()
x_box_accord=117*(1-droitier)+867*droitier+121*Pow(-1,droitier)-200
If affichage_accord=1
StartDrawing(ScreenOutput())
DrawingMode(1)
For i=0 To 20
Box(x_box_accord,310,400,12*(20-i),RGB(70+i*4,135+i*4,135+i*4))
Next i
For j=0 To 11
For i=0 To 4
FrontColor(RGB(255,255,255))
DrawText( 117*(1-droitier)+867*droitier+121*Pow(-1,droitier)-200+i*80+10,310+j*20,accord(j*5+i,1)\nom)
Next i
Next j
StopDrawing()
If x_purenote>x_box_accord And x_purenote<x_box_accord+400 And y_purenote>310 And y_purenote<550
If MouseButton(1)<> 0
affichage_accord=0
numero_accord=Int((x_purenote-x_box_accord)/80)+5*Int((y_purenote-310)/20)
Delay(128)
initialisation()
calcul_resultat()
identification()
recherche_intervalle()
selection_notes()
FreeSprite(#spr_compo_accord)
FreeSprite(#spr_affichage)
FreeSprite3D(#spr_affichage3D)
dessin_composantaccord()
sprite_manche()
sprite_final()
EndIf
EndIf
EndIf
EndProcedure
;************choix de la position*************************
Procedure.b choix_position()
If MouseButton(1)<>0
affichage_position.b=affichage_position+1
affichage_accord=0
affichage_fondamendale=0
affichage_grille=0
Delay(128)
If affichage_position>1
affichage_position=0
EndIf
EndIf
EndProcedure
;*************affichage de la liste des positions**************
Procedure.b affiche_pos()
x_box_position.l=117*(1-droitier)+867*droitier-160*droitier+120*(1-droitier)
If affichage_position=1
StartDrawing(ScreenOutput())
DrawingMode(1)
For i=0 To 20
Box(x_box_position,240,40,12*(20-i),RGB(70+i*4,135+i*4,135+i*4))
Next i
For kaz=1 To 12
FrontColor(RGB(255,255,255))
chiffre_romains(kaz)
DrawText(117*(1-droitier)+867*droitier-160*droitier+120*(1-droitier)+10,240+(kaz-1)*20,position_romaine)
Next kaz
StopDrawing()
If x_purenote>x_box_position And x_purenote<x_box_position+40 And y_purenote>240 And y_purenote<481
If MouseButton(1)<> 0
affichage_position=0
position=Int((y_purenote-240)/20)
Delay(128)
FreeSprite(#spr_affichage)
FreeSprite3D(#spr_affichage3D)
sprite_final()
EndIf
EndIf
EndIf
EndProcedure
;************choix corde à vide*************************
Procedure.b choix_corde_a_vide()
If MouseButton(1)<>0
corde_a_vide.b=corde_a_vide+1
Delay(128)
If corde_a_vide>1
corde_a_vide=0
EndIf
EndIf
EndProcedure
;************choix de la grille*************************
Procedure.b choix_grille()
If MouseButton(1)<>0
affichage_grille.b=affichage_grille+1
affichage_position=0
affichage_accord=0
affichage_fondamendale=0
Delay(128)
If affichage_grille>1
affichage_grille=0
EndIf
EndIf
EndProcedure
;*************affichage de la liste des grilles**************
Procedure.b affiche_grille()
x_box_grille.l=117*(1-droitier)+867*droitier-141*droitier+100*(1-droitier)
If affichage_grille=1
StartDrawing(ScreenOutput())
DrawingMode(1)
For i=0 To 3
Box(x_box_grille,170,40,12*(3-i),RGB(160+i*10,225+i*10,225+i*10))
Next i
For i=4 To 6
FrontColor(RGB(255,255,255))
DrawText(x_box_grille+15,170+12*(i-4)-2,Str(i))
Next i
StopDrawing()
If x_purenote>x_box_grille And x_purenote<x_box_grille+40 And y_purenote>170 And y_purenote<206
If MouseButton(1)<> 0
affichage_grille=0
nombre_cases_cadre=Int((y_purenote-170)/12)+4
Delay(128)
FreeSprite(#spr_affichage)
FreeSprite3D(#spr_affichage3D)
sprite_final()
EndIf
EndIf
EndIf
EndProcedure
;****************************** selection des notes*****************************
Procedure selection_notes()
StartDrawing(ScreenOutput())
;initialisation
For corde=0 To 5
corde_traitee(corde)=99
For kaz=0 To 14
note(corde,kaz)\visible=0
note(corde,kaz)\nombre=0
Next kaz
Next corde
;gestion des cordes à vide
If corde_a_vide=1
For composante_accord=0 To 6
If accord(numero_accord,composante_accord)\intervalles<>20
total=fondamentale+accord(numero_accord,composante_accord)\intervalles
EndIf
While total>11
total=total-12
Wend
DrawingMode(1)
Select total
Case 4
corde_traitee(0)=4; corde à vide Mi3
corde_traitee(5)=28;corde à vide Mi5
DrawText(117*(1-droitier)+867*droitier-64,120,"0")
DrawText(117*(1-droitier)+867*droitier-64+24*5,120,"0")
Case 9
corde_traitee(1)=9;corde à vide La3
DrawText(117*(1-droitier)+867*droitier-64+24*1,120,"0")
Case 2
corde_traitee(2)=14;corde à vide Re4
DrawText(117*(1-droitier)+867*droitier-64+24*2,120,"0")
Case 7
corde_traitee(3)=19;corde à vide Sol4
DrawText(117*(1-droitier)+867*droitier-64+24*3,120,"0")
Case 11
corde_traitee(4)=23;corde à vide Si3
DrawText(117*(1-droitier)+867*droitier-64+24*4,120,"0")
EndSelect
Next composante_accord
EndIf
For i = 0 To 5 ;passage en revue des 6 cordes et detection des notes qui ont l'indice de priorite le plus grand
If corde_traitee(i)=99
indice_priorite_max.b=0
kaz_priorite_max.b= position+1
For j= position+1 To position+nombre_cases_cadre
If note(i,j)\resultat<>99
indice_priorite.b=note(i,j)\priorite+7*(3-note(i,j)\nombre)
If indice_priorite>indice_priorite_max
kaz_priorite_max=j
indice_priorite_max= indice_priorite
EndIf
EndIf
Next j
note(i,kaz_priorite_max)\visible=1
note(i,kaz_priorite_max)\nombre=note(i,kaz_priorite_max)\nombre+1
corde_traitee(i)=note(i,kaz_priorite_max)\resultat
For l=0 To 5
For m=position+1 To position+nombre_cases_cadre
If note(l,m)\intervalle_valeur=note(i,kaz_priorite_max)\intervalle_valeur
note(l,m)\nombre=note(i,kaz_priorite_max)\nombre
EndIf
Next m
Next l
EndIf
Next i
;********gestion des cordes non-jouées*****************************
For i =0 To 5
If corde_traitee(i)=99
DrawingMode(1)
DrawText(117*(1-droitier)+867*droitier-64+24*i,120,"X")
EndIf
Next i
StopDrawing()
EndProcedure
;***********************fin des procédures*************************************
;*****************************************************************
InitKeyboard()
InitMouse()
InitSprite()
InitSprite3D()
;*****************écran*********************************
OpenScreen(1024,768,32,"Pure_Guitare") ;ouverture d'un écran de profondeur 32
LoadFont(1,"arial",9,#PB_Font_HighQuality|#PB_Font_Bold)
;********************************************************
lecture_datas()
initialisation()
calcul_resultat()
identification()
recherche_intervalle()
selection_notes()
;*********sprite pure_note***********************************
dessin_purenote()
;****************barrette des composantes de l'accord******************
dessin_composantaccord()
;************************dessin du manche**********************************
sprite_manche()
sprite_final()
CreateSprite3D(#spr_affichage3D,#spr_affichage)
RotateSprite3D(#spr_affichage3D,#angle*Pow(-1,droitier),1)
;************************programme principal****************
MouseLocate(117*(1-droitier)+867*droitier,200); position de départ de la souris
Repeat
Delay(10)
ClearScreen(RGB(64,128,128))
Start3D()
Sprite3DQuality(1)
DisplaySprite3D(#spr_affichage3D,-148+40*droitier,-236);manche incliné de la guitare
Stop3D()
DisplayTransparentSprite(#spr_compo_accord,712*droitier,0); composantes de l'accord
StartDrawing(ScreenOutput())
DrawingMode(1)
DrawingFont(FontID(1))
identification_accord()
;*****************************************************************************
dessin_boule_infos()
;*****************************************************************************
StopDrawing()
;************************affichage des composantes de l'accord en haut à gauche*******
ExamineMouse()
x_purenote=MouseX()
y_purenote=MouseY()
;************coordonnées du centre de rotation***********************
x_centre_rotation=640-148+40*droitier
y_centre_rotation=640-236
;***********rotation de -#angle et de centre(x_centre_rotation,y_centre_rotation) **********
x_control=Cos(-#angle*Pow(-1,droitier)*#PI/180)*(x_purenote-x_centre_rotation)-Sin(-#angle*Pow(-1,droitier)*#PI/180)*(y_purenote-y_centre_rotation)+x_centre_rotation
y_control=Cos(-#angle*Pow(-1,droitier)*#PI/180)*(y_purenote-y_centre_rotation)+Sin(-#angle*Pow(-1,droitier)*#PI/180)*(x_purenote-x_centre_rotation)+y_centre_rotation
StartDrawing(ScreenOutput());******affichage du texte***************
DrawingMode(1)
FrontColor(RGB(255,255,255))
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)-39,2*y_centre_rotation-261,nom_accord)
FrontColor(RGB(64,128,128))
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)-35,2*y_centre_rotation-241,"Corde n° :")
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)-35,2*y_centre_rotation-221,"Case n° :")
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)-35,2*y_centre_rotation-201,"Note :")
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)-35,2*y_centre_rotation-181,"Intervalle :")
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)-35,2*y_centre_rotation-161,"Demi-ton(s) :")
StopDrawing()
If MouseDeltaX()=0 Or MouseDeltaY()=0;afficher les infos si la souris est immobile
; **********ID corde************
; afficher les infos si la souris est au dessus du manche
If Abs(x_control-x_centre_rotation)<3*#e And y_control>-192 And y_control<948 And affichage_accord<>1 And affichage_fondamendale<>1 And affichage_position<>1
delta.f=Abs(Int((x_control-(x_centre_rotation-3*#e))/#e)-(x_control-(x_centre_rotation-3*#e))/#e); quand delta=0,5 le curseur est pile sur une corde
;************ID Case***********
calcul=0; variable pour le calcul de la position de la barre de fret
j=0; compteur de cases
Repeat
calcul=calcul+4.44*#e*Pow(2,-(j)/12)
position_fret.l=y_centre_rotation-taille/2+calcul
j=j+1
Until position_fret> y_control
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(128,0,140))
If delta >0.35 And delta<0.75
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)+30,2*y_centre_rotation-241,Str(6*droitier+(1-droitier)+Pow(-1,droitier)*Int((x_control-(x_centre_rotation-3*#e))/#e)))
corde_resultat.b=5*(1-droitier)-Pow(-1,droitier)*Int((x_control-(x_centre_rotation-3*#e))/#e)
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)+3,2*y_centre_rotation-201,note(corde_resultat,j)\nom+Str(note(corde_resultat,j)\hauteur))
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)+35,2*y_centre_rotation-181,note(corde_resultat,j)\intervalle)
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)+50,2*y_centre_rotation-161,Str(note(corde_resultat,j)\intervalle_valeur))
EndIf
DrawText(2*x_centre_rotation-(117*(1-droitier)+867*droitier)+30,2*y_centre_rotation-221,Str(j))
StopDrawing()
EndIf
EndIf
;****************** choix du mode droitier / gaucher******************************
If Abs((x_purenote-(117*(1-droitier)+867*droitier-8)))<20 And Abs(y_purenote-340)<20 And affichage_accord<>1 And affichage_fondamendale<>1
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(255,255,255))
DrawText(117*(1-droitier)+867*droitier-55,360,"Droitier / Gaucher ?")
StopDrawing()
droitier_gaucher()
EndIf
;**********************choix de la fondamentale**************************************
If Abs(x_purenote-(117*(1-droitier)+867*droitier+70*Pow(-1,droitier)))<20 And Abs(y_purenote-321)<20 And affichage_accord<>1
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(255,255,255))
DrawText(117*(1-droitier)+867*droitier+70*Pow(-1,droitier)-50,341,"Fondamentale ?")
StopDrawing()
choix_fondamentale()
EndIf
affiche_fond()
;*******************choix de l'accord*************************
If Abs(x_purenote-(117*(1-droitier)+867*droitier+121*Pow(-1,droitier)))<20 And Abs(y_purenote-270)<20 And affichage_position<>1
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(255,255,255))
DrawText(117*(1-droitier)+867*droitier+121*Pow(-1,droitier)-25,290,"Accord ?")
StopDrawing()
choix_accord()
EndIf
affiche_acc()
;*******choix de la position************************
If Abs(x_purenote-(117*(1-droitier)+867*droitier+140*Pow(-1,droitier)))<20 And Abs(y_purenote-200)<20 And affichage_grille<>1
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(255,255,255))
DrawText(117*(1-droitier)+867*droitier+140*Pow(-1,droitier)-25,220,"Position ?")
StopDrawing()
choix_position()
EndIf
selection_notes()
affiche_pos()
;************choix de la corde à vide****************************
If Abs(x_purenote-(117*(1-droitier)+867*droitier))<20 And Abs(y_purenote-280)<20 And affichage_accord<>1
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(255,255,255))
Select corde_a_vide
Case 0
DrawText((117-80)*(1-droitier)+(867-80)*droitier,300,"Accord avec cordes à vide ?")
Case 1
DrawText((117-80)*(1-droitier)+(867-80)*droitier,300,"Accord sans cordes à vide ?")
EndSelect
StopDrawing()
choix_corde_a_vide()
selection_notes()
EndIf
;************choix des dimensions de la grille******************
If Abs(x_purenote-(117*(1-droitier)+867*droitier+121*Pow(-1,droitier)))<20 And Abs(y_purenote-130)<20
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(255,255,255))
DrawText(117*(1-droitier)+867*droitier+121*Pow(-1,droitier)-50,150,"4,5 ou 6 cases?")
StopDrawing()
choix_grille()
EndIf
selection_notes()
affiche_grille()
;*******************Quitter****************************
If Abs(x_purenote-(117*(1-droitier)+867*droitier+70*Pow(-1,droitier)))<20 And Abs(y_purenote-79)<20
StartDrawing(ScreenOutput())
DrawingMode(1)
FrontColor(RGB(255,255,255))
DrawText(117*(1-droitier)+867*droitier+70*Pow(-1,droitier)-25,99,"Quitter ?")
StopDrawing()
If MouseButton(1)<>0
End
EndIf
EndIf
;******************************curseur souris "Purenote"******************************
DisplayTransparentSprite(#spr_purenote,x_purenote-9,y_purenote-19);affichage de Pure_Note
;*************************************************************************************
FlipBuffers()
If ExamineKeyboard()
;****************quitter le programme*************************
If KeyboardPushed(#PB_Key_Escape) ; press Esc to quit
End
EndIf
;******************saisie d'écran**********************
If KeyboardReleased(#PB_Key_F1)
Ecran=GrabSprite(#PB_Any,0,0,1024,768)
SaveSprite(Ecran,"SauveEcran.BMP",#PB_ImagePlugin_BMP)
EndIf
EndIf
ForEver
DataSection ; accords
intervalles:
Data.b 0,4,7,20,20,20,20,0,4,6,20,20,20,20,0,4,8,20,20,20,20,0,3,7,20,20,20,20,0,3,6,20,20,20,20; X|X(b5)|X+|Xmi|Xdim
Data.b 0,3,8,20,20,20,20,0,7,20,20,20,20,20,0,5,7,20,20,20,20,0,2,7,20,20,20,20,0,2,6,20,20,20,20;Xmi(#5)|X5|Xsus|Xsus2|Xsus2(b5)
Data.b 0,2,4,7,20,20,20,0,4,5,7,20,20,20,0,4,7,9,20,20,20,0,2,4,7,9,20,20;X2|X4|X6|X6/9
Data.b 0,2,3,7,20,20,20,0,3,5,7,20,20,20,0,3,5,7,9,20,20,0,3,7,9,20,20,20;Xmi2|Xmi4|Xmi4/6|Xmi6
Data.b 0,2,3,7,9,20,20,0,2,5,7,20,20,20,0,4,7,11,20,20,20,0,3,7,10,20,20,20; Xmi6/9|X2sus|Xma7|Xmi7
Data.b 0,3,7,11,20,20,20,0,4,7,10,20,20,20,0,2,7,11,20,20,20,0,5,7,10,20,20,20;Xmi(ma7)|X7|Xma7sus9|X7sus
Data.b 0,2,7,10,20,20,20,0,4,6,9,20,20,20,0,3,7,8,20,20,20,0,2,3,8,20,20,20;X7sus9|X6(b5)|Xmi(b6)|Xmi2(#5)
Data.b 0,3,5,7,8,20,20,0,1,3,7,9,20,20,0,4,6,11,20,20,20,0,4,8,11,20,20,20;Xmi4(b6)|Xmi6(b9)|Xma7(b5)|Xma7(#5)
Data.b 0,3,6,10,20,20,20,0,3,6,9,20,20,20,0,4,6,10,20,20,20,0,4,8,10,20,20,20;Xmi7(b5)|X°7|X7(b5)|X7(#5)
Data.b 0,1,4,7,10,20,20,0,3,4,7,10,20,20,0,1,4,8,10,20,20,0,5,6,10,20,20,20;X7(b9)X7(#9)X7(#5,b9)X7sus(b5)
Data.b 0,1,5,7,10,20,20,0,2,4,7,11,20,20,0,2,3,7,10,20,20,0,2,3,7,11,20,20;X7sus(b9)|Xma9|Xmi9|Xmi(ma9)
Data.b 0,2,4,7,10,20,20,0,2,4,6,10,20,20,0,2,5,6,10,20,20,0,2,3,5,7,10,20;X9|X9(b5)|X9sus|Xmi11
Data.b 0,2,4,5,7,10,20,0,2,4,5,7,9,11,0,2,3,5,7,9,10,0,2,4,5,7,9,10;X11|Xma13|Xmi13|X13
Data.b 0,1,4,5,7,9,10,0,2,5,7,9,10,20;X13(b9)|X13sus9
nom:
Data.s "ma","(b5)","+","min","dim","mi(#5)","5","sus","sus2","sus2(b5)"
Data.s "2","4","6","6/9","mi2","mi4","mi4/6","mi6","mi6/9","2sus","ma7","mi7"
Data.s "mi(ma7)","7","ma7sus9","7sus","7sus9","6(b5)","mi(b6)","mi2(#5)"
Data.s "mi4(b6)","mi6(b9)","ma7(b5)","ma7(#5)","mi7(b5)","°7","7(b5)","7(#5)"
Data.s "7(b9)","7(#9)","7(#5,b9)","7sus(b5)","7sus(b9)","ma9","mi9","mi(ma9)"
Data.s "9","9(b5)","9sus","mi11","11","ma13","mi13","13","13(b9)","13sus9"
priorites:
Data.b 3,2,1,0,0,0,0,3,1,2,0,0,0,0,3,1,2,0,0,0,0,3,2,1,0,0,0,0,3,1,2,0,0,0,0; X|X(b5)|X+|Xmi|Xdim
Data.b 3,1,2,0,0,0,0,2,1,0,0,0,0,0,3,2,1,0,0,0,0,3,2,1,0,0,0,0,3,1,2,0,0,0,0;Xmi(#5)|X5|Xsus|Xsus2|Xsus2(b5)
Data.b 4,3,2,1,0,0,0,4,2,3,1,0,0,0,4,2,1,3,0,0,0,5,4,2,1,3,0,0;X2|X4|X6|X6/9
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;Xmi2|Xmi4|Xmi4/6|Xmi6
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7; Xmi6/9|X2sus|Xma7|Xmi7
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;Xmi(ma7)|X7|Xma7sus9|X7sus
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;X7sus9|X6(b5)|Xmi(b6)|Xmi2(#5)
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;Xmi4(b6)|Xmi6(b9)|Xma7(b5)|Xma7(#5)
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;Xmi7(b5)|X°7|X7(b5)|X7(#5)
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;X7(b9)X7(#9)X7(#5,b9)X7sus(b5)
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;X7sus(b9)|Xma9|Xmi9|Xmi(ma9)
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7;X9|X9(b5)|X9sus|Xmi11
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,6,4,3,2,1,7,5;X11|Xma13|Xmi13|X13
Data.b 1,2,3,4,5,6,7,1,2,3,4,5,6,7;X13(b9)|X13sus9
EndDataSection
@Dobro : tu as entièrement raison, c'est pourquoi je demande l'avis des Sages....
Si l'ordinateur a à choisir entre plusieurs notes, à égalité de présence dans l'accord, il prendra celle qui a sa valeur de priorité la plus grande!
Pour le Mi majeur, accord de trois notes, il y a 6 possibilités différentes(3! c'est à dire factorielle 3)
Bien sûr, la grille affichée pourra être identique pour des choix de priorités différents car moins il y a de composantes dans un accord, moins l'ordinateur proposera de grilles(même si on change les priorités).
Les changements peuvent éventuellement s'observer lors des changements de position.
En plus, il n'existe pas UN accord, le rôle du programme c'est de faire une proposition cohérente(je proposerai peut-être une option "changer de proposition")
Pom popopom pom pom....
Bonne nuit les petits...