Saturday, October 6, 2012



Velato... fa sol la si... dooooooo!!! >_<




A one of a kind.. musical programming language... anyone?
A lot of people love music. Some people say, without music you won't be able to find love. People might think that if you're a computer scientist, your only concern is the computer or when you say keyboard, it means a computer keyboard and not the one that outputs sounds or perform music. But according to Peter Kirn (composer/musician, media artist, educator, and technology writer, and the creator and editor of Create Digital Music), even before the term "IT" was coined in, most computer programmers have a musical background. *ehem
Some computer scientists love music to the point that they created a computer language that uses MIDI files as a source code, where programs are defined by the pitch and order of notes and (obviously) intended for music lovers (composers). Its primary goal is for flexibility in composition making functional programs don't sound like random notes.
Velato is an example of an esoteric programming language. It was created by User:Rottytooth (Daniel Temkin) in the year 2009.
They say that the results sound a "...a bit like an academic-sounding ragtime..." If you're going to listen to the outputs, well... they actually do sound like it was generated by a computer.
This is a computer language just for composers and composer wannabes. haha... nice.


What do other people say about Velato?

"I think its Hello World program is more listenable than the one for Fugue" -- Andy Baio
"Velato: What if Musical Notes Had Their Own Programming Language?" -- Peter Kirn
"It's an esoteric language, not designed for practical, every-day use (although don't let me discourage you from writing production code with it!). I was inspired to write it, in part, by Piet, but also an audio equivalent. I figured it offers an unusual challenge: to write something that both sounds musical and works as a program." -- Rottytooth (the creator himself to RustyBrooks)
"I think this sounds pretty cool. Nice work :)" -- johnstein
"(wide-eyed, after staring at the code for a few minutes)... So far, this (the program) is readable to me." -- scimtar

COMMANDS 
CommandSecond noteThird noteFollowed by / Notes
Change Root NoteMajor 2ndNew root note
Let (assignment)Minor 3rdVariable as single note, then expression
Declare variableMinor 6thVariable as single note, then type
BlocksMajor 3rd
WhileMajor 3rdExpression
End WhilePerfect 4th
IfPerfect 5thExpression
ElseMajor 6th
End IfMajor 7th
Special CommandsMajor 6th
Print to screenPerfect 5thExpression to print
(Table 1 from http://esolangs.org/wiki/Velato)

"Commands can be followed by any number of expressions. Notes used for expressions don't differentiate between major/minor or perfect/diminished. To avoid ambiguity, no augmented intervals can be used. So a tritone is always interpreted as a diminished 5th, not an augmented 4th."

ExpressionFirst noteSecond noteThird noteFollowed by / Notes
value3rd
variable2ndName of variable (single note)
pos. (+) int5thSingle note for each digit, ending with Perfect 5th to mark end of number
neg. (-) int3rdSingle note for each digit, ending with Perfect 5th to mark end of number
char4thChar as ASCII int: single note for each digit, ending with Perfect 5th to mark end of number
pos. (+) double6thSingle note for each digit, first Perfect 5th to mark decimal point, second Perfect 5th marking end of number
neg. (-) double7thSingle note for each digit, first Perfect 5th to mark decimal point, second Perfect 5th marking end of number
conditional2nd
=2nd
>3rd
<4th
NOT5thAlso used for NOT < (indicating greater than or equal to) and NOT =
AND6th
OR7th
procedural6th
grouping6th
(6th
)2nd
math operation5th
simple5th
+3rd
-2nd
*5th
/4th
% (mod)6th
exponential / other7th
power2nd
log3rd
(Table 2 from http://esolangs.org/wiki/Velato)
Types:
int = 2nd
char = 3rd
double = 4th

Sample Hello World program in Velato

(image from http://esolangs.org/wiki/Velato)

You can find the tutorial here at this link ---> http://danieltemkin.com/Blog/post/Velato-Hello-World!-tutorial.aspx
You can hear the code at this link ---> http://www.muziboo.com/mp3/hello-world-in-velato-programming-language-0/ 
Enjoy!

Sources:
http://esolangs.org/wiki/Velato
http://createdigitalmusic.com/staff/peter/
http://danieltemkin.com/Velato.aspx
http://projects.metafilter.com/1903/Velato-A-music-programming-language


Author:
Janroe Ryan A. Atienza
CMSC 124 T-3L

No comments:

Post a Comment