<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Beats</title> <link rel="stylesheet" href="csound.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="PartReference.html" title="Part III. Reference" /> <link rel="prev" href="CscoreAdvancd.html" title="More Advanced Examples" /> <link rel="next" href="Example.html" title="" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">Beats</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="CscoreAdvancd.html">Prev</a> </td> <th width="60%" align="center">Part III. Reference</th> <td width="20%" align="right"> <a accesskey="n" href="Example.html">Next</a></td> </tr> </table> <hr /> </div> <div class="chapter" title="Beats"> <div class="titlepage"> <div> <div> <h2 class="title"><a id="BeatsTop"></a>Beats</h2> </div> </div> </div> <p> <a id="IndexBeats" class="indexterm"></a> <span class="emphasis"><em>Beats</em></span> is an alternative score language that is aimed at specifying simple scores in standard western tunings and rhythms. <span class="emphasis"><em>Beats</em></span> can be invoked via the CsScore component of a standard .csd score with <span class="emphasis"><em>bin="beats"</em></span> or as stand-alone program which generates a standard numeric score. </p> <p> As a stand-alone the program reads standard input and writes to standard output. </p> <div class="section"> <div class="titlepage"></div> <p> The <span class="emphasis"><em>beats</em></span> language is very simple, having only 5 kinds of statement, and only one of them has any complexity. In general the introductory word for each statement type is case insensitive, so "QUIT", "quit", "QuIt"... are all the same. Comments can be introduced in either ANSI C89 format or C++ (that is either /* ... */ or // to the end of line) or Csound's semicolo. </p> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"> <span class="emphasis"> <em>QUIT</em> </span> <p> Causes beats to exit. For flexibility the command <span class="emphasis"><em>END</em></span> is also accepted for the identical action. </p> </li> <li class="listitem"><span class="emphasis"><em>BEATS</em></span>=integer <p> Sets the number of beats per minute for the following score until the end or until it is reset. The default value is 60bpm. The token <span class="emphasis"><em>BPS</em></span> is also acceptable instead of BEATS. </p></li> <li class="listitem"><span class="emphasis"><em>PERMEASURE</em></span>=integer <p> Sets the number of beats in a bar. The default value is 4. </p></li> <li class="listitem"> <span class="emphasis"> <em>BAR</em> </span> <p> Start a new bar. </p> </li> <li class="listitem"><span class="emphasis"><em>BAR</em></span> integer <p> Start the bar whose number is given. </p></li> <li class="listitem"><span class="emphasis"><em>i</em></span> integer attributes <p> Specified a note event for the numbered instrument. The attributes may be any of a pitch, duration or dynamic, or a positioning of the note to a beat or measure, and can be in any order. </p><p> Pitches are specified with a conventional note name (English form) in upper case optionally followed by a #, x (for double sharp), b (for flat) or bb (for double flat). A note of Z is a rest (think zzzz). All notes except rests must be followed by an octave number, with A4 being international A (440Hz). Pitches are passed to Csound in Hertz in the parameter p4, and are twelve tone equal temprament. </p><p> Durations are coded in lower case with the initial letter of the name. </p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><span class="emphasis"><em>ed</em></span> Dotted eighth note (three quarters of a beat) </li><li class="listitem"><span class="emphasis"><em>et</em></span> Triplet eighth note (third of a beat) </li><li class="listitem"><span class="emphasis"><em>e</em></span> Eighth note (half a beat) </li><li class="listitem"><span class="emphasis"><em>hd</em></span> Dotted half note (three beats) </li><li class="listitem"><span class="emphasis"><em>ht</em></span> Triplet half note (one and a third beats) </li><li class="listitem"><span class="emphasis"><em>h</em></span> Half note (two beats) </li><li class="listitem"><span class="emphasis"><em>qd</em></span> Dotted quarter note (one and a half beats) </li><li class="listitem"><span class="emphasis"><em>qt</em></span> Triplet quarter note (two thirds of a beat) </li><li class="listitem"><span class="emphasis"><em>q</em></span> Quarter note (one beat) </li><li class="listitem"><span class="emphasis"><em>sd</em></span> Dotted sixteenth note (Three eighths of a beat) </li><li class="listitem"><span class="emphasis"><em>st</em></span> Triplet sixteenth note (sixth of a beat) </li><li class="listitem"><span class="emphasis"><em>s</em></span> Sixteenth note (quarter of a beat) </li><li class="listitem"><span class="emphasis"><em>th</em></span> Thirty-second note (an eighth of a beat) </li><li class="listitem"><span class="emphasis"><em>w</em></span> Whole note (four beats) </li></ul></div><p> Durations can be added together by giving more that one duration. To make this more intuitive a + sign can be used instead of white space. </p><p> The dynamics are written in conventional notation, that is fff, ff, f, mf, mp, p, pp, ppp. These are passed to the instrument as p5 as 0 for fff, and one less dB for each step below. The default dynamic is fortissimo. </p><p> If any of these attributes is missing it carried forward from the previous note, with beat position being incremented to the end of the previous note. </p><p> In addition an event can be directed to a particular measure with an m attribute or a particular beat with a b. </p></li> </ul> </div> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="CscoreAdvancd.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="PartReference.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="Example.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">More Advanced Examples </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> </td> </tr> </table> </div> </body> </html>