Mostrando entradas con la etiqueta blehrg. Mostrar todas las entradas
Mostrando entradas con la etiqueta blehrg. Mostrar todas las entradas

Band Name Generator - Portable Version

After I wrote the funky name generator i stumbled upon a little problem.  I can't run the thing on my phone, which is the one computing device i carry with me just about everywhere.

I tried different ways to run the jar file on my android jb device, but couldn't.  I'd say that's pretty dumb, if you ask me.  All android apps are written in java, but then it won't run java archive files?  Bummer...

So, I had to make it portable.

Luckily enough, processing 2 is quite a miracle worker, and exporting to javascript is, literally, dummy-proof... thank god :p

So, after a little editing (added a few extra items to the arrays), here is the finished product, ready to be viewed on any javascript-capable browser.

No love for links2 :(



-OR-

Try It

This is what it looks like on the browser:



To generate a new name, simply refresh the page.

Beepy Mañanitas

Las mañanitas, for those who don't have a clue :)

I guess I'm just the kind of nerd who'll put the computer to sing, instead of singing it myself :p



So yeah... there it is.

code:

#!/bin/bash

beep -f 294 -l 400 -n -f 294 -l 400 -n -f 392 -l 1600 -n -f 370 -l 400 -n -f 392 -l 400 -n -f 440 -l 1200 -n -f 370 -l 400 -n -f 392 -l 400 -n -f 440 -l 400 -n -f 494 -l 1200 -n -f 392 -l 400 -n -f 440 -l 400 -n -f 494 -l 400 -n -f 523 -l 2400 -n -f 494 -l 1200 -n -f 440 -l 400 -n -f 392 -l 400 -n -f 370 -l 400 -n -f 440 -l 800 -n -f 392 -l 400 -n -f 370 -l 400 -n -f 392 -l 400 -n -f 440 -l 400 -n -f 494 -l 800 -n -f 523 -l 800 -n -f 440 -l 800 -n -f 392 -l 1200

exit 0

We're using beep which is a pcspkr beeper for linux systems.  The f flag determines the frequency (notice we're at A440 middle C octave), the l flag determines length (in milliseconds) and the n flag tells the program to generate a new beep.  The code in the video is not as effective as the code shown above.  In the video, I did beep -f xxx -l xxx; beep -f xxx -l xxx... etc... i learned about the n flag about 5 minutes after I'd already done it :)

This was done using a 2001 Dell Inspiron 2500 Laptop (yeah it's 13 years old), running Debian GNU/Linux 6 (squeeze) with a 486 kernel.