Skip to content

Instantly share code, notes, and snippets.

@horndude77
horndude77 / tone.html
Last active September 14, 2024 07:09
Simple HTML Tone Generator
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Tone Generator</title>
<script>
var context = null;
var usingWebAudio = true;
@horndude77
horndude77 / gist:7165565
Created October 26, 2013 05:19
Attempting to understand rust pointers.
enum List<T> {
End,
Node { val: T, next: ~List<T> },
}
fn print_list<T:ToStr>(list: List<T>) {
match list {
End => { println("<X>"); },
Node{val, next} => {
println(val.to_str());
\version "2.13.17"
melody = \relative c'
{
\clef treble
\key b \minor
R1*2 |
r8 f fis gis gis fis f4 |
r8 f dis cis f dis cis4 |
r8 cis dis f \times 2/3 {dis f dis} cis4 |
\version "2.12.0"
violin = \relative c'
{
\clef treble
\times 2/3 {g8([ c e]} \times 2/3 {g8[ c e]} g4 e)
\times 2/3 {aes,,8([ c ees]} \times 2/3 {aes8[ c ees]} aes4 ees)
\times 2/3 {bes,8([ d f]} \times 2/3 {bes8[ d f]} bes4) \times 2/3 {bes8[ bes bes]}
c1
}