Friday, February 4, 2011

Background Issues (ieretrofit.js)

All the problems I've run into up to now have been limitations of Blogger that I've been able to work around with template changes, CSS, javascript, etc.  But the problem I'm dealing with now is a lot harder to nail down.

Figure 1: Page without ieretrofit.js bug
The issue is that certain Internet Explorer configurations seem to have issues keeping the background colors/images of post elements straight when you use some Blogger templates (such as the "Picture Window" template I'm using).  The result is that the background for the various elements on my page all change to match the background of the page itself.  Leaving you with a very bland and often hard to read web page (refer to figures 1 and 2).
Figure 2: Page with ieretrofit.js bug

So far I can tell that the problem is caused by a javascript that Blogger runs on IE browsers to help display pages properly.  (If you download the source HTML and comment out this script then the background appears normal)

If you view the source html for my blog or any other Blogger blog (not the template XML but the source of the page when you're viewing it) you'll see the following segment of code in the head section which loads up the suspect javascript:

<!--[if IE]>
  <script type="text/javascript" src="http://www.blogger.com/static/v1/jsbin/2175052290-ieretrofit.js"></script>
<![endif]-->

The "ieretrofit.js" script they're loading has been minified so it's horribly difficult to troubleshoot even after you run it through a javascript beautifier.  But I took a jab at it and here's what I have so far.

I noticed that the background appears normally until right at the end of the page load.  But as I mentioned before, the script is loaded at the TOP of the page in the head section.  I assumed they must be using some event trigger to run the script at the end of the page load instead.  So, I started by narrowing down my potential problem code to segments that reference "onload", "addEventListener", or "attachEvent" and found this piece of code:

document.attachEvent && document.attachEvent("onreadystatechange", function() {
  if (document.readyState == "complete") {
    document.body.currentStyle.zoom != "10%" && Rf();
    window.setTimeout(Vf, 1E3)
  }
})

Notice that it's setting up a function named "Rf" to execute once the browser's readyState changes to "complete".  This "Rf" function eventually calls a function named "$f" which is defined below:

$f = function(a, c, e, b, d) {
  var h = Of[D(a)];
  
  if (h == s) {
    var j = fg + c.length;
    h = new V;
    h.element = a;
    h.id = j;
    Of[D(a)] = h
  }

  c[D(a)] = a;
  if (e.F) h.F = r;
  if (e.za()) h.required = r;

  for (var l in b)
    h.T(l, b[l], d);

  h.f.backgroundColor = h.f.backgroundColor || a.currentStyle.backgroundColor;
  if (a = Pf[D(a)]) a.parent = h;
  h.na()
}

Wow.  That's painful to look at, huh?.

I think I've further narrowed it down to the "T" function being called from the "h" object in the last lines of the code above, but I'm not certain of that.  So, I'll spare you the pain of looking at the code for the "T" function.

But from what I've been able to figure out so far, I think they may be looking for elements with rounded corners, transparent backgrounds, etc. and playing with them in the DOM. (changing their style, moving them around, removing, replacing, whatever)

I've posted on Google's help forum to see if someone can give me a solution or maybe a pre-minified version of the ieretrofit.js script before I go any further.  If not then I guess I'll be reverse enginering some minified javascript this weekend.  (Oh joy!)

And before you ask - Yes.  I have looked at other templates.  But I guess I'm just to obsessive compulsive to let this go and hope that it doesn't crop again somewhere else.  :)

Creating this blog

This blog has started to become much more of a pain than I originally intended.  So much so that I've all but stopped working on other projects and have dedicated the last two weeks or so to trying to get Blogger to behave the way I want it to.

There are likely at least a few other people out there experiencing the same frustrations I'm running into.  So, I guess I'll go ahead and start a new project detailing the problems I'm having and the solutions I've discovered.  However, since I didn't intend on documenting the creation of this blog as a project in and of itself, the entries may be a little out of order.

For example the entry I'm about to make is going to be about my most recent issue so that I can get advice from others who may have already found a solution.  But there are other issues I've already run into and resolved on my own that are probably worth mentioning.  (I'll try to adjust the post date of future entries to be in a logical order so that anyone following along doesn't get too confused)

Friday, January 28, 2011

Rock Band 3 - Results

Overall Self Assessment:

I'm getting better at the pro guitar controller and I'm enjoying playing through the career mode.  I haven't picked up a real guitar yet, but I'm optimistic that the skills I'm learning will translate fairly well.

Accomplishments:

  • I've made it through the easy and medium instrument lessons and the first two career goals
  • I'm learning to play through songs without having to look down at the guitar
  • I'm able to move up and down the fret board (to some extent) without dragging my fingers along the strings (using onscreen cues) to see where my fingers are.

Details:

As I mentioned in previous entries, I recommend everyone start out in the career mode if you're trying to learn to play.  The training mode and career mode take you to the same instrument lessons, but the career mode mixes them up with song lessons and song goals that make everything a little more fun.

So, after I tried the training mode and decided it wasn't working for me, I started spending most of my time in career mode.  As a matter of fact, the career goals have driven me to play full songs with no song lessons whatsoever.  I had originally intended to learn to play the guitar as well as possible through the training mode before playing full songs.  And to my surprise playing songs has been a key step in my development.  But before I explain how playing songs has been such a big deal for my development let me elaborate on the experience of playing easy difficulty level songs.

When you play a song under easy difficulty in Rock Band 3 it doesn't slow the song down or change the music in anyway.  To make the song easier it simply doesn't require you to play all the notes/chords in the song.  However, those notes/chords will still be played through your TV speakers.  So, it may be irritating at times when you feel like you should be strumming a string because there's music playing, but you're not supposed to play it under the easy difficulty level.

Due to this method of adjusting the song difficulty you can't really take your eyes off the screen and look at the guitar because you need to be able to see which notes/chords you're supposed to play.  That was very annoying to me at first (and still is sometimes).  It was driving me nuts to be missing notes/chords because I was moving my hands or fingers the wrong place, when I knew I could do it if I could just look down.  But I didn't have enough time to look down at my fretting fingers, glance down at the strings, and then move my eyes back to the screen before the next note is coming down the screen.

Then something amazing happened.  Once I kind of gave up and just started trying to play the song even though I knew I was going to miss a good portion of the notes, I discovered that I started to be able to "feel" whether or not I was in the right place.  Furthermore, most of the time when I found myself second guessing whether or not my fingers were in the right place they were in the right place but I'd miss the note because I paused or got off beat when I second guessed myself.

Now I'm to the point that I can play most songs with at least three stars on easy difficulty as long as there's not too much activity on the G, B, or high E strings.  For some reason I can't seem to transition between those strings and the others very accurately.

Another area I'm working on is moving up and down the fret board.  I can generally find the right numbered fret in time to strum the string as long as it's one of the first nine eight frets and one of the first 3 strings.  Beyond that I'm depending heavily on the onscreen cues that let you know which fret button you're holding down.  So for example I might miss the 10th fret and hit the 12th fret instead and have to slide my fingers back up the frets to get to the 10th fret before it's time to strum/pick the string.

Enough blogging.  I'm going to play some more now.  Hopefully I'll have more accomplishments to report soon.

Monday, January 24, 2011

Rock Band 3 - Lessons (Part 2)

Figure 1: Lesson Description and Progress
The guitar lessons in Rock Band 3 seem fair enough.  Lessons are separated into small easy to accomplish "exercises" (for lack of a better word).  For example the lesson in figure 1 has three exercises as you can tell by looking under "Overall Progress" in the lower left.  When you first start a lesson all the blocks under "Overall Progress" will be darkened.  As you progress through the lesson they will be shaded green.

Figure 2: Useful Lesson Description

In some lessons such as the one in figure 2 the exercise description will be used to try to educate you on music terminology.  I think the concept of teaching more than just muscle memory is a good idea, but they didn't really follow through with the idea which is annoying at times.

Sometimes they mention music/guitar terminology as if you already know what they're talking about.  It's as if they edited out the lesson/exercise that was supposed to tell you about that terminology.

For example in figure 1 above it references "fifth position" but I hadn't seen anything thus far that explains what "fifth position" is.  A Google search revealed the answer, but who wants to go search Google in the middle of your lessons?  Why should you need to?  I chose the option to "Learn an Instrument" and it never told me to make sure I had a book on music theory handy.

To make matters worse, not only are the lesson introductions/descriptions incomplete, but it seems like they may even be inaccurate at times.  Take the same lesson in figure 1 again.  It tells you to keep your hand in fifth position for the open E and play the E at the seventh fret with your ring finger.  What it doesn't tell you is how you're supposed to reach the ninth fret one beat later.

I assume you're supposed to stay in fifth position since it doesn't tell you otherwise.  But that means my little finger is on the eighth fret.  Not the ninth.  Am I supposed to be stretching my little finger out to get to the ninth fret?  Is learning to stretch my finger out part of this exercise?  If so, why didn't they justify their seemingly odd suggestion by saying so?

Fortunately I'm not the only one who had a problem with this lesson.  So, when I did my Google search for "fifth position" I also found a better way to play the lesson which involved moving to seventh position.  But seriously... when you make a game that has such poor instructions that people are forming their own support forums to figure out how to make sense of them ... well ... let's just say you've got some room for improvement. :)


Here's another example of incomplete instructions.  In figure 3 below you'll notice it says you should use three fingers to play the chords.  But in figure 4 which is from the same lesson you'll see that it's clearly telling you to barre the fret with one finger.
Figure 3: Lesson Description

Figure 4: Note/Chord Help - Barre the Strings
In their defense the next chord you play does show three fingers.  But it's not like they were out of room in the description.  Why not go into a little more detail for the sake of clarity?

I think that about sums it up for describing the hardware and software.  In the upcoming entries I'll start documenting my actual progress through the game/lessons and my perception on how much help it has been in learning how to play a real guitar.

Sunday, January 23, 2011

Rock Band 3 - Lessons (Part 1)

Figure 1: Main Menu

Lessons in Rock Band 3 are accessed either through the training menu option or through the career/my goals menu option (figure 1).  Either way you'll end up doing the same lessons (figure 2), but the career mode will align the lessons with achievements whereas the training mode seems to be more or less intended to just learn how to play an instrument or a song without any specific goal in mind.  (Though you still get the same achievements/trophies regardless of which path you choose)



Training mode:


Figure 2: Pro Guitar Lessons Menu
Since I'm a bit of a perfectionist and hate to start on "easy" difficulty in any game I chose the training mode path. My rationale was that if I learned how to play the guitar first then playing the game with the guitar would be easy enough that I could start playing songs on a higher difficulty level.  If you read between the lines I think you'll find the words "That didn't work" in there somewhere.

I found two problems with this approach.  First of all, there's not much in the way of instant gratification via achievements or trophies going this route.  So, unless you can find a sense of self accomplishment by learning to play individual notes and chords you'll quickly get bored and/or frustrated with the training.

Secondly there's the issue of the training itself.  The lessons start off with individual notes rather than chords and I've sense been told that this is the opposite order that most people learn to play the guitar, but this is really only part of the issue.  The big problem with the lessons is an unsteady progression in difficulty.  For example in a lesson with five exercises it my steadily get more difficult for the first three exercises.  Then become REALLY HARD on the fourth exercise. (Like seemingly impossible "I quit for the day" hard)  And then the fifth exercise of the lesson is easier than the first part.

I imagine the right way to approach that scenario would be to step back to the easier exercises in the lesson and redo them until it becomes almost second nature.  Then try the hard exercise again.  But since you don't get any achievements, trophies or anything for redoing these exercises/lessons you'll have to use your own self discipline to keep yourself on that schedule.  It would have been nice if they'd added achievements for completing an exercise/lesson X number of times.



Career/my goals mode:


Figure 3: Career/My Goals Menu
So, yeah.  Self discipline... what are the other options?  :)  Career mode.  I actually found the "my goals" portion of career mode for the pro guitar to be pretty good.  It mixes up the basic note/chord lessons with song lessons so that you get to put your newly learned skills to use.

In figure 3 the icons to the right of the goal listing represent the requirements for the first goal (introducing pro guitar).  The requirements are: Watch a video, do part of the first easy guitar lesson, do a song lesson, do some more guitar lessons, song lessons, guitar lessons.

And even better yet, since you're playing in career mode completing all these requirements help you earn achievements and trophies.  So, you get a little instant gratification to keep you going when you're really sick of trying to make it through a lesson.



Pro keyboard:

The pro keyboard career goals are nowhere near as nice.  The first 4 goals for the guitar with the song lessons and instrument lessons mixed together are nowhere to be found.  There is a goal for accomplishing these lessons, but they're all crammed into the "general keyboard goals".  The rest of the goals you see there all involve playing song after song until you've completed each one in the set - which is something like 70 songs.

This essentially makes the career/my goal route about the same as the training route where you have to decide if you want to learn how to play the instrument or how to play songs, and it seems to be "all or nothing" as far as goals/achievements go.  In contrast, the career goals for the pro guitar actually give you an achievement for watching videos.  I'm not sure why the experience is so different for the pro keyboard.  It really almost seems like the keyboard was an afterthought.

Fortunately my wife already knows how to play the keyboard/piano.  So, she's been breezing through most of the lessons and songs anyway.  But I have a feeling less experienced players may be a little overwhelmed by this all or nothing approach to goals.

In my next entry I'll go into more details on the lessons themselves.

Sunday, January 16, 2011

Rock Band 3 - Screen Layout & Controls

Figure 1: Lesson Screen
The photo above in figure 1 shows what the Rock Band 3 lessons look like.  Sorry for the picture quality, but projection TVs aren't exactly photogenic.

During lessons (and game play) numbers flow down the screen on strings representing the fret button you should be holding down on each string as you pick/strum it at the precise moment it reaches the bottom of the screen.  So, in the example above you should be holding down the 7th fret on the low E string.  And if you look closely you can see that the next note should be playing on the D string using the 9th fret button and the note should be held for a moment (indicated by the trailing orange line) followed by shortly by fret 7 on the A string.

Figure 2: Chord/Note Help
You may notice at the top of the screen underneath the "0%" there is a line of text that says "Chord/Note Help" (figure 2).  When this mode is enabled the game will pause any time you miss enough notes for your lesson percentage to fall to 0% (lessons only).

While the game is paused it will give you help on what fret/string you should be playing and give you a chance to get your fingers in position before moving on.  When you need help on single strings/notes the most you'll generally get is a picture of the fret board at the top of the screen (figure 3) with blue fingerprints over the fret/string you should be holding down.

Figure 3: Note/Chord Help - Fret Board
Of course this only tells you what string should be pressed down.  Not what finger(s) you should be using.  That is one of the areas where Rock Band 3 tries, but falls short of success.

There are times when it will instruct you on what fingers to use, but this is mostly limited to chords (see figure 5 below for an example).  And in general that's sufficient.  Single notes can often be played with any finger you choose.  It's only when you're trying to move quickly between different notes or pick single notes while transitioning between chords when it's really an issue.  But when it is an issue it's a BIG issue.  You're left feeling like your teacher just walked in, handed you some sheet music, and then left with no further instruction.

For those of you as new to this guitar thing as I am I'll take a moment to explain what a chord is.  A chord is pretty munch the foundation for a lot of the rock music you listen to today.  Rather than a note composed of a single string strummed with a specific fret held down, a chord requires you to fret and strum multiple strings at once.

Figure 4: Chord
Figure 3 actually depicts a chord as displayed in the note/chord help screen.  However, as you can imagine it would be difficult to read all those fret positions coming down the screen at once.  Much less get your fingers into the correct position before it's too late.

To overcome this issue Harmonix has done three things.  First they've added the name for the chord.  In this case "G" as you can see to the left of the chord in figure 4.  I'm sure this would be useful if you already know how to play guitar, but I don't.  For me this is just an arbitrary name.  It might as well be named "Bob".

Figure 5: Note/Chord Help - Finger Placement
So, for people like me they eliminated most of the fret numbers and only give you the number for the string your index finger should be on.  Next they got rid of the standard fret number flags for the rest of the chord and replaced them with a blue bar stretching across all the strings you're supposed to fret (figure 4).  The blue bar will be thin on the index finger position and get incrementally thicker depending on where you're supposed to fret the string at that position.

So, in the example shown in figure 4 you can (with practice) tell that you fret the A string with your index finger and then drop one fret down for both the low E and high E strings.  As far as what fingers to use, generally having the index finger on the indicated fret will steer you in the right direction, but in a lesson the chord help will actually tell you precisely which finger goes where (see figure 5).

Figure 5: Speed Control
Another feature you'll find helpful in lessons is the speed control found on the left side of the screen underneath the overall progress (figure 5).  Using this control you can slow down the stream of notes (and the music) by up to 40% so that your fingers can learn the positions and then gradually increase the tempo until you're at 100%.

It also introduces a metronome sound when you slow the music down.  Some people may find this useful, but to me it was just irritating.

In my next entry I'll go over lesson presentation and effectiveness in more detail.

Saturday, January 15, 2011

Rock Band 3 - Instruments

I'm using the Mad Catz Wireless Fender Mustang Pro Guitar and my wife is using the Mad Catz Wireless Pro Keyboard.  I have absolutely no experience playing any musical instrument (as I'm sure will be evident) and am rediscovering playing video games which I played as a major pastime in my youth.  My wife has close to zero experience playing video games and is rediscovering the keyboard/piano which she took lessons on many moons ago.

So, between the two of us I think we've got the target demographics covered.  I'll try to include her progress with mine when available, but for the most part I'll be documenting my experience with the game.



Pro Guitar:


Figure 1: Fret buttons
Overall, I've been impressed with the pro guitar.  The fret board has a button for every fret position between 1 and 17 (figure 1).  That's a total of 102 buttons.  One for each string position you'd find on your average guitar.  You'll also find six plastic strings down on the body of the guitar for picking and strumming (figure 2) instead a single rocker switch like the older 5 button guitars.  The only thing I have been disappointed by is the missing whammy bar.  Though I'd probably just mess up the song trying to use it at this point.

Figure 2: Bridge
People who can already play a real guitar will be quick to point out that the guitar's fret buttons only go up to fret 17 where real guitars go up to 21.  They'll also point out that the buttons don't require the same amount of accuracy or pressure as real guitar strings.  And I'm sure they're right.

In my opinion these things give us noobs a sometimes much needed low(er) barrier of entry to allow us to learn at least some basic finger positioning skills.  At least that's my hope.  I guess we'll see how easy it is to transition from the Pro Guitar to a real guitar once I get to the point that I want to pick one up.



Pro Keyboard:


Figure 3: Pro Keyboard
As for the Pro Keyboard (figure 3), well I can only tell you from second hand, but it seems to be accurate to the real thing based on how well my wife is playing.  She's already passed me on the "Learn an Instrument" mode and is working on the advanced lessons.  And I think that's GREAT!  It's reassuring to know that it seems to be more useful to know how to play an instrument than it is to know how to play video games.  Hopefully that means the things I learn while playing with the Pro Guitar will translate to useful skills playing a real guitar.

The only negative thing I've heard her say about the keyboard is that finger placement is a little different than playing on a full size keyboard or piano.  No matter what 10 keys it shows on the screen there's never a "middle C".  I'm not familiar with the concept, but apparently it makes determining your finger placement difficult.

We were initially concerned by the fact that the on screen keyboard only had 10 keys white keys (or a little more than an octave - whatever that means).  But it turns out that the on screen keyboard will change from one side of the keyboard to the other at times.  So, you can in fact use all the keys on the keyboard in a single song or lesson.

There are some significant differences in the lessons between the two instruments, but I'll save that for another entry.

Saturday, January 8, 2011

Rock Band 3 - Introduction

Figure 1: Old 5 button guitar
Rock Band 3, for those of you not familiar with it, is one of many games in the music games genre.  In this genre of game the player needs to perform movements or press buttons in time with on screen sequences that correlate to the beat or rhythm of the music being played.  Another distinguishing feature of most of these games is the use of a non-standard input such as a dance mat, guitar, keyboard, etc.

In most music games these non-standard controllers are just a substitute for the standard controller and each movement you make must correlate to a specific button on the standard controller.  As you can imagine this is a little limiting for simulating real musical instruments which have more variation in movement.

So, for example the guitar controllers used in these games (until now) have had five buttons on the neck of the guitar and a single switch/button in place of the strings used for strumming/picking (figure 1).  As you can also imagine, learning anything other than rhythm from these controllers is pretty much a lost cause.
Figure 2: Pro instruments

That's where Rock Band 3's "Pro Mode" is different. In this mode you can break through the six button barrier and use controllers/instruments that have more buttons than the standard controller (figure 2)  You can even use REAL instruments assuming they have MIDI output.  Consequently Rock Band 3 can actually be used as a teaching instrument for learning how to play a real musical instrument and has modes of game play that are designed specifically for this purpose.

Which leads us to the meat of this "project".  Over the coming months I'll be using this blog as a journal to document my progress learning to play guitar using Rock Band 3 and the Wireless Fender Mustang  Pro Guitar by Mad Catz.  In the next entry I'll describe the guitar/controller in more detail and explain how it's used in game play.