===================================== Define freqnotes()= Prgm :Local a,b,i,diap,h,octv,note,n,freq,j :0→a:0→b:440→diap:4→h:0→octv:1→note:0→n:0→freq:0→i :setMode(5,2) :For j,1,3 : Disp "" :EndFor :Disp " Touche [enter] pour commencer " :For j,1,3 : Disp "" :EndFor :getKey(1) :Request "Choisir le Diapason (440 ?)",diap :If diap<430 or diap>450 : Stop :Disp "" :Disp "[enter] et choisir le numéro de la note ..." :Disp "" :Disp " La La# Si Do Do# Ré" :Disp " 1 2 3 4 5 6" :Disp "-------------------------------" :Disp " Ré# Mi Fa Fa# Sol Sol#" :Disp " 7 8 9 10 11 12" :Disp "-------------------------------" :getKey(1) :Request "Numéro de la note ?",note :If note<1 and note>12 : Stop :note→n :note-1→note :Request "Quel octave de −2 à 9 ?",h :If h<−2 and h>9 : Stop :(10^(((log(2,10))/(12))))^(note)*diap→freq :If note≥3 Then : h-1→octv :Else : h→octv :EndIf :octv-4→octv :If octv≠0 Then : If octv>0 Then : For i,1,octv : freq*2→freq : EndFor : Else :abs(octv)→octv : For i,1,octv : freq*0.5→freq : EndFor : EndIf :EndIf :round(freq,3)→freq :Disp "" :Disp "Diapazon",diap :Disp "Note",n :Disp "Octave",h :Disp "Fréquence",freq,"Hertz" :For j,1,3 : Disp "" :EndFor :Disp " Entrer pour sortir !" :getKey(1) :EndPrgm =====================================