Toggle search
Search
Toggle menu
notifications
Toggle personal menu
Editing
Component/Sound
(section)
From Turing Complete
Views
Read
Edit
Edit source
View history
associated-pages
Page
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Inputs== {|class="wikitable" !colspan=2| Command type !Action |- | <code>0</code> | No request || Do nothing. Allow any currently playing note to continue. |- | <code>1</code> | Play | Start playing a note. |- | <code>2</code> | Reset and Play | Stop the current note and start a new one. |- | <code>3</code> | Stop | Stop the currently playing note. |} <code>Note></code> specifies which note to play: The defaut sound samples are described here. There are 5 instruments each with a different timbre and range of 24 notes each a semitone apart. Each can be overriden with a custom sample {|class="wikitable" ! <code>Note</code> values ! Instrument ! Range |- || 0-23 || 0 || C4 to B5 |- || 24-47 || 1 || C4 to B5 |- || 48-71 || 2 || C4 to B5 |- || 72-95 || 3 || C3 to B4 |- || 96-119 || 4 || Pitch unclear |} <code>Pitch</code> is a signed 8-bit integer that scales the frequency of the note. <code>f -> f * (pitch + 129) / 129 </code> A pitch value of 8 will raise a note by about a semitone.
Summary:
Please note that all contributions to Turing Complete are considered to be released under the Creative Commons Attribution-ShareAlike (see
TuringComplete:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)