Jiayun Guo ------ DREU Experience 2010

DSCF1514

usc campus

school of cinematic arts

viterbi school of engineering

outside Chinese theater

after Lakers' parade

Weekly Log

This weekly log gives a more detailed description of how my research goes in ten weeks and how my life is like in L.A.

week 1


I was done with school on Friday and then flew to L.A. on Saturday. Woohoo, glad done with all my 6 classes for the spring quarter. Because of the difference between quarter and semester system, I have to split my research into two parts. The first half lasts 4 weeks and the second half lasts 6 weeks. I will take a one-month break in between, which is really nice because I will have time to fly back to China and spend the whole month with family.

Coming from a city which is famous for endless rain, I spent several days to get used to L.A.'s eternal sunshine. In Seattle, everytime it rains, I have the tendency to be upset, so the good news for me about L.A. is that I will be a happy little one for at least 10 weeks!

The sad news about the first week is that both Elaine and Alex flew to Singapore on Monday, and they would spend a whole week there, so i didnt have the chance to meet my mentor in the first week. As a result, I spent the first week read up on ESP and SAI/MFSM, and get familiar with the MFSM middleware.

I read several papers on ESP, for example, NIME 2005, ACE 2006, and AMCMM 2006
Through reading and note-taking, I got some basic idea about my project and the basic archetecture behind the code.
Also, I've started my self-learning of web design. I feel it's really a shame that as a Computer Science student, I have never built a website on my own. Since DREU requires every participating student to build their own website of the project, I guess it's really time for me to learn HTML, CSS, even PHP and Javascript.

weekend:
I had a really nice weekend with friends. One of my best guy friends in Seattle just done with his travelling in Yosemite and came to L.A. to visit me. We have another friend who's working in NASA's JPL lab which is quite near L.A., so we rented a car and went to Pasadena and Venice Beach on Saturday, Zuma Beach on Sunday. When we were in Pasadena, it happened that the chalk festival was on, so we spent a lot of time watching tons of artists, using chalk, painting on the ground of the old city, which was really fun.

back to top

week 2


Finally, I met Prof. Chew and Prof. Francois on Tuesday morning, and I got the mac version of FSF library and several examples which are applications implemented by the SAI framework. I compiled the FSF library and played around with the GlutIOExample, UserGuideExample and VideoExample a lot on Tuesday. Also Prof. Francois gave me a tutorial about the whole ESP project, which helped me to build a clearer idea about what ESP really is. And eventually I started building this project website.
On Wednesday, Prof. Francois helped me to set up my work station with the "car" and the PC in the lab, also we went through the ESP code and briefly talked about which part of the code I need to take care of and which part of the code I can just leave as it is.
In the remaining days of the second week, I spent most of my time connecting the ESP code with the graph that I drew during tutorial to see if each module makes sense to me, and found out some problems in the code, such as overuse of global variables, etc.

weekend:
I didn't do much during the weekend, just did some reading and went to Westwood Village Memorial Park Cemetery, my favorite Chinese director Edward Yang's burial site.

back to top

week 3


This week, as scheduled, I need to update the ESP project to FSF's newest library, i.e. from 0.7 to 0.8. For the first two days of this week, I was busy with figuring out how Doxygen works. In general, Doxygen is a documentation system for C++, C, Java,Objective-C, Python......
I use it to generate an on-line documentation browser(in HTML) and an off-line reference manual(in Latex) from the original ESP project, by adding some new comments and change the commenting style.
With the help of Doxygen, I modified a bunch of linking settings and library settings. Another main issue for this week is to replace the diaplay module with GlutIO module. In order to make GlutIO module work in the whole peoject, there's some modification of source code needed to be done, for example, considering the concept of singleton, I replace all direct use of the g_pSystem pointer with a call to CSystem::GetInstance()
In addition to that, I drew a graph of each .cpp file and their header files to show the hierachy and dependencies.
With the help of my graphs and Doxygen, I deleted some useless or redundant header files for each .cpp file and made some changes for the unappropariate defines.

weekend:
Here comes the July 4th long weekend.But the sad thing is that all my friends in L.A. would be out of town. Considering I'm leaving next Saturday, I did a lot of shopping during the weekend...bought some gifts for my parents and other relatives. On July 4th, when stay in my apartment alone, I really wish I were in Seattle...then I can go to Gasworks Park and enjoy the fireworks with friends...
Anyway, I'm flying back home in a week!!!cheer up...

back to top

week 4


This week must be the easiest week ever...since Monday is the holiday, I only need to work for four days, and the good news is I'm done with the code cleaning part on Wednesday afternoon. On Monday, I spent the whole day cleaning up all the global variables. The old version of the project is full of global variables and they are primarily used in three different ways: input and output files; some physics computation usage in one module; extern global variables that use in several different modules.
For the global variables that deal with input and output files, I basically pass the files as parameters to different methods.
For the global variables that only appear in one module, especially the physics module, I change them as const.
For the global variables that define as extern and are used in different modules, I change them as nodes that can not only talk to each module, but also accessible through source.

After done with this part, I thought my work was done, and the sad thing is though the cleaner version of the project compiles, the executable program doesn't run properly. The car can be initialized but it won't move...so, I spent the whole Tuesday morning fixing that problem. It turns out that i forgot to add the position integration cell when delete the global variable that has access to it, so the car won't move. After adding that cell, the executable program runs smoothly.
So, our next target is to figure out the memory leak and fix it. After some debugging trials, we figure out that the memory leak comes from the rendering module. Since I'm not familiar with OpenGL, Alex will take a look at the rendering module which is basically built on OpenGL and see what causes the memory leak.
Then, my work for Thursday and Friday is to finish all the documents stuff for the first four weeks of my research and continue building my website.
Things not related to work:
I got the email from my advisor that the department will fund me to go to this year's Grace Hopper Conference. It will be an unforgettable 4 days in Atlanta, and I'm really looking forward to it.
On Thursday, Katie(the other girl works in the lab) and I went to the Art Walk in downtown L.A. It only happens on second Thursday of every month. Before that, we went to Little Tokyo and enjoyed some wonderful ramen. I should say it's the yummiest ramen I've ever had.
Then we headed down several blocks to the main district that the art walk was taking place. It was really fun and I collected a lot of post cards from several galleries. The only annoying thing was that I could not find the bus stop that took me back. Unfortunately, I had to call a cab and it cost a lot...but anyway, the yummiest ramen and wonderful galleries compensate for that.

weekend:
I AM FLYING BACK HOME ON SATURDAY NIGHT!!!!!!
THERE'S NO WHERE LIKE HOME!!!!!!

back to top

week 5


After the almost one month break at home, I came back to USC to finish up my second half of the research. Purposely, I came back on Saturday, so I can have Sunday off and get everything settled down. But for the first time, the jetlag was killing me...I felt tired during daytime but super energetic during night time. The worse thing is that the working version of the project doesn't work after one month. The problem I have right now is the music is not on when driving and there's no output midi file. I compared the code and the settings with the original version, there's no difference, so quite confused why it doesn't work.
So what I have to figure out this week is to get the project working again, also I need to start learning openGL stuff, so that I can fix the texuture color issue.
On Thursday, I attended a tech talk hosted by my mentor Elaine. The guest speaker is Geraint Wiggins, Professor of Computational Creativity, from Goldsmiths' College. His talk is mainly about computational modeling of a process of musical composition, based on a cognitive model of human behaviour.It's a quite intuitive talk and I get to know some smart people during the talk.

weekend:
I visited Cal Tech with my new friend, who I happened to know from Thursday's tech talk. His middle school classmate, who is a Cal Tech phd student, served as our tour guide. I really like the small town feeling in Pasadena.

back to top

week 6


During last weekend, I looked up the openGL tutorial for a while, so on Monday, I focused on fixing the grass color and eventually, I figured out how to fix it in the afternoon. So for Tuseday, I started fixed the output midi file issue, because right now, even after played the driving game till end, we couldn't get any midi output file. It turned out that we shouldn't add the output file name as a parameter to the method. The correct way is to add the output file name, which is given by the command line parameter, as a node to the passive pulsar.
After solving the wrong color and midi output file problems, I focused on fixing the texture mapping issues.
It seemed that no matter how I arrange the loading texuture orders, once set the texture active, the task manager will show that the threads that is being used will go up dramatically, which shows there must have some race conditions in the project.
But after trying to fix it one more day in failure, Prof. Elaine, Prof Alex and I talked about this issue, and we decided not to use the texure mapping, and continued to port the project into mac.

weekend:
On Saturday, I went to take care of the CPT documents and offer letters for next quarter's intern at RIM. Then Sunday, just went to church with my housemate Amy and after that, we went to a Hong Kong style restaurant, and enjoyed some yummy Chinese food.

back to top

week 7


This week, Alex and I started porting the ESP project to mac. First, we checked that we need to replace our midimodule.h/cpp to a newer version, because the midimodule we were using in the pc use a lot of libraries that only compatible in windows.
Also, we include another module: RtMidiModule, which basically takes care of all the midi interfaces.
The problem is we have to think of a good way to take care of read midi file and get midi output file.
At the end of this week, I managed to add the new read/write midi file function to the new midimodule class.

weekend:
Here comes the long weekend, but unfortunately I didn't do anything impressive...
On labor's day, I baked a brownie with my roommate Amy and did some house cleaning afterwards.
It seems that Labor's day is for laboring...

back to top

week 8


This is my really-feel-lost week. We know that the gamepad module won't work on the mac, so as planned, we hoped that the joystick will replace the gamepad module. We have other projects that use joysticks and according to Apple Developer Network, joystick should be supported on mac. But the thing is event the other projects we implemented with joysticks, it does not seem to work on both my and Alex's mac.
Unfortunately, we need to find some other way to implement the gamepad module.
The other problem we have encountered is the read/write file function.
After several debugging trials, we found that the problem lies in the endianness plafform difference. When reading the standard midi file, we used to use an unsigned long to store the header file message, which should be 6. But in mac, the number we get is so much bigger. And it all results from the different size of unsigned long in mac and pc. In mac, the unsigned long has size 8, while in pc the unsigned long has size 4.
I'm kind of surprised to find that in pc, unsigned long and unsigned int has the same size, which is also 4.
But anyway, after changing all the size problem and define "INTEL" in the makefile. The project compiles.
The reason why we need to define INTEL in makefile is also due to the endianenss platform difference.

weekend:
One of my high school friends who's doing a research intern in UC-Davis came to L.A. this weekend. So we went to Beverly Hills together on Sunday. And afterwards, I went to see Inception with my roommate in the evening.
Inception is so awesome. I highly recommend it! It's a real must-see for this year.

back to top

week 9


It seems that I don't have much time left in California, and I feel that there's still so much work I want to do, so many tasks I want to accomplish.
In the new midi module, we don't have the input/output interfaces anymore. In fact, we extract the interfaces to a new class called rtmidi, which stands for real time midi.
There are several benefits to extract the input/output interfaces out of the midi module. In general, the interfaces are actually driven in real time, so extracting the interfaces out makes the midi module clearer and more specific.
Consequently, I need to compare the new rtmidi class with the old input/ouput interface and change the code from our main function, so that the new modules will work.
Another change I made to the midi module was that I added the tick function to the new midi module. When it comes to writing midi file, the function is called in real time, i.e. when buffer out is in process. And everytime we add a new node to the final event list, we need to call tick(), to make sure that each note that has been generated is aligned.

back to top

week 10


This is my last week...I spend almost all my time documenting the project code I have and writing bunch of comments, so that it will be easier for the other researchers to follow up this project in the future.
Also, I start writing the final report, and hope that I can finish it by the end of the 10th week. I decide to use Latex to write my final report, but I have no Latex experience before...so this is another real challenge.
My intern starts soon...excited but also nervous...

back to top

updated September 2010.