7901c9c75d17942b87b0559f1111e35386c43cfa
1 # -*- coding: utf-8 -*-
10 from pgu
.gui
import Desktop
11 from pgu
.gui
import QUIT
12 from widgets
.home
import Home
13 from widgets
.playingscreen
import SongPlayingScreen
, PlayingScreen
14 from widgets
.instrumentselector
import InstrumentSelector
15 from synth
import Synth
16 from eventutils
import EventDispatcher
17 from musicxml
import musicXml2Song
18 from config
import SONG_FILE_PATH
27 home
= Home(songPath
=SONG_FILE_PATH
)
28 home
.connect(QUIT
, app
.quit
)
31 returnValue
= home
.returnValue
35 selector
= InstrumentSelector()
39 EventDispatcher
.reset()
40 instrumentDescription
= selector
.selectedInstrument
42 song
= musicXml2Song(home
.songFile
, printNotes
=True)
43 bank
, preset
= instrumentDescription
['bank'], instrumentDescription
['preset']
44 synth
.program_select(0, bank
, preset
)
45 playingScreen
= SongPlayingScreen(synth
, song
)
48 EventDispatcher
.reset()