Introducing SoundCloud-Powered Multi-Track WebApp, “Sessian”

Here’s a quick look at something I’m building with the SoundCloud developer tools.

Now, I’m sure this type of app has been done a thousand times…but I thought other devs might like to see what’s possible with the tools and phenomenal support SoundCloud provides.

Sessian is a browser-based multi-track app that uses SoundCloud embedded tracks as its foundation. Still in its early stages, I wanted to make web-based multi-tracking as simple as possible. I thought, “Why not stack SoundCloud tracks and time-sync them with recording? It might be an easy way to collaborate on rough mixes and ideas.” No fancy effects, editing or any advanced features. Just clean and minimal.

Scratchin’ My Own Itch

I’m building Sessian for myself. Why? The answer is simple. You see, I lived in L.A. for many years and miss jamming with my friends. Sessian will allow me to collaborate with them again – long-distance through a web browser. But others can use it, too.

Here’s how it’ll work: I’ll create a new session and start with a drum track. My buddy, Anthony, will add a bass line and rhythm guitar track in L.A. Then I’ll log back on and record one of my blistering, face-melting guitar solos (“Raise your goblets of rock!”). Finally, Paul in Michigan will add his vocals.

Since Sessian is web-based, anybody with a SoundCloud account can join in. Maybe somebody halfway across the world plays a mean set of keys. How cool would it be to log on and discover three or four fresh tracks from random people all over the globe? (The sessian “owner” could choose to keep them in the final mix or not.)

How It Works

Sessian accepts audio two ways: First, by dragging and dropping existing tracks from SoundCloud (as you’ll see in the screencast). Second, by recording straight in (I use an M-Audio FastTrack Pro USB audio interface). I’m looking at Johannes Wagener’s RecButton code for the recording and uploading of tracks. I’m going to bind a jQuery event to the “Record” button which will trigger the tracks to play and start recording audio.

Will this app replace ProTools or Logic? No. It’s designed for rough mixes and jamming. It’s a sketch pad. But everybody has a browser so it’s accessible to everyone.

Another Use Case

Here’s a cool use case. Let’s say you’re in a band. You tell your fans, “Hey, I’m jumping on Sessian and starting my new song. I’m going to lay down four new tracks as a starting point. Join me by laying down your best track and I’ll “audition” it. If it’s good, we’ll let the other fans loose to upvote the tracks they think are best.” You’ll end up with a few kickass crowd-sourced songs to really help you connect with your fan base and create a lot of excitement.

Whatever. The point is…it could be a fun, simple way to collaborate in almost real time.

Go fullscreen with this baby and bump up the resolution to 720p. Looks way better.

Peace. Chris

P.S. – That’s not me singing. It’s the Apple demo track from GarageBand. :)

Rails Paperclip Plugin Validation If No Attachment Present

On a martial arts marketing website, Through the Ranks, I use ThoughtBot’s excellent file upload plugin, Paperclip, the defacto standard for managing Rails file uploads.

However, one problem has been vexing me since day one. And that is validating only when an attachment exists. For example, in my Rails application, I give users the option of uploading a logo and other photos. But they don’t always upload one. However, when they DO, I need to validate they aren’t injecting something nasty (javascript, for example) or huge .bmp image files into my database.

So…how do you do that? How do you validate a Paperclip attachment if – and only if – an attachment exists?

Some people say to add the old…

  :allow_nil => true  

option in the model that has paperclip attachments.

But that does NOT skip the validation if the attachment isn’t present. This simply allows you to submit a form with no attachment present. It does NOT skip your validation if your attachment object does not exist. So…here’s a nice snippet of code that allows you to skip validation if no attachment is present. Here’s all you do:

Paperclip: How to Skip Validation When No Attachment Exists

  1. Open /vendor/plugins/paperclip/lib/paperclip.rb
  2. Comment out the following code (or delete it):

    
        #      validates_inclusion_of :"#{name}_file_size",
        #                             :in      => range,
        #                             :message => message,
        #                             :if      => options[:if],
        #                             :unless  => options[:unless]
    
      

  3. Add the following in its place:

           validates_inclusion_of :"#{name}_file_size",
                                 options.merge(:in => range, :message => message)
        

  4. Now restart your server. Your Paperclip validation headache is now gone!
Quick Search /
See Your Current Git Branch In Your Shell Prompt – In Full, Glorious Color!
February 15th, 2015

Here’s a cool bit of code that displays your current git branch in your shell prompt. Like this: Pretty handy. Here’s all you have to do to get this beauty working for you. In your .bash_profile (or .bashrc ) file, add this:

Zero Downtime Rails Migrations with the Large Hadron Migrator Gem
April 9th, 2013

Are you working on a mature or legacy Rails app?  If so, you know migrations that change the structure of your tables (like adding indices) or update many rows can be troublesome.  You might be ask yourself, “Wow. I have this big app in production with lots of users and I have to perform an […]

How To Build a Product People Really Love
May 27th, 2011

Eric Wahlforss, one of the founders of SoundCloud, recently said, “To make a product people really love, find those people and iterate together with them”. This puts the focus on customers and what they want.  It’s democratization of development.  Obviously, you can go too far in this direction and cede to every feature demand, but […]

Introducing SoundCloud-Powered Multi-Track WebApp, “Sessian”
April 16th, 2011

Here’s a quick look at something I’m building with the SoundCloud developer tools. Now, I’m sure this type of app has been done a thousand times…but I thought other devs might like to see what’s possible with the tools and phenomenal support SoundCloud provides. Sessian is a browser-based multi-track app that uses SoundCloud embedded tracks […]

The Easy Way to Authenticate via SoundCloud
April 14th, 2011

Here’s a quick video I shot to help you get started with SoundCloud’s API in a Rails app. I recommend viewing in 480p to see more detail (you can also watch it on YouTube.com).

Rails 3 Bundler of Love
November 6th, 2010

Are you on Rails 3 yet? If not, you’re in for a treat. The Rails core team has done a great job with Rails 3. While there are lots of nice improvements, the best of the bunch is bundler. In my opinion, this feature alone is worth the upgrade. So pay attention here. You’re going […]

Steven Johnson’s New Book, Where Good Ideas Come From Inspires a New Site: SlowHunch.com
October 13th, 2010

If you do anything with the web – or want to develop more creative ideas – you must rush out and buy Steven Johnson’s new book Where Good Ideas Come From. One of the central themes of the book is that an idea is a process, not an event. A great idea, Johnson explains, doesn’t […]

Application Development Secret: Give a Toy Away
September 14th, 2010

As your web application matures and your users request more and more features, your code can quickly get out of hand. This leads to hidden bugs, recursive crap and “skeletons” lurking in your code closet. But we both know it’s important to keep our code lean. But how do you do this when you’re adding […]

Weekend Rails Development Project – Dj-Search.com
June 24th, 2010

A couple weekends ago, I slammed out a new site, called dj search. The concept behind the site is obvious: find a dj for your upcoming event. We wanted the design and functionality to be “as simple as simple can be”. Constructed with the help of a friend who is a professional dj, we cranked […]

Rails Paperclip Plugin Validation If No Attachment Present
June 19th, 2010

On a martial arts marketing website, Through the Ranks, I use ThoughtBot’s excellent file upload plugin, Paperclip, the defacto standard for managing Rails file uploads. However, one problem has been vexing me since day one. And that is validating only when an attachment exists. For example, in my Rails application, I give users the option […]

RailsRankings.com: 500 Errors
June 19th, 2010

What is going on with RailsRankings.com lately? Seems like every time I visit the site it looks like this: At least it’s good to know the site IS Rails, however.

Rails and jQuery: How to Integrate jQuery UI into Your Rails App
June 9th, 2010

Ahhhh….jQuery UI. Lucious. It’s the quickest way to get your app looking slick in no time. It’s also highly flexible. jQuery UI’s themeroller feature allows you to tweak your css settings (and the look of your jQuery ui elements) right in a web browser (Wow! We must be living in the 21st century!)

Will Paginate Page_Entries_Info Hide/Show
June 1st, 2010

The old standby Rails pagination plugin, Will Paginate has an excellent built-in method for showing the records found in a collection: What this does is returns a count of the model objects in your collection. This sometimes helpful, for example, if you want to show your users how many comments a blog post has. Or […]

The Hungry Beast
May 22nd, 2010
Developing the 9elements Way
May 22nd, 2010

For years, I’ve used my MBP hooked up to a 24″ external monitor, with my laptop closed and an extension keyboard.  However, I recently went back to the amazing site run by German web development firm, 9elements. After watching their cool looped video (yes, in Flash!) I noticed something surprising: most of them code directly […]

Rails and Cucumber – The Benefits of Using Cucumber in Your Next Ruby on Rails Application
May 21st, 2010

Ever wonder what the appeal of Cucumber is? Wonder if you should employ Cucumber to help develop your next Rails apps? Is it worth the time, effort and extra steps involved? My vote is a hearty “yes”. And here’s why: First, Cucumber forces you to SLOW DOWN. It forces you to stop and think. To […]

New to Rails? Here Are Nine Tips for Beginning Developers
May 21st, 2010

If you’re a designer who is just encountering Ruby on Rails…congrats! You’re going to love working the “agile way”. Rails is efficient, fast and a joy to work with. However, Rails can have a steep learning curve, especially for designers. But once you grasp the fundamentals, you’ll never look back.

Here are my top ten tips (and resources) for wrapping your head around Ruby on Rails as a designer: