The iPhone application BUZZflies detects sounds from other iPhone devices and synchronizes them utilizing a synchronization algorithm inspired from the nature:
the firefly synchronization algorithm.
After the iPhone devices are synchronized they will play a song of your choice from your library.
This iPhone application is a demonstration of simple distributed scheme based on the theory of pulse coupled oscillators. http://www.youtube.com/watch?v=6Rx2THU3daM&list=PLB18oUigs4QCaBg2k20Zp6pGQd2Nsz-wg&index=3
Go for the free application BUZZflies on iTunes:
https://itunes.apple.com/at/app/buzzflies/id402295450?mt=8