Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2012-07-20 20:44:12 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2012-07-20 20:44:12 (GMT)
commit9294d4e7f66ac151adaee168ec07c8223e668d2d (patch)
treed95602d709971ca802634c6642bbc9b18b8db8d9
parentf66652ba24efdd0b061ec7ae2e78f1b32038377c (diff)
C clefs support
-rw-r--r--clef.py4
-rw-r--r--instruments/piano.py2
-rw-r--r--symbols/Cclef4.svg61
3 files changed, 65 insertions, 2 deletions
diff --git a/clef.py b/clef.py
index ec7c1d8..b54cf28 100644
--- a/clef.py
+++ b/clef.py
@@ -31,7 +31,9 @@ CLEF_G = 3
class Clef:
clef_type = CLEF_G
clefs = [rsvg.Handle(file=os.path.join(os.environ['SUGAR_BUNDLE_PATH'],
- 'symbols/Cclef3.svg')), None,
+ 'symbols/Cclef3.svg')),
+ rsvg.Handle(file=os.path.join(os.environ['SUGAR_BUNDLE_PATH'],
+ 'symbols/Cclef4.svg')),
rsvg.Handle(file=os.path.join(os.environ['SUGAR_BUNDLE_PATH'],
'symbols/Fclef.svg')),
rsvg.Handle(file=os.path.join(os.environ['SUGAR_BUNDLE_PATH'],
diff --git a/instruments/piano.py b/instruments/piano.py
index 6895401..8bb975c 100644
--- a/instruments/piano.py
+++ b/instruments/piano.py
@@ -34,6 +34,6 @@ class Piano(Instrument):
top_staff.clef = clef.Clef()
bottom_staff = Staff()
bottom_staff.clef = clef.Clef()
- bottom_staff.clef.clef_type = clef.CLEF_C3
+ bottom_staff.clef.clef_type = clef.CLEF_F
self.staves.append(top_staff)
self.staves.append(bottom_staff)
diff --git a/symbols/Cclef4.svg b/symbols/Cclef4.svg
new file mode 100644
index 0000000..80fb5cd
--- /dev/null
+++ b/symbols/Cclef4.svg
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="40"
+ height="109"
+ id="svg3235"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="Cclef4.svg">
+ <defs
+ id="defs3237" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8"
+ inkscape:cx="-94.517473"
+ inkscape:cy="84.492132"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1366"
+ inkscape:window-height="706"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata3240">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-943.36218)">
+ <path
+ style="overflow:visible"
+ inkscape:connector-curvature="0"
+ id="path19"
+ d="M 7.9405064,1010.675 H 0.74221454 V 956.96028 H 7.9405064 v 53.71472 z m 3.5391616,0 v -53.71472 h 2.39943 v 53.71472 h -2.39943 z m 8.278035,-38.67883 c 0.279933,0.81465 0.539872,1.62933 0.780648,2.444 0.439062,1.20502 1.079743,2.12594 1.919545,2.76278 1.159723,0.85007 2.739349,1.25815 4.738875,1.222 3.759108,-0.0353 5.638661,-3.11698 5.638661,-9.24395 0,-2.62111 -0.439894,-4.97655 -1.319685,-7.06636 -1.119736,-2.7266 -2.719355,-4.09103 -4.798862,-4.09103 -2.160322,0 -4.019879,0.37192 -5.578676,1.11573 -1.319688,0.60215 -1.979531,1.15117 -1.979531,1.64632 0,0.24868 0.239944,0.33722 0.719829,0.26565 0.718997,-0.14093 1.338849,-0.21177 1.858726,-0.21177 2.399431,0 3.599146,1.27586 3.599146,3.82537 0,0.99249 -0.519877,1.8426 -1.55963,2.55024 -0.880625,0.56747 -1.739587,0.85011 -2.579388,0.85011 -1.479648,0 -2.699359,-0.62132 -3.659965,-1.86325 -0.8398,-1.13567 -1.17972,-2.23516 -1.019757,-3.30075 0.718995,-4.50646 5.13878,-6.58298 13.256853,-6.22804 2.719356,0.107 5.098791,1.33785 7.138306,3.69624 2.038683,2.35766 3.059274,5.16694 3.059274,8.42856 0,3.36787 -0.899787,6.20444 -2.69936,8.50898 -2.039515,2.58786 -4.839684,3.86375 -8.398005,3.82832 -1.599621,0 -3.119261,-0.35346 -4.55892,-1.06261 -0.719828,-0.4243 -1.419663,-0.84932 -2.100334,-1.27512 -0.359915,0.3542 -0.779815,1.25741 -1.259701,2.70965 -0.439896,1.27587 -0.659844,2.03667 -0.659844,2.28461 0,0.21177 0.219948,0.97339 0.659844,2.28467 0.479886,1.4168 0.899786,2.32 1.259701,2.7097 0.679838,-0.4251 1.379673,-0.8502 2.100334,-1.2753 1.439659,-0.7084 2.959299,-1.0801 4.55892,-1.1158 3.558321,0 6.35849,1.2938 8.398005,3.8823 1.799573,2.3047 2.69936,5.14046 2.69936,8.50836 0,3.26162 -1.020591,6.06192 -3.059274,8.40262 -2.039515,2.3394 -4.419784,3.5804 -7.138306,3.7222 -8.118073,0.354 -12.537858,-1.7217 -13.256853,-6.2281 -0.159963,-1.065 0.179957,-2.1652 1.019757,-3.3008 0.959773,-1.2773 2.179483,-1.91642 3.659965,-1.91642 0.839801,0 1.698763,0.3003 2.579388,0.90312 1.039753,0.6731 1.55963,1.5224 1.55963,2.5504 0,2.5149 -1.260535,3.7722 -3.779104,3.7722 -0.479885,0 -1.039752,-0.052 -1.6796,-0.1595 -0.439896,-0.1069 -0.659845,-0.036 -0.659845,0.2125 0,0.4599 0.679006,1.0273 2.039517,1.7003 1.639611,0.7794 3.458347,1.1512 5.458704,1.1158 2.079507,0 3.679128,-1.3645 4.798862,-4.091 0.879791,-2.1261 1.319686,-4.4809 1.319686,-7.06632 0,-6.16326 -1.879553,-9.24406 -5.638661,-9.24406 -2.839327,0 -4.799694,0.8495 -5.879439,2.5503 -0.60069,1.2751 -1.199714,2.53256 -1.798739,3.77146 0.159129,-4.03846 -1.340516,-7.93396 -4.498932,-11.68863 3.239231,-3.75529 4.818855,-7.68693 4.738875,-11.79568 z" />
+ </g>
+</svg>