[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/music/sheet_music.c</h2>
An inherit for sheet music. Can be used with books or paper and the
actual skills testing is handled by the musical instrument.<p>Written by Kaylar
<p>Started July 2004<h2>Method index</h2>
<ul>
<li><a href="#add_music">add_music</a>(int, string *)<br/>
This function adds music to the sheet music
<li><a href="#query_instrument">query_instrument</a>()<br/>
This returns the name or the path of the instrument the sheet music can
be played with
<li><a href="#query_instrument_type">query_instrument_type</a>()<br/>
This returns the type of instrument that can be used with the sheet music
<li><a href="#query_music">query_music</a>(int)<br/>
This returns the messages associated with the page number.
<li><a href="#query_primer">query_primer</a>()<br/>
This returns a non-zero if the sheet music is a primer.
<li><a href="#query_sheet_music">query_sheet_music</a>()<br/>
This is always true.
<li><a href="#set_instrument">set_instrument</a>(string)<br/>
This function sets a specific instrument the sheet music can be used with
<li><a href="#set_instrument_type">set_instrument_type</a>(string)<br/>
This function sets the instrument type the sheet music can be played by.
<li><a href="#set_primer">set_primer</a>(int)<br/>
This function sets whether the sheet music is a primer.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt><a name="add_music">
add_music</a><pre>
void add_music(int page_number,
               string * messages)
</pre><dd><br />
This function adds music to the sheet music<br />
<br />
<dd><b>Parameters:</b><br />
page_number - If used with paper the page number should be set to 0,
 if used with a book the number should correspond to the page you wish the
 music to appear on<br />
*messages - An array of eight messages and one difficulty level.
 Firstly successes from marginal to critical then failures from marginal
 to critical.  Should suit "Womble plays <your message here> from <sheet
 music name> on his guitar.".  All eight messages need to be included.
 The last part of the array should be the difficulty level of the music,
 either "easy", "medium", "difficult" or "expert". Tunes in primers will
 automatically be less difficult than other types of music<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_music">query_music()
</a><br /><br /><dd><b>Example:</b>
<br/><pre> add_music( 4, ({ "a bar of Three Blind Mice", "Three Blind Mice",
   "an upbeat version of Three Blind Mice", "an moving rendition of "
   "Three Blind Mice", "something that sounds similar to Three Blind "
   "Mice", "a terrible noise", "a few horrible bars of something",
   "something that could be Three Blind Mice wishing they were Three "
   "Deaf Mice", "easy" }) );</pre>
<dt><a name="query_instrument">
query_instrument</a><pre>
string query_instrument()
</pre><dd><br />
This returns the name or the path of the instrument the sheet music can
be played with<br />
<br />
<dd><b>Returns:</b>
<br />the path or name of the instrument<br /><br />
<dd><b>See also:</b>
<br /><a href="#set_instrument">set_instrument()
</a><br /><br />
<dt><a name="query_instrument_type">
query_instrument_type</a><pre>
string query_instrument_type()
</pre><dd><br />
This returns the type of instrument that can be used with the sheet music<br />
<br />
<dd><b>Returns:</b>
<br />the type of instrument; percussion, wind, stringed or keyboard<br /><br />
<dd><b>See also:</b>
<br /><a href="#set_instrument_type">set_instrument_type()
</a><br /><br />
<dt><a name="query_music">
query_music</a><pre>
string * query_music(int page_number)
</pre><dd><br />
This returns the messages associated with the page number.<br />
<br />
<dd><b>Returns:</b>
<br />the musical messages associated with that page<br /><br />
<dd><b>See also:</b>
<br /><a href="#add_music">add_music()
</a><br /><br />
<dt><a name="query_primer">
query_primer</a><pre>
int query_primer()
</pre><dd><br />
This returns a non-zero if the sheet music is a primer.<br />
<br />
<dd><b>Returns:</b>
<br />1 if the book is a primer.<br /><br />
<dd><b>See also:</b>
<br /><a href="#set_primer">set_primer()
</a><br /><br />
<dt><a name="query_sheet_music">
query_sheet_music</a><pre>
int query_sheet_music()
</pre><dd><br />
This is always true.<br />
<br />
<dd><b>Returns:</b>
<br />1, it is sheet music.
<br /><br />

<dt><a name="set_instrument">
set_instrument</a><pre>
void set_instrument(string instrument)
</pre><dd><br />
This function sets a specific instrument the sheet music can be used with<br />
<br />
<dd><b>Parameters:</b><br />
instrument - The name or path of the instrument the sheet music can
 be used with<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_instrument">query_instrument()
</a><br /><br /><dd><b>Example:</b>
<br/><pre>set_instrument( "/obj/music/instruments/wind/flute" );</pre><br/><pre>
set_instrument( "drum" );</pre>
<dt><a name="set_instrument_type">
set_instrument_type</a><pre>
void set_instrument_type(string type)
</pre><dd><br />
This function sets the instrument type the sheet music can be played by.
This must be set.  If you then want to limit it to one instrument,
use set_instrument()<br />
<br />
<dd><b>Parameters:</b><br />
type - The type of instrument the sheet music can be used with, should
 be percussion, wind, stringed or keyboard<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_instrument_type">query_instrument_type()
</a><br /><br /><dd><b>Example:</b>
<br/><pre>set_instrument_type( "wind" );</pre>
<dt><a name="set_primer">
set_primer</a><pre>
void set_primer(int i)
</pre><dd><br />
This function sets whether the sheet music is a primer.<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_primer">query_primer()
</a><br /><br />
</dl>
[an error occurred while processing this directive]

