dBent

February 4th, 2010

Client: dBent

dBent is a site made to showcase the talents of designer David Bennett, it features a fully custom wordpress theme and javascript effects such as fading and mouse interaction with accelerating elements.

Author: admin Categories: Projects Tags:

Melbourne Coffee Review

November 24th, 2009

appstore

Client: Melbourne Coffee Review Pty Ltd
Version: 1.0
Status: On Sale

iWillApps partnered with b2cloud to create The Melbourne Coffee Review which is an app based on the book MCR's Guide to Melbourne's Top 100 Cafes which contains information on the reviewers top 100 cafe's as well as other articles concerning coffee. The App turns this information into a hand held guide which can be used to see your nearest cafe's, and find out information about them such as the owner, the opening and closing times, the review of the cafe and directions. This app features include the following:
- Communication with an external server to provide updates to the applications cafe's
- Caching information for future use using sqlite3 to allow for limited operation even when no connection is present
- GPS use to calculate how far away you are from the cafe, and to plot directions to the cafe
- Threaded URL requests to allow the images to load in their own time without disrupting the whole application
- The ability to call the cafe and view its website from within the app
- A favourites feature that lets users flag their favourite cafe's and access them without the need for an internet connection
- Article and Cafe information presented in a stylish format

The app is currently (at the time of writing) 6th in the Lifestyle category in the Australian app store with more than 10,000 downloads and many positive reviews with a 4 star rating. It featured on the front page of the iTunes App Store.

Author: admin Categories: Projects Tags:

Blackeye Productions

November 24th, 2009

Client: Blackeye Productions

Blackeye Productions is a Drupal based ecommerce site made for selling percussion literature to schools and individuals who practice percussion. It contains the ability to process transactions from credit cards and paypal, a sophisticated and user friendly ordering system and live previews along with download-able audio files and operates fully within a secure HTTPS connection.

Author: admin Categories: Projects Tags:

Improve Floating Point Performance by Disabling Thumb

October 21st, 2009


It's a little known fact that the iPhone ARM processor can sometimes be a little slow at doing FPU calculations, this is one of the reasons Fast Fourier Transforms on the iPhone are done using radix versions than traditional floating point versions. Unfortunately not everything can be done using fixed-point transforms, especially when using vanilla C libraries designed to compile for different platforms. Not a whole lot can be done when trying to tackle the slow floating point problem on a practical level, however sometimes you will find it beneficial to disable the compiler generating optimised 'thumb' assembly. Thumb runs in 16-bit operands which improves performance and memory usage when doing regular operations, but can sometimes lead to slow floating point processing due to code having to switch back and forth from the 16-bit operands to the 32-bit operands. I find it useful when I'm making an app that relies heavily on sound processing or physics engines to toggle Thumb and see if I can gain any performance benefits:

Thumb Code Generation

Author: admin Categories: Tutorials Tags:

Animating Rotations on Views

October 16th, 2009


To make your app stand out from the rest, you will need to give it a unique look and feel. Apple helps you a lot here, by making it easy to animate changes to views (which can include UILabel's, UIImageView's, UIButton's and much more). Some people may try to simulate animations using a timer and adjusting the changes over time, however this uses a lot of unnecessary resources and will certainly never be as smooth or easy as Apple's UIView animation resources. For example if I wanted to apply a 180 degree rotation on a view object, I would use the following code:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
viewObject.transform = CGAffineTransformMakeRotation((M_PI/180.0)*180.0);
[UIView commitAnimations];

This would make the object spin 180 degrees during the course of 0.5 seconds. The same technique can be applied when making changes to an objects frame, this can make it zoom across the screen or shrink/grow in an animated fashion, or combine all rotation, size and position for some neat effects.
Now something else to notice is the way I have applied the rotation code. It's important to acknowledge that the CGAffineTransformMakeRotation takes inputs as radians (where Pi is equal to 180 degrees), so we will need to convert a standard degree to a radian if we want to use them as inputs.

Author: admin Categories: Tutorials Tags:

Horizontal Applications

August 8th, 2009


Depending on the kind of applications you make, you may find that you will need to implement some in a horizontal view rather than a vertical view, this can help you display data that is traditionally made for viewing on a landscape interface (such as musical notation). There are a couple of hurdles you will have to jump across to make perfect horizontal views, but once you get it working the first time its doubtful it will cause you problems in the future. So first things first, open up Interface Builder and navigate to your view, there you will see a window that looks something like this:
window
Notice how there is a curving arrow towards the top right? Click it and it will rotate your view to be horizontal/vertical as shown in Interface Builder. Now theoretically that's all we should really need to do, but the fun doesn't stop there, we have to insert some code into our application. Locate the function applicationDidFinishLaunching in your AppDelegate class and inside add the following code:

[application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];

This changes the application to landscape when it launches. Try it out though, and you'll notice 1 tiny problem with it, it rotates the view after the application has been launched. So how do we get our application to launch automatically using the landscape view? We need to go into our Info.plist file and add a variable:

<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string>

Now our application starts in landscape mode, and we can put this problem to bed.

Author: admin Categories: Tutorials Tags:

G Unit

July 16th, 2009

appstore

G Unit is an application that turns your iPod Touch/iPhone into a G Force measurement unit that can measure the force being applied to the device in all directional vectors. Using G Unit you can measure the strength of your turns in a vehicle (like a G Meter in an aerobatic aircraft), the G Force in a rollercoaster or elevator or even the maximum G Force you can generate by shaking the device.

It features a unique display that tells you the maximum (red needle), minimum (blue needle) and current (white needle) total G Force applied to the device, while showing which direction is applying the most force, and applying a small trail so you can see the change in directional force. It also provides a graph display at the bottom that lets you track the X (red), Y (green), Z (blue) axis's and total G force (white) applied to the device.

G Unit lets you set your own gauges for maximum G Force and the memory limit for the graph view, allowing you to see more information in the graph. Calibration is also easy, simply push the calibrate button and G Unit will detect whether to use the Y or Z axis to display the force pull on.

Support: admin@iwillapps.com
Status: On Sale
Version: 1.0
Screenshots:

G Unit Main View

G Unit Main View

G Unit Settings View

G Unit Settings View

Author: admin Categories: Apps Tags:

Converting a Fundamental Frequency to a Musical Note

July 4th, 2009


OK last tutorial I covered how to get a fundamental frequency from an array of audio samples by using autocorrelation, but now we will begin to look at how we can convert these frequency values to a musical note. It is actually very simple, given that notes are just incrementing frequencies, all we really need are 2 loops, an octave loop and a note loop. In the octave loop we times our base frequency by 2 every loop, because each octave denotes a doubling of pitch, and in our note loop we times our testing frequency by 1.05946, which is the equal temperament of western music, it is also the twelfth root of 2, which is important considering there are essential '12' frequencies we are looking for in each octave (inclusive of accidentals):

-(BOOL) getNote:(double)fundamentalFrequency
{
	double baseFreq = 65.406; // C2
	for(int i=2;i<6;i++)
	{
		double testFreq = baseFreq;
		for(int j=0;j<12;j++)
		{
			double nextFreq = testFreq * 1.05946; // Equal Temperment;
			double lastFreq = testFreq / 1.05946;
			if(fundamentalFrequency > lastFreq && fundamentalFrequency < nextFreq)
			{
				double nextPercDif = (fundamentalFrequency - testFreq) / (nextFreq - testFreq);
				double lastPercDif = (fundamentalFrequency - lastFreq) / (testFreq - lastFreq);
				if(nextPercDif <= 0.5 && lastPercDif >= 0.5)
				{
					octave = i;
					natural = 0;
					switch(j)
					{
						case 0: note = 0; natural = 0; break;
						case 1: note = 0; natural = 1; break;
						case 2: note = 1; natural = 0; break;
						case 3: note = 1; natural = 1; break;
						case 4: note = 2; natural = 0; break;
						case 5: note = 3; natural = 0; break;
						case 6: note = 3; natural = 1; break;
						case 7: note = 4; natural = 0; break;
						case 8: note = 4; natural = 1; break;
						case 9: note = 5; natural = 0; break;
						case 10: note = 5; natural = 1; break;
						case 11: note = 6; natural = 0; break;
					}
					return true;
				}
			}
			testFreq = nextFreq;
		}
		baseFreq *= 2.0;
	}
	return false;
}

This code is assuming octave, note and natural are global variables in whatever class this function is included in. If we look at Wikipedia's Musical Note page under the heading "Note designation in accordance with octave name" we can see the frequency values of each note, this gives us an idea of how our loop is working. To convert the note number to it's formal musical name, we just simple have to have a lookup table (I use defines personally):

#define A 5
#define B 6
#define C 0
#define D 1
#define E 2
#define F 3
#define G 4

And now we have converted our fundamental frequency into musical notation information, giving us the octave, the note name and whether or not it is a sharp (or accidental).

Author: admin Categories: Tutorials Tags:

Autocorrelation on Audio Signals

July 4th, 2009


One of the major confusions surrounding digital signal processing is the assumption that the peak frequency in the frequency domain will give you an indication of the fundamental frequency (or pitch) of the signal. This is wrong, and in fact no Fourier Transform should be done at all for the best results (at least in my opinion). Wikipedia gives you some idea of the kinds of pitch detection algorithms that can be used on sound (http://en.wikipedia.org/wiki/Pitch_detection_algorithm), and although many ideas are discussed there we will only focus on one, Autocorrelation.

Autocorrelation can be best explained by the cross correlation of the signal itself, and is used to weed out randomization in seemingly random data sets (such as an audio signal). To put it basically I've made some C code that calculates the fundamental frequency based on a minimum/maximum frequency lookup, a signal array and its length plus the constant sample rate of the signal (44.1kHz):

#define MIN_FREQ (1.0/(65.406/44100.0))
#define MAX_FREQ (1.0/(1046.502/44100.0))
 
double autoCorrelation(SInt16* samples,int length)
{
	if(length >= MIN_FREQ)
	{
		int lookupCount = MIN_FREQ - MAX_FREQ;
		double* results = (double*) malloc(sizeof(double)*lookupCount);
		for(int p=MAX_FREQ;p<MIN_FREQ;p++)
		{
			double psum = 0.0;
			for(int i=0;i<length-p;i++)
			{
				psum += samples[i]*samples[i+p];
			}
			results[p-MAX_FREQ] = psum / ((double)length);
		}
		double maxFreq = -1.79769313486231E+308;
		int maxIdx = -1;
		for(int i=0;i<lookupCount;i++)
		{
			if(results[i] > maxFreq)
			{
				maxFreq = results[i];
				maxIdx = i;
			}
		}
		free(results);
		return 1.0/((double)(maxIdx+MAX_FREQ)/44100.0);
	}
	return 0.0;
}

I do not recommend calling this function inside a RemoteIO callback, as you will encounter extreme lag towards the start of the application. Instead store the samples from that callback somewhere globally accessible, and then poll a process function using an NSTimer to return you your frequency results.

Author: admin Categories: Tutorials Tags:

iHearYou – Music Transcriber

July 3rd, 2009

appstore
iHearYou is an application that allows you to gain a musical representation of your surrounding sound via a traditional music staff or a standard guitar tablature. It supports accidentals, and allow you to set the beats per minute and the decibel sensitivity of the note pickup. It picks up notes in between the 3rd octave and the 6th octave.

At the moment it has no concept of different instruments, and treats every frequency as played by the same instrument, it also monitors the sound monophonically, meaning that it will fail to pick up the harmonics in chords, just the fundamental frequency of the chord.

Note to iPod Touch users: You will need the microphone device addition to use audio recording on this application.

Note to 1st Generation iPhone users: Due to the cap on sampling rate on the 1st Generation iPhone's this application will not work on these devices.

Support: admin@iwillapps.com
Status: On Sale
Version: 1.0
Screenshots:

iHearYou - Music Transcriber (Staff View)

iHearYou - Music Transcriber (Staff View)


iHearYou - Music Transcriber (Tablature View)

iHearYou - Music Transcriber (Tablature View)


iHearYou - Music Transcriber (Settings View)

iHearYou - Music Transcriber (Settings View)

Author: admin Categories: Apps Tags: