AudioStretch ad in Guitar Techniques Magazine


I’m really excited to have a quarter-page ad running in the next three issue of UK-based Guitar Techniques magazine, starting with issue 237 (December 2014) which should appear on newsstands any day now.

The ad concept and design are by Toronto-based Aestheticize Media. The aim was to focus on the most unique feature of AudioStretch, namely the ability to ‘scrub’ the audio without changing the pitch, and do that in a way that excites and arouses curiosity. Aestheticize nailed it!

Standard

It’s a huge improvement over the crowded little 1/8 page ad I ran in the Classifieds section of Guitar Techniques last year. Since it was designed by an engineer (me!), it’s not surprising that it looks like something pulled from an engineering specification: basically a screenshot and list of features. Informative, but hardly exciting!  What was I thinking?

FirstGTAd

 

 

Posted in Uncategorized | Leave a comment

AudioStretch: “One Of The Essential Music Apps”


Nice video review of my app, AudioStretch for iOS.

Posted in Uncategorized | Leave a comment

No iCloud Drive on iOS? No problem


For quite a while, AudioStretch has been able to open audio files that are not in an iOS device’s Music library via the “Open In…” mechanism. For example, I can open the Dropbox app, choose an mp3, then click on the “Action” icon, choose “Open In…” then choose AudioStretch from the list of compatible apps that appears. After a second or two, the file opens up in AudioStretch.

I find this really handy for keeping a small selection of test files that I don’t want to have cluttering up my Music library, e.g. brief excerpts of various types of music, sine tones, etc.

Now that iOS 10.10 (aka Yosemite) and iOS 8 are out, I thought I’d try iCloud Drive instead. So I dragged a few audio files into iCloud Drive on my Mac, which is really easy, as iCloud Drive is nicely integrated with the Finder (as is Dropbox).

I figured I’d then open up Apple’s iCloud Drive app on my iPhone, choose one of the files, and use “Open In…” just like I do with Dropbox. Problem: Apple, rather incredibly, doesn’t have a iCloud Drive app!

With iOS 8, it’s now possible for an app to access files you put in iCloud Drive, but only if the app has been set up to do so. Specifically, it needs to use the UIDocumentMenuViewController class. I’m experimenting with it right now in my AudioStretch app. Works well, but before I can ship this feature, I have to figure out where to add yet another button to the UI, test it thoroughly, submit it to the app store, etc. which means it’ll be easily several weeks before it’s deployed.

In the meantime, there’s a stop gap measure: the Cloud Grab app. Ridiculously simple app: it just shows the documents you have in iCloud, and allows you to “Grab” and “Use” them (via Open In) in other apps. For $0.99 it was a no-brainer for me to buy it.

Seems a little crazy that Apple didn’t provide something like this out of the box, but hey, the developer of Cloud Grab was smart enough to spot this gap, so good on him! That’s entrepreneurship: spotting some little niche and filling it fast.

screen568x568

Posted in Uncategorized | Leave a comment

Predictable PIN numbers


An interesting analysis of PIN numbers in this article in Data Genetics shows astonishing lack of randomness in how people choose PIN numbers.   For example, just 20 4-digit numbers account for a staggering 26% of 4-digit PIN numbers, with “1234″ alone accounting for over 10%!

Posted in Uncategorized | Leave a comment

Semisopochnoi


Besides writing audio software, I play guitar in various styles.  Mostly at home just to myself, but very occasionally I play in public.

Earlier this year, I had the pleasure and honour of playing the lead guitar part in the world premiere of “Semisopochnoi (Семисопочный)”, a concerto for solo electric guitar, electro-acoustic sounds and Niibori guitar orchestra. The piece was composed by my friends Robert Casteels (concept and acoustic music) and Peter Kellock (electro-acoustic music).

The premiere took place during the NUS Guitar Ensemble’s “Wanderlust” concert on 16 March 2014 at the Conservatory Concert Hall of the Yong Siew Toh Conservatory of Music, in front of an audience of ~400 people, with Robert Casteels conducting.

There’s a very nicely-done video of the performance (below).  It’s a long and slightly unusual piece.  If you’d like to just see my solo playing, I reckon the best bit is the ~1 minute solo from ~12:00.

Posted in Uncategorized | Leave a comment

A Public, Cross-Platform DSP API?


Porting DSP code to take advantage of platform-specific ‘native’ DSP libraries is a pain. Surely there’s a better way.

Over the years, I’ve worked on DSP projects for many different platforms. As much as possible I try to find a library of essential DSP functions that are well-optimized for the target platform. For example, when I was doing a lot of development on Windows, I used Intel IPP (Integrated Performance Primitives). In recent years, I’ve been developing a lot for iOS, so I now use Apple’s Accelerate/vDSP Framework.

The advantage of using a ‘native’ DSP library is that it can be wicked fast. The FFTs in Intel IPP and in the Apple Accelerate framework are substantially faster than any of the C versions you’ll find on the web. They’re also very nicely documented. Unfortunately they’re also totally non-portable. If you write some nice code using Intel IPP, for example, porting it to some other platform where IPP is not supported will be a lot of work. Even within just the Windows world, you can’t even count on using Intel IPP alone, as it’s not supported on ARM.

A while ago, I needed to port a bunch of DSP code I’d written for iOS to make it run on a Linux server and on Android tablets. I ended up writing my own vDSP-like library – optimistically dubbed “OpenDSP” – all in standard C++, using signatures that are nearly identical to Apple’s own functions. For example, the Accelerate framework has function vDSP_vmul(), which “multiplies vector A by vector B and leaves the result in vector C”. My own implementation looks like this:

void DSP_vmul(
	const float x1[],
	DSP_Stride stride1,
	const float x2[],
	DSP_Stride stride2,
	float y[],
	DSP_Stride strideResult,
	DSP_Length n)
{
	while (n--)
	{
		*y = *x1 * *x2;
		x1 += stride1;
		x2 += stride2;
		y += strideResult;
	}
}

I wrote my own implementations for the couple-of-dozen vDSP functions I needed, including several of the FFT ones. I put them all into a single file (OpenDSP.cpp), and in the accompanying OpenDSP.h header, I mapped the vDSP_abc function names to my DSP_abc, but only if the target was a non-Apple platform.

#ifdef __APPLE__

// If you're building for an Apple platform (Mac or iOS), then you really should use
// the Accelerate framework. It's really fast!

#include < Accelerate/Accelerate.h >

#else

// If you're *not* building for an Apple platform, we use #defines to map vDSP function
// names to the corresponding OpenDSP function names. This allows you to write cross-platform
// signal processing code that's blazingly fast on Apple platforms, and uses Apple's vDSP
// functions, and run the same code on other platforms as well.

#define vDSP_vmul  DSP_vmul

// Similarly for vDSP_vclr, vadd, vsmul, create_fftsetup, fft_zrip, etc...

#endif

This approach worked very well, in that I can now compile code using vDSP functions on any platform, not just Apple’s.

I’ve considered making my OpenDSP library public, but here’s the problem: the vDSP documentation, and therefore presumably the API itself, is covered by Apple’s copyright. So if I were to release the library publicly, Apple could plausibly come after me for copyright infringement. After all, Oracle sued Google over the Java API, and ultimately won the case.

Personally, I’d rather focus my brain power on developing interesting apps, not on learning platform-specific APIs. Ideally there would be a single public-domain API for basic DSP functions, with a generic C/C++ implementation that could be compiled for any platform. Platform owners would be free to create their own super-optimised implementations, or in the mean time developers could map them to existing platform-specific libraries (Intel IPP, Apple Accelerate/vDSP, ARM Ne10, etc.).

Does anyone know whether such an API already exists? If not, would anyone be interested in helping to define one?

Posted in Audio, DSP, FFT, iOS, Programming | 2 Comments

Downloading audio and video from YouTube


Users of my AudioStretch app sometimes ask me whether you can use YouTube content in it, for example to work out how to play a solo from some jazz concert video. Short answer: you can’t. AudioStretch doesn’t have the ability to grab content directly from YouTube, and even if it were technically possible to add such a feature, it’s probably not allowed.

That said, there are services to download content from YouTube and get it into audio or video files on your PC (or Mac). Once you’ve got the file on your PC, you can copy it into Dropbox. Then in Dropbox on your iPad, you can choose the file and ‘export’ it to AudioStrech (or other app) via the iOS “Open In…” mechanism. So here are a couple of services you can check out.

YouTube-mp3.org lets you download the audio track of a YouTube video as an mp3 file. Just take the URL from YouTube, copy/paste it into YouTube-mp3.org, and in a few seconds an mp3 will be ready for download.

If you want to download a video (not just the audio) from YouTube, go to the YouTube video, then change the start of the URL from http://www.youtube.com to ssyoutube.com, e.g. change:

http://www.youtube.com/watch?v=KNd1lXq5MQA

to

http://ssyoutube.com/watch?v=KNd1lXq5MQA

That second link redirects to http://en.savefrom.net, and from there you’ll be able to download the video as an mp4. Note that you can you can open the audio track mp4 videos in AudioStretch via “Open In…” from Dropbox, just as you would load up mp3 files.

Disclaimer: I’m unsure of the legality of the above services, and have no idea whether they’re entirely safe, etc. so use them at your own risk! And also, please remember that much material on YouTube is not in the public domain, and probably shouldn’t have been uploaded to YouTube in the first place. If you’re just downloading a song to work it out in AudioStretch or some other time-stretching app, and not redistributing it, that may be OK (at least morally, if not legally). But if you really like a song, support the artist by buying a copy of it from a legitimate source. If your favourite artist puts out educational videos or books for learning their stuff, buy them. You’d be surprised how little most recording artists earn (and most app developers, for that matter). Musicians and other creative people often love doing what they do, but need to buy food and pay the rent too!

Posted in Uncategorized | Leave a comment