1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| # -*- coding: utf-8 -*-
# Application gammique évolutive
# Version 1 : Calculer les gammes
#
from tkinter import *
# Dessine une note
# def cercle(can,x,y,r):
# can.create_oval(x-r,y-r,x+r,y+r)
class GamMusic(objet):
""" Ramification Gammique """
def __init__(self):
self.ui=Gammique()
"Tableau de bord"
self.ui.title('Entité Gammique :')
# Fenêtre écran_résultat (
self.ui.can=Canvas(self,bg='ivory', height=500,width=750)
self.ui.can.pack(side=RIGHT)
# Bouton gamme_audio
Button(self,text ='Radio').pack()
# Les notes cursives scalpha : Graduations gérées.
self.ui.sca1=Scale(self,length =250,orient = HORIZONTAL,label ='C',
troughcolor ='black',sliderlength =20,showvalue =2,
from_ =0,to =5,tickinterval =1)
self.ui.sca1.pack()
self.ui.sca2=Scale(self,length =250,orient = HORIZONTAL,label ='D',
troughcolor ='green',sliderlength =20,showvalue =0,
from_ =-1,to =4,tickinterval =1)
self.ui.sca2.pack()
self.ui.sca3=Scale(self,length =250,orient = HORIZONTAL,label ='E',
troughcolor ='blue',sliderlength =20,showvalue =0,
from_ =-2,to =3,tickinterval =1)
self.ui.sca3.pack()
self.ui.sca4=Scale(self,length =250,orient = HORIZONTAL,label ='F',
troughcolor ='grey',sliderlength =20,showvalue =0,
from_ =-2,to =3,tickinterval =1)
self.ui.sca4.pack()
self.ui.sca5=Scale(self,length =250,orient = HORIZONTAL,label ='G',
troughcolor ='red',sliderlength =20,showvalue =0,
from_ =-3,to =2,tickinterval =1)
self.ui.sca5.pack()
self.ui.sca6=Scale(self,length =250,orient = HORIZONTAL,label ='A',
troughcolor ='orange',sliderlength =20,showvalue =0,
from_ =-4,to =1,tickinterval =1)
self.ui.sca6.pack()
self.ui.sca7=Scale(self,length =250,orient = HORIZONTAL,label ='B',
troughcolor ='yellow',sliderlength =20,showvalue =0,
from_ =-5,to =0,tickinterval =1)
self.ui.sca7.pack()
# Concerne les notes scahuit : Graduations gérées.
self.ui.sca8=Scale(self,length =250,orient = HORIZONTAL,label ='CDEFGAB',
troughcolor ='white',sliderlength =20,showvalue =0,
from_ =-12,to =12,tickinterval =1)
self.ui.sca8.pack()
# Bouton gamme_naturelle
Button(self,text ='Zéro').pack()
# Texte significatif
self.ui.lab=Label(self,text="Barre des tâches ").pack(side=RIGHT)
# Tableau réunissant les tables diatoniques
self.ui.gammes =['1101110','0201110','2001110','4000010','1011110','0111110','1030010',
'1210010','2200010','0012110','1300010','0021110','1220000','0040010',
'1400000','1002110','0102110','1130000','0003110','1100210','0200210',
'0202010','2000210','1010210','1012010','1112000','2003000','0020210',
'1202000','1003010','1001210','1103000','1121000','0100310','0010310',
'0001310','0002210','1000310','0022010','0000410','0023000','1004000',
'0005000','1101020','1101200','0201020','0201200','2001020','2001200',
'1011020','1011200','1100120','1100300','1102100','1120100','0200030',
'1002200','1001030','1300100','1000130','0003020','0021200','1000040',
'0003200','1100030','3000020']
sca=self.ui.sca1
print ("sca1 ",sca)
prgm = GamMusic()
prgm.mainloop() |
Partager