Version 6, last updated by mrsoviet at May 30, 2009 05:00 UTC

Release Candidate

Code Review

Overview

The module we decided to code review was MusicianDirectory. Note that this is the file before review.

The module post review: MusicianDirectory New

This module is responsible for dynamically loading the Musician classes, their icons, and other metadata on start up.

It's worthy of code review because it executes non-trivial introspective, pattern-matching and directory walking operations, and makes 2 goals of the project possible:

  • Robust, easily replaceable front end (communicates with this meta-data service to extract).
  • Plug-in style of musician addition (just create a new folder with the class, icon, metadata).

Feedback

  • Currently all the functionality is in one method. Separating out operations into functions is necessary.
  • docstring is necessary to describe each method.
  • Mostly trivial rearrangment and cleanup to better reflect flow of control and readability in several places.
  • We can update the icon discovery code to be stricter.
  • Instead of using tuples, refactor to create a MusicianMetadata class.
  • Practice Asking Forgiveness instead of Look Before You Leap in several places.
  • Exception handling errors may be misleading for several occasion. e.g. "musicians directory not found" will be printed for lack of directory permissions
  • Files with certain extensions are explicitly excluded-- why not implicitly exclude any non-desired file?
  • The methods could have more appropriate names: filterMusicianList implies mutability; validTags isn't a verb-noun
  • With the forethought that the returned lists may be very long, the methods that return lists could become generators.

Changes

  • The constructor method was significantly broken down into much smaller, more cohesive pieces to improve readability, and to help isolate any problems that may occur to one method.
  • Each musician directory is handled by its own method call, which extracts all the necessary information from the files in that directory.
  • Each type of file in a musician directory is also handled by its own method (getTags, getConstructor, etc.) in order to further improve readability.
  • MusicianMetadata class was created to store information about each musician, such as the display name, tags set, constructor, and file path to its icon image
  • Removed some exception catching in cases where the program would break in other places after the exception was caught (i.e. can't find musicians directory)
  • Changed the way the constructor method is detected to a much more concise, readable statement
  • validTags returns a set of tags instead of a list because it makes more sense semantically and provides easier use by the GUI code
  • Icon files must now be named icon.png,icon.gif, etc. to enforce a more consistent naming convention for images in the musician folders
  • Docstrings were added to all of the methods to better describe their functionality

User Studies

Overview:

We performed several user studies, using people who are completely new to the Robot Rock and outside of the CSE department. Our main takeaways are to make our controls more simplistic (such as key and time), as well as to make the delete button more clear and to add musicians that are more melodic.

Most people found the application fairly simple to use and intuitive, and the areas of confusion mostly involved areas requiring musical knowledge.

Besides the changes already implemented, our most improvements based on user feedback are: * Improved instrument quality and selection * Hiding the more advanced controls from the interface * Improving the instrument selection menu * Show user how instruments may be moved to change their performance.

User: 21 year old male, minimal to nonexistent music experience

Background: Electrical Engineering Major

Initial Playthrough:

  • User played with a lot of the controls first, adjusting the key signature, beats per bar, and tempo
  • Tried to play music before adding a musician, then added an acoustic guitar
  • Listened to guitar for a while, fiddled with key and beats per bar (wasn't sure what they did)
  • Replaced guitar with two metronomes to try to hear differences between metronomes with different keys (unaware that key, time, tempo were global settings)
  • Couldn't hear difference between metronomes (obviously), replaced with a bass
  • Took a few minutes to discover that moving the musician changed the way it sounds
  • Enjoyed the sound a lot more when moved the bass to high complexity / high energy
  • Thought that the musician properties box was very useful
  • Added a bass drum and program crashed, restarted
  • Started again, adding a few percussive instruments
  • Adjusted key signature to no effect
  • Moved them around until he found a beat that he liked, listened to it a while
  • Added a bass and guitar, decided it sounded bad with both, removed guitar
  • Liked the bass / hihat / handdrum combo, played with that a bit

Feedback:

What was the most frustrating?

  • Lack of a piano
  • Could not tell what the effect of key signature or beats per bar was
  • Took a long time to figure out how moving instruments changed complexity and energy
  • Energy and tempo seemed to be identical, confused on the difference between the two

What was most enjoyable?

  • Can create music without any previous knowledge
  • Properties box was useful
  • Very easy
  • Tooltips are very useful

Other notes

  • User had a good understanding of how changing complexity changed the music
  • Never used the delete button (may be unnecessary)

What I Learned

  • The user is very likely to be drawn to the large play button and the settings around it. The musician selection box should be more prominent so the first thing a user tries is creating a new musician
  • Key signature and time signature (or beats per bar) are very confusing to non music experienced users. It was very unclear that key signature did not affect percussive instruments, and beats per measure seemed to do nothing to the user (Low feedback from these actions)
  • The properties box was very good, overall it was good for the user to receive feedback in the form of visual change or audio change

User: Female, 27.

Besides whistling daily, not a musician. Instructed to "go to town".

Observations:

  • Drop down box for instruments was first thing used.
  • Pressed play button, then checked speaker volumes because no output was heard. (No instruments existed at this point.)
  • Added an acoustic guitar; disgusted 20 seconds later.
  • Used the delete key to remove an instrument--never used the icon.
  • Put together drum kit--hi-hats, kick and snare.
  • Positioned the drum kit components around--very happy with results. "Ooooh! I like it!"
  • Tried to find a position where snare would hit on offbeats, couldn't find it.
  • Never tried the bass.
  • Said "Uh.....?" when musicians continued to play after being removed. Declared it a "bug".

Feedback:

  • Really likes the drums.
  • Wants option for the snare to hit on the up beats.
  • Hated the acoustic guitar: "too random", "nonsense"
  • Acoustic guitar and metronome were considered too loud; per instrument volume is highly desired.
  • No comment on the interface of the program.
  • Didn't understand beats per bar. "Doesn't do anything."

My thoughts:

  • We are on the right track for the interface: simple and intuitive.
  • Quality of musicians could be improved, appear more responsive to position.
  • Maybe notes should be flushed when a musician is removed.

User: 20 year old male, little to no music experience. Statistics major

Tasks performed:

  1. Add a musician:

    • User went directly to the drop down menu and button.
  2. Begin playing:

    • Directly to play button, no problem.
  3. Pause/Stop:

    • Believed red 'X' was a stop button at first, then used the pause button.
  4. Delete a musician:

    • See above, red 'X' was confusing. After initial confusion, user correctly deleted a musician using the 'X'.
  5. Adjust musician parameters:

    • Had to be told that musicians are draggable.
    • Was not certain why musicians appeared where they did (random)

At this point, the user added several more musicians and began arranging them to produce some vaguely interesting music.

  1. Change tempo:

    • Used tempo slider, did not try the text line.
    • Worked fine, other than the reported bug of tempo not increasing beyond ~120
  2. Change key:

    • Assumed that unchecked minor box implied a major key
      • (should this be explicit somehow?)
    • Was able to change key using drop down menu and hear the changes
  3. Change time signature:

    • Had to explain what 'beats per bar' meant. In explaining, I used the metronome musician to demonstrate when bars ended/began.
  4. Quit application:

    • Closed the window, which correctly closes the program.

Overall impressions:

  • Looks nice.
  • Vaguely understood difference between energy/complexity, and how to effect change.
  • Sound, although fairly primitive, can be used to create interesting beats/music.
  • Too many musicians in drop down menu, wanted a simpler setup

Had to be told:

  • Musicians are movable. (Didn't have to say how)
  • Beats per bar description.
  • Do not have to pause in order to change status
    • includes adding/removing musicians,
    • changing key/tempo, beats per bar

Guessed:

  • If 'minor' checkbox unchecked, then key is major

Mistakes:

  • Red 'X' looks like stop button
    • After seeing it wasn't a stop button, correctly used it to delete musicians

User: Male 21 year old. Music hobbyist, no formal training.

Observations:

  • Needed a little bit of exploring to hit the play button after adding a couple of musicians.
  • Said he would create a "basic pattern" out of adding 2 guitars and 2 hi-hats.
  • Ran into a previously unknown bug with the metronome object where it doesn't clear its notes between compositions.
  • Was able to change keys, change tempo and noticed that pausing doesn't completely stop the sound (known issue).
  • Spent time exploring sounds by moving instruments around axes.

Feedback:

  • Requests more electric instruments, cymbals, bass drum.
  • Noted that having the metronome is useful but he didn't use it.
  • "Really simple to use."
  • "Anyone who can read a graph can use it."
  • After asking what the denominator of key signature was, didn't understand ("measures per line").
  • Didn't know what the number signified for Tempo (right answer is bpm).
  • Thought the red X stops the music.
  • Didn't notice detail window in upper right corner.
  • Appreciates being able to make changes while playing in real time.
  • Requests more colorful or visually interesting interface.
  • Maybe a background image for the stage view instead of a white monochrome.
  • Understood that the axes are synonyms for intensity and "musical interest."

Changes:

  • No longer present time signature, instead it is one number called "Beats per bar." May need to simplify to just "beats."
  • Fixed metronome bug.
  • Fixed pause bug.
  • Need to relocate 'X' so it clearly acts on an instrument, instead of near the playback controls.
  • Need more visual eye candy.

User 1: 18 year old female, no musical experience (does not understand what 'tempo' is)

User 2: 20 year old female, significant musical experience (pianist, clarinetist, saxophonist)

Users were present at the same time

Initial Playthrough:

  • Took a moment to realize what to do
  • Asked 'What do I do?' 'How do I add instruments?' - Ended up solving the problems on her own
  • Played around adding musicians
  • Moved musicians around
  • Asked about energy (what is it?) and various controls on the right panel
  • Naturally arranged musicians to make a cool beat
  • Really enjoyed the percussion, especially the hand drum
  • Was annoyed with acoustic guitar
  • Had a lot of fun just playing with musician locations and the sounds coming as a result

Feedback:

What was the most frustrating?

  • Acoustic guitar was annoying, sounded bad
  • Did not understand what the right side controls were (what is the difference between energy, beats per bar, and tempo?)
  • Wanted a grid, but realized she would have stuck to the grid it she was given one
  • Want a way to delete all, instead of one at a time
  • Wanted a better variation in acoustic guitar's chords

What was most enjoyable?

  • Hand drum!
  • Really intuitive (basically picked it up instantly)
  • Cute images for the instruments
  • Start and Stop was really intuitive
  • Adding a musician was really easy

Other notes

  • Complexity was intuitive, energy was not
  • Have a way to save music
  • Have woodblock respond to key
  • Change the keys of individual instruments
  • Thought band order (and spotlight) were REALLY cool when they were mentioned
  • Also really liked the idea of a production mode, and the idea of being an instrument (knowing these intentions helped with how they felt about the program)
  • Needs some color, flash, flair!
  • Bolder and bigger words
  • Record and playback options would be nice

What I Learned

  • The users really enjoyed just being able to play around in the canvas. The whole experience in it seemed very natural.
  • If the user does not understand something then they might plat with it really quick, but will most likely ignore the feature altogether.
  • Needs a tutorial or something to indicate how to start (my version did not have one, so I just did a quick explanation, like 1/2 a sentence).
  • Terminology was too musical. Things like tempo, key, bar, and energy were misunderstood. However, complexity was immediately understood.