Esempio n. 1
0
 function show_left()
 {
     global $user, $count;
     output_block_start($user['username']);
     echo 'Member since ' . date('Y-m-d', $user['regdate']) . '<br/>' . number_format($count) . ' sequences';
     output_block_end();
 }
Esempio n. 2
0
function output_message($title, $msg)
{
    clear_buffer();
    output_header($title);
    output_block_start($title);
    echo $msg;
    output_block_end();
    output_footer();
    exit;
}
Esempio n. 3
0
function show_left()
{
    global $searchform;
    output_block_start('Search Titles');
    form_display($searchform);
    output_block_end();
    output_block_start('Sort by');
    echo '<ul>';
    showSortLink(1, "Newest");
    showSortLink(2, "Popular");
    showSortLink(3, "Longest");
    echo '</ul><ul>';
    showDateLink(1, "Today");
    showDateLink(2, "This week");
    showDateLink(3, "This month");
    showDateLink(4, "All time");
    echo '</ul>';
    output_block_end();
}
Esempio n. 4
0
<?php

output_header("Chat Logs");
output_block_start("Chat Logs");
?>
<style type="text/css">
td.left {
	width: 160px;
	background-color: rgba(107, 107, 107, 0.8);
	color: white;
	padding: 5px;
}
.left a {
	font-weight: bold;
	color: white;
}
#chat_table {
	background-color: rgba(107, 107, 107, 0.4);
	border: 1px solid #505050;
    margin-bottom: 10px;
}
#chat_table table {
	margin: 0;
	padding: 0;
}
#chat_table td {
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
td.sendbar {
	background-color: #c0c0c0;
	padding: 5px;
Esempio n. 5
0
<?php

mod('form');
$form = form_create('Continue', 'default', 'process_form', 'post');
function process_form()
{
    global $form, $root, $userid;
    $f = $_FILES['file'];
    $name = $f['name'];
    $f['name'] = md5(rand(0, 1000000000));
    $path = $root . '/uploads/midi/' . $f['name'];
    if (!move_uploaded_file($f['tmp_name'], $path)) {
        form_add_error($form, 'Error uploading file.');
    } else {
        header('Location: /import2/' . $f['name'] . '?title=' . urlencode($name));
        exit;
    }
}
form_add_param($form, 'File', 'file', 'file;mid;20000000', '', 100, 14);
form_process();
output_header("Upload MIDI File");
output_block_start("Upload MIDI File");
echo '<p>Keep in mind that not all MIDI files will work well! Many MIDI files use features that are not supported by the sequencer; simple ones work best.</p>';
echo '<p>Examples: <a href="http://onlinesequencer.net/4679">Baba Yetu</a>, <a href="http://onlinesequencer.net/4680">Fangad aven korvring</a>, <a href="http://onlinesequencer.net/4681">Cliffs of Dover</a></p>';
form_display($form);
output_block_end();
output_footer();
Esempio n. 6
0
output_header("Experiments");
output_block_start("Random Sequences");
?>
<p>
Visit <a href="http://onlinesequencer.net/?random">http://onlinesequencer.net/?random</a> to autoplay random sequences that seem to be decent (with a lot of notes in the same key).
</p>
<?php 
output_block_end();
output_block_start("Synthesis");
?>
<p>
Add <code>?synth</code> to any sequence's URL to generate the sounds in your browser, instead of using samples. This will also respect the note lengths. All instruments will sound the same and it doesn't work well in any browser yet, but it's still pretty cool!
</p>
<?php 
output_block_end();
output_block_start("Console Tricks");
?>
<p>
You can do some hacky stuff using the Chrome JavaScript console. Type <code>grid=(1/4)/(1/3)</code> to change the grid size to whatever you want, where 1/3 is the new note length.
</p>
<p>
You can also add notes with JavaScript. This adds a bunch of random stuff and sounds terrible:
</p>
<pre>
for(var i = 0; i < 500; i++) {
    song.addNote(new Note(song,
    piano[Math.round(Math.random()*piano.length)] /*note (piano is an array of B7...C2) */,
    Math.round(Math.random()*64) /*time*/,
    1 /*length in 1/4 intervals*/,
    0 /*instrument*/));
}