Initial Commit

This commit is contained in:
2018-05-19 02:20:19 +02:00
commit 8621248968
6554 changed files with 1121559 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<div id="contentdiv">
<div class="col s12" id="maps">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2507.5737539170027!2d3.7063064159308783!3d51.060957851067016!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47c37113c8d9fd6b%3A0xdd513b9ceba13bb6!2sOdisee+Technologiecampus+Gent!5e0!3m2!1snl!2sbe!4v1525122633926" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>
</div>
<ul class="collection with-header">
<li class="collection-header"><h4>Made possible by</h4></li>
<li class="collection-item">Karim Seghir</li>
<li class="collection-item">Beppe Vanrolleghem</li>
<li class="collection-item">Sebastiaan De Baedts</li>
<li class="collection-item">Simon Martin</li>
</ul>
</div>

View File

@@ -0,0 +1,38 @@
<div class="col-centered">
<div style="position: fixed; top: 50%; left: 50%; margin-top: -50px; margin-left: -225px;">
<a href="javascript:startPlaying();">Click to play!</a>
<div id="player"></div>
</div>
{{#each tweets}}
<div class="CardContainer extraBorder">
<div class="card">
<div class="card-body" style="width: 24rem;">
<span class="card-title">{{this.UserName}}: {{this.Date}}</span>
<p>String: <b>{{this.text}}</b></p>
<p>Created By: <b>{{this.UserName}}</b></p>
<p>Success : <b>{{this.success}}</b></p>
{{#if this.location}}
<form action="http://localhost:8080/download" method="POST">
<input type="hidden" name="typeScript" value="downloadMid"/>
<input type="hidden" name="location" value="{{this.location}}">
<button type="submit" formmethod="post">DownloadMid</button>
</form>
<form action="http://localhost:8080/download" method="POST">
<input type="hidden" name="typeScript" value="downloadWav"/>
<input type="hidden" name="location" value="{{this.location}}">
<button type="submit" formmethod="post">DownloadWav</button>
</form>
<form action="http://localhost:8080/download" method="POST">
<input type="hidden" name="typeScript" value="play"/>
<input type="hidden" name="location" value="{{this.location}}">
<button type="submit" formmethod="post">play</button>
</form>
<button onclick="javascript:test('{{this.location}}');">Click to play!</button>
{{/if}}
</div>
</div>
</div>
{{/each}}
</div>

View File

@@ -0,0 +1,289 @@
<div id="contentdiv">
<div class="row">
<div class="col s8">
<div class="card">
<div class="card-content white-text" id="syntax">
<div class="row"><span class="card-title">Syntax</span></div>
<p>The usage of european (Do Re Mi Fa Sol La Si/Ti) notes are allowed and will work just as well as american notation (A B C D E F G). After that we signify if the note is flat (b) or sharp (#) and then we put the octave we want the note to be
on.</p>
<br>
<div class="row"><span class="card-title">Pauses</span></div>
<p>a "p" sign signifies a pause, it works the same as a normal note, but is just silent. ex: "pq" is a quarter note pause</p>
<br>
<div class="row"><span class="card-title">Timing</span></div>
<p>Timing was a little harder to do in a user friendly manner, however. this is how the script understands length of notes.</p>
<ul>
<li>- O is a whole note </li>
<li>- o is a half note </li>
<li>- q is a quarter note </li>
<li>- t is an eight note </li>
<li>- s is a sixteenth note </li>
</ul>
<p>you would add these after your notes to signify how long the note should last</p>
<br>
<div class="row"><span class="card-title">Instruments</span></div>
<p>Right now i have it set that you have to set your <a href="#instruments">instrument</a> before you start your song part(?). The syntax for this is Inst($$$), with $$$ representing the name of one of the instruments or the instrument number.
these are the program change event values that is used in General Midi (GM) at the end of this readme i will include a list of all the numbers with their respective instruments</p>
<br>
<div class="row"><span class="card-title"><Tracks</span></div>
<p>Right now this feature is not yet fully implimented because of the way syntax works. I would really like to implement it, but damn is it hard to find an easy way to put this in text form.</p>
<br>
<div class="row"><span class="card-title">Examples</span></div>
<p><b>| E4q G#4q B4q pq |</b></p>
<br>
<p>this would result in the notes E G# and B being played in the 4th octave all for 1/4th of a bar, and then there is a 1/4th of a bar of rest.</p>
<p>chords are created using the ( ) signs. you can put multiple notes inside of the () without marking their timing, and then mark the time after the chord.</p>
<br>
<p><b>| ( E4 G#4 B4 )o po |</b></p>
<br>
<p>this would result in half a bar of the chord e-major being played, and then half a bar of pause.</p>
</div>
</div>
</div>
<div class="col s4" id="boxx">
<div class="card" id="boxxcard">
<div class="card-content white-text">
<span class="card-title">Compose a song</span>
<div class="row">
<form class="col s12">
<div class="row">
<div class="input-field col s12">
<form action="/index" method="POST">
<p>
Author:
</p>
<input type="text" name="user"/>
<p>
Title:
</p>
<input type="text" name="title"/>
<p>
Content
</p>
<input type="text" name="text"/>
<button type="submit" formmethod="post">Submit</button>
</form>
<textarea id="textarea1" class="materialize-textarea"></textarea>
<label for="textarea1">...</label>
</div>
</div>
</form>
</div>
<div class="card-action">
<a href="#">Send !</a>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col s8">
<div class="card">
<div class="card-content white-text" id="instruments">
<div class="row"><span class="card-title">Instrument list</span></div>
<p><b>Piano</b></p>
<ul>
<li>1 Piano</li>
<li>2 Bright_Piano</li>
<li>3 Electric_Grand_Piano</li>
<li>4 Honkytonk_Piano</li>
<li>5 Electric_Piano</li>
<li>6 Electric_Piano_2</li>
<li>7 Harpsichord</li>
<li>8 Clavinet</li>
</ul>
<br>
<p><b>Chromatic Percussion</b></p>
<ul>
<li>9 Celesta</li>
<li>10 Glockenspiel</li>
<li>11 Music_Box</li>
<li>12 Vibraphone</li>
<li>13 Marimba</li>
<li>14 Xylophone</li>
<li>15 Tubular_Bells</li>
<li>16 Dulcimer</li>
</ul>
<br>
<p><b>Organ</b></p>
<ul>
<li>17 Drawbar_Organ</li>
<li>18 Percussive_Organ</li>
<li>19 Rock_Organ</li>
<li>20 Church_Organ</li>
<li>21 Reed_Organ</li>
<li>22 Accordion</li>
<li>23 Harmonica</li>
<li>24 Tango_Accordion</li>
</ul>
<br>
<p><b>Guitar</b></p>
<ul>
<li>25 Acoustic_Guitar_nylon</li>
<li>26 Acoustic_Guitar_steel</li>
<li>27 Electric_Guitar_jazz</li>
<li>28 Electric_Guitar_clean</li>
<li>29 Electric_Guitar_muted</li>
<li>30 Overdriven_Guitar</li>
<li>31 Distortion_Guitar</li>
<li>32 Guitar_Harmonics</li>
</ul>
<br>
<p><b>Bass</b></p>
<ul>
<li>33 Acoustic_Bass</li>
<li>34 Electric_Bass_finger</li>
<li>35 Electric_Bass_pick</li>
<li>36 Fretless_Bass</li>
<li>37 Slap_Bass</li>
<li>38 Slap_Bass_2</li>
<li>39 Synth_Bass</li>
<li>40 Synth_Bass_2</li>
</ul>
<br>
<p><b>Strings</b></p>
<ul>
<li>41 Violin</li>
<li>42 Viola</li>
<li>43 Cello</li>
<li>44 Contrabass</li>
<li>45 Tremolo_Strings</li>
<li>46 Pizzicato_Strings</li>
<li>47 Orchestral_Harp</li>
<li>48 Timpani</li>
</ul>
<br>
<p><b>Ensemble</b></p>
<ul>
<li>49 String_Ensemble</li>
<li>50 SString_Ensemble_2</li>
<li>51 Synth_Strings</li>
<li>52 Synth_Strings_2</li>
<li>53 Choir_Aahs</li>
<li>54 Voice_Oohs</li>
<li>55 Synth_Choir</li>
<li>56 Orchestra_Hit</li>
</ul>
<br>
<p><b>Brass</b></p>
<ul>
<li>57 Trumpet</li>
<li>58 Trombone</li>
<li>59 Tuba</li>
<li>60 Muted_Trumpet</li>
<li>61 French_Horn</li>
<li>62 Brass_Section</li>
<li>63 Synth_Brass</li>
<li>64 Synth_Brass_2</li>
</ul>
<br>
</div>
</div>
</div>
<div class="col s8">
<div class="card">
<div class="card-content white-text" id="instruments">
<div class="row"><span class="card-title">Instrument list (continued)</span></div>
<p><b>Reed</b></p>
<ul>
<li>65 Soprano_Sax</li>
<li>66 Alto_Sax</li>
<li>67 Tenor_Sax</li>
<li>68 Baritone_Sax</li>
<li>69 Oboe</li>
<li>70 English_Horn</li>
<li>71 Bassoon</li>
<li>72 Clarinet</li>
</ul>
<br>
<p><b>Pipe</b></p>
<ul>
<li>73 Piccolo</li>
<li>74 Flute</li>
<li>75 Recorder</li>
<li>76 Pan_Flute</li>
<li>77 Blown_bottle</li>
<li>78 Shakuhachi</li>
<li>79 Whistle</li>
<li>80 Ocarina</li>
</ul>
<br>
<p><b>Synth Lead</b></p>
<ul>
<li>81 Synth_Lead_square</li>
<li>82 Synth_Lead_sawtooth</li>
<li>83 Synth_Lead_calliope</li>
<li>84 Synth_Lead_chiff</li>
<li>85 Synth_Lead_charang</li>
<li>86 Synth_Lead_voice</li>
<li>87 Synth_Lead_fifths</li>
<li>88 Synth_Lead_bass_and_lead</li>
</ul>
<br>
<p><b>Synth Pad</b></p>
<ul>
<li>89 Synth_Pad_new_age</li>
<li>90 Synth_Pad_warm</li>
<li>91 Synth_Pad_polysynth</li>
<li>92 Synth_Pad_choir</li>
<li>93 Synth_Pad_bowed</li>
<li>94 Synth_Pad_metallic</li>
<li>95 Synth_Pad_halo</li>
<li>96 Synth_Pad_sweep</li>
</ul>
<br>
<p><b>Synth Effects</b></p>
<ul>
<li>97 Synth_FX_rain</li>
<li>98 Synth_FX_soundtrack</li>
<li>99 Synth_FX_crystal</li>
<li>100 Synth_FX_atmosphere</li>
<li>101 Synth_FX_brightness</li>
<li>102 Synth_FX_goblins</li>
<li>103 Synth_FX_echoes</li>
<li>104 Synth_FX_scifi</li>
</ul>
<br>
<p><b>Ethnic</b></p>
<ul>
<li>105 Sitar</li>
<li>106 Banjo</li>
<li>107 Shamisen</li>
<li>108 Koto</li>
<li>109 Kalimba</li>
<li>110 Bagpipe</li>
<li>111 Fiddle</li>
<li>112 Shanai</li>
</ul>
<br>
<p><b>Percussive</b></p>
<ul>
<li>113 Tinkle_Bell</li>
<li>114 Agogo</li>
<li>115 Steel_Drums</li>
<li>116 Woodblock</li>
<li>117 Taiko_Drum</li>
<li>118 Melodic_Tom</li>
<li>119 Synth_Drum</li>
<li>120 Reverse_Cymbal</li>
</ul>
<br>
<p><b>Sound Effects</b></p>
<ul>
<li>121 Guitar_Fret_Noise</li>
<li>122 Breath_Noise</li>
<li>123 Seashore</li>
<li>124 Bird_Tweet</li>
<li>125 Telephone_Ring</li>
<li>126 Helicopter</li>
<li>127 Applause</li>
<li>128 Gunshot</li>
</ul>
<br>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,44 @@
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Deez Notes</title>
<meta charset="utf-8">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="scripts/bootstrap.min.js"></script>
<script src="scripts/script.js"></script>
<script src="scripts/synth.min.js"></script>
<script type="text/javascript" src="scripts/wildwebmidi.js"></script>
<script type="text/javascript" src="scripts/midiplayer.js"></script>
<script type="text/javascript" src="scripts/example-song.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/styles.css"/>
</head>
<body>
<div class="navbar navbar-inverse">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="navbar-header">
<a href="index" class="brand-logo navbar-brand"><img src="/img/midi.png" width="30" height="3"/></a>
</div>
<div class="" id="navbarSupportedContent">
<ul class="nav navbar-nav mr-auto">
<li class="nav-item"><a href="index">Home</a></li>
<li class="nav-item"><a href="download">Download</a></li>
<li class="nav-item"><a href="about">About</a></li>
<li class="nav-item"><a href="management">Management</a></li>
<li class="nav-item"><a href="https://twitter.com/MidiConverter" target="_blank">Twitter</a></li>
</ul>
</div>
</nav>
</div>
<div class="container">
{{{body}}}
</div>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<div class="col-centered">
<div class="container">
<form action="/management" method="POST">
<h4>Interpreter Script</h4>
<h6>Arguments/text</h6>
<input type="text" name="textArg"/>
<h7>Title</h7>
<input type="text" name="title" />
<select name="scriptType">
<option value="Interpreter.py">Interpreter</option>
<option value="ClearDb">Clear Database</option>
<option value="TwitterGet">
TwitterGet
</option>
<option value="TweetsToMidi">
TweetsToMidi
</option>
<option value="TweetsToDb">
TweetsToDb
</option>
<option value="Iets">
iets
</option>
</select>
<button type="submit" formmethod="post">Go</button>
</form>
</div>
</div>

View File

@@ -0,0 +1,55 @@
<style>
#wav:after {
content: " " attr(download);
}
#wav:not([href]) {
display: none;
}
</style>
<input type="file" id="midi" accept="audio/midi">
<a id="wav">Download</a>
<script>
var audio;
var input = document.getElementById('midi');
var anchor = document.getElementById('wav');
input.addEventListener('change', function change() {
// clean up previous song, if any
if (anchor.hasAttribute('href')) {
URL.revokeObjectURL(anchor.href);
anchor.removeAttribute('href');
if (audio && !audio.paused) {
audio.pause();
}
}
// check if file exists
if (input.files.length > 0) {
var reader = new FileReader();
var midName = input.files[0].name;
var wavName = midName.replace(/\..+?$/, '.wav');
reader.addEventListener('load', function load(event) {
// convert midi arraybuffer to wav blob
console.log(event.target.result);
var wav = synth.midiToWav(event.target.result).toBlob();
// create a temporary URL to the wav file
var src = URL.createObjectURL(wav);
audio = new Audio(src);
audio.play();
anchor.setAttribute('href', src);
});
// read the file as an array buffer
console.log(input.files[0]);
reader.readAsArrayBuffer(input.files[0]);
// set the name of the wav file
anchor.setAttribute('download', wavName);
}
});
</script>