Ejemplo n.º 1
0
Created on Wed Jun 29 22:11:53 2016

@author: alexis
"""

from interfacage.lylipond_parser import LyParser
from instruments.timbre import Timbre
from music.scale import Scale
from player.player import Player

player = Player()
interface = player.playRealTime()
player.enableLearning()

instrument = Timbre('orgue') # Defining an instrument
player.instrument = instrument # giving an instrument to the player

tempo = 200

# Defining a scale
majorScale = Scale('major',LyParser().getNote('c,').height)
#player.playScale(majorScale, tempo) # Asking the player to play the scale to a specific tempo

# Defining a sheet
#sheet="{ a,4 ais, b, c, cis, d, dis, e, f, fis, g, gis, a4 ais b c cis d dis e f fis g gis a'4 ais' b' c' cis' d' dis' e' f' fis' g' gis' }"
#sheet="{ ais8 ais a g,16 f, f, d,8. c,4 f,2 }"
sheet="{ r2 c,8 c, a4 g, f, g,2 e,4 f, r f, g,2 c,4 a b c g,2 e,8 e, f,4 e, d, c,2. r2. }"
#sheet="{ c4 c c d e2 d c4 e d d c2 c4 c c d e2 d c4 e d d c2 d4 d d d a2 a d4 c b a g,2 c4 c c d e2 d c4 e d d c2 }"    
#parsedSheet = player.playLySheet(sheet, tempo, majorScale) # Asking the player to play the sheet to a specific tempo

# Transposing