Add stuff
This commit is contained in:
commit
359152de7c
9 changed files with 123 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "moosek"
|
||||
version = "0.1.0"
|
8
Cargo.toml
Normal file
8
Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "moosek"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
14
LICENSE
Normal file
14
LICENSE
Normal file
|
@ -0,0 +1,14 @@
|
|||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
|
20
songs/bit_waltz.sh
Normal file
20
songs/bit_waltz.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
cargo run -q 4000 | aplay -f S16_LE -r 4000
|
||||
cargo run -q 5000 | aplay -f S16_LE -r 5000
|
||||
cargo run -q 6000 | aplay -f S16_LE -r 6000
|
||||
cargo run -q 4000 | aplay -f S16_LE -r 4000
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 3500 | aplay -f S16_LE -r 3500
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 3500 | aplay -f S16_LE -r 3500
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 3500 | aplay -f S16_LE -r 3500
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 3500 | aplay -f S16_LE -r 3500
|
||||
cargo run -q 2000 | aplay -f S16_LE -r 2000
|
||||
cargo run -q 3500 | aplay -f S16_LE -r 3500
|
9
songs/furelise.sh
Normal file
9
songs/furelise.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
cargo run -q 4284 | aplay -q -r 8567
|
||||
cargo run -q 4043 | aplay -q -r 8086
|
||||
cargo run -q 4284 | aplay -q -r 8567
|
||||
cargo run -q 4043 | aplay -q -r 8086
|
||||
cargo run -q 4284 | aplay -q -r 8567
|
||||
cargo run -q 3210 | aplay -q -r 6420
|
||||
cargo run -q 3815 | aplay -q -r 7631
|
||||
cargo run -q 3400 | aplay -q -r 6799
|
||||
cargo run -q 2860 | aplay -q -r 5720
|
44
songs/scale.sh
Executable file
44
songs/scale.sh
Executable file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/sh
|
||||
echo "C4"
|
||||
cargo run -q 3400 | aplay -q -r 3400
|
||||
echo "C#4"
|
||||
cargo run -q 3600 | aplay -q -r 3600
|
||||
echo "D4"
|
||||
cargo run -q 3820 | aplay -q -r 3820
|
||||
echo "D#4"
|
||||
cargo run -q 4045 | aplay -q -r 4045
|
||||
echo "E4"
|
||||
cargo run -q 4285 | aplay -q -r 4285
|
||||
echo "F4"
|
||||
cargo run -q 4540 | aplay -q -r 4540
|
||||
echo "F#4"
|
||||
cargo run -q 4810 | aplay -q -r 4810
|
||||
echo "G4"
|
||||
cargo run -q 5096 | aplay -q -r 5096
|
||||
echo "G#4"
|
||||
cargo run -q 5399 | aplay -q -r 5399
|
||||
echo "A4"
|
||||
cargo run -q 5720 | aplay -q -r 5720
|
||||
echo "A#4"
|
||||
cargo run -q 6061 | aplay -q -r 6061
|
||||
echo "B4"
|
||||
cargo run -q 6420 | aplay -q -r 6420
|
||||
echo "Sleeping..."
|
||||
sleep 1
|
||||
echo "C4"
|
||||
cargo run -q 3400 | aplay -q -r 3400
|
||||
echo "D4"
|
||||
cargo run -q 3820 | aplay -q -r 3820
|
||||
echo "E4"
|
||||
cargo run -q 4285 | aplay -q -r 4285
|
||||
echo "F4"
|
||||
cargo run -q 4540 | aplay -q -r 4540
|
||||
echo "G4"
|
||||
cargo run -q 5096 | aplay -q -r 5096
|
||||
echo "A4"
|
||||
cargo run -q 5720 | aplay -q -r 5720
|
||||
echo "B4"
|
||||
cargo run -q 6420 | aplay -q -r 6420
|
||||
echo "C5!"
|
||||
cargo run -q 6799 | aplay -q -r 6799
|
||||
|
7
songs/utilty.sh
Executable file
7
songs/utilty.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
# utilty.sh - Converts standard actual note frequencies to aplay frequencies.
|
||||
declare -i e=$1
|
||||
|
||||
declare -i result=e*13
|
||||
|
||||
echo "cargo run -q $result | aplay -q -r $result"
|
13
src/main.rs
Normal file
13
src/main.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
use std::env;
|
||||
use std::str::FromStr;
|
||||
|
||||
fn main() {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
let input = i32::from_str(&args[1]).unwrap_or(0);
|
||||
let passes = input / 50;
|
||||
let mut str = "".to_string();
|
||||
for _i in 0..passes {
|
||||
str.push_str("bbbbbbbbbbbbbbbbbbbbbbbbb\n")
|
||||
}
|
||||
println!("{}",str);
|
||||
}
|
Reference in a new issue