Showing posts with label Notes. Show all posts
Showing posts with label Notes. Show all posts

Thursday, April 12, 2012

Distributed Laptop Orchestra

So, this semester I've been involved with this really interesting class at Carnegie Mellon: 15-323 Computer Music Systems and Information Processing. Taught by one of the creators of Audacity and Nyquist, Roger Dannenberg, the course aims to give the students a broad background in how music is treated programatically, to the point were at the end of the semester we can all co-operate to build a full-blown laptop orchestra application!
On Monday April 16, it is going to happen; the world largest distributed laptop orchestra is going to perform as a part of "Symposium on Laptop Ensembles & Orchestras" at Louisiana State University. Apart from LSU and Carnegie Mellon, five more universities in the US and UK will participate

Stanford University
Texas A&M University
University of Colorado
University of Huddersfield (West Yorkshire, England)
Queen's University (Belfast, Northern Ireland)

It will definitely be a late night for our friends on the east side of the Atlantic, as the concert starts at 20:30 EDT (New York -time). That equates to 01:30 BST! And at that time, I will sit on the stage at UC McConomy, eager to hammer notes and sounds out of my keyboard. I expect my fellow europeans to be the same.

The previous CMU laptop orchestra
I also hope the laptop orchestra will actually work. That piece of software right there is running my code - I do not want it to crash with such great universities watching and participating.

If you can't come to McConomy to hear the Carnegie Mellon -version, you should tune in to the live stream from LSU!



If you are interested in the source code for the project, it is available as open source. In fact, you can even download the code and participate yourself! There are instructions on how you should use the system online as well, so I will not go into details here; but I'd still like to give a brief technical overview of the project, and discuss some of the interesting challenges:

(At least to me, they are. But I take no offence if you stop reading now :-)

A performer's computer is connected physically to a live PA system in each of our 7 locations via mini-jacks on the headphone port; our software contains sampled sounds it will loop or play once, depending on the nature of the sound, and it can also generate a few waveforms.

(In order to do this, we must know how to generate, process and play back music in real time on the computer. The music is generated in blocks of bytes, each representing a very short time of sound, by the standard of an ear; this block is then pushed into the computer's music playback buffer, and then the next block is generated. This must be done on a high priority thread, to prevent any lagging. That kind of stuff is what you learn in this course.)

After the music is pushed out to the analog mixer, it is mixed and sent two places: a) To the local speakers, and b) as a soundstream to LSU.

In the local mixer, there is then one input channel for each performer, as well as a stereo input coming from LSU. The stream from LSU contains all the sounds from LSU as well as all the sounds from the 5 remaining locations. Thus, there will be some pretty significant latency issues; speed of light is only so fast, and there is lots of network jitter as well. The sound from LSU will then have some latency, and the sound from the other universities will have an average of twice that latency. This also has the consequence that the performance will sound different at each location, depending on the local mix and also on the varying latencies.

Roger Dannenberg, conductor
(play picture as sound)
So how do the performer know what to play? It certainly can not be very rhythmic considering the constraints discussed in the previous paragraph. But it should be somewhat synchronised, to create at least some sense of structure. To do this, we have created a conductor interface.

The conductor (Roger) will be able to send various conducting messages through a special mode in the software. These messages will appear in the window for all the performers, so that the we can play according to the conducting; variable parameters controlled by the conductor include

* Intensity
* Dynamics
* Pitch (high/med/low)
* Play/stop/fade in/fade out
* Music language/Sound architecture
The performer interface; top half is determined by conductor
Note that the conductor can send different messages to different universities, or "orchestras" as we cleverly named them in the software. There is also a chat system based on an hierarchal form, so anyone can send chat messages to anyone, everyone in a single orchestra, or everyone in the federation of orchestras.

To make all of that work, there is a lot of network logistics going on. The network is organised by nodes and supernodes; all nodes are connected to a supernode, and all supernodes are interconnected. When sending a message from a node (say, the conductor node), the message is first sent to the supernode, then from the supernode to the correct supernode(s) (if applicable) and then from the supernode to the individual node(s).

But, how do the conductor node know at what IP address its supernode is? To do this, each node will register with a special server (currently running at CMU) when they start up. This server will inform the node of what IP its supernode has, or if there is no supernode yet. If there is no supernode yet, then the supernode will initiate a connection when it is set up. In this fashion, as soon as a node is registering with the server, the server will provide information about all the nodes with which it should connect; if the node is a supernode, this includes all nodes in his orchestra, as well as all the other supernodes.

In addition to this, there is a clock synchronisation protocol running, and there is also a performance monitoring system that keeps track of how much data is being sent to and from each node. My contribution to the code has mainly been on this performance monitoring system. It basically collects information of all messages going in and out of a node, as well as the latency to the closest "parent" node (where the node containing the original clock is the uppermost parent; this should be the supernode at LSU).


In sum, this is going to be pretty awesome, and I'm looking forward to celebrate the anticipated huge success of our concert. Wish me luck, and tune in on Monday!

CMU School of Computer Science: Laptop Orchestras in Seven Cities Unite Via Internet for First-of-its-Kind Concert
15-323: Computer Music Systems and Information Processing
LSU: Symposium on Laptop Ensembles & Orchestras

Saturday, August 28, 2010

New semester and me

I feel like I am in the right place. I started my third semester at Carnegie Mellon this week, after an amazing summer back home in Norway. I thought it would be terrible to leave home. But it was not. It actually feels really good to be here in Pittsburgh right now. I have a mission here, and I feel good about working towards my degree here. I also have a deep conviction that going home is not far away. I will go home. Soon. And it will be wonderful. But right now, my world is here, it is beautiful, and I am at peace.

I am taking four classes this semester. That is not an awful lot, and the classes neither have a reputation of being awfully difficult. That said, three of my classes are required for my major, so I am not falling far behind by this. The four classes I am taking are:

15-123 Effective Programming in C and UNIX
18-240 Structure and Design of Digital Systems
21-127 Concepts of Mathematics
79-350 Early Christianity

The three first classes are all having a pretty slow start, and I expect them to speed up in the coming weeks. They are also classes that are not very interesting to discuss unless the audience is educated in software, logic or mathematics. Hence, the class material I will discuss here on the blog is mostly limited to Early Christianity. So let me tell you about that course:

We are about twenty students taking the class. I don’t know the various flavours of belief we represent, but a fair guess is that most of us are Christians in some sense or another. I know a few of them from before, but they are mostly strangers to me.

Professor Miller is an historian, and the course is teaching us how to look at the Bible from an historian’s perspective. Miller does not, however, impose on us that the historical perspective is the only correct way to read the Bible, though he certainly would argue that it is a valid way to read the Bible; Jesus may or may not be the Christ, but regardless of your answer to that he is also an undeniable historical figure, and the Jesus movement was also a very true and historical movement. And it is this historical aspect of Jesus and the early church that is under the scope of this course.

As for Miller’s own belief, it is hard to tell exactly what it is. I certainly do not think he is not holding the Bible as infallible, as opposed to what many evangelicals do. However, he has a great respect for Jesus, so either he considers him the one and only Christ, or he considers Jesus as one of many “Christ’s”, or he may also just consider him as a great human being.

You see, historians do not take for granted that what is recorded in the gospels is always a true record. A historian is considering the views and belief of the writer as well. So whenever Jesus claims that he is the Messiah, a historian can opt to believe that those claims were written into Jesus’ words later. Written, of course, in the belief that he actually did say those words, but as any historian would tell you: Human memory is closer to what the brain can make sense of than what actually happened.

To accept this premise does not, however, imply that you cannot believe the gospels are inspired, and that what they tell is mostly true. For what I know, Miller himself may very well believe the gospels are inspired and true. If so, he is just more aware of his own beliefs than most of us are.

Anyways, I think this will be an interesting semester, and I am looking forward to all of it. Oh, and I am also hired by the University as a course assistant in 15-110, which is an introductory programming course in Python. Funny thing, though, I have never used Python before! When I took that course, it was taught in Java (see one of the assignments here). Wish me luck :-)


More:
Joseph H. Lynch: Early Christianity: A Brief History

Saturday, May 22, 2010

This summer

I don’t plan to write a lengthy blog post this time, but I realize some of you would be interested to know what I’m up to now that CMU has released me of duty for a few months. Hence, here comes a short update on my life.

First and foremost: I am delighted to actually meet my wonderful girlfriend. Skype is a beautiful piece of software; but as any true Electrical and Computer Engineering major can tell you, hardware is much more exciting than software. And truly, she is even more amazing here in the real world.

I also got myself a summer job. I am now working as an “FDV Engineer” at Bybanen AS, a company that runs a newly built light railway in Bergen. The official opening will be on June 22nd, and Her Majesty will herself cut the tape. My over-refined title aside, I am very exited to work here, this was exactly were I dreamed about working before I started my job search. Hence, I decided to just send them a simple application, in case they needed anyone. Amazingly they did, and they hired me even before they met me.

Now I want to do some good work for Bybanen, so they won’t regret that they hired me. This is the work I wanted; now I must put my heart in it. I must be creative, be impulsive, be active. Be curious, but respectful. Not unlike what a good boyfriend should be like.

This summer I hope to learn much more about that.

Wednesday, April 14, 2010

Beauty and justice

So what is all this talk about beauty? Isn’t it equally important to be just, and doesn’t justice look rough sometimes? Ok, justice may look rough sometimes. And justice may be good and necessary. It makes sense for a good God to exercise justice. But even God, which he himself is fully just, have problems making justice beautiful. You see, justice is hard and painful, and only has losers. (I think this is because justice only is required because of sin and ugliness in the first place.) Hence, justice is good and necessary, but not beautiful.

But justice is straight out ugly if the judge is guilty. We call it hypocrisy, and society righteously despises it.

Monday, December 14, 2009

Christmas wishes

I used to distribute my Christmas wishes to my family as a neatly organized list of nice things for a boy my age to have. It was only the latest years the list included actual useful stuff, like clothes, and most items were usually way to expensive for anyone to buy. Thus, also included in the wish list was a step-by-step procedure for how to collaborate when buying presents. I was always ambitious writing the Christmas wish list.

I have stopped distributing these. I no longer feel they are appropriate. In fact, I am kind of ashamed I sent out those lists for so long. They were more than slightly materialistic, and totally without any self-awareness of it. Now, I am still materialistic in nature, and would be happy to receive a lot of expensive stuff, and I enjoy unwrapping those packs with nice things in them. However, this Christmas I’ve decided to wish for something more noble:

Support for my spring break trip to Monte Cristi in the Dominican Republic, were I am going to help an organization called “Orphanage Outreach” alongside a bunch of fellow Carnegie Mellon students.

Exotic Asian drinkSo, instead of buying me a sweater for, say, 200 kr, then buy me a cheap pair of socks or a fair-trade chocolate plate for 30 kr, and then donate 170 kr to Orphanage Outreach. Or, instead of buying me a fine vintage wine (dunno why you would do that, but if so), then buy me some exotic soft drink you found in the Asian food store, and donate the difference to Orphanage Outreach.

You can donate and read one of my very short scribblings about the trip here:
Donate to Orphanage Outreach

If you want to donate, beware that the amounts are in dollars, not in kroner. Adjust accordingly, I don’t want to ruin ya’ll so you can’t afford lamb ribs for Christmas! And you are of course most welcome to donate even if you didn’t plan to send me a present this year.

Orphanage Outreach: Donate
Calculate amount: Valutakurser (Norwegian)
YouTube: Villanova University on similar trip
Carnegie Mellon University: Alternative Break
Charity Navigator: Charities with the Most Consecutive 4-Star Ratings

Sunday, November 22, 2009

New design

It is not too much to say, really. Maybe I should mention that it was a bit of a battle to get the same picture to show up correctly everywhere. But though several individual defeats, in the end I was victorious in the war on CSS. In case you can't tell what's different, here is a snapshot of the previous design for comparison. Maybe the pictures will turn out more colourful from now, also.


On the screenshot: Warfare experience

Thursday, September 17, 2009

When to eat

Do you ever find yourself outside Spice It Up Grill, depressed that they stopped serving five minutes ago? Now you can know beforehand if you are to late for those delicious custom made burgers, or if you still can work on your thrilling homework for another hour before you must hurry. With this handy guide to food on campus, you never need to go hungry again! So do it, do it now, bookmark this page for reference and guidance in those critical moments when the hunger approaches your constant urge for homework. This is your ultimate food-finding friend! Simply click on the menu, and it will fill your screen with all the serving times you can possibly want! Do not hesitate! Bookmark now!

More food:
Jon's hopeless attempt on the same overview (however, he does provide you with a campus map and try to tell you what makes a block)
Campusfood: Carnegie Mellon University

Saturday, September 12, 2009

CMU bookmarks

Since college started a few weeks ago, my bookmarks bar has drastically changed. The link to the online studies at the University of Tromsø is of course removed, and many others with it; instead, I now have links to different online services provided by Carnegie Mellon, which are frequently visited.

Blackboard is the most important one. On Blackboard, I find all my homework, all the course documents, syllabuses and calendars (except the physics homework, which inconveniently enough have it’s own web page). Though Blackboard isn’t especially intuitively navigated, it does a decent job, and you can probably make it do anything within the area of administrative communication. I visit Blackboard several times a day.

My CMU is a web portal that tries to gather information from as many different services as possible on one place. I don’t use My CMU much, though, as I either find the services boring, useless or inefficient; it shows my web mail, but I get my e-mail to my e-mail client; It has a CMU news feed, but I get the most important news as e-mail; the blackboard links are less efficient than going directly to blackboard, I already have the Pittsburgh weather forecast on my dashboard and I find the emergency alert service to be intrusive enough already before I sign up for further paranoia. The primary use I have of My CMU, is the meal plan overview (how many meals I have left and such).

ScheduleMan is a powerful tool when creating the schedule; however, it also serves as a handy reminder of when I should attend classes in which classroom. My SceduleMan –page is always up on my iPod, in case I want to reassure myself that I still have an hour before class.

One of the most amusing services is the Henderson Laundry page; it shows how many washers and dryers that are available at any given moment, or how far they have come in their cycle. It also sends you an email whenever your laundry is finished.

The Bandwidth Monitor is helpful in keeping track your bandwidth usage; we have a maximum bandwidth limit of 10 GB for every five days, and 3 GB every day. Because of the bandwidth monitor, I know that I’ve never even been close to 100 MB, despite a few Skype calls. Local traffic isn’t measured, so the hours of listening to music shared on the CMU network aren’t reflected.

See more:
My schedule: ScheduleMan
Henderson Laundry: eSuds

Tuesday, July 21, 2009

Song of Frustration

Since I didn't get a summer job this year, I've had a great deal of extra time these last weeks. A few of those hours were spent recording an old song of mine (written in 2006, give or take) in GarageBand. It is the first time in the studio this year, and the first new project since February 2008. It feels good to be back! Here it is:


If you find it as awesome as I do, you even download it and put it in your iPod for motivation during puffing uphill runs in Stoltzekleiven. (When you reach the top, you send your time, for example 14.34, as a text message to 1933 with codeword STOLTZ . And when you go home, you stare with reverence at your personal Stoltzen statistics page as your times make a graph less predictable than Dow Jones)

More: (remember to open in new windows if still listening)
Free download: Song of Frustration
Stoltzekleiven Opp: Min statistikk (Norwegian)
Apple: GarageBand

Friday, May 29, 2009

Snow and other events

Is it still May? I almost can’t believe it. So much has happened; the snow yesterday almost made me believe fall had begun again.

Yes, it actually snowed yesterday. It’s times like those you know you are far north; the sun never goes down, it is late in May, and it SNOWS. The alarm that woke me up also made me do some strange choices in clothing and packing my backpack. I put cotton pants on, and not the membrane, and put wool pants in the backpack instead of a wool sweater. Marching up the mountain through moist bushes and melting snow, we did get wet.

It was the great final in our week of war technique. We spent every day outdoors, and did many cool tasks, including hiding in the woods, throwing grenades, attacking enemy positions with the squad, physical tests and a 15 km run fully equipped, and lots of other fun. It was tiring, though; especially since I had another 15 km run the day before this circus started.

Hike the seven mountainsThe annual trip over the seven mountains that surround Bergen was held the same day as I was returning to the cold north. As I had to make it to my airplane departure, I only had time for the short version, four mountains. One of my best mates and me started tough; we knew we had a tight schedule. But we might have gone a little too hard; my not-so-used-to-travel-far-distances-by-foot friend had a hard time the last two thirds of the distance.

Before I came to Bergen to walk the mountains and enjoy some time with old friends, I was in Lourdes, France, at the International Military Pilgrimage (PMI). Although I’m not a catholic, it was an absolutely tremendous experience. I don’t want to write too much about it at this blog, as we have created another blog dedicated to the trip (unfortunately for my international audience, it is in Norwegian only). If you understand Norwegian, I strongly encourage you to visit it.

That was all for now. Till next time – enjoy life! (It may take a while, as I am supposed to work on my exam in philosophy the next week, and more exams are to come)

Read more:
BT: Slik var 7-fjellsturen (Norwegian)
Our blog from PMI: Pilegrimsblogg (Norwegian)

Sunday, February 8, 2009

A dumb president?

I guess most of us left-oriented Europeans have at least a few times judged the former president of the United States to be quite dumb. But how can a man that graduated from Yale and served as a pilot in the US Army for six years, be that stupid? The rumours state that he has an IQ close to 91. However, people interested in such matters have found that Bush actually has an IQ of about 129; check out this Google Answer:

George W Bush's ACTUAL IQ

When I read this, I guess had my own prejudices thrown back at me. I suddenly felt like I had to respect the guy, despite our disagreements in politics. Which in turn led me to this question: Do I really respect and value people on the basis of their intelligence? Yet another defeat for the Warrior of Agape.

(...) whoever takes a humble place—becoming like this child—is the greatest in the kingdom of heaven. And whoever welcomes one such child in my name welcomes me.
Matthew 18:4-5

Read more:
Wikipedia: U.S. Persidential IQ hoax
YouTube: Bushisms

Tuesday, January 27, 2009

Please repeat that!

Confused
I found this absolutely amazing scentence today!

"The move from a structuralist account in which capital is understood to structure social relations in relatively homologous ways to a view of hegemony in which power relations are subject to repetition, convergence, and rearticulation brought the question of temporality into the thinking of structure, and marked a shift from a form of Althusserian theory that takes structural totalities as theoretical objects to one in which the insights into the contingent possibility of structure inaugurate a renewed conception of hegemony as bound up with the contingent sites and strategies of the rearticulation of power."
Dr Judith Butler

I'm looking forward to become that good in English.

I found the quote while watching this TED talk:
Steven Pinker: Chalking it up to the blank slate