dinosaurs eat everybody

for all your Dave Schwantes related needs

Thing A Week 9 - No Thing

So this week was not a good Thing a Week week. I had planned to build the Instragram listener to go along with the Bird Watcher project I was working on a few weeks ago, but I ended up sort of bouncing around between a few ideas instead. This is a bit against the “Thing a Week” idea where I complete something every week rather than randomly playing around with stuff to no clear end.

That said I did git a bit of work done in a few areas.

I started the Instagram work and learned a bit more about how their streaming API works. It looks like I’ll need to build a callback endpoint to take in post info and store things in a database and then Instagram will handle most of the hard work. I’ll probably just end up building the callback endpoint as part of the exiting daveandeileen.com Sinatra application.

I also spent some time doing a bit of research on audio processing libraries for another project I’m planning. As of now I’m leaning towards PyDub. Hopefully I’ll have some work from that project to post soon.

Finally, I’m planning to build a ring box for our wedding out of an old book (kind of like this, but with wedding rings). I was able to find a book I like at a used bookstore this weekend, so I consider that a small win.

This wasn’t a great Thing a Week week, but at least I got a few productive things done.

Thing A Week 8 - In The Garage Cover

I had a little bit of trouble picking my project this week. Originally I had planned to continue working with Flask, but I was just at a loss for a small web app project idea. I had been playing around with some Weezer songs while playing guitar one morning so I decided to record a cover of In The Garage for this week’s thing. If you don’t feel like reading this to get all the way down to the Soundcloud player here’s a link.

I was pretty faithful to the original, mainly just taking some liberties with instrumentation in a few parts. I really like the dirty guitar and bass in song so I found some amp models that kept with that style. I did swap out the harmonica riff for a thin, high piano part over a crunchy bass. I really liked the hollow sound it created and it felt in line with my tendency to add keys to things. In that same vein, I used some synth in a few parts as well, replacing the little guitar riff in the verse and working with the guitar in the solo.

I actually had a lot of fun with the solo, again staying pretty true to the original but taking some liberties here and there. The synth was a fun addition and really beefed things up. I ended up falling back on some blues riffing during the end of the solo because I’m just not as metal as Rivers.

Again I used Garageband’s Drummer feature for the drums. I spent a bit of time dialing them in and I was pleased with how they turned out. While laying out the song I did discover that Garageband doesn’t let you change time signatures in the middle of a song. There is a single measure of 2/4 time in the verse so I had to just offset thing. I was worried that the automated drumming would sound weird around this change, but it ended up being fine.

The vocals… This is always tough for me. The verses turned out ok. They’re pretty straight forward and in my range but the chorus was tough. Some of the high notes were a big of a strain for me and in general the choruses felt a bit lack luster. I just don’t know how to get more character out of my voice. The last chorus with the high harmonies was especially difficult. I was really straining my voice there. As always, doing stuff like this is great practice and helps me improve so I just need to keep that perspective.

I wasn’t especially pleased with the mixing and production on this song. I felt a bit rushed because I started working on this a little later in the week. I had recorded some of the guitar parts in a chopped up way and I can hear some lack of fluidity. None of the parts were difficult enough to get right to justify this type of recording but I was just in a rush to get something down. In general I think things just feel a bit choppy, but I suppose that’s the price of doing things on a time crunch.

All in all, it was a fun project and it’s alway nice to spend time recording. Enjoy:

bonus thing!

I also posted a comic to Mount Saint Awesome this week (the first in quite a while). It didn’t feel like a big enough art project to be a full Thing a Week thing, but it’s still worth checking out.

Thing A Week 7 - Flask

Now, in my defense I was pretty sick for most of last week so I ended up not getting much done outside of work besides a lot of napping. I started with a vague plan to do something with Flask, the Python micro-webframework and to that end I succeeded in what I set out to do. It had been a while since I had done anything serious with Python and I’ve been feeling the urge to get back into it.

I ended up spending a lot of time just getting my Python development environment set up. Apparently it’s been so long since I’ve done anything non-trivial in the language that I didn’t even have basic tools set up well on this computer. I wanted to do things right and that took a bit of installing and uninstalling through various channels to get things just so. This meant Python installed threw Homebrew and then using that version of pip to install virtualenv. This way I didn’t have to use sudo to install virtualenv. While this ended up being more frustrating than it should have been (and at one point led to me asking a Stack Overflow question that I later answered for myself) I did get things set up nicely, which is a major win.

Once I got down to setting up Flask thing were pretty smooth. For the basic stuff I was doing it felt very similar to Sinatra, which I’ve worked with quite a bit. I finally got to use Python’s method decorators in practice which was neat (they drive the routing around the functions related to the routes).

The end result was a pretty basic first test site. Nothing really worth putting up anywhere. I’d like to keep playing with Flask and get a bit more reacquainted with Python so unless I have another burning project come up, I might just stick with it this week too.

Thing A Week 6 - Piano and Bass Song

I think that it’s fair to call this Thing A Week a failure and I don’t really have a great excuse. I set out to write a song that revolved around the piano and bass and I ended up with a nice riff that didn’t go anywhere.

This tends to happen to me a lot. My Garageband folder is full of 30 second long riffs and fleshed out song chunks, but I often hit a wall and I’m not sure where to go from there. Last week I sat down and tried writing some stuff influenced by a couple songs that either did piano and bass or just bass licks well. The main ones I referred to were Erase Me by Ben Folds Five and Sic Transit Gloria…Glory Fades by Brand New. They are both awesome songs and I especially love the way the piano and bass work together in the Ben Folds song but my ideas just weren’t working. I ended up with some weird meandering minor bass parts thrown over some really weak piano parts.

I came back the next day and switched to a major key and started with the piano part first. From there I came up with something that I liked and wrote a simple bass part that just harmonized the piano roots in a few parts.

And that’s where I got stuck. I spent a bit of time playing around with some sparse guitar parts and a few of the new amp models in the new version of Garageband. I also played around with the new Drummer feature of Garageband. It was pretty cool and maybe the most redeeming quality of Garageband X (the removal of the old keyboard shortcuts and export to mp3 are driving me nuts and might send my back to version 6!). The drum sounds are great and it’s a big step up from the midi drum parts I had been working with in the old version of Garageband, but I did feel a bit uncomfortable with the loss of control over every single hit. I suppose it’s a decent compromise.

So here’s what I came up with. I ended up just doing some random guitar riffing and bigger chords at some point, but it really just felt forced and didn’t take the song anywhere. Take a listen, though, because the piano/bass part turned out pretty nice:

I’d like to keep working with this song. It’s different than most of the stuff I’ve written lately. I think that throwing lyrics over it will be a bit of a challenge just because I don’t quite trust my voice for something this mellow, but it’s a fun part and I think it could turn into something cool.

This week I’m leaning towards either a project with Python (I’ve been meaning to brush up on my Python for a while) or something artistic. I’m still not quite sure.

Thing A Week 5 - Bird Watcher (Part 2)

So I took this week to wrap up last week’s project. I was having trouble getting the Twitter listener for my wedding photo project up and running on my server but I’m pleased to report that I managed to get things up and running.

I ended up changing the format of the project a bit. Instead of a full Sinatra application I put everything into a single Ruby file that I can just leave running whenever I want to fire up the listener. I didn’t need this project to serve any content, only run Tweet Stream and write to a database, so Sinatra was probably overkill to begin with.

I had some trouble with Sequel, the Gem I was using to interface with the Postgres database but eventually got things worked out. The weirdest issue was with trying to store the url of the photo. For some reason this didn’t work:

def store_image(tweet_photo_url, tweet_user, tweet_text)
  ...
  @db[:photos].insert( :photo_url => tweet_photo_url, :service => "twitter", :username => screen_name, :name => name, :photo_text => tweet_text)
end

but this did:

def store_image(tweet_photo_url, tweet_user, tweet_text)
  ...
  the_url = "#{tweet_photo_url}"
  
  @db[:photos].insert( :photo_url => the_url, :service => "twitter", :username => screen_name, :name => name, :photo_text => tweet_text)
end

It must have something to do with the way Ruby handles certain strings or how Sequel or Postgres handle certain strings in INSERTs.

You can see the final file I’m using bird_watcher.rb in the Github repo for the project.

Next I’ll need to write an Instragram listener. Hopefully that will be pretty quick as most of the mechanics will be identical to this listener. I might hold off on working on that for a bit, though. I’m thinking about tackling a musical project next week.

Does Anyone Still Use RSS?

Since the death of Google Reader I feel like I’ve seen people use RSS less and less, but a quick informal survey of friends showed that some people still use it for some things so maybe this blog should have a feed, right?.

I was interested in how hard it would be to add RSS to this weird Jekyll/Sinatra hybrid I have running and had a few minutes tonight so I decided to give it a shot. It turned out to not be bad. I just followed this quick tutoral and found a nice template here and 90% of the work was done (basically I just add another template to my Jekyll project and a few lines in my config and an xml file gets generated along with everything else when I run jekyll build.

The only custom part was adding a few lines to my Jekyll handler method in my main Sinatra app to suppress the layout template and render the RSS file as XML:

if file_path.include? "rss.xml"
  content_type 'text/xml'
  erb contents, :layout => false
else 
  erb contents
end

Now you can subscribe to this blog via RSS is you so desire!

Thing A Week 4 - Bird Watcher

This week might count as a partial failure plus I’m getting the post up pretty late, so that’s probably not good either.

Once again I tackled a project for the wedding. I want to build a system that listens to Twitter and Instagram for photos that are tagged #daveandeileen then pulls them in and displays them somewhere at the wedding. This week I decided to finish up the Twitter listener.

This listener is basically just a small Sinatra app that uses TweetStream to listen for tagged tweets and then if it matches the criteria (has image and is properly tagged) it stores info about the tweet into a database. This same database will eventually hold Instagram (this was the whole reason I signed up for Instragram) data and then I’ll need to write a nice front end that pulls the photo data out and displays the pictures in some nice way.

I call this week a partial failure because I got the app working locally, but ran into some trouble getting it deployed properly. I am not a great sys admin, but I’m learning a few things. This is also the first time I’ve set up a database on my VPS. I’ve really been spoiled by always working with databases through a nice visual interface so doing some Postgres work while sshed into my server felt like pulling teeth. I was just running into some issues pretty late on Sunday night so I ended up admitting defeat and went to bed. You can check out the code for this project on Github.

This next week (the week we are currently experiencing right now) is pretty busy. We’re trying to finish up a bunch of other big wedding things (stuff that doesn’t involve coding) and my parents are in town this weekend, so I know I’m going to be limited for “thing a week” time. I would like to use this week to finish off the deployment for Bird Watcher. I feel bad about letting a project spread over two weeks but I think it’s best for my schedule and this project.

Thing A Week 3 - Save The Date Comic

Sorry, but this week you can’t see the full final product of my Thing A Week. I used this last week to write and draw a comic that we might use as part of our Save The Date cards (if you didn’t know already, I’m getting married soon) so I want to keep the final comic unpublished until we send those out.

This Thing A Week was pretty straight forward: write and draw a comic. This is something I’ve done many times before. The main challenge was getting it good enough to print on cards and mail to friends and family. It just feels like because this is for the wedding, I should set the bar heigher than I would for a web comic. I’m always worried about my art not being good enough, so this comic was a bit stressful at times.

The layout wasn’t too complicated but some of the poses and body positions were just a little odd for me and it took a bit to get them right. Like most comics I spent some time planning out the pannels and doing some quick sketches of a few poses before starting on the actual comic. I also decided to work at a larger scale, using 8.5 x 14 paper. This is always nice because I feel like I can work on details a lot better at this size.

I suppose there’s not much more to say about this project. I’m a bit torn on what to work on next week, it’s currently between writing a song that uses my new bass pedal, working on a programming project for the wedding, or starting to work on a new idea for Big CoreUs.

Thing A Week 2 - Bass Overdrive Pedal

Success!

This week I built a bass overdrive pedal. I had received a kit for this pedal for Xmas (as well as an arm for holding circuit boards while soldering, which may be the nerdiest gift I’ve ever received) and I was excited to finally have time to work on it. Last year I built a Tube Screamer overdrive clone from a kit, so I’ve had a little experience building pedals from kits already.

The choice of a bass overdrive pedal was motivated a bit by listening to some newer Ben Folds. He has some great songs on his new record that are really carried by piano and gruff sounding bass. Now that I have this new pedal, one of my upcoming Thing A Week things will hopefully be a song written in that style.

This build was a bit more complicated than the last pedal I built, but I didn’t have any major problems with it. It took a while to solder all the little components onto the board but I actually found it to be very relaxing. It takes a lot of focus but it isn’t really mentally taxing. Soldering was a nice way to unwind after work this week. The biggest addition I made to this build was the choice to paint the enclosure. I had never painted metal before so I had to learn a bit about that (it’s not that complicated). It really just involved sanding the enclosure, priming it, then adding a few layers of indoor/outdoor spray paint. I picked a nice ugly yellow, which ended up looking really cool with the black nobs. I had originally planned to label the nobs and draw some sort of design, but I just didn’t find anything I like so I kept it totally clean, which ended up being a nice look.

The tone of the pedal itself it pretty cool. It has treble and bass levels as well as a blend control which lets you blend the drive and clean tones nicely. I did a quick recording so you can hear what it sounds like. I started with a clean bass sound for comparison then turned on the overdrive.

It felt good to finish a Thing A Week project, I was a little worried about the viability of this project after falling short the first week. Next week I will probably try to do something artistic, maybe comic related.

Thing A Week 1 - Professor Rex VonScience Saves The World (an HTML5/JavaScript game)

So, the first Thing A Week project was kind of a failure.

My goal was to build my first HTML5/JavaScript based game. I started out by picking a JS game framework suggested by my buddy Bryan. I ended up using Crafty and getting started with this tutorial. It was really good and by the end I had a top down adventure game thing that looked very Zelda-like.

From there I sat down and did a bit of planning to figure out what sort of game I wanted to make. This is where I may have gotten a bit ambitious. I decided to make a top down adventure game (similar to the one in the tutorial) about a T-rex/scientist who must fight off mammals and time travelers to gather parts to build a spaceship and blow up the asteroid that will cause the mass extinction of all dinosaurs. I planned out 4 stages, each with new mobs and planned to hand draw all the sprite fames.

Perhaps I was in a bit over my head, having never built a game before.

In the end, I was able to create a rather buggy game where you can move around a dark green square in a forest (made of light green squares) and go after gray squares (the parts!) while avoiding some brown squares (probably a rodent of some kind?). I wouldn’t really call it a game, but I suppose I know a lot more about game building with JavaScript than I did last week. I did really like the idea for the game, especially the name “Professor Rex VonScience” and I got to draw several dinosaurs wearing a lab coat and a bow tie, so it wasn’t a total loss.

If you’d like to “play” the “game” you can take a look here: Professor Rex VonScience Saves The World and the code is available on my Github.

So, now that I’ve already had an unsuccessful Thing A Week week, I need to figure out how to deal with failure in the project. I’d like to keep working on this game but I’d also like to avoid sticking with the same project several weeks in a row, particularly this early. Perhaps in an upcoming week I’ll pick a subset of this game as my project and work from there now that I have a better idea about the kind of work it takes to make a game. I’m also not sure if I’m ready to set next week’s project yet. I’m leaning towards building a bass distortion pedal, though.