Archive for August, 2009

OnScreen Pitch Count Now On Sale on iTunes App Store!

Saturday, August 29th, 2009

OnScreen Pitch Count, my iPhone “app” for recording pitch results in a baseball or softball game has been approved for placement on the iTunes App Store and is now available for purchase, in the Sports department, naturally. The past couple of posts here (OnScreen Pitch Count: An iPhone App Preview and How I Made a Quick-and-Dirty Six-Minute Demo Video of My iPhone App) have been devoted to describing the app and my efforts to get it ready.

The only way to sell an app for the iPhone and iPod Touch is through the App Store, and Apple has to approve individually every app that goes on sale there. The estimated time for this approval had been quoted as about two weeks when I submitted OnScreen Pitch Count on the night of August 12. I hurried to get it done then because I was going to be out town for five days, visiting family.

I spent the next couple of weeks wondering if I’d somehow introduced a fatal bug at the last minute (“impossible,” but still one thinks about the impossible sometimes) or if the reviewer at Apple might be someone that didn’t know the first thing about baseball. The evening of August 26 arrived, and OnScreen Pitch Count still hadn’t been approved. Then, almost two weeks to the hour since I’d submitted my app, I got the email saying it was now on sale on the iTunes app store.

Sure enough, within an hour or so the link embedded in my email worked to take me to the OnScreen Particle app’s display on the iTunes App Store. Sure, it’s too late in the baseball season to make many sales now, but it’s still a good feeling to know the app has been approved.

Let me quote a couple of paragraphs from the iTunes app description:

OnScreen Pitch Count from OnScreen Science, Inc. is an app for anyone wanting to have the pulse of a baseball or softball game at his or her fingertips. Pitching is the key to the game, and with OnScreen Pitch Count you’ll have data that even the tv analysts don’t. You’ll know how many pitches each pitcher in the game has thrown and exactly what the net results of those pitches have been.

Whether you’re watching your favorite team play, listening to a game on the radio, sitting in the stands at your child’s Little League game, or coaching a game in which extra pitching data could help you make the right decision, you’ll find OnScreen Pitch Count enhances your enjoyment of the game as it increases your understanding of it.

If you enjoy following baseball or softball, and especially if you coach it at any level, you should check OnScreen Pitch out. Even if you don’t really need it until next spring, you might as well get it and learn it now. I welcome comments and questions. See the email address in the right hand column.

UPDATE: See also “IPhone App Updates and Experiences” and “OnScreen Pitch Count 1.3 Is Now on the iTunes App Store”.

How I Made a Quick-and-Dirty Six-Minute Demo Video of My iPhone App

Monday, August 24th, 2009

My iPhone app OnScreen Pitch Count (submitted to Apple, but not yet approved for App Store placement) is easy to use. Even so, describing how it works, using only words and still images can be tedious and may give the impression that it’s more complicated than it is. The draft user’s guide for OnScreen Pitch Count details what every screen button is for. Most of them should be immediately obvious, but the sheer number of buttons might make learning seem an unpleasant task, at first glance.

I clearly needed a video presentation of OnScreen Pitch Count that showed both how to use the app and what it was to be used for. Not knowing either the timetable or the exact procedure for the Apple review, I also felt the need to get something online as soon as possible, just in case an Apple reviewer, with the app’s fate in his or her hands, came to the web site looking for help in using it. I originally thought that a video of me or someone else tapping the buttons on the screen would be best, as being more realistic and possibly making the viewer want to start doing the same thing. That may be true, but given my resources and my impression of some rather pathetic online videos of iPhone game play, where the player’s fingers really got in the way, and the focus was poor, I decided to opt for making a screen recording of the app running in the iPhone Simulator, which Apple provides for testing apps under development.

Since most button taps lead to the tapped button’s being highlighted, it should be easy for the viewer to follow the action, imagining the invisible finger or thumb of the user. I already had used a Macintosh program iShowU for making a screencast demo of OnScreen Particle Physics, OnScreen Science’s modern physics teaching software, so my first thought was to try iShowU. First I went to its web site to see if there was a new version. There was, one that required Mac OS 10.5. This raised the question of whether the version I had would run under 10.5 at all. Since there was a discounted upgrade price I decided to look into the upgrade. Unfortunately to get to the upgrade page, one had to enter a password, the meaning of which was not explained anywhere I could see. I decided to launch the older version to see if the password might be found there. The good news was that the older version launched OK under 10.5, but the serial number turned out to be extremely long and with no way to copy it. Perhaps some old email would have it, but that was enough to deter me from the upgrade, since I wasn’t even sure the serial number was in fact the required password. I decided to see how well version 1.7.2 would work before revisiting the upgrade or alternative software question.

iShowU provided an easy, intuitive way to capture just the portion of the screen I wanted. There was a draggable, resizable rectangle, which I could put exactly over the iPhone Simulator’s on-screen representation of the iPhone device. The on-screen instructions said to hit return to set the recording area. Nothing happened to indicate that the capture rectangle had been registered when I did that (several times). It seemed this might be an incompatibility with 10.5, as I had feared. What else to do but try quitting and relaunching? That did the trick, though as usual in such cases, I’ll never know why. I did a couple of short practice runs. It was working, saving a QuickTime mov file to the desktop, each time. I then plugged in my USB microphone, the Blue Snowflake, and tested it with commentary enough to see that the audio worked. About a megabyte seemed to be required for each minute of recording, which I thought was within reason.

Clearly, though, I could not just improvise my way all the way through a demonstration. I would have to script it, and try to keep it around five minutes. It was immediately apparent to me that methodically going through the use of each button would be boring, and probably impossible to do without a context for the button usage. At the risk of sounding dumb, I decided to use a made-up game scenario, which I would narrate sparingly, to illustrate the app. I typed the script as fast as I could, thinking of it as a first draft. Looking at it now, I can see a couple of things I might have added, and a couple of places where the order might be improved, but it covers most aspects of the app’s usage to record pitch results in a game. When I do it again, I’ll probably include a runner caught stealing and a batter reaching base after a dropped third strike. I definitely should have shown the use of the Undo button, but its visible presence hopefully makes the point that it is possible to undo actions.

Now, how to do it physically? The script went beyond one page, but I didn’t want to have paper rustling sounds recorded, and I needed to have my hands free to use the trackpad and keyboard on my MacBook Pro anyway. I should note that I turned off the mouse cursor recording feature of iShowU since I didn’t want the movement of a mouse pointer across the screen to be highlighting continually that this was a simulation on a computer screen. I didn’t try to get a visual display of mouse clicks (simulated button taps) since the mouse clicks almost always highlighted the button anyway. One place where the simulation didn’t match the standard iPhone screen was when I typed in names. The iPhone keyboard appeared in the simulation, but I would have had to click with the mouse pointer on each letter in order to show the big letter that appears beside the tapped key. This would have been much too slow, so I just typed on the computer keyboard, which accomplished the job much faster, but without the usual visual display.

I decided to lay the two pages of the script out side by side to avoid the paper handling problem. It was still challenging to go back and forth between the screen and the script, and I lost my place a couple of times and had to do some improvising. The result was bad enough in one six-second interval that I decided to edit the audio track, which I’ll tell about below. I may do more editing later. The method I used for script page display wouldn’t work for anything longer than what I recorded. Maybe I could use a page turner the way pianists do.

Despite the less-than-perfect delivery and the deviation from the script in places, I went ahead and posted the demo as recorded, copying the javascript code I had used previously to play the OnScreen Particle Physics QuickTime demo. One place where my voice trailed off while I obviously searched for what I wanted to say seemed worse and worse the more I thought of it (played it, actually). I wasn’t sure how to edit the audio part of the mov file, but I knew there had to be a way to replace the flawed section. I had Audacity, the free audio recording and editing software distributed under the GNU General Public License, on my hard drive, so I thought I’d give it a try. Audacity imported the mov file via the Open command. I was able to locate the problematic section without any trouble and see that it was six seconds long.

Now what? I had to record a replacement for the bad section. I considered doing it with Audacity, but for some reason I don’t recall now I didn’t succeed immediately, so I decided to use QuickTime Player (Pro) as my recording software. Recording with QuickTime Player proved easy once I realized I had to set the input source as the Blue Snowflake microphone via the Preferences panel, just as with Garage Band. I recorded what I thought was a major improvement both in wording and diction. I then opened the file with Audacity and located the beginning of the substitute sentence. Since it was spoken without hesitation or searching for words, it took a considerably shorter time than the original one had. In order to keep the rest of the audio in synch with the video, I just selected six seconds from the new recording, which included a good bit of silence at the end. I then went to the old mov file audio track, which still had the undesirable six seconds selected, and did a paste. Would it combine the two, insert the new audio before the old, or replace the original as one would expect? It replaced the original. I could now play right through the edited section without hearing any obvious “splicing” effects. I did regret not having given a little silence at the beginning of the new segment, but the result was well within the Guy Kawasaki “Don’t worry, be crappy” standard. I have a feeling anyone that knows there was an edit done somewhere will be able to pick out where it occurred, but it is definitely an improvement over the original.

I still didn’t have the new audio inserted into the video. A straight save from Audacity would only give me an Audacity project file rather than a mov file with a video track, so I did an export to AIFF, an Apple audio format I knew QuickTime could handle. It took a little bit of searching through the QuickTime Player Help, but I found the procedure for adding a soundtrack to a mov file. I opened the new AIFF file I’d exported from Audacity and chose Edit->Select All, then Edit->Copy. Then I opened the mov file with the original sound track and selected Edit->Add to Movie. I played through the “bad” spot and discovered I had just added a second track, so that both versions played in the six-second interval I wanted to change. No big surprise, but I had thought it might just replace the soundtrack. Revert. Then I rediscovered that Window->Show Movie Properties revealed the video and audio tracks of the movie. I selected the audio track and deleted it. Then I repeated the procedure for adding the new sound track and ended up with what I was after. I then replaced the online mov file with the newly edited one. The next edit will be much easier. One of the reasons for writing this is so that I’ll have it for future reference.

So, is a something-less-than-professional, hand-rolled video better than nothing? I have no doubt that it is. There really is no easy way to convey the app’s usage with text and still images. I plan to improve on this first video effort; and, as I await Apple’s approval, I may be moved to do the whole thing over, but I feel it is an asset already. You can see and hear the results here.

OnScreen Pitch Count: An iPhone App Preview

Wednesday, August 5th, 2009

I’ve been explaining the infrequency of my postings here as due to the time I’ve spent working on an iPhone “app.” Now that it’s about to be submitted to the iTunes App Store for inclusion on that exclusive online site for selling (or even giving away) iPhone apps, it seems I should give my devoted readers a preview of the app: OnScreen Pitch Count, the first iPhone app from OnScreen Science, Inc.

Pitch Count? “How could you take that long to make a pitch counter?” you may be thinking (and perhaps “How is it better than the mechanical clicker kind you can buy at the hardware store?”). Hopefully a description of what the app can do will answer both those questions.

The screenshot below shows the main display and the buttons one taps to record pitch results. Incidentally, I considered naming the app OnScreen Pitch Results since it more accurately describes what the app keeps track of, but that name is two characters longer than allowed before being truncated in the App Store listings, so I’m going with Pitch Count, which may be better anyway. The name of the current pitcher is displayed at the top. This example is from a moment in this year’s MLB All Star game.

The buttons in the lower green area are the ones that record each pitch result. One of my first tasks was to determine just what I wanted to keep track of. I referred to my own experience as a Little League coach and also as an interested baseball fan. I rejected the level of detail that would include pitch location and pitch type (curve ball, fast ball, etc.) as being more than anyone but a pitching coach or scout would probably want or be able to handle, not even considering the difficulty in coming up with a user-friendly way of recording that much information for each pitch.

basic
Using a basic knowledge of baseball and some trial and error, I came up with the buttons that are displayed above. In keeping track of strikes thrown we need not only to record pitches that add to the strike total in a given at bat but also the pitches that result in foul balls after two strikes have already been recorded or that result in balls being put into play, leading either to an out being recorded or to the batter reaching base. A great deal of thought and experiment went into choosing the size and placement of the buttons, which I have found to be easy to use in the actual flow of a game.

The bottom two rows of buttons are for recording pitches not put into play: balls and the three kinds of strikes. The Walk and Strikeout buttons are not enabled until four balls or three strikes have been registered. I found from experience that putting in the extra step of recording a walk or strikeout reduced the chance of error and made the situation that much clearer. The Undo button can be tapped to undo the results of as many as two pitches, for example for changing a ball into a called strike after a hasty tap made before the umpire had spoken. It can also, of course, be used to cancel an accidental tap of any button. When three strikes have been recorded, the Strikeout button is highlighted to indicate the next step, and all other ball and strike buttons are disabled until the strikeout is recorded or the strike call is undone. At any time, only the buttons that have meaning are enabled. For example, if there are no runners on base, the Basepath Out and Run buttons are disabled. At important steps such as recording the third out, the next button to be tapped is indicated by highlighting (as mentioned previously for recording a strikeout).

Above the two lower rows of buttons are those relevant to balls put into play and possible results with runners on base. As currently programmed, hits and errors are recorded but without the specific type of hit (single etc.). The Out button is tapped whenever a ball hit by the batter results in the batter being put out before reaching base or in a baserunner being forced out. A basepath out is recorded when a runner is put out not as the result of a hit ball, say caught stealing. In the case of a double play, both an out and a basepath out are recorded. This system of buttons keeps the hits, errors, outs, and current baserunners straight. The Other OB button is used to record batters reaching after being hit by a pitch and so on. It even has the option of the batter reaching first base after a dropped third strike, properly recording the strikeout while removing the out.

The middle yellow section above shows the current situation in the inning: outs, runners on base, and the ball and strike count on the hitter. The cumulative game totals of balls and strikes (including balls put in play etc.) for the current pitcher are shown above that section. A tap of the Details button brings up the cumulative game totals for pitch results, runs allowed, baserunners, etc. for the current pitcher, as shown in the screen shot below.

review

The pitcher whose results are shown above pitched only one inning as closer, but the same totals for every pitcher in the game can be brought up for inspection by a tap of the Review button followed by a scroll and a tap to select the pitcher from the list of those recorded (see below). All pitchers appearing in the game for either team can be recorded. Or, a single pitcher appearing at any point in the game can be followed alone, depending on the user’s interest. All of the data recorded in a given game is saved on the iPhone or iPod Touch and can be reviewed at any time with the OnScreen Pitch Count app.

list

When I started to work on this project there were no competing apps that I was aware of, but since then a few have appeared. OnScreen Pitch Count lies in between some that seem to be really barebones counters of balls and strikes (with limitations on the number of pitchers) and much more detailed “pitching scout” type apps that record more data but are aimed at tracking individual pitchers over time. I think OnScreen Pitch Count should find  a comfortable place in this niche of pitch recording apps. I’m pretty confident it can more than hold its own in usability and usefulness. As far as I’ve been able to tell from scanning app descriptions, OnScreen Pitch Count is the only app that properly charges runs to the pitcher that allowed the scoring runner to reach base even when the run scored after a relief pitcher had come into the game.

Of course, interrupting the pitch-recording to answer the iPhone or to play a game between innings has no effect on OnScreen Pitch Count, and it will resume right where it left off whenever it’s pressed into service again. This happens automatically for pauses of up to an hour, but you can resume any unfinished game at any time, whether after a long rain delay or after you’ve paused a game tape for days.

How much will it cost? I’m leaning toward $2.99. It would be worth a lot more than that to some people, but the way mass appeal apps have been forced to fight for attention on the App Store has led to popular games being sold for 99¢. OnScreen Pitch Count is not competing in the popular game market, but the depression in game prices has led to iPhone users’ expecting very low prices on anything they buy.

I should mention that I found in my testing of OnScreen Pitch Count, watching both local softball games and televised major league games, that the spectator experience was enhanced by following with such close attention and having so much information literally at my fingertips. I would have loved to have had the information when I was coaching Little League. It was a lot of work to program OnScreen Pitch Count, though the development tools Apple supplies are excellent. Further improvements and my next app (I have an idea!) will be easier, assuming I get on with it before I forget what I’ve learned.

In a day or two after I post this I should have more information about OnScreen Pitch Count up at this link: http://nondummies.com. I plan to have a video demonstration.

UPDATE: See also “OnScreen Pitch Count Now On Sale on iTunes App Store!”, “IPhone App Updates and Experiences”, and “OnScreen Pitch Count 1.3 Is Now on the iTunes App Store”.