-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71efe06
commit 1f2be36
Showing
5 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
\chapter{Music} | ||
|
||
\section{Music Macro Language} | ||
|
||
Music Macro Language (MML) has been used since the 1970s to sequence music on computer and video game systems. MML support is included in durexForth, starting with version 1.3. The package is loaded with \texttt{s" mml" load"}. Two demonstration songs can be found in the \texttt{mmldemo} package. | ||
|
||
MML songs are played using the Forth word \texttt{play-mml} which takes three strings, one MML melody for each of the three SID voices. An example song is as follows: | ||
|
||
\begin{verbatim} | ||
: frere-jaques | ||
s" o3l4fgaffgafab->c&c<ab->c&cl8cdc<b-l4af>l8cdc<b-l4affcf&ffcf&f" | ||
s" r1o3l4fgaffgafab->c&c<ab->c&cl8cdc<b-l4af>l8cdc<b-l4affcf&ffcf&f" | ||
s" " play-mml ; | ||
\end{verbatim} | ||
|
||
\section{Commands} | ||
|
||
\begin{description} | ||
\item[cdefgab] The letters \texttt{c} to \texttt{b} represent musical notes. Sharp notes are produced by appending a \texttt{+}, flat notes are produced by appending a \texttt{-}. The length of a note is specified by appending a number representing its length as a fraction of a whole note -- for example, \texttt{c8} represents a C eight note, and \texttt{f+2} an F\# half note. Appending a \texttt{.} increases the duration of the note by half of its value. | ||
\item[o] Followed by a number, \texttt{o} selects the octave the instrument will play in. | ||
\item[r] A rest. The length of the rest is specified in the same manner as the length of a note. | ||
\item[$<$,$>$] Used to step down or up one octave. | ||
\item[l] Followed by a number, specifies the default length used by notes or rests which do not explicitly specify one. | ||
\item[\&] Ties two notes together. | ||
\end{description} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters