polyrhythms

polyrhythms

Peter Sobot  //  Musician and software engineering student. I make things. Check out some of my work at petersobot.com.

Jan 22 / 7:46pm

The middle ground between form and function

I've noticed a distinct trend in all of my recent work. Not all of it is useful, and not all of it is feature-complete - but it all places a lot of importance on form over function. Let me give an example:

Lndrme

Read the rest of this post »

Filed under  //  code   design   form   function   lndr.me   ninjaquote   project   web development  
Mar 18 / 12:58am

A Better Music Workflow?

I produce a lot of music.

Logic

I don't necessarily release a lot of it (or finish all of it) but I have at least 100 songs I consider developed enough to listen to, and about 300 other song files that are just riffs, beats and vocal ideas floating alone.

With so many files, projects, songs, sounds, and work in one place, I've developed musical workflow that borrows a lot from software development patterns. My music tends to be produced in stages and cycles.

I'll usually start with an idea from noodling around on some instruments, then do two things:

  1. Record (track) instruments with the main riffs of the song or basic chord structure.
  2. Record a basic drum loop and bass loop, then arrange to fit song structure.

Then, I don't do anything.

For any length of time between a day and a month, I usually don't touch the song-in-progress. The song needs a break, while I can forget about whatever ideas I had while writing the initial sections of the song.

Then, I'll come back to it, add some more riffs, ideas, melody, direction, possibly a scratch vocal track. Then the real fun begins.

Guitarrig

  1. Re-record any parts with mistakes or even rhythm that's slightly off.
  2. Add whatever new sections, parts, instruments, riffs, or notes that need to be added.
  3. Make updates, edits and changes written down from previous listens.
  4. Bounce to disk.
  5. Place .flac in Dropbox for remote listening and burn to CD for in-car auditioning.
  6. Make comments on SoundCloud/Evernote on each track.
  7. See step 1.

This process continues until I find it extremely hard to find changes to make to a track, or until I've reached the self-imposed deadline and am happy with the track.

In an ideal world, I wouldn't need to burn CDs for the car - I could plug in my phone and have it stream the latest version of the song from SoundCloud with no user intervention. (very similar to "nightlies" in the open-source programming world.) I could listen at work, make comments (that would get synced back into Logic), listen on my phone, make comments, send the links to others, get their feedback, and have this all happen with one utility.

(just to round out the post with some audio, here's one of my SoundCloud tracks.)

Cupcakes by Peter Sobot

Unfortunately, if I continue writing this script at the moment, I won't have any time to finish the album the tool would be created for. Once I've released my next album, (ETA: May 2011) I'll be open-sourcing some cool tools to make such a workflow easy.

 

Filed under  //  SoundCloud   code   logic pro   music   workflow  
Feb 5 / 1:24pm

The iPhone and Custom Text Tones

(download)

This is my text message sound: "Level Up," sampled from Pokémon Blue on a GameBoy Colour. Short, geeky, and perfect enough to be heard every time I get a text.

However, Apple has decided that while users can set their own ringtones for their iPhones in iTunes, the text message notification sounds are off limits. I wouldn't take that answer.

Read the rest of this post »

Filed under  //  code   custom project   hack   iphone   project   ssh   text   text message   text tone   tone  
Dec 10 / 12:14am

OhLife and Online Privacy

OhLife is a brilliant site that emails you nightly and lets you keep a journal through email. I've been using the site for many months now, and it's been immensely useful in spurring me to keep a journal. Not that I've read over the entries yet, but when I have a free moment, it'd be interesting to reflect.

Ohlife

As awesome as this service is (and it really is), I slowly realized there's no need for me to email all of my journal entries to a third party. With a physical journal, you'd probably keep it very private, and not leave it with anybody at any time - why not do the same for a digital journal? To keep the same functionality though, I still wanted an online, email-based solution.

Enter OhJournal. (Yes, the name is a blatant ripoff of OhLife. Shush, you.)

By putting a 20-odd line PHP script on a cronjob every day at 8pm and a simple Gmail filter, I can replicate the basic functionality of OhLife without using a third party.

Daily

Every day at 8pm, my server automatically sends me an email reminding me to write a journal entry. The reply-to field is automatically filled with my Gmail address, but with a tag on the end, so my response gets caught by Gmail's filter and goes into the proper folder, properly labelled. It's a very simple system, really.

Gmail

As is my style lately, the source code is available on github. Feel free to download it and set it up yourself - but be careful to change the email addresses! I don't want to be receiving anybody's errant journal entries...

Filed under  //  blitz   code   custom   github   journal   ohlife   open-source   project  
Dec 6 / 7:38pm

Live Status Updates with PHP

If you have a personal website, and you use Twitter, there's a chance you already have a Twitter widget embedded in your site. Most people will opt for the default Twitter-provided (Javascript-based) widget, which does its job well, is relatively customizable, and is very easy to implement.

Psobot

However, some people (like myself) are stubborn and would rather come up with their own custom solution that allows for complete customization. I wrote my own basic Twitter feed widget in PHP for the latest rendition of my homepage.

Myt


This custom widget has complete PHP and CSS-based control over how you display the latest tweet. It fits the content into the exact dimensions you want, with a bare minimum of content, so you can style it exactly how you want. I've also set it up to automatically grab the geolocation data from the tweet, or to fall back to the client used to tweet if there's no geotag. You can also (by default) filter the latest tweets selectively - I've chosen to omit @replies and re-tweets, as personally, I'd rather have my own original tweets displayed prominently on my site.

I've made this widget open-source - download it from github if you'd like. You're free to use it wherever you want. There's only one PHP file to import, and only one function to call. It makes use of PHP's built-in SimpleXML module, to parse through Twitter's live RSS feed of your own tweets and extract the first one that's not an @reply or retweet.

Some future plans for the code:

  • Allow for local caching to reduce fetching from Twitter's rss feed
  • Find some way to allow for private twitter feeds (using their API perhaps?)
  • Offer a more flexible div structure
  • Add the Javascript necessary to load the widget with an Ajax request

 

Lfm

In addition, if anybody uses Last.fm and is interested in having a similar widget for last song scrobbled, I've created and open-sourced such a widget, also available for download from github. However, this widget requires an API key, so you'll need to sign up for an API account if you'd like to use it.

If you've got any comments or suggestions, feel free to leave a comment below. 

Filed under  //  code   github   live   php   status   twitter   updates   web developer   web development   widget  
Nov 22 / 1:21pm

The Colour of the Web

What colour is the internet?

This is a very difficult question to even ask - what does colour mean? How does one measure the colour of a web page? How do you quantify and categorize the results?

For an upcoming class project (for STAT 206, to be precise,) @amtinits and I are trying to find the colour of the most successful websites on the web. Using the Alexa website rankings and some custom python hackery, we're finding the average colour of a random sampling of 1,000 websites from the top hundred thousand sites online.

We're making heavy use of the wonderful webkit2png python library and using the extremely helpful pypng as the heart of our image manipulation scripts.

We're then comparing the popularity of the site with its hue, as given by the Alexa ranking index and a simple calculation from its average colour value. Then we do some statistical magics, push some buttons, graph some pretty scatter plots, and see if there's any meaning to the data.

At the moment, we've got the scripts running full-time on my server, gathering and processing data slowly. After the data is collected, the report is written (that part won't be made public) and the marks come back, we want to write a nice front-end with some more options, a database, some crazy amounts of processing, and... do... something with it. (Is this even remotely monetizable? Who cares!)

Until the "app" eventually gets launched, you can view the results of the script in real-time at http://colour.petersobot.com/100k/ .

The real-time results of the script can be viewed at http://colour.petersobot.com/100k/output.csv. The script was run for a little while on the top one-million site dataset, but this list had too many malware/spam sites in it. This short list of results can be found at http://colour.petersobot.com/1m/output.csv.

Filed under  //  code   colour   git   github   internet   project   python   script   statistics