electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
The Web Hearts ChucK - My Project
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Plankhead



Joined: Apr 24, 2008
Posts: 14
Location: Long Island

PostPosted: Fri Apr 25, 2008 8:20 pm    Post subject: The Web Hearts ChucK - My Project
Subject description: Ruby has Rails, Chuck has <3?
Reply with quote  Mark this post and the followings unread

A while ago (read: a couple days) I decided I wanted to create a new web language and call it <3.

That's right. Less than three. Heart. <3. The file extension would be .<3 (It's possible, really, even on the web. Just use .&lt3; if it screws up your parsing), and it would be wonderful. Now I just had to decide what it would do.

That was the hard part.

I thought something about audio. Like...dynamic audio! Your screen can output the color white, so why not let them output white noise? It would be CSS for audio! And it would all take place on the client-side, so you wouldn't have to download all that much!

Now, I don't have any degrees in computer science. I'm a senior in high school going into film school in the fall. Somehow, for whatever reason, I know my way around a PHP document and a stylesheet, and that's gotten me involved in web design. For a while I decided to experiment with Ruby on Rails to see if I could come up with any whiz-bang ideas, but eventually the idea hit me that I wanted to be proficient in a language called <3. Why? Because I want to.

Now, what does all that have to do with this, other than the fact that I really have no business sticking my nose into creating my own web programming language? Well, essentially, it meant I'd have to find an existing open-source audio synthesizing and manipulation environment to include in my own equally open source project.

Hi, ChucK.

So I came up with the basic structure of how a <3 "beat" file would look. Part stylesheet, part scripting language, it would organize calls to a ChucK virtual machine that would theoretically be controlled by the browser (a Firefox extension is the most likely preliminary solution). Each page element would have its own specific set of functions to call, starting its timer once the parent element is done loading (i.e. the header will start doing things when it loads, as will images, and some calls won't be made until the entire page body loads).

Of course, <3 wouldn't use ChucK just for audio. It would use it for timed events as well, i.e. click a button, and five visual effects occur over the next five seconds, one at every second mark.

I created a miniwiki for the specification where I THINK I explained it pretty well. It's located at http://scratchpad.wikia.com/wiki/Category:Heart_Beat_Scripting_Language. I'll add an FAQ after posting this just to make sure.

Now, is all this possible with JavasScript and/or AJAX? Probably. As easy? Certainly not. ChucK-powered? Nein.

Thoughts?

EDIT: Windows made me have to change the file extension to .lt3. I hate you Microsoft.

Last edited by Plankhead on Fri Apr 25, 2008 8:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Fri Apr 25, 2008 8:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's certainly a very creative idea. Even Linux started with just one person taking one step first. I believe Linus Torvalds, who wrote the first Linux code, was a student at the time. Perhaps your idea will go far also. Good luck with it and do keep us posted, it's interesting stuff!
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Plankhead



Joined: Apr 24, 2008
Posts: 14
Location: Long Island

PostPosted: Fri Apr 25, 2008 8:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:
It's certainly a very creative idea. Even Linux started with just one person taking one step first. I believe Linus Torvalds, who wrote the first Linux code, was a student at the time. Perhaps your idea will go far also. Good luck with it and do keep us posted, it's interesting stuff!


I read Linus Torvalds' biography, the appropriately titled "Just for Fun," and I'm aware that I've already taken a very Linuxy step by even thinking about this. The difference is that I believe he was actually a computer science student.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Fri Apr 25, 2008 11:04 pm    Post subject: Re: The Web Hearts ChucK - My Project
Subject description: Ruby has Rails, Chuck has <3?
Reply with quote  Mark this post and the followings unread

Plankhead wrote:

Thoughts?


Go! Very nice idea indeed.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Fri Apr 25, 2008 11:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

ChucK has a very limited network capability now, so that's one thing I'd look into. I've only seen it once, somewhere on the unit generators list, but it isn't linked to from the unit generators page. ChucK can connect between two computers (or perhaps more) if you know their ip addresses and the port numbers to use.

Also on the Wiki Projects page the top entry is from someone who at least once was working on a networked ChucK server that people could run.

Those are two things I'd consider as starting points for your effort. Good luck.

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Plankhead



Joined: Apr 24, 2008
Posts: 14
Location: Long Island

PostPosted: Sat Apr 26, 2008 6:24 am    Post subject: Reply with quote  Mark this post and the followings unread

Ideally all the ChucKing will be executed on the client side. All scripts would be downloaded (or take place on the localhost to begin with).

The browser would have to be configured to process a ChucK script in a certain way. It might look for specific script comments. For example, here's my beep script:

Code:

//The next two comments are parsed by the BROWSER because they are phrased "//<3"
//The browser will look at a comment, and then look at the next character(s) to see if it should continue parsing that line.
//<3> float freq;
//<3> dur time;
SinOsc s => dac;
freq => s.freq;
time => now;
s =< dac;


When the script is called, it would be phrased http://127.0.0.1:30000/beep.ck?freq=1000&time=60%3A%3Ams (that link won't lead anywhere so don't click it).

By the way, if anyone has any comments or ideas for things on the wiki, PLEASE post on the pages or talk pages of various entries.
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Sat Apr 26, 2008 6:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Plankhead wrote:
When the script is called, it would be phrased http://127.0.0.1:30000/beep.ck?freq=1000&time=60%3A%3Ams (that link won't lead anywhere so don't click it).


That's starting to sound a little clearer, good. Although "time" is a keyword in ChucK so I'd use another variable name. Also there is a distinction between time and dur in ChucK, dur is a delta time. But that's just a minor detail. Do you know how to write a script that will interpret the code that gets sent to your client? If so you can get started right away coding something that works. I like the idea of passing parameters into the script in typical html style, that makes sense. Keep it up, it's interesting to read.

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Plankhead



Joined: Apr 24, 2008
Posts: 14
Location: Long Island

PostPosted: Sat Apr 26, 2008 6:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:
Also there is a distinction between time and dur in ChucK, dur is a delta time.


If you take another glance at the URL, you'll see "%3A%3A" between 60 and ms. That's URL encoding for "::". So, yes, a dur is passed into the dur.

Dur. Funny word.

Inventor wrote:
Do you know how to write a script that will interpret the code that gets sent to your client?


Hoo boy. Well...remember that whole part about not having any business writing my own programming language?

Although I'm sure I could figure it out. The tricky part is getting the ChucK Virtual Machine to run natively as a browser plugin, such as a Firefox extension.
Back to top
View user's profile Send private message
Plankhead



Joined: Apr 24, 2008
Posts: 14
Location: Long Island

PostPosted: Sat Apr 26, 2008 8:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Good news! The wiki is migrating to http://heartlanguage.wikia.com/ as we speak!
Back to top
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Sat Apr 26, 2008 8:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow! This is very good idea.. There can be a lot of more tools out of this fusion ^_^
thanks and fight fight.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use