Exertion Interfaces

This is Rhett Dobson's ongoing web log of Summer 2008's NSERC-sponsored study of Exertion Interfaces. This project was started by Bruce Gooch at the University of Victoria. I'm a Music/Computer Science student here, going into third year, and I'm doing this co-op term for the summer. In particular, I'll be taking over a nine-man project that was building a modified Dance Dance Revolution machine, with added features such as online stat pages for players, hand sensors for extra in-game steps, and fresh graphics and songs. We are building upon Stepmania 3.9's Linux source code. I'll update this page daily, and maybe make it look a lot nicer in the coming days.

Learning Objectives

Updates


8/12/08:
I came back to my old step converter code. I thought I finished Version 3 but I guess I forgot about it. Well, it is now safeguarded against accidentally trying to copy something that matches the right difficulty. For example, if there already was Hard steps for Single, and you tried to convert Hard Solo to Single, it might find Hard Single first and try to convert it as if it was Solo. Although, having accomplished that, it seems sort of folly, if one already has Hard steps for Single...plus, having two copies of steps can do weird things in Stepmania. I know that you can select all of them separately in game mode, but you can only edit one of them in the editor. The only thing wrong with this code is that it forgets to write the rest of the stepfile, as well. Well, at least it's here now. Coming up soon is the rest of the sounds and new music...I've been looking for inspiration the past few days.
SMConvert3.java

7/25/08:
After my quick interview with Meeta (the co-op coordinator) I worked on some sound effects. Not much improvement here but I'm not done all of them yet. I want to try to get a paper-like sound for scrolling between songs but I couldn't find a good sample so maybe I'll just record one tomorrow or something.
Two new sounds:

  • stageselect2.ogg: Added a mild thunder sound to the start of this one. It needed to be bigger like the original "selection" sound effect.
  • changediff.ogg: I needed to sneak a cheesy Mortal Kombat-ish gong in there somewhere. I know I would totally get a kick out of changing difficulties just to hear this one. It might be too quiet though, once I stick it into my version of Stepmania I'll see if it needs to be louder.

  • Also Bruce, if you're reading this, Meeta needs you to respond to her emails. ;)

    7/24/08:
    I spent the day at home, which was a bit silly since I just dropped my MIDI controller off at the lab. Well, I'll be joining up with it tomorrow. I finished a new batch of sounds, some of which are improvements on old ones. I imported these into my personal copy of Stepmania to critique them myself and this has helped a lot.

  • sm-fail.ogg: After failing a few songs, I thought the start of it needed a bit more oomph, so I added a little bit of kick drum to the start. It's hardly noticeable when you're playing though, maybe I should come back to this...
  • swoosh.ogg: Replaces the aptly named _swoosh.ogg in Stepmania. I was trying to convey the sound of a ninja dashing somewhere but this actually sounds kind of cheesy, I should try to get a more realistic sound or maybe a stock sample.
  • swoosh-drop.ogg: See above, but listen carefully for the sound of two feet landing. You hear this after passing a song. A graphic of a ninja swooping in and landing just like that would be nice but a task like that might require modifying the code.
  • mine2.ogg: I think this is an improvement of the original mine.ogg but it doesn't sound as booming within Stepmania for some reason.
  • stageselect.ogg: This replaces the generic selection sound in Stepmania, which you hear in more things than just selecting your stage. This sound is lacking in some bass too even though I really like it. Maybe I should replace the rest of the sounds and see how this slightly subdued sound range changes the feel of playing the game. I guess it would make it seem more intimate but that's hardly what an arcade owner would want, which would seem to be the endpoint of this project.
  • cymbal-C.ogg: Added a kick to the start of this sound. This sound was almost inaudible if music was playing in the background (say, during the modifier selection screen)

  • Not all of the in-game sounds are replaced yet but I could also go really overboard and replace some of the behind-the-scenes sounds such as the ones used in the step editor. That should be a lower priority for now though.

    7/22/08:
    How has it been so long again? Anyway, Landon and I did indeed work on the pads; we started a second one because we were waiting for our plastic squares to be re-cut and now they are almost equally built. We got a new drill so things should proceed smoothly. I'll be working on them on my own soon but not yet. Tomorrow I'll resume working on new sounds for the theme. I also got to say hi to Bruce, which was nice, I usually don't see him around. I should stay here all afternoon more often.

    7/16/08:
    Sorry for the lack of updates, I was back home and at a sort of "business conference" in Calgary last weekend...got to see some of the best DDR players in Canada. It's strange to think I might have been in charge of the future of rhythm games if it weren't for UVic claiming patents and rights to everything that is borne from this project.
    Anyway, Landon and I will be resuming the building of the pads again. Hopefully Landon will get a new drill soon as our current drill has lousy battery life and it is sort of a bottleneck for work. I'll be studying the tutorial videos we found a lot these next few days because I may need to work on the pads alone too.

    6/24/08:
    Though Chapter 3 was an easy read due to it being a review of C, it was long and took a while. The next chapter was more design-oriented and took 8 hours, almost as long. I talked to Lynn again (and Paul too) and they are optimistic that the hand sensor can be made to be read like a button press for the controller, but I think I need to try and understand electronics and our pad design a bit better before I talk to them again >_>
    I'm flying back to Regina, and I'll be gone for about a week, but I'll keep reading this online book while I'm away, and I've confirmed I can SSH to the local Linux box just in case I feel I need to do something on there remotely. I have an idea for a completely unrelated C++ program that might test my new chops, and I'd make it object-oriented too, even though the behaviour I'm trying to model is from a game made in 1989 and was (surely) written in very low-level procedural code, trying to cram things on to a Game Boy cartridge. ...I've said too much.

    6/23/08:
    Spent 12 hours in ECS here. Read some more of Thinking in C++, should be finished Chapter 4 by tomorrow. Got in touch with Lynn in the Technical Support Office/Workshop, who will hopefully help me with these hand sensors tomorrow.

    6/21/08:
    I had some time to think about the new version of SMConvert. If I'm looking for a specific difficulty to convert, say converting Hard steps from single to solo, it's okay to assume that there won't already be Hard steps on solo, or else what would be the need to convert? I could either:
    1. Print "there's already " + difficulty + " steps for " + sMode + ", move or delete them in Stepmania" and exit the program
    2. Find a more advanced way to get around it. Though it's rare and nobody writes them, it's possible the stepfile might contain dance-double or dance-couple steps. Because I have nothing but time on my side, I'm going to go for this option. This may involve restructuring the code somewhat, so I'll put it on hold a bit longer to think about it some more.
    But since I also read Chapter 3 of Thinking in C++ (talks about old C and its relation to C++) I think I'll be ready to just code version 3 in C++. The author got around to talking about file I/O very early on, so if I can find a list of methods in the string library, and if it has powers equal to that of Java's, the conversion should be easy as pie. All this reading ate up another 8 hours...on Sunday I'll either read a bunch more or make some more sound.

    6/20/08:
    Read Chapter 2 of Thinking in C++. This took 8 hours.

    6/16/08:
    Reading! Lots of it! Finished Chapter 1 of Thinking in C++, though it only talked about design with regards to object-oriented programming languages and didn't get into any C++ syntax. I wanted to read this anyway because I felt this whole topic was rushed in my Java courses. "Well everything's an object and then there's inheritance but whatever you don't need to know that etc etc". This particular line explains why I can't find anything in Stepmania's mostly undocumented code: "Don�t fear that you�ll end up with procedural-style spaghetti code -- classes partition the problem and help control anarchy and entropy. " I can't imagine the program running anywhere because everything is a highly generalized object that can jump in at any moment. Kind of Zen-like, really.
    I worked overnight for 12 hours to also work on a slightly updated version of the step converter, with some mild Exception checking to try to make errors look nicer. In the process I discovered a major bug I had overlooked: the program foolishly looks exclusively for difficulty first, but it may try to copy the wrong type of steps to another! I'll resolve this tomorrow. I also tested that Edit-difficulty stuff; it works. And these webpages use CSS now, which explains the new font.

    6/15/08:
    The weekend came early for me but I was planning to work on Sunday anyway. I should mention that on my way home from work on Friday afternoon, I stopped by Landon's place and we worked on the pads a bit by cutting some two-by-fours into 33" lengths, which we need for the base of the pad for the wells the arrow sensors will lie in.
    I was here for 4 hours, thus completing the minimum 40-hour week (8+12+16+4...I could keep this up) and I checked Stepmania's code to see if I could find how they converted step styles. I did find a relevant piece of code in EditMenu.cpp, but I think I'll have to look at it in a full-blown development kit to find out where to go next.

    else if( GetSelectedSourceNotes() )
    {
    	m_Actions.push_back( ACTION_COPY );

    So I just need to find a procedure like this
    void push_back(Object o) {

    somewhere else...I would think ACTION_COPY is some kind of #define but it's not in this source file. And m_Actions isn't defined in this file either. The list of #includes at the top only has 9 header files though, I could start by checking all those. In other news, GameManager.cpp contains a massive array definition in
    Styles g_Styles[]=
    that dictates the order of columns for all the game modes, Solo included. It may be necessary to change this for displaying the diagonal directions on the outside but I think that would be changing the internals too much when really I'm just trying to change the way it looks. SM files are written in a certain way, and it's certainly futile to try and change it on that level...
    I also added my learning objectives to the site today for the sake of my co-op work term; the link will stay at the top of the page as well.

    06/11/08: (the date refers to what day it is when I start working)
    I decided to do something a little more normal and start at 9...9 PM, that is. I've decided to roll my sleep cycle forwards in a "larger than 24 hours way" but this will hopefully be a temporary arrangement. I have to remember that looking things up in the Java API can be very distracting...but I did stay long enough to say hi to the other RTFM guys who are working on robotic puppets. They showed up at 11:30 and I stayed after that to make a second version of the converter code. At 1:30 PM I was getting hungry so that's when I decided to leave. Anyway, I had some luck writing my initial dance-style converter. In the first version, I didn't attempt any kind of file updating and let the loose step data collect in another file.
    I'll briefly explain why I wrote my own step converter instead of sticking with Stepmania's. Stepmania can convert just fine, but I don't like the way it does so. Single style has Left-Down-Up-Right for directions, four columns. Solo has Left-UpLeft-Down-Up-UpRight-Right. What Stepmania will do when going from Single to Solo is take your meticulously placed Single steps and align them exactly in the first four columns, so you'll see a muddle of steps for Left, UpLeft, Down and Up while UpRight and Right contain absolutely nothing. Since we're using UpLeft and UpRight as the inputs for our hand sensors, this betrays the nature of the original single steps completely and can lead to bizarre double-stepping (using the same foot to hit steps twice in a row, it is very annoying and uncomfortable at high speeds) or maybe impossible hand motions. As for converting Solo to Single, it does so in a completely bizarre fashion; my converter simply ignores the UpLeft and UpRight columns, allowing my Ninja Rhythm Challenge (NRC? has a nice ring to it) steps to be easily converted back to DDR if I were interested in doing so.
    The code is far from perfect in both of them, however. I could certainly cut down on the number of lines, maybe make it more idiot-proof, and try to fix that one annoyance in the second version (temporary file refuses to be deleted). The option for "Edit" difficulty hasn't been tested but people don't use it very often these days...I find it can be glitchy in Stepmania sometimes. I have two screenshots depicting the code in action, and here are the four files so you can see how the code changed them. They'll work in Stepmania, too, if you want to go that far! I tested them too. Mock me all you want for using Java, but I got screwed on my final Software Engineering assignment this spring because of my unfamiliarity with the chaotic nature of strings in C. I had my program working fully, except the test cases expected me to add a period to the end of every number, including integers. As I set out to do this, I proceded to break my code so hard I could not make it work again. That'll teach me to use CVS. But yeah, Java implements strings wonderfully...adding that period would be a simple

    string + ".";

    so I figured I could just implement this in Java because that's easy enough for me. I never did figure out file I/O in QBasic but that would be a step up because it would be faster. Just kidding, a simple Java program like this runs Fast Enough (actually it's O(n), where n is every line in the .sm file). Ideally, I'll write an even better version, and then learn enough C++ to rewrite this Java code in C++. And then, if I feel especially crazy (and very comfortable with our team's SVN server) I'll try to integrate into our custom version of Stepmania, replacing their own step conversion algorithm. Or maybe by the time I find theirs, I'll look at it and go "Huh. That's actually a lot more efficient. Guess I'll just change 1 or 2 things here." and be done with it.
    On a more whimsical note, Co-op department sent me an email asking me what my position title was. Since no one told me one, I asked around for some ideas for a bit before deciding on my own initial idea: Dread Warlord of Research. "Lord of the Dance Dance Revolution" came in a close second though...

    06/10/08:
    Argh, I was here for almost 12 hours but it doesn't quite show because I spent some time traveling to and from Landon's house (he lives walking distance away from UVic, but still). We built two metal squares for the pad, pictures to follow shortly once Landon sends them to me, and after that I walked back to UVic and made some of the music like I said I would. Well, more of it was sound effects, actually. Stepmania doesn't require all that much in-game music, but either way, I've decided to take an emphasis on pentatonic scales, "Chinese pentatonic" in particular (scale degrees 1 2 4 5 6). I created a /sounds directory here to store them all, but since it's going to fill up with more files I'll go into detail about what I made today:

  • rtfm.ogg: meant to replace the ScreenCompany.ogg file, it plays between demo screens before gameplay starts. Unfortunately, it's not much less annoying than the existing one.
  • cans.ogg: probably going to use this for "ScreenOptions prev.ogg"
  • cymbal-C.ogg: intended for ScreenOptions. The note played is C.
  • mine.ogg: The default "mine detonated" sound in Stepmania is loud and atrocious. In The Groove's sound is much more subdued and still sounds somewhat like an explosion. Explosion sounds are hard to imitate, this sounds like an explosion you might hear on your NES...
  • guitar-scale-down.ogg: A 5-note run down the Chinese pentatonic scale in A, to be precise. I can't remember what I intended it for initially but I think it will be a good "coin inserted" sound.
  • sm-fail.ogg: Plays when a song is failed. This was actually played on my MIDI controller instead of sequenced because it seemed like it was being rushed when played at exactly 125 BPM. By trying to keep thinking about pentatonic scales, I ended up with this atonal theme that also sounds like something you might hear in some old NES game. The original Dance Dance Revolution and In The Groove were both much less musical in their "failed" sounds but I think this one is appropriate nonetheless.
  • ninja-theme.ogg: A simple 8-bar loop, styled after the Stepmania 4.0 menu music. The jump up to G natural was inspired by a mistake, I clicked on D instead of C# in my sequencer and that got the ball rolling. The best things in electronic music happen by accident ;)
  • Man, designing sound in a music program is hard. (I'm using my own copy of Reason 3.0, in case you're wondering). I think the server nucleardog.com is on is currently located in Texas so the time stamps are two hours ahead. Oh, and I showed up just in time to meet with Landon and Anna, one of the graphics designers. Anna suggested several titles for the game and the one I like is "Ninja Rhythm Challenge" because the group decided early on to go with a ninja theme. We're fun and crazy like that. Speaking of the group, I'd better send an email to see if they think the sounds are any good...

    06/09/08:
    Don't really have anything to show for today, except forming my ToDo List and this web page. I searched the Stepmania source a bit for the source file that implements the Flip mod, or the part that displays the targets at the top...we're using Solo mode, a 6-column play mode and I'm trying to re-arrange the targets so that the regular DDR steps will be displayed in order (left, down, up, right) and with the hands on the outside. No luck yet, but maybe once I finish reading this online book (Thinking in C++, by Bruce Eckel) I'll have a better idea of what to look for. That's right, I'm involved in a game project written in C++ when I don't know much C++ of my own. But this book looks quite solid, I'll probably learn my fill in time.
    I was here for 8 hours today, but I'll be staying even longer tomorrow. As for the ToDo List, right now these things are on it:

  • New music for theme (probably doing this tomorrow)
  • Integrate hand sensors; Electrical Engineering lab is in ELW 330? Landon is giving me more info on these tomorrow, I'll look into this on Wednesday
  • New target display: left hand, left (arrow), down, up, right, right hand
  • Build pads with Landon
  • single/solo step conversion (I'll get started on this later this week too. Will implement in Java first because that will be easy, then do it again in some faster language)
  • post updates on awesome website
  • "no sensors" mod for players, rename "No Hands" to "No Triples" (more on this later)
  • Playtesting at the end?

  • The only part that I need done for me is the graphics, unless the team wants to see them completed using MSPaint. I'm actually not bad at MSPaint, I'm just lousy at drawing.