Ajout dll wiiuse.
[minwii.git] / src / minwii / config.py
1 # -*- coding: utf-8 -*-
2 """
3 constantes de configuration
4
5 $Id$
6 $URL$
7 """
8
9 import pygame
10 import os.path
11
12 _here = os.path.abspath(__file__).split(os.path.sep)[:-1]
13
14 def _computePath(path) :
15 path = path.split('/')
16 path = _here + path
17 path = os.path.abspath(os.path.sep.join(path))
18 return path
19
20
21 pygame.font.init()
22
23
24 # playingscreen
25 FRAMERATE = 100
26 FIRST_HUE = 0.6
27 OFF_LUMINANCE = 0.2
28 OFF_SATURATION = 1
29 ON_TOP_LUMINANCE = 0.6
30 ON_BOTTOM_LUMINANCE = 0.9
31 ON_SATURATION = 1
32 ON_COLUMN_OVERSIZING = 2
33 ON_COLUMN_ALPHA = 1
34 font_file = _computePath('fonts/Arial Unicode.ttf')
35 NOTES_FONT = pygame.font.Font(font_file, 50)
36 LYRICS_FONT = pygame.font.Font(None, 80)
37 FONT_COLOR = (0,0,0)
38 MIDI_VELOCITY_RANGE = (64, 127)
39 MIDI_PAN_RANGE = (32, 96)
40 MIDI_VELOCITY_WRONG_NOTE_ATTN = 0.5
41
42 SONG_FILE_PATH = _computePath('../../chansons')
43
44 INSTRUMENTS = (
45 {'name' : 'accordeon',
46 'bank' : 0,
47 'preset' : 23
48 },
49 {'name' : 'celesta',
50 'bank' : 0,
51 'preset' : 8,
52 'octave' : 1
53 },
54 {'name' : 'flute',
55 'bank' : 0,
56 'preset' : 73
57 },
58 {'name' : 'guitare',
59 'bank' : 0,
60 'preset' : 24,
61 'octave' : -1
62 },
63 {'name' : 'orgue',
64 'bank' : 0,
65 'preset' : 19
66 },
67 {'name' : 'piano',
68 'bank' : 0,
69 'preset' : 0
70 },
71 {'name' : 'tuba',
72 'bank' : 0,
73 'preset' : 58,
74 'octave' : -2
75 },
76 {'name' : 'violon',
77 'bank' : 0,
78 'preset' : 40
79 },
80 {'name' : 'violoncelle',
81 'bank' : 0,
82 'preset' : 42,
83 'octave' : -2
84 },
85 )
86
87 for i in INSTRUMENTS :
88 i['octave'] = i.get('octave', 0)