~ubuntu-branches/ubuntu/saucy/solfege/saucy

« back to all changes in this revision

Viewing changes to help/pt_BR/lesson-files.html

  • Committer: Bazaar Package Importer
  • Author(s): Tom Cato Amundsen
  • Date: 2010-05-19 23:10:09 UTC
  • mfrom: (1.1.11 upstream) (2.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100519231009-r3zyxze7zom6xz25
Tags: 3.16.3-1
* New upstream release
* Recommend csound (closes: #579210)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Lesson files</title><link rel="stylesheet" href="../style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"><link rel="home" href="index.html" title="GNU Solfege 3.15.9 Manual do Usuário"><link rel="up" href="extending-solfege.html" title="Capítulo 4. Extending GNU Solfege"><link rel="prev" href="extending-solfege.html" title="Capítulo 4. Extending GNU Solfege"><link rel="next" href="chordvoicing-module.html" title="The chordvoicing module"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Lesson files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extending-solfege.html">Anterior</a> </td><th width="60%" align="center">Capítulo 4. Extending GNU Solfege</th><td width="20%" align="right"> <a accesskey="n" href="chordvoicing-module.html">Próxima</a></td></tr></table><hr></div><div class="sect1" title="Lesson files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="lesson-files"></a>Lesson files</h2></div></div></div><p>In GNU Solfege, each exercise is created by a lesson file
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Lesson files</title><link rel="stylesheet" href="../style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="GNU Solfege 3.16.3 Manual do Usuário"><link rel="up" href="extending-solfege.html" title="Capítulo 4. Extending GNU Solfege"><link rel="prev" href="extending-solfege.html" title="Capítulo 4. Extending GNU Solfege"><link rel="next" href="chordvoicing-module.html" title="The chordvoicing module"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Lesson files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extending-solfege.html">Anterior</a> </td><th width="60%" align="center">Capítulo 4. Extending GNU Solfege</th><td width="20%" align="right"> <a accesskey="n" href="chordvoicing-module.html">Próxima</a></td></tr></table><hr></div><div class="sect1" title="Lesson files"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="lesson-files"></a>Lesson files</h2></div></div></div><p>In GNU Solfege, each exercise is created by a lesson file
2
2
interpreted by one of the exercise modules.</p><p>Deprecated modules: chord, harmonicprogressiondictation,
3
3
</p><p>Missing documentation: chordvoicing, identifybpm, twelvetone
4
 
</p><div class="sect2" title="File encoding"><div class="titlepage"><div><div><h3 class="title"><a name="File-encoding"></a>File encoding</h3></div></div></div><a class="indexterm" name="id3079858"></a><p>Solfege by default expects the content of lesson files to be in UTF-8
 
4
</p><div class="sect2" title="File encoding"><div class="titlepage"><div><div><h3 class="title"><a name="File-encoding"></a>File encoding</h3></div></div></div><a class="indexterm" name="id2831419"></a><p>Solfege by default expects the content of lesson files to be in UTF-8
5
5
encoding.
6
6
Modern editors often let you
7
7
specify the encoding in the "Save As" dialog. One example is
34
34
   the symbol you like.
35
35
   </p></dd><dt><span class="term">♭ <code class="literal">266D MUSIC FLAT SIGN</code></span></dt><dd><p>This sign can be used instead of the letter 'b' for a
36
36
   flat sign.</p></dd><dt><span class="term">♯ <code class="literal">266F MUSIC SHARP SIGN</code></span></dt><dd><p>This can be used instead of the letter '#' for the
37
 
   sharp sign.</p></dd></dl></div></div><div class="sect2" title="Comments"><div class="titlepage"><div><div><h3 class="title"><a name="Comments"></a>Comments</h3></div></div></div><a class="indexterm" name="id3080065"></a><p>Everything after # on a line is ignored. Example:</p><pre class="programlisting"># This line is ignored. The next line is not.
 
37
   sharp sign.</p></dd></dl></div></div><div class="sect2" title="Comments"><div class="titlepage"><div><div><h3 class="title"><a name="Comments"></a>Comments</h3></div></div></div><a class="indexterm" name="id2831627"></a><p>Everything after # on a line is ignored. Example:</p><pre class="programlisting"># This line is ignored. The next line is not.
38
38
question { bla bla }
39
 
</pre></div><div class="sect2" title="Types"><div class="titlepage"><div><div><h3 class="title"><a name="Types"></a>Types</h3></div></div></div><div class="sect3" title="Strings"><div class="titlepage"><div><div><h4 class="title"><a name="lf-types-strings"></a>Strings</h4></div></div></div><a class="indexterm" name="id3080098"></a><p>Strings are quoted with the <code class="literal">"</code> character. Example:</p><pre class="programlisting">"this is a string"</pre><p>Use tripple quotes for strings that contain line breaks, or
 
39
</pre></div><div class="sect2" title="Types"><div class="titlepage"><div><div><h3 class="title"><a name="Types"></a>Types</h3></div></div></div><div class="sect3" title="Strings"><div class="titlepage"><div><div><h4 class="title"><a name="lf-types-strings"></a>Strings</h4></div></div></div><a class="indexterm" name="id2831659"></a><p>Strings are quoted with the <code class="literal">"</code> character. Example:</p><pre class="programlisting">"this is a string"</pre><p>Use tripple quotes for strings that contain line breaks, or
40
40
if the string itself has to contain the <code class="literal">"</code> character:</p><pre class="programlisting">
41
41
description = """&lt;h1&gt;Long desription&lt;h1&gt; This lessonfile need
42
42
very much descriptions. Qoutes (") are ok here. bla bla bla"""</pre><p>NB: All strings have to be unicode strings. If you get error messages like this one:</p><pre class="programlisting">
47
47
</pre><p>then you must check the encoding of your file, and maybe you should
48
48
read <a class="xref" href="lesson-files.html#File-encoding" title="File encoding">“File encoding”</a>. You can change the encoding of a file using the <span class="command"><strong>iconv</strong></span> program:</p><pre class="programlisting">iconv -f YOUR_ENCODING -t utf8 your.file</pre></div><div class="sect3" title="Tempo"><div class="titlepage"><div><div><h4 class="title"><a name="lf-type-tempo"></a>Tempo</h4></div></div></div><p>The tempo of music is entered as <code class="literal">bpm/beatlen</code>. The
49
49
following example will set the tempo to 120 beats per minute, each beat being a
50
 
quarter note.</p><pre class="programlisting">tempo = 120/4</pre></div></div><div class="sect2" title="Global variables"><div class="titlepage"><div><div><h3 class="title"><a name="Global-variables"></a>Global variables</h3></div></div></div><a class="indexterm" name="id3080193"></a><p>Global variables can save you a few key strokes.</p><pre class="programlisting">
 
50
quarter note.</p><pre class="programlisting">tempo = 120/4</pre></div></div><div class="sect2" title="Global variables"><div class="titlepage"><div><div><h3 class="title"><a name="Global-variables"></a>Global variables</h3></div></div></div><a class="indexterm" name="id2831754"></a><p>Global variables can save you a few key strokes.</p><pre class="programlisting">
51
51
s = "\score\relative c'{ %s }
52
52
question {
53
53
# instead of music = music("\score\relative c'{ c d e f g2 g2 }") 
64
64
 ASSIGNMENT
65
65
 ...
66
66
}
67
 
</pre></div><div class="sect2" title="Header block"><div class="titlepage"><div><div><h3 class="title"><a name="Header-block"></a>Header block</h3></div></div></div><a class="indexterm" name="id3080240"></a><p>The header block can be placed anywhere in the file, but by convention
 
67
</pre></div><div class="sect2" title="Header block"><div class="titlepage"><div><div><h3 class="title"><a name="Header-block"></a>Header block</h3></div></div></div><a class="indexterm" name="id2831801"></a><p>The header block can be placed anywhere in the file, but by convention
68
68
    it should be the first block in the file. And there is a limitation that
69
69
    the header has to be within the first 40000 characters of the file.</p><div class="variablelist" title="Variables shared by many exercise modules"><a name="lesson-header-vars"></a><p class="title"><b>Variables shared by many exercise modules</b></p><dl><dt><span class="term">
70
70
 
80
80
 <span class="command"><strong>tools/hash-of-file.py</strong></span> can be used to get the hash value
81
81
 of files before modifying them.</p><pre class="programlisting">replaces = "bf7dd374206451bff43d61fc8191f5fb3e88d007"
82
82
replaces = "bf7dd374206451bff43d61fc8191f5fb3e88d007", "cdb2f9415171650ee7682028788c1c42c62fdbf"
83
 
 </pre></dd><dt><span class="term"><code class="literal"><a name="lf-lesson_id"></a>lesson_id</code></span></dt><dd><a class="indexterm" name="id3080607"></a><p class="remark"><i><span class="remark">This variable is deprecated in Solfege 3.15.3. It should remain in
 
83
 </pre></dd><dt><span class="term"><code class="literal"><a name="lf-lesson_id"></a>lesson_id</code></span></dt><dd><a class="indexterm" name="id2832168"></a><p class="remark"><i><span class="remark">This variable is deprecated in Solfege 3.15.3. It should remain in
84
84
  existing lesson files for some time for backward compatability. But it should
85
85
  not be added to new lesson files.</span></i></p><p>Each file need a unique identifier. The identifier can be any string
86
86
  you like, and if you don't add one, Solfege will add one for you. Solfege
88
88
  two files with identical <code class="literal">lesson_id</code>. Example:
89
89
  </p><pre class="programlisting">lesson_id = "5b30c9ae-09f1-40b3-9333-4789638dc851"</pre></dd><dt><span class="term">
90
90
<code class="varname"><a name="lf-version"></a>version</code></span></dt><dd><p>
91
 
<a class="indexterm" name="id3080652"></a>
 
91
<a class="indexterm" name="id2832213"></a>
92
92
Tell the version of
93
93
solfege the lessonfile is known to work with. This variable is not
94
94
required, but it should be used because it can (but don't guarantee to)
96
96
Example:</p><pre class="programlisting">version = "3.0.7"</pre></dd><dt><span class="term">
97
97
 
98
98
<code class="varname"><a name="lf-title"></a>title</code></span></dt><dd><p>
99
 
<a class="indexterm" name="id3080684"></a>
 
99
<a class="indexterm" name="id2832245"></a>
100
100
Short one-line description that will be used for
101
101
creating the menu entry for the exercise. You should add this to all lesson
102
102
files. Example:</p><pre class="programlisting">title = "Minor and major chords in root position"</pre></dd><dt><span class="term">
103
103
 
104
104
<code class="varname"><a name="lf-lesson_heading"></a>lesson_heading</code></span></dt><dd><p>
105
 
<a class="indexterm" name="id3080724"></a>
 
105
<a class="indexterm" name="id2832285"></a>
106
106
A short heading that will be displayed above the exercise. It
107
107
should say what the purpose of the exercise is. Some modules provide a
108
108
default value, others leave the string empty. Example:</p><pre class="programlisting">lesson_heading = _("Identify the chord")</pre></dd><dt><span class="term">
109
109
 
110
110
<code class="varname"><a name="lf-help"></a>help</code></span></dt><dd><p>
111
 
<a class="indexterm" name="id3080752"></a>
 
111
<a class="indexterm" name="id2832313"></a>
112
112
This variable say which help file from the user manual will be
113
113
displayed when the user presses F1.
114
114
Example:</p><pre class="programlisting">help = "idbyname-intonation"</pre><p>By default, Solfege will display the help file that has the same
115
115
name as the exercise module being used in the lesson file.</p></dd><dt><span class="term">
116
116
 
117
117
<code class="varname"><a name="lf-theory"></a>theory</code></span></dt><dd><p>
118
 
<a class="indexterm" name="id3080784"></a>
 
118
<a class="indexterm" name="id2832345"></a>
119
119
This variable say which help file from the user manual will be
120
120
displayed when the user presses F3. Pressing F3 should display
121
121
music theory about the exercise. Don't include this variable if there
122
122
are no music theory written.
123
123
Example:</p><pre class="programlisting">theory = "scales/maj"</pre></dd><dt><span class="term">
124
124
 
125
 
<code class="varname">random_transpose</code></span></dt><dd><a class="indexterm" name="id3080810"></a><p>In some exercises the program can transpose the music to
 
125
<code class="varname">random_transpose</code></span></dt><dd><a class="indexterm" name="id2832371"></a><p>In some exercises the program can transpose the music to
126
126
create variation. The default value is <code class="literal">yes</code>. (The
127
127
default value changed from <code class="literal">no</code> to
128
128
<code class="literal">yes</code> in Solfege 3.0.)</p><p>Used in modules: <code class="literal">chord</code>,
186
186
    <code class="literal">singinterval</code>.</p></dd><dt><span class="term"><code class="varname"><a name="lf-intervals"></a>intervals</code></span></dt><dd><p>This variable tell which intervals should be asked for in exercises
187
187
    using the <code class="literal">harmonicinterval</code> module. 1 for minor second, 2 for major
188
188
    second, 3 or minor third etc. Example that will practise thirds:</p><pre class="programlisting">intervals = [3, 4]</pre><p>Modules: <code class="literal">harmonicinterval</code>.</p></dd><dt><span class="term">
189
 
    <a class="indexterm" name="id3081178"></a><code class="varname"><a name="lf-test"></a>test</code></span></dt><dd><p>
 
189
    <a class="indexterm" name="id2832739"></a><code class="varname"><a name="lf-test"></a>test</code></span></dt><dd><p>
190
190
        This variable defines the test for the exercise. In a test,
191
191
        Solfege will ask all the questions in the lesson file a number
192
192
        of times. 
198
198
        and <code class="literal">singinterval</code>.</p></dd><dt><span class="term">
199
199
    
200
200
    <code class="varname"><a name="lf-test_requirement"></a>test_requirement</code></span></dt><dd><p>
201
 
    <a class="indexterm" name="id3081242"></a>
 
201
    <a class="indexterm" name="id2832803"></a>
202
202
    This variable defines how large percentage of the questions
203
203
    has to be answered correctly to pass the test. Example:
204
204
    </p><pre class="programlisting">test_requirement = "90%"</pre><p>Modules: <code class="literal">harmonicinterval</code>,
229
229
       <code class="literal">elembuilder</code>.</p></dd><dt><span class="term">
230
230
    
231
231
    <code class="varname"><a name="lf-at_question_start"></a>at_question_start</code>
232
 
    <a class="indexterm" name="id3081424"></a>
 
232
    <a class="indexterm" name="id2832984"></a>
233
233
    
234
234
    <code class="literal"></code></span></dt><dd><p>This variable changes what happens when the user clicks
235
235
    <span class="guibutton">New</span>. By default, Solfege will play the music when