<?php
//enable visitors to see the PHP source code of current file
$me basename($_SERVER['PHP_SELF']);
if(isset(
$_GET['showPHP'])){
    
show_source("$me");    
    die();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="assets/css.css" type="text/css" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Flash game</title>
<?php 
include("includes/header.inc.php");
?>

<!--This meta element defines a description of my page:-->
<meta name="description" content="Otomata" /> 

<!--This meta element defines keywords for my page:-->
<meta name="keywords" content="otomata, game, flash" /> 

<!--See about swffit.js here http://swffit.millermedeiros.com.-->
<script type="text/javascript" src="js/swfobject.js"></script>
    <script type="text/javascript">
        var flashvars = {};
        var params = {};
        params.wmode = "transparent";
        swfobject.embedSWF("flash.swf", "minFlash", "360", "300", "9.0.0", "expressInstall.swf", flashvars, params);
        swfobject.embedSWF("swf/otomata.swf", "otomata", 
        "760", "550", "9.0.0", "expressInstall.swf", flashvars, params); 
    </script>
</head>
<body>
<div id="wrapper">
<?php 
include("includes/top-navigation.inc.php");
?>

        <div id="center-box">
<?php 
include("includes/header_img.inc.php");
?>
            <div id="left-right-padding">
<?php 
include("includes/navigation.inc.php");
?>
                <div style="clear: left;"></div>
                <h1>Otomata</h1>
                <h2>Otomata – Online Generative Music Instrument</h2>
            </div>
            <div id="Small-left-right-padding">
                <div id="otomata">
                    <h1>Alternative content</h1>
                    <p><a href="http://www.adobe.com/go/getflashplayer">
                    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
                    alt="Get Adobe Flash player" />
                    </a></p>
                </div>
            
                <br/>
                <iframe width="640" height="510" src="http://www.youtube.com/embed/lHCdHh1eSi0" 
                frameborder="0" allowfullscreen></iframe>
                <br/>
                <p>Otomata is a generative sequencer. 
                It employs a <a href="http://en.wikipedia.org/wiki/Cellular_automaton">cellular automaton</a> 
                type logic I&rsquo;ve devised to produce sound events.</p>
                <p>Each alive cell has 4 states: Up, right, down, left. 
                at each cycle, the cells move themselves in the direction of their internal states. 
                If any cell encounters a wall, it triggers a pitched sound whose frequency is 
                determined by the xy position of collision, and the cell reverses its direction. 
                If a cell encounters another cell on its way, it turns itself clockwise.</p>
                <p>This set of rules produces chaotic results in some settings, therefore you 
                can end up with never repeating, gradually evolving sequences. 
                Go add some cells, change their orientation by clicking on them, 
                and press play, experiment, have fun.</p>
                <p>If you encounter something you like, just press &ldquo;Copy Piece Link&rdquo; 
                and save it somewhere, or better, share it!</p>
              <br/>
            </div>
        </div>
        <br/>
        <br/>
<?php 
include("includes/footer.inc.php");
?>

    </div>
</div>
</body>
</html>