Google Analytics

Saturday, December 31, 2011

Happy New Year 2012

Happy new year folks! I wish one and all a very blessed new year ahead. 


I pray all of you get to move towards your goals and do the things you've always wanted to do. 


God bless you all! 

Friday, December 23, 2011

Round-Robin and the Elevators Scheduling at My Block


Talking about round-robin, I am reminded of the elevators at the block of flats where I live.


I've been frustrated at the elevators before. Sometimes when I call for the elevator, I can tell that 2 of the lifts are in transit (going somewhere, with or without passangers).


Sometimes only 1 out of 3 is in transit.


When I call the lifts, I expect one of the lifts that are parked to be mobilised. Instead, the logic that drives the lifts assignment lets that lift go in the opposite direction, then come to a rest, (either to drop off some passenger or park itself), then wakes itself again, to come to my level. There are many other cases of combination of the lifts doing different things mid-way, and reacted in a very inefficient manner, resulting in my having to wait a huge amount of time before a lift picks me up. Now I realise this has totally got to do with the concept of round-robin (or the lack of) assignment.


This is the same for the elevators at work. There are at least 4 elevators serving the levels of my current workplace. Most of the time I don't need to wait an awful long time to get an elevator, but sometimes they are really inefficient.


Elevators may be using another set of rules to guide the scheduling algorithm to decide upon which lifts to activate for all I know. Maybe I should go and read up a bit of elevator scheduling just to clear my doubts. :)

Definition of Round-Robin & EastWest's Play Engine


In the course of reading the manuals of EastWest virtual instruments plug-ins, I keep coming across the term "round-robin".


What Round-Robin Means


At first it seemed to be a recording technique, or some kind of microphone set-up. I searched google.com for "round-robin mic techniques", and found nothing. Closest results relevant to audio processing was a a "round-robin" setting in protools configuration that allows Protools to be configured to read/write audio data from an array of hard-disks to ensure stability of glitch-less recording. 


After I watched the videos from Youtube (from the previous blog entry), they used the term to describe the way samples are triggered.




Here's what I found on Answers.com:
http://www.answers.com/topic/round-robin


and from wikipedia.org
http://en.wikipedia.org/wiki/Round-robin


The original meaning is to describe the signing of a petition in a way that signatures are passed around in a circle to make it impossible to know was which signature belongs to whom.


In sports terms, it is the matching of every contestant against every other contestant.


In programming terms, it is the simplest scheduling algorithm that for every time a resource is needed for a task, the round-robin algorithm selects which supplier to pull a certain resource from, out of a list of resource suppliers. This ensures that every resource provider is used the same number of times over a given period. This means that if there are 4 resource providers, each will be taxed equally over a period of time.


As I am re-phrasing this definition, I am imagining 4 missile barrels triggered by software, controlling which barrel to fire each time. If there is a need to continuously fire off 50 missiles, we could use the round-robin method to assign which barrel to fire each missile off.


An extreme case of imbalanced load assignment would be to fire all 50 rounds from tube 1. That would leave the other 3 tubes totally idle. Therefore an example of round-robin style assignment would be to fire off tubes in the sequence of tube numbers 1, 2, 3, 4, 1, 2, 3, 4, etc... There could be a more complex assignment based on random values, like 1, 4, 2, 3, 2, 4, 1, 3, etc... It could even be based on rules. If each tube takes a slightly different time to reload, our algorithm would have to query which tube is available and loaded, then assign that tube to be the next to fire.


The aim is to balance the load on each of the resource provider. Therefore at the end of a fixed duration, the number of times each resource (or tube) is being used, would be about the same. (This duration could be at the end of the hour, or at the end of 50 rounds of firing, or at the end of a day, etc).


I think the sports and programming terminology for round-robin is quite similar. It ensures every request (or sportsman) is matched with every other resource (or opponents, in sports) in the same number of times of events that calls for the resource (or matches, in sports).


So how does that apply to the virtual instrument plugin situation?


Round Robin in EastWest's "Play" Engine


It seems that EastWest is employing this round robin kind of task-versus-resource assignment to allocate which samples to trigger when you issue a MIDI note event (ie, when you hit a key on the MIDI controller). 



This is one of the EastWest videos showing the Fab Four virtual instruments library and its instruments in great detail. This is part 2 of 3.


Watch the video at 2mins 27secs, when round-robin is mentioned. It is used to trigger the samples from alternate takes of the same note to play, when you repeatedly play on the same note on the virtual instrument.


At 1min 09secs, the hi-hats from the drumkit when played, will automatically trigger off left- and right-handed sampled hi-hat hits to play when you play that midi note repeatedly.


That is one of the many supported features of the EastWest play engine. Its really simple and intuitive, but yet it has all the features you'll ever need from a virtual instrument.

Tuesday, December 20, 2011

UK / USA Keyboards!

I've been using UK keyboards for the majority of the year, when I was in London. While I was there, I bought a Dell laptop. Naturally the keyboard is a UK one. The last time I was in London for a year, 2007, I also got used to the UK keyboard.

Now I'm still using the UK lay-out keyboard at home on my laptop, so I am really comfortable with it. 

When I came back to work, at dneg Singapore, I was given a US keyboard. I found myself hitting the wrong keys time and again. 

Strangely in Singapore, we all adopt the USA keyboard. I suspect its the case because UK keyboard has a pound sign (£) assigned to shift-3 on the alphabetical keys. Since Singapore uses the dollar ($), having the "£" is just wasting that key it's assigned to.

I never thought I would do this, but I have just written to Tech to get my keyboard changed to one with a UK layout. heh heh ;)

Tuesday, December 13, 2011

Limescale in The Kettle?

Since coming back to Dneg's Singapore office, I've started making my own coffee, just like in London. I guess its a good habit I've picked up because it forces me to stand up, walk around and maybe talk to people in the pantry. Also, it would save me some money buying drinks from the food court downstairs.

I was with Janson at the pantry today and I was checking on the water in the electric kettle. Everything was so familiar, similar to how I made coffee in Dneg London, that when I opened up the lid of the kettle to check how much water was inside, I expected to see lime-scale coating the inside of the kettle. :)

It's a small thing but this is the first time I am aware of myself remembering London. After all, I did spend the last 6 months of my life there. I do still think of the colleagues over there and when I watch the work done by the London office I am naturally reminded of the time spent there.

Before this, I was quite surprised why I was not reminded of London in any way. I did not think about it much, and I did not remember dreaming about it. I don't dislike the place at all. That is why I am puzzled why I don't find myself thinking of London.

Come to think of it, I was actually watching the company's demo reel for one of the upcoming films before I went into the pantry. That could be the reason for me expecting to see lime-scale along the inner walls of the kettle.

The New Circle Line, and My Way Home

I was working late last night. When I went home it was already 10.20pm.

The opening of One North MRT station has provided many of us tremendous convenience in terms of travelling to and from work.

This is due to the fact that one of the exits of the One North MRT station links directly to the basement of Fusionopolis. That's the building where Dneg Singapore lives, and that's where I work.

Before the opening of the One North Station, I used to take the North East Line from Farrer Park Station to Outram Park Station. From there I change to the East-West Line and take the train to Buona Vista Station, where I'll have to exit, cross the road and then take a bus to Fusionopolis. The bus comes once every 12-15 minutes. This was a huge inconvenience for people working here.

Amazingly, the operation of One North MRT station has opened up 3 routes by which I can now go to work by.

Out of the 3 routes, I have unknowingly favoured one route over the others. A few days ago my wife discovered a route I have never considered before. That aroused my curiosity, made me want to find out which route is the shortest and which one the longest.

As I was going into the station last night I made an effort to download the SMRT network map find out just how many stations each of the routes needed to take me to my destination.

Here are the routes,  in descending order of numbers-of-stations:
Route 3: from Farrer Park station take the North-East line to Serangoon Station (4 stops), switch to the Circle Line and travel via Bishan and Holland Village stations to One-North Station (9 stops). Total of 13 stops. This is the route I tend to take without thinking.

Route 2: from the Farrer Park Station take the North-East Line to Harbourfront Station (the last station on the line). (That's 6 stops). From there change lines to the Circle Line and then travel via Labrador Park and Kent Ridge Stations to One North Station (6 more stops). Its a total of 12 stops.

Route 1: from Farrer Park Station take the North East Line to Outram Park Station (5 stops), get onto the East-West Line, travel via Tiong Bahru Station to Buona Vista Station (5 more stops), then switch lines again to the Circle Line, and finally take the Circle Line to One North Station (1 stop). This winning route totals 11 stops. However it is also the route with the most number of line-changes.

It is interesting to note that the  difference between the number of stations is only 1 station from one option to the next. I believe that route 3 with the most number of stops also has the longest distance between the stops. I feel the Labrador Park and Kent Ridge part of the journey from Route 2 also has longer distances between the Circle Line Stations.

Therefore, Route 1 which has the least number of stations would also probably have the shortest distance between stations overall. I will have to measure the distances with Google Maps when I have more time.

As I am writing this, I am on the way to work. Without realising it I've just found myself on Route 3 with the most number of stops, approaching Woodleigh Station. The other shorter routes involve going in the opposite direction down to Outram Park and Harbourfront Stations, so its too late to go back now. Oh well... ;)

Published with Blogger-droid v2.0.1