Introduction to the UDML


Topics

  1. Using the iMacs
  2. Software in the UDML
  3. Equipment Checkout
  4. Using Special Equipment in the Lab
  5. JES/Python
  6. Lab Marking
  7. References
  8. Homework

1. Using the iMacs

Probably the most important highlight of this lab!

1.1 Logging in:

1.2 Accessing Network Storage (small files only please)

There are two ways of accessing your network drive:

  1. Using the icon on the dock with your username:

  2.  
  3. Using Finder:

Note: anything that is saved on the network drive will be available on any computer in the room. Anything that is saved to the Desktop, will only be on that machine.

1.3 Storage Notes:

 


2. Multimedia Software Available in the UDML

2.1 Finding and Using Applications:

  1. Applications Folder
  2. Spotlight Search
  3. Dock

To stop a program you should go to the applications main menu and select quit, or use Command-Q. Often Mac programs will keep running even if all their windows are closed. Look for the glowing dot under its icon. Right or control click and choose quit to stop it completely.


3. Equipment Checkout

From time to time you may wish to checkout the equipment available in the Media Production Department. We may use some of this equipment in the labs but you may also wish to use it for your class project. Equipment includes:

The location of the Media Production department and the contact person therein is as follows:


The Computer Science department also has five JVS HD Everio video cameras. They will be available to borrow for a week at a time, which gives you time to learn the camera and record your projects.


4. Using Specialized Equipment in the Lab

You will notice that this lab has some specialized equipment that not all of the labs have. There is a scanner, two super-vhs machines, and a Roland midi keyboard.

4.1 Using the UDML Scanner

4.2 Using the Super-VHS Machines

4.3 Using the Roland MIDI Keyboard


5. JES/Python

As we said in an early section, JES stands for Jython Environment for Students. It is a special programming environment developed for a Media Computation curriculum by Mark Guzdial and Barbara Ericson at Georgia Tech. JES includes everything (functions and interfaces) that we need to work with multimedia easily.

You might be wondering what Jython is. Jython is a version of Python. To give you an understanding, Python is normally implement using C. By contrast, Jython is implemented in Java. It is a form of Python so the syntax of the two will be quite similar; although, there are underlying differences. You will find that the labs are labelled as "Python and Something". This is consistent with the book by Guzdial and Ericson; but, to be exact, what we will be working with is a version of Python known as Jython.

5.1 Downloading JES

If you would like to work at home, you can install JES on your own computer. You can get it from:

http://code.google.com/p/mediacomp-jes/downloads/list

From the list, choose the platform that you are working on to download and install the software.

5.2 Running JES

In the lab, to run JES, type JES in the Spotlight search (upper right-hand corner). From the list, you will click to choose the JES application (shown below).

When JES is running, there are three main areas (illustrated below):

JES Areas

  1. Program Area - This is the area where we can type our programs or functions in Jython. In order for JES to find the functions that we have in the Program Area, we need to first load them by click on the Load Program button. Let us try it out by typing (or copying and pasting) the following into the Program Area (note that the indentation is important):
    def showPict():
      file=pickAFile()
      picture = makePicture(file)
      show(picture)
    You can now choose File > Save Program As.... In the dialog box, select a directory and type a name with a .py extension.

    Click on the Load Program button.

  2. Command Area - This is where you type commands to make something happen. Either you can call your own "loaded" functions, or you can call functions that are built-in to the language. Try typing the following in the Command Area:
    showPict()
    print 34 + 56
    print 1/2
  3. Help Area - You do not see this area unless you either: 1) click on some function in the Program Area and then click on the Explain button (at the bottom) or 2) choose an option from the Help menu.

You will also notice that there are two additional buttons: Watcher and Stop. Watcher is a debugger and Stop allows you to stop a running program if you realize that it is taking too long or doing something wrong.

5.3 Overview of Python Syntax

There are some things that are obviously different from C++. These are things worth briefly mentioning so that you realize what is going on if your Python/Jython code is not working.

In general, Python is meant to be a simpler and easier to read than C++:

  1. Python has no semi-colons at the end of statements

  2. Python has no curly brackets. Be aware, however, that indentation is important. If you indent statements inside of a control statement, that indicates to Python that those statements belong within the control statement. For instance, a while statement might look like this:
    counter=0
    while counter < 3:
        print 'loop#%d' % (counter)
        counter +=1
    The above code would not work if counter +=1 was left-aligned (the same as the while) because, to Python, that would mean that the counter+=1 statement was not included in the while loop.

  3. You might have noticed some other differences in the code above:
    1. the colon(:) after the control statement
    2. no parentheses around the condition (counter < 3)
    3. the print statement

  4. Function definitions also have a colon (:). Without realizing it, we already defined the following function:
    def showPict():
      file=pickAFile()
      picture = makePicture(file)
      show(picture)
    Notice the use of the keyword def

  5. Comments are denoted with the hash or pound sign (#). Anything that comes after the # on a line is taken as a comment.

The above list includes the most major differences. You are sure to encounter others throughout the labs on Python. For now, be aware that some syntax (like semi-colons and brackets) are not a part of the Python language and that indentation shows where a statement belongs.


6. Lab Marking

6.1 Mark Distribution

6.2 Submission

For most labs a final product, source materials and a description of the techniques you used are expected. Please organize them all into one folder.

Lab work is due at the beginning of the next lab. Your lab instructor is experimenting with submission mechanisms. You may be asked to use special software or an online service. You may also be asked to move your files to a USB device that is passed around during the lecture.

6.3 Note on Lab Material

The lab material will be posted on this website: http://www.cs.uregina.ca/Links/class-info/325/. Dr. Hepting and I are working together to improve the lab material, so labs may change topic or content shortly before the week's lecture begins.


7. References


8. Homework

For next week's lab orient yourself thoroughly: