Sound Interfaces

Over the years I have owned a multitude of sound interfaces for different reasons, far more than my limited recording abilities justify, but thought I would randomly blog the ones I owned and why I sold them.

MOTU 2408 – returned, didn’t work with IBM thinkpad docking station
MOTU 2408 (yes another one) – sold, didn’t work with non intel chipset
M-Audio Delta 1010 – worked, then sold as I wanted a non PCI based one
MOTU 828MkII – worked, then sold for more preamps and bus powered Traveller
MOTU Traveller – worked, then sold because the ProjectMix had a control surface and came up for cheap on asiaxpat
M-Audio ProjectMix IO – bought from John Lauden, worked accept no hot plugging, sold to Audiotraffic when changing laptop to a new MacBook with no FireWire
M-Audio Fast Track Ultra 8R – bought on sale, most stable driver yet, until they got bought over by Avid and the support got terrible :(
Apogee ONE – trying to downsize, but I missed a proper mic, and stereo in/out
Presonus Audiobox USB – staying small, but a bit more features than the Apogee

Google Spreadsheet to iCal

At church and youth we have several rosters in excel for keeping track of who’s doing what and when. I’ve wanted for a while to make a rostering app that would automatically create a roster, assigning a set of users to different tasks at different frequencies for a set period of time. Additionally having it online could be people could automatically be notified of changes and provide an iCal feed.

In the end though I realised that after uploading an excel spreadsheet to Google Spreadsheet, a program could be written to produce an iCal feed for iCal / Outlook / Google Calendar / Thunderbird (via Lightning) / Sunbird, and it would save a lot of time. So that’s what I’ve done an you can download it here.

Installation:
1) Setup you spreadsheet in Google Docs
2) unzip ical.zip and upload it to your webserver
3) Edit config.php and add your username, password named range / event start times and spreadsheet key
4) Subscribe to your calendar!

Demo:
There is a demo calendar set up based on this spreadsheet. Click the link, or copy and paste the URL into your calendar application, especially if you’re using Google Calendar. The single entry configuration is available here:
http://jameslow.com/content/software/ical/?sheet=TestSheet
And an entry that produces multiple iCal events per spreadsheet row here:
http://jameslow.com/content/software/ical/?sheet=MultiEntry

Help
Help and version information is avaliable here: http://jameslow.com/content/software/ical/?help

Item query
You can query for calendar events from just a specific user or item name listed in the spreadsheet by specifying this on the URL: http://jameslow.com/content/software/ical/?sheet=MultiEntry&item=James

Multiple sheets
You can query multiple sheets by using the [ALL] tag: http://jameslow.com/content/software/ical/?sheet=[ALL] or doing a comma separated list of sheets: http://jameslow.com/content/software/ical/?sheet=TestSheet,MultiEntry. These values can also be used in the $DEFAULT_SHEET param in the config, to make these the default available at the root URL.

Test
You can run a test on any sheet by suffixing test to the URL. This will not redirect to an iCal file, so you can see any errors in your setup. It will echo the number of iCal events created if successful. http://jameslow.com/content/software/ical/?sheet=MultiEntry&test=1

Username
The username / password used to access the spreadsheet can be left out of the config file (global and sheet) and specified in the URL so that the data is not public: http://jameslow.com/content/software/ical/?sheet=MultiEntry&[email protected]&password=password

Notes:
Uses the Google GData PHP client: http://code.google.com/apis/gdata/articles/php_client_lib.html
And Flaimo’s PHP iCal library: http://www.phpclasses.org/browse/package/873.htm

FAQ:
1) Named Ranges
– Sometimes google doesn’t return data from named ranges correctly, its recommended to use a specific ranage eg. A1:C20
2) Outlook / Windows support
– Outlook 2007 natively supports subscribing to iCal feeds. For windows you can download Windows Live! Mail. For outlook 2003 you can use the free Remote Calendars add-in and for Outlook 2000/XP this commerical add-in.

Change Log:
1.4
– Query all spreadsheets and multiple spreadsheets using [ALL] or comma separated list of sheets
1.3.1
– Add some explanation to config file
1.3
– Add calendar title
1.2
– Group similar items
– Link back to spreadsheet
– Fix to show all dates
1.1
– Fix for PHP on some systems
1.0
– Initial version

Limegreen Released

Most of the desktop applications I’m working on are based around a crossplatform java template that I’m writing, that basically makes java applications feel as native to the user as possible. It also has a sophisticated Ant build build file that provides automation for a lot of tasks including creating of exe or app files and uploading to google code and sourceforge.

I’ve released the first version of the the template over at google code.

Podpress and WordPress 2.6 fix with revisions

Haha, two ‘work’ posts in a row!

As some of you may know, wordpress 2.6 broke podpress, the great podcasting plugin for wordpress. There were several ‘fixes’ that people found after, but basically all of them involved disabling revisions in the new version of wordpress. I then discovered this forum topic that showed how wordpress called the ‘save_post’ hook in the new revisioning system. The solution I came up with allows you to keep the revisioning system turned on, but still allow podpress to work.

Instructions (Podpress 8.8)
1) Download this file.
2) Rename to podpress_admin_class.php and copy it to your /wp-content/plugins/podpress directory, replacing the existing file.
3) Create a post and check it works

Instructions (Other versions)
The above file might work with other versions of podpress, but it might not. It would be better to edit your own podpress_admin_class.php file to ensure things work.
1) Edit /wp-content/plugins/podpress/podpress_admin_class.php
2) Replace the line function post_edit($post_id) with the following:

function post_edit($post_id) {
if(wp_is_post_revision($post_id) || wp_is_post_autosave($post_id)) {
return $post_id;
} else {

3) Scroll down to just above the function edit_category_form($input) {
4) Insert another } above it to close off the condition statement.

Things that should be noted:

  • This worked for me, and its given here that it might work for you, but I’m not responsible for any damaged caused to your website or computer through the user of this plugin.
  • While the podpress information is saved for each revision, if you restore revisions, it currently won’t restore the podpress information from that revision. That requires using the wp_restore_post_revision hook, which I haven’t got round to doing yet.
  • I use wordpress 2.6 on all of the blogs I maintain now. I love it, I love the new file uploads that were introduced in 2.5, and the post revisions from 2.6. I use wordpress on some intranet pages along with allow categries and private files to control access to sensitive information. The new revisions work great because in a world of non-techsavy users, if we need to go back and fix something that someone broke we can, or for writing online documentation, it means you get a complete version history.

    MySQL BIT in PHP

    Ok, if you subscribe to my blog for personal reasons, this isn’t very relevant to you, but for those of you here for the programming, on a recent project I had some problems getting the BIT field in MySQL to be interpreted as a boolean in PHP. There are a couple of discussions on the net about it here and here, but I couldn’t find any simply stated solutions on the net. So here’s what I ended up doing. You can also download the file here, rename the file .php to use it.


    function mysql_bit($bit) {
    return ord($bit) == 1;
    }

    Business Ideas

    So, for those of you that know me know I think, ALOT, and in the process I come up with lots of ideas. I’m also the type of person that tries to do EVERYTHING and too much. After listening to my Pastor’s (excellent) latest sermon on time, I’ve decided I need to be free of feeling like I have to do so much, and just concentrate on the most important things, if I’m really going to be successful in life.

    So here I’m listing a load of the hair-brained business ideas I’ve had. They are now all public, so anybody can feel free to do them if they really think they’re good, and feel free to give a little of the profits if they make a lot :-P

    Finance

    Control Systems For Market Making
    During by time at DB I was involved in a lot of derivatives pricing and risk analysis. One of the ideas I had related to market making. In market making systems use programming logic to determine what price / spread / volume to apply to market making a security. It might be a good idea to model these as a control/feedback system (or even fuzzy logic) as applied in engineering to come up with stable yet fast acting pricing systems.

    Fuzzy Option Pricing
    There are a few papers published about this, but basically the idea is you model an option’s behaviour using a fuzzy logic system that is intuitive to people who know how options should perform given certain conditions. It might be faster than analytical methods, but maybe less accurate.

    Fuzzy Vol Models
    Again related to option pricing. While you might still calculate the price of an option using conventional methods, it might be a good way to construct a vol service using a fuzzy logic system. This would allow the construction of a smooth service, with no discontinuities using logic steps rather than adjusting parameters for skew / long vol / etc.

    China

    Snowboarding
    There must be snow in China, and its cheap to construct and employee in China. Would stand to reason that opening a ski resort for snowboarding and skiing might be really good way to attract tourists and make money, especially since within Asia, Korea and Japan are the main places and are both pretty expensive.

    Tailored Jeans
    There are places in Europe / America that will do tailored jeans for you, any style, custom fit, warn, new, etc. Thought Hong Kong / China would be a great place to do this too, due to the cheap labour and easy custom production that is available in China. Similar to the way HK is a prime destination for tailored suits and shirts at great prices.

    TV Aggregator
    There’s rise of having a ridiculous number of TV channels in Asia these days. In the US there are sites like Titan TV and Tv Tv in Europe which aggregate TV schedules from all the different networks so you can find out in one place what’s on. They also offer services so that DVRs like Elegato can query and programmatically record all of your favourite series like a Tivo.