~presto-developers/presto/trunk

« back to all changes in this revision

Viewing changes to doc/programmer-guide.tex

  • Committer: Joao Paulo Pizani Flor
  • Date: 2011-01-09 18:11:28 UTC
  • Revision ID: joaopizani@gmail.com-20110109181128-56nh94wtczzi809x
Introduction to the programmer guide written; Rests are now completely handled and muifyed correctly

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
\begin{document}
12
12
    \maketitle
13
13
 
14
 
    Hello, dear programmer! In this document you will (hopefully) find all information regarding how to write
15
 
    your programs using using the Presto programming language. The Presto language is very different from
16
 
    conventional programming language, and so will be this manual.
17
 
 
18
 
    In Presto you write music and this music represents an algorithm. Therefore this will be a document about
19
 
    how to write music\ldots nice, huh? We'll give you the basic guidelines of how the language \emph{works},
20
 
    i.e, it's fundamental constructs, and also give some tips of style of how to write some very common
21
 
    programming idioms.
 
14
    \begin{abstract}
 
15
        Hello, dear programmer! In this document you will (hopefully) find all information regarding how to write
 
16
        your programs using using the Presto programming language. The Presto language is very different from
 
17
        conventional programming languages, and so will be this manual.
 
18
 
 
19
        In Presto you write music and this music represents an algorithm. Therefore this will be a document about
 
20
        how to write music\ldots nice, huh? We'll give you the basic guidelines of how the language \emph{works},
 
21
        i.e, it's fundamental constructs, and also give some tips of style of how to write some very common
 
22
        programming idioms.
 
23
    \end{abstract}
 
24
 
 
25
    \section*{Introduction, or ``What we wanted Presto to be''}
 
26
        So, what did we have in mind when designing a ``musical language''? A very short answer is: we wanted
 
27
        that the user be able to create \emph{beautiful} programs. Presto programs are not meant to be
 
28
        efficient, although some simple optimizations are performed; it's an esoteric language, to demonstrate
 
29
        the regular and algorithmic nature of music (and the musical nature of algorithms). This simple
 
30
        thought has guided our design in several ways:
 
31
        \begin{itemize}
 
32
            \item There are multiple ways of achieving the same computational task. We wanted to give the
 
33
                programmer (or rather, the \emph{composer}) as much freedom as possible. For instance, to
 
34
                build an arithmetic series the composer can use several tempos, several rhythmic patterns and
 
35
                various melodic patterns also.
 
36
            \item Whenever possible, algorithmic concepts are to be represented by their direct musical
 
37
                counterpart. For example, an ascending numerical sequence can be built using ascending
 
38
                melodies, and a quicker rhythm makes the sequence grow faster.
 
39
            \item Our \emph{machine model} should be as simple as possible: a small number of primitive
 
40
                operations would enable our goal to give more freedom to the composer, even though it might be
 
41
                \emph{more difficult} to write Presto programs. We've settled on a stack machine model, with
 
42
                one single stack and a very limited number of operations.
 
43
        \end{itemize}
 
44
 
 
45
 
 
46
 
22
47
\end{document}