<rss version="2.0">
<channel>
<title>Music Hack Day</title>
<link></link>
<description>RSS feed from Music Hack Day</description>
<language>en-US</language>

	<item>
	  <title>JAEZZESiZER</title>
	  <pubDate>Fri, 31 Jul 2009 09:30:30 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=JAEZZESiZER</link>
	  <description><pre id="diff"><ins>!!AKA Harmony Box
</ins>
!!Creators
* Mike
* Dave

!!About the hack
* It's a synthesizer that has the rules of modal jazz built-in; you press a key, it plays the right chord. You just pick the key and the mode. :D
* Alias-free oscillator drives a self-oscillating filter
* Plus LFOs and Envelopes for fatness.

!!Why did you create it?
* We love jazz
* Anything that self-oscillates is cool
* Using punch-font never needs justification.

!!Presenting?
Yep! With the number dog!

API's/tools used:
* Steinberg VST SDK
* Apple AudioUnit SDK
* XCode
* Visual C++
* Caffeine

!!Files
* Screenshot and sound clips at http://davenoise.com/blog (hosted by soundcloud).

</pre></description>
	</item>

	<item>
	  <title>JAEZZESiZER</title>
	  <pubDate>Fri, 31 Jul 2009 09:30:10 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=JAEZZESiZER</link>
	  <description><pre id="diff"><ins>!!Creators
* Mike
* Dave

!!About the hack
* It's a synthesizer that has the rules of modal jazz built-in; you press a key, it plays the right chord. You just pick the key and the mode. :D
* Alias-free oscillator drives a self-oscillating filter
* Plus LFOs and Envelopes for fatness.

!!Why did you create it?
* We love jazz
* Anything that self-oscillates is cool
* Using punch-font never needs justification.

!!Presenting?
Yep! With the number dog!

API's/tools used:
* Steinberg VST SDK
* Apple AudioUnit SDK
* XCode
* Visual C++
* Caffeine

!!Files
* Screenshot and sound clips at http://davenoise.com/blog (hosted by soundcloud).
</ins>
</pre></description>
	</item>

	<item>
	  <title>JAEZZESiZER</title>
	  <pubDate>Fri, 31 Jul 2009 09:29:30 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=JAEZZESiZER</link>
	  <description><pre id="diff"></pre></description>
	</item>

	<item>
	  <title>JAEZZESiZER</title>
	  <pubDate>Fri, 31 Jul 2009 09:27:52 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=JAEZZESiZER</link>
	  <description><pre id="diff">!!Creators
* Mike<del> Massberg</del>
* Dave<del> Gamble</del>

!!About the hack
* It's a synthesizer that has the rules of modal jazz built-in; you press a key, it plays the right chord. You just pick the key and the mode. :D
* Alias-free oscillator drives a self-oscillating filter
* Plus LFOs and Envelopes for fatness.

!!Why did you create it?
* We love jazz
* Anything that self-oscillates is cool
* Using punch-font never needs justification.

!!Presenting?
Yep! With the number dog!

API's/tools used:
* Steinberg VST SDK
* Apple AudioUnit SDK
* XCode
* Visual C++
* Caffeine

!!Files
* Screenshot and sound clips at http://davenoise.com/blog (hosted by soundcloud).

</pre></description>
	</item>

	<item>
	  <title>Percussion Machine</title>
	  <pubDate>Sun, 19 Jul 2009 12:35:44 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Percussion+Machine</link>
	  <description><pre id="diff">!!Creators
* <del>Alistair MacDonald</del><ins>[Alistair MacDonald|http://www.agm.me.uk/blog]</ins>
* <del>Mr Duck</del><ins>[Mr Duck|http://www.agm.me.uk/duck365]</ins>

!!About the hack
This is a device to drum it's way through the day. It has little practical use, verging on no use. Okay, let's be honest it does have no use, but it is fun and makes people smile, so it that not enough. The device is programmed to move two hands in two different directions that strike various objects. The objects make different sounds when struck and can produce a beat driven tune.

!!Why did you create it?
I was wanting to experiment with the underlying technology and this was a fun project to do this with. Although the technology can be extended and used for practical and artistic reasons this is just a proof of concept.

!!Presenting?
Yes

!!API's/tools used:
* Arduino microcontroller.
* Servos.
* Other random scavenged stuff including bottle, cups, cans and tea stirrers.

!!Screenshots or photos
<del>The finished hack.
[http://www.flickr.com/photos/alistair_uk/3711925879/]
[http://www.youtube.com/watch?v=X7eyBT7Hmks]

The links below are</del><ins>[Photo of the percussion machine|http://www.flickr.com/photos/alistair_uk/3711925879/].
[Video of the percussion machine in action|http://www.youtube.com/watch?v=X7eyBT7Hmks].
[A write-up</ins> of the hack <del>under development.
[http://www.flickr.com/photos/rugbymadgirl/3710738207/]
[http://www.youtube.com/watch?v=BCu2apTe7pI]</del><ins>on Alistair's blog|http://www.agm.me.uk/blog/2009/07/music-hack-day-my-percussion-machine.php].</ins>

</pre></description>
	</item>

	<item>
	  <title>Hacks</title>
	  <pubDate>Thu, 16 Jul 2009 14:20:38 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Hacks</link>
	  <description><pre id="diff">!!Winning Hacks
* [LonelyHarps] won 7digital prize
* [Music Zeitgeist] won BBC prize
* [iPhone Music Visualiser] won The Echo Nest prize
* [pythoniphication of SoundCloud API] won Gigulate prize
* [MusicBore] won Last.fm and Be Broadband Overall prize
* [trackmap] won Songkick prize
* [SoundCloud <del>Playlist Sampler]</del><ins>playlist sampler]</ins> won SoundCloud prize
* [Percussion Machine] won RjDj and Tinker it! prize
* [SpaceBass] won LOLCODE prize

!! Other Hacks
* [TrippyAudioWaves]
* [Music Feeds]
* [Record Label Website and Data Access]
* [Cantarino]
* [Danzen Party MIX!!!]
* [iPhone Music Visualiser]
* [Pix n Mixer]
* [IRC Duckestra]
* [BotTalk]
* [SoundCloud AS3 Wrapper]
* [TwinkleStarduino]
* [Music Price Comparison]
* [Outcast]
* [CloudPost]
* [Gig news]
* [LONCYN]
* [MP3 music news blog plugin]
* [last.fm Events on iPhone]
* [SoundCloud Dropbox Manager]
* [MakeMyMixtape]
* [Bass Race RjDj Scene]
* [7digital and Guardian news mashup]
* [YouLoop]
* [CitySounds.fm]
* [RFID objects with a taste in music]
* [Amenator]
* [Theremag]
* [ookoi_ShakeNRoll]
* [Soup.io SoundCloud import &amp; Radio alpha]
* [Bass Race RjDj Scene]
* [JAEZZESiZER]
</pre></description>
	</item>

	<item>
	  <title>Hacks</title>
	  <pubDate>Thu, 16 Jul 2009 14:18:51 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Hacks</link>
	  <description><pre id="diff">!!Winning Hacks
* [LonelyHarps] won 7digital prize
* [Music Zeitgeist] won BBC prize
* [iPhone Music Visualiser] won The Echo Nest prize
* [pythoniphication of SoundCloud API] won Gigulate prize
* [MusicBore] won Last.fm and Be Broadband Overall prize
* [trackmap] won Songkick prize
* [SoundCloud Playlist Sampler] won SoundCloud prize
* [Percussion Machine] won RjDj and Tinker it! prize
* [SpaceBass] won LOLCODE prize

!! Other Hacks
* [TrippyAudioWaves]
* [Music Feeds]
* [Record Label Website and Data Access]
* [Cantarino]
* [Danzen Party MIX!!!]
* [iPhone Music Visualiser]
* [Pix n Mixer]
* [IRC Duckestra]
* [BotTalk]
* [SoundCloud AS3 Wrapper]
* [TwinkleStarduino]
* [Music Price Comparison]
* [Outcast]
* [CloudPost]
* [Gig news]
* [LONCYN]
* [MP3 music news blog plugin]
* [last.fm Events on iPhone]
* [SoundCloud Dropbox Manager]
* [MakeMyMixtape]
* [Bass Race RjDj Scene]
* [7digital and Guardian news mashup]
* [YouLoop]
* [CitySounds.fm]
<del>* [SpaceBass]</del>
* [RFID objects with a taste in music]
* [Amenator]
* [Theremag]
* [ookoi_ShakeNRoll]
* [Soup.io SoundCloud import &amp; Radio alpha]
* [Bass Race RjDj Scene]
* [JAEZZESiZER]
</pre></description>
	</item>

	<item>
	  <title>Hacks</title>
	  <pubDate>Thu, 16 Jul 2009 14:18:14 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Hacks</link>
	  <description><pre id="diff">!!Winning Hacks
* [LonelyHarps] won 7digital prize
* [Music Zeitgeist] won BBC prize
* [iPhone Music Visualiser] won The Echo Nest prize
* [pythoniphication of SoundCloud API] won Gigulate prize
* [MusicBore] won Last.fm and Be Broadband Overall prize
* [trackmap] won Songkick prize
* [SoundCloud Playlist Sampler] won SoundCloud prize
* [Percussion Machine] won RjDj and Tinker it! prize
<ins>* [SpaceBass] won LOLCODE prize</ins>

!! Other Hacks
* [TrippyAudioWaves]
* [Music Feeds]
* [Record Label Website and Data Access]
* [Cantarino]
* [Danzen Party MIX!!!]
* [iPhone Music Visualiser]
* [Pix n Mixer]
* [IRC Duckestra]
* [BotTalk]
* [SoundCloud AS3 Wrapper]
* [TwinkleStarduino]
* [Music Price Comparison]
* [Outcast]
* [CloudPost]
* [Gig news]
* [LONCYN]
* [MP3 music news blog plugin]
* [last.fm Events on iPhone]
* [SoundCloud Dropbox Manager]
* [MakeMyMixtape]
* [Bass Race RjDj Scene]
* [7digital and Guardian news mashup]
* [YouLoop]
* [CitySounds.fm]
* [SpaceBass]
* [RFID objects with a taste in music]
* [Amenator]
* [Theremag]
* [ookoi_ShakeNRoll]
* [Soup.io SoundCloud import &amp; Radio alpha]
* [Bass Race RjDj Scene]
* [JAEZZESiZER]
</pre></description>
	</item>

	<item>
	  <title>Hacks</title>
	  <pubDate>Thu, 16 Jul 2009 14:17:19 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Hacks</link>
	  <description><pre id="diff"><ins>!!Winning Hacks
* [LonelyHarps] won 7digital prize
* [Music Zeitgeist] won BBC prize
* [iPhone Music Visualiser] won The Echo Nest prize
* [pythoniphication of SoundCloud API] won Gigulate prize
* [MusicBore] won Last.fm and Be Broadband Overall prize
* [trackmap] won Songkick prize
* [SoundCloud Playlist Sampler] won SoundCloud prize
* [Percussion Machine] won RjDj and Tinker it! prize

!! Other Hacks</ins>
* [TrippyAudioWaves]
<del>* [Percussion Machine]
* [MusicBore]</del>
* [Music Feeds]
* [Record Label Website and Data Access]
* [Cantarino]
* [Danzen Party MIX!!!]
* [iPhone Music Visualiser]
<del>* [Music Zeitgeist]</del>
* [Pix n Mixer]
* [IRC Duckestra]
<del>* [LonelyHarps]
* [trackmap]</del>
* [BotTalk]
* [SoundCloud AS3 Wrapper]
* [TwinkleStarduino]
* [Music Price Comparison]
* [Outcast]
* [CloudPost]
* [Gig news]
* [LONCYN]
<del>* [SoundCloud playlist sampler]</del>
* [MP3 music news blog plugin]
* [last.fm Events on iPhone]
* [SoundCloud Dropbox Manager]
<del>* [pythoniphication of SoundCloud API]</del>
* [MakeMyMixtape]
* [Bass Race RjDj Scene]
* [7digital and Guardian news mashup]
* [YouLoop]
* [CitySounds.fm]
* [SpaceBass]
* [RFID objects with a taste in music]
* [Amenator]
* [Theremag]
* [ookoi_ShakeNRoll]
* [Soup.io SoundCloud import &amp; Radio alpha]
* [Bass Race RjDj Scene]
* [JAEZZESiZER]
</pre></description>
	</item>

	<item>
	  <title>pythoniphication of SoundCloud API</title>
	  <pubDate>Thu, 16 Jul 2009 07:53:40 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=pythoniphication+of+SoundCloud+API</link>
	  <description><pre id="diff"><del>A brief explanation the improvements made to the python wrapper of the soundcloud API by  Ben</del><ins>!!Creators
* Ben</ins> Fields

<del>This will be followed by a run down</del><ins>!!About the hack
Improvements made to the [python wrapper|http://github.com/soundcloud/python-api-wrapper/tree/master]</ins> of<ins> the soundcloud API in order to facilitate ''follower following''.  This enabled</ins> efforts to build a <del>Complex Network</del><ins>[Complex Network|http://en.wikipedia.org/wiki/Complex_network]</ins> representation of the SoundCloud users network.<ins>  Due to time constraints, I was unable to capture the entire network, however a reasonably representative sample was captured.  This sample was then run through the [lanet|http://xavier.informatics.indiana.edu/lanet-vi/] k-core decomposition process to visualize the community structure of SoundClouds users.  Further details of the process behind the hack :
[http://stuffalsothings.blogspot.com/2009/07/musichackday.html]
Source Code:
[http://github.com/gearmonkey/pySomethingClever/tree]

Also thanks to [Kurt Jacobson|http://kurtisrandom.blogspot.com/] for assistance on the visualization.

!!Why did you create it?

The visualization of soundcloud as a complex network is just the first step.  With a full capture of the network, various playlist generation and music recommendation tools can also be build, perhaps with the use of echonest tools.

!!Presenting?

yes

!!API's/tools used:

* soundcloud, via python
* python 2.6
* [igraph|http://igraph.sourceforge.net/]
*  [lanet|http://xavier.informatics.indiana.edu/lanet-vi/]

!!Screenshots, photos or videos
{html}&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://doc.gold.ac.uk/~map01bf/scratch/bensgraph.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;&quot; src=&quot;http://doc.gold.ac.uk/~map01bf/scratch/bensgraph.png&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;{/html}</ins>
</pre></description>
	</item>

	<item>
	  <title>Hacks</title>
	  <pubDate>Wed, 15 Jul 2009 06:56:07 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Hacks</link>
	  <description><pre id="diff">* [TrippyAudioWaves]
* [Percussion Machine]
* [MusicBore]
* [Music Feeds]
* [Record Label Website and Data Access]
* [Cantarino]
* [Danzen Party MIX!!!]
* [iPhone Music Visualiser]
* [Music Zeitgeist]
* [Pix n Mixer]
* [IRC Duckestra]
* [LonelyHarps]
* [trackmap]
* [BotTalk]
* [SoundCloud AS3 Wrapper]
* [TwinkleStarduino]
* [Music Price Comparison]
* [Outcast]
* [CloudPost]
* [Gig news]
* [LONCYN]
* [SoundCloud playlist sampler]
* [MP3 music news blog plugin]
* [last.fm Events on iPhone]
* [SoundCloud Dropbox Manager]
* [pythoniphication of SoundCloud API]
* [MakeMyMixtape]
* [Bass Race RjDj Scene]
* [7digital and Guardian news mashup]
* [YouLoop]
* [CitySounds.fm]
* [SpaceBass]
* [RFID objects with a taste in music]
* [Amenator]
* [Theremag]
* [ookoi_ShakeNRoll]
* [Soup.io SoundCloud import &amp; Radio alpha]
* [Bass Race RjDj Scene]
<ins>* [JAEZZESiZER]</ins>
</pre></description>
	</item>

	<item>
	  <title>SoundCloud AS3 Wrapper</title>
	  <pubDate>Tue, 14 Jul 2009 15:59:16 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=SoundCloud+AS3+Wrapper</link>
	  <description><pre id="diff">!!Creators
*Edd Parris

!!About the hack
HERRO!
This is an ActionScript3 library for Flex that implements a wrapper for SoundCloud.com's API including its OAuth stuff, getting resources and sending files.

!!Why did you create it?
Because I meant to do this a long time ago but got the fear of flex

!!Presenting?
Hells yeahs

<del>API's/tools</del><ins>!!API's/tools</ins> used:
*Soundcloud API
*Flex

!!Files
*Git repository here: http://github.com/empika/SoundCloudWrapper_Flex_AS3/tree/master
</pre></description>
	</item>

	<item>
	  <title>Hacks</title>
	  <pubDate>Tue, 14 Jul 2009 07:54:15 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Hacks</link>
	  <description><pre id="diff">* [TrippyAudioWaves]
* [Percussion Machine]
* [MusicBore]
* [Music Feeds]
* [Record Label Website and Data Access]
* [Cantarino]
* [Danzen Party MIX!!!]
* [iPhone Music Visualiser]
* [Music Zeitgeist]
* [Pix n Mixer]
* [IRC Duckestra]
* [LonelyHarps]
* [trackmap]
* [BotTalk]
* [SoundCloud AS3 Wrapper]
* [TwinkleStarduino]
* [Music Price Comparison]
* [Outcast]
* [CloudPost]
* [Gig news]
* [LONCYN]
* [SoundCloud playlist sampler]
* [MP3 music news blog plugin]
* [last.fm Events on iPhone]
* [SoundCloud Dropbox Manager]
<ins>* [pythoniphication of SoundCloud API]</ins>
* [MakeMyMixtape]
* [Bass Race RjDj Scene]
* [7digital and Guardian news mashup]
* [YouLoop]
* [CitySounds.fm]
* [SpaceBass]
* [RFID objects with a taste in music]
* [Amenator]
* [Theremag]
* [ookoi_ShakeNRoll]
* [Soup.io SoundCloud import &amp; Radio alpha]
* [Bass Race RjDj Scene]
</pre></description>
	</item>

	<item>
	  <title>Amenator</title>
	  <pubDate>Tue, 14 Jul 2009 07:18:09 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Amenator</link>
	  <description><pre id="diff">!!Creators
*zen

!!About the hack
Plays without gaps any media file on the internet. Be it from your local server, a link to a blogpost, or even RSS feeds and data from API's. 

In this case clicking on the star brings up a searchbar that allow you to access all music in the SoundCloud. 

Visual synthesis is happening in realtime and offers events to listen to such as onBeat, as well as a visual markup language for drawing visualisers.

The media player also streams FLV and MP4 files so that with a bit of script-fu it could integrate directly with YouTube, mySpace, MTV etc.

There is also a javascript API for adding songs, requesting feeds, pause and play etc.

If you right click, you can hit the remix button - this simply adds a cut up amen break to all of the onBeat events - making your clean music dirty.

!!Why did you create it?
I wanted to show how one web-interface can play all manner of media in a fast, gapless way, regardless of where on the internet the media is located. It can be deployed on any website with just three lines of code and transforms all media file links automatically <del>become</del><ins>to active</ins> player buttons.

!!Presenting?
If 56 hours awake doesn't catch me first...
Check it out @ [http://shogunmedia.co.uk]

!!API's/tools used:
SoundCloud API
EchoNest API
AS3 / FlexSDK
PHP / JS (for passing files to the player)
</pre></description>
	</item>

	<item>
	  <title>Main page</title>
	  <pubDate>Tue, 14 Jul 2009 01:53:08 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Main+page</link>
	  <description><pre id="diff">{html}&lt;style type=&quot;text/css&quot;&gt;#page-title{display:none;}&lt;/style&gt;&lt;div class=&quot;big-quote&quot;&gt;Finally, a hack day based on the best industry to hack on, with the cleanest APIs and the most enjoyable content.&lt;/div&gt;&lt;ul class=&quot;big-navs&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/musichackday&quot; class=&quot;blue&quot;&gt;&lt;strong&gt;Google Group&lt;/strong&gt;&lt;br&gt;... to collaborate with other attendees&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/info/Hacks&quot; class=&quot;green&quot;&gt;&lt;strong&gt;Hacks&lt;/strong&gt;&lt;br&gt;... full list of hacks <del>done&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a</del><ins>done on the day&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a</ins> href=&quot;http://twitter.com/musichackday&quot; class=&quot;red&quot;&gt;&lt;strong&gt;Follow us&lt;/strong&gt;&lt;br&gt;... on twitter, updates over the weekend live&lt;/a&gt;&lt;/li&gt;&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;&lt;/ul&gt;{/html}

European music sites are revolutionising the music industry, not least with their eagerness to open up their data with APIs.

We will be running a Hack Day independent from, but working with the companies at the forefront of this movement. We hope you'll be able to join us....
</pre></description>
	</item>

	<item>
	  <title>Main page</title>
	  <pubDate>Tue, 14 Jul 2009 01:52:54 -0700</pubDate>
	  <link>http://musichackday.org/index.php?page=Main+page</link>
	  <description><pre id="diff">{html}&lt;style type=&quot;text/css&quot;&gt;#page-title{display:none;}&lt;/style&gt;&lt;div class=&quot;big-quote&quot;&gt;Finally, a hack day based on the best industry to hack on, with the cleanest APIs and the most enjoyable content.&lt;/div&gt;&lt;ul class=&quot;big-navs&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/musichackday&quot; class=&quot;blue&quot;&gt;&lt;strong&gt;Google Group&lt;/strong&gt;&lt;br&gt;... to collaborate with other attendees&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;/info/Hacks&quot; <del>class=&quot;green&quot;&gt;&lt;strong&gt;Submit hack&lt;/strong&gt;&lt;br&gt;... and a</del><ins>class=&quot;green&quot;&gt;&lt;strong&gt;Hacks&lt;/strong&gt;&lt;br&gt;... full</ins> list of <del>current hacks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a</del><ins>hacks done&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a</ins> href=&quot;http://twitter.com/musichackday&quot; class=&quot;red&quot;&gt;&lt;strong&gt;Follow us&lt;/strong&gt;&lt;br&gt;... on twitter, updates over the weekend live&lt;/a&gt;&lt;/li&gt;&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;&lt;/ul&gt;{/html}

European music sites are revolutionising the music industry, not least with their eagerness to open up their data with APIs.

We will be running a Hack Day independent from, but working with the companies at the forefront of this movement. We hope you'll be able to join us....
</pre></description>
	</item>

	<item>
	  <title>Hacks</title>
	  <pubDate>Tue, 14 Jul 2009 01:51:49 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Hacks</link>
	  <description><pre id="diff"><del>{html}&lt;a id=&quot;add-link&quot; href=&quot;/hacks.php?action=edit&quot; class=&quot;button float-right&quot; style=&quot;display:none;&quot;&gt;Add your hack&lt;/a&gt;{/html}
!!Current Hacks</del><ins>* [TrippyAudioWaves]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=TrippyAudioWaves&quot;&gt;TrippyAudioWaves&lt;/a&gt;{/html}</del><ins>[Percussion Machine]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Percussion+Machine&quot;&gt;Percussion Machine&lt;/a&gt;{/html}</del><ins>[MusicBore]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=MusicBore&quot;&gt;MusicBore&lt;/a&gt;{/html}</del><ins>[Music Feeds]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Music+Feeds&quot;&gt;Music Feeds&lt;/a&gt;{/html}
* {html}&lt;a href=&quot;/hacks.php?page=Record+Label+Website+and+Data+Access&quot;&gt;Record</del><ins>[Record</ins> Label Website and Data <del>Access&lt;/a&gt;{/html}</del><ins>Access]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Cantarino&quot;&gt;Cantarino&lt;/a&gt;{/html}</del><ins>[Cantarino]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Danzen+Party+MIX!!!&quot;&gt;Danzen</del><ins>[Danzen</ins> Party <del>MIX!!!&lt;/a&gt;{/html}</del><ins>MIX!!!]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=iPhone+Music+Visualiser&quot;&gt;iPhone</del><ins>[iPhone</ins> Music <del>Visualiser&lt;/a&gt;{/html}</del><ins>Visualiser]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Music+Zeitgeist&quot;&gt;Music Zeitgeist&lt;/a&gt;{/html}</del><ins>[Music Zeitgeist]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Pix+n+Mixer&quot;&gt;Pix</del><ins>[Pix</ins> n <del>Mixer&lt;/a&gt;{/html}</del><ins>Mixer]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=IRC+Duckestra&quot;&gt;IRC Duckestra&lt;/a&gt;{/html}</del><ins>[IRC Duckestra]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=LonelyHarps&quot;&gt;LonelyHarps&lt;/a&gt;{/html}</del><ins>[LonelyHarps]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=trackmap&quot;&gt;trackmap&lt;/a&gt;{/html}</del><ins>[trackmap]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=BotTalk&quot;&gt;BotTalk&lt;/a&gt;{/html}</del><ins>[BotTalk]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=SoundCloud+AS3+Wrapper&quot;&gt;SoundCloud</del><ins>[SoundCloud</ins> AS3 <del>Wrapper&lt;/a&gt;{/html}</del><ins>Wrapper]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=TwinkleStarduino&quot;&gt;TwinkleStarduino&lt;/a&gt;{/html}</del><ins>[TwinkleStarduino]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Music+Price+Comparison&quot;&gt;Music</del><ins>[Music</ins> Price <del>Comparison&lt;/a&gt;{/html}</del><ins>Comparison]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Outcast&quot;&gt;Outcast&lt;/a&gt;{/html}</del><ins>[Outcast]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=CloudPost&quot;&gt;CloudPost&lt;/a&gt;{/html}</del><ins>[CloudPost]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Gig+news&quot;&gt;Gig news&lt;/a&gt;{/html}</del><ins>[Gig news]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=LONCYN&quot;&gt;LONCYN&lt;/a&gt;{/html}</del><ins>[LONCYN]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=SoundCloud+playlist+sampler&quot;&gt;SoundCloud</del><ins>[SoundCloud</ins> playlist <del>sampler&lt;/a&gt;{/html}</del><ins>sampler]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=MP3+music+news+blog+plugin&quot;&gt;MP3</del><ins>[MP3</ins> music news blog <del>plugin&lt;/a&gt;{/html}</del><ins>plugin]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=last.fm+Events+on+iPhone&quot;&gt;last.fm</del><ins>[last.fm</ins> Events on <del>iPhone&lt;/a&gt;{/html}</del><ins>iPhone]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=SoundCloud+Dropbox+Manager&quot;&gt;SoundCloud</del><ins>[SoundCloud</ins> Dropbox <del>Manager&lt;/a&gt;{/html}</del><ins>Manager]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=MakeMyMixtape&quot;&gt;MakeMyMixtape&lt;/a&gt;{/html}</del><ins>[MakeMyMixtape]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=Bass+Race+RjDj+Scene&quot;&gt;Bass</del><ins>[Bass</ins> Race RjDj <del>Scene&lt;/a&gt;{/html}</del><ins>Scene]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=7digital+and+Guardian+news+mashup&quot;&gt;7digital</del><ins>[7digital</ins> and Guardian news <del>mashup&lt;/a&gt;{/html}</del><ins>mashup]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=YouLoop&quot;&gt;YouLoop&lt;/a&gt;{/html}</del><ins>[YouLoop]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=CitySounds.fm&quot;&gt;CitySounds.fm&lt;/a&gt;{/html}</del><ins>[CitySounds.fm]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=SpaceBass&quot;&gt;SpaceBass&lt;/a&gt;{/html}</del><ins>[SpaceBass]</ins>
* <del>{html}&lt;a href=&quot;/hacks.php?page=RFID+objects+with+a+taste+in+music&quot;&gt;RFID</del><ins>[RFID</ins> objects with a taste in <del>music&lt;/a&gt;{/html}

!!Hack instructions</del><ins>music]</ins>
* <del>In order to get around a small bugette in the LionWiki software we've had to add a random number to the &quot;Add your hack&quot; page. You can remove this number from the title of your hack</del><ins>[Amenator]</ins>
* <del>You need to add your hack to this wiki before 14:00 on Sunday 12th July 2009</del><ins>[Theremag]</ins>
* <del>There's a rough template on the {html}&lt;a href=&quot;/hacks.php?page=Example+Hack&quot;&gt;Example Hack&lt;/a&gt;{/html} page for reference as to what data is required</del><ins>[ookoi_ShakeNRoll]</ins>
* <del>If you need to upload a file use the {html}&lt;a href=&quot;/upload.php&quot; target=&quot;_blank&quot;&gt;upload file&lt;/a&gt;{/html} page</del><ins>[Soup.io SoundCloud import &amp; Radio alpha]</ins>
* <del>When you've added your project to the wiki, contact a MHD representative and we'll put it on the list above
{html}&lt;script type=&quot;text/javascript&quot;&gt;window.onload = function() {
document.getElementById(&quot;add-link&quot;).setAttribute('href', '/hacks.php?page=Enter+the+name+of+your+project+(' + Math.round( Math.random() * 100000 ) + ')');
document.getElementById(&quot;add-link&quot;).style.display='';
}&lt;/script&gt;{/html}</del><ins>[Bass Race RjDj Scene]</ins>
</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Mon, 13 Jul 2009 16:20:09 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">!! Creator - Rain Ashford http://rainycatz.wordpress.com

!! About the hack

I've been working with computational art for a number of years to create interactive artworks incorporating sound, so I was really excited when I discovered microproccessors for rapid prototyping. for this project I wanted to created a fine art textiles, interactitive sound artwork.

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

Lilypad arduino is a wearable form of the popular arduino microprocessor, it's connected/wired up by conductive thread. Using the arduino compiler the code is written in C on my Mac and then uploaded to the lilypad via a FTDI Basic Breakout - 3.3V board &amp; USB cable.

[http://musichackday.org/uploads/1247438924.jpg]

!! More about the sounds:

<del> * Uses</del><ins>Uses</ins> a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html<del>

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)</del>

!! Fiddly?
Yep - all the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


!! API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

!! More screenshots?
See http://www.flickr.com/photos/37996583811@N01/3710521183/

!! For a write up and documented code go to: http://rainycatz.wordpress.com/2009/07/13/musichackday-2009-my-hack-twinklestarduino/
</pre></description>
	</item>

	<item>
	  <title>Outcast</title>
	  <pubDate>Mon, 13 Jul 2009 16:09:14 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Outcast</link>
	  <description><pre id="diff">!!Creators
* [James Coglan|http://jcoglan.com]

!!About the hack
Outcast consists of a web service that exposes your iTunes library over HTTP, and a site where you can share your library with others over the web. People can connect to your library so that anything you play is broadcast to all your listeners.

See the end result at <del>http://outcast.jcoglan.com.</del><ins>http://outcast.jcoglan.com .</ins> Instructions for running an iTunes server will follow soon.

!!Why did you create it?
Some people in my office want music on in the room, others prefer silence/headphones. This way, several people can play music to each easily over a local network. You could also use it if you're having a party and have a big house and not many cables. Potentially the music could be controlled from any machine connected to the network. Aside from all that, I wanted to play with some Comet stuff I've been working on lately.

!!Presenting?
Yes

!!API's/tools used:
* iTunes server: Ruby, Rack, JSONP
* Sharing site: [Faye|http://github.com/jcoglan/faye] Comet server, [Ojay|http://ojay.othermedia.org] and [JS.Class|http://jsclass.jcoglan.com] JavaScript libraries
</pre></description>
	</item>

	<item>
	  <title>Outcast</title>
	  <pubDate>Mon, 13 Jul 2009 16:08:44 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Outcast</link>
	  <description><pre id="diff"><ins>!!Creators
* [James Coglan|http://jcoglan.com]

!!About the hack</ins>
Outcast consists of a web service that exposes your iTunes library over HTTP, and a site where you can share your library with others over the web. People can connect to your library so that anything you play is broadcast to all your listeners.

<del>http://outcast.jcoglan.com</del><ins>See the end result at http://outcast.jcoglan.com. Instructions for running an iTunes server will follow soon.

!!Why did you create it?
Some people in my office want music on in the room, others prefer silence/headphones. This way, several people can play music to each easily over a local network. You could also use it if you're having a party and have a big house and not many cables. Potentially the music could be controlled from any machine connected to the network. Aside from all that, I wanted to play with some Comet stuff I've been working on lately.

!!Presenting?
Yes

!!API's/tools used:
* iTunes server: Ruby, Rack, JSONP
* Sharing site: [Faye|http://github.com/jcoglan/faye] Comet server, [Ojay|http://ojay.othermedia.org] and [JS.Class|http://jsclass.jcoglan.com] JavaScript libraries</ins>
</pre></description>
	</item>

	<item>
	  <title>Amenator</title>
	  <pubDate>Mon, 13 Jul 2009 11:59:11 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Amenator</link>
	  <description><pre id="diff">!!Creators
*zen

!!About the hack
Plays without gaps any media file on the internet. Be it from your local server, a link to a blogpost, or even RSS feeds and data from API's. 

In this case clicking on the star brings up a searchbar that allow you to access all music in the SoundCloud. 

Visual synthesis is happening in realtime and offers events to listen to such as onBeat, as well as a visual markup language for drawing visualisers.

The media player also streams FLV and MP4 files so that with a bit of script-fu it could integrate directly with YouTube, mySpace, MTV etc.

There is also a javascript API for adding songs, requesting feeds, pause and play etc.

If you right click, you can hit the remix button - this simply adds a cut up amen break to all of the onBeat events - making your clean music dirty.

!!Why did you create it?
I wanted to show how one web-interface can play all manner of media in a fast, gapless way, regardless of where on the internet the media is located. It can be deployed on any website with just three lines of code and transforms all media file links automatically become player buttons.

!!Presenting?
If 56 hours awake doesn't catch me first...
Check it out @ <del>&lt;a href='http://shogunmedia.co.uk&quot;&gt;here&lt;/a&gt;</del><ins>[http://shogunmedia.co.uk]</ins>

!!API's/tools used:
SoundCloud API
EchoNest API
AS3 / FlexSDK
PHP / JS (for passing files to the player)
</pre></description>
	</item>

	<item>
	  <title>Amenator</title>
	  <pubDate>Mon, 13 Jul 2009 11:58:46 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Amenator</link>
	  <description><pre id="diff">!!Creators
*zen

!!About the hack
Plays without gaps any media file on the internet. Be it from your local server, a link to a blogpost, or even RSS feeds and data from API's. 

In this case clicking on the star brings up a searchbar that allow you to access all music in the SoundCloud. 

Visual synthesis is happening in realtime and offers events to listen to such as onBeat, as well as a visual markup language for drawing visualisers.

The media player also streams FLV and MP4 files so that with a bit of script-fu it could integrate directly with YouTube, mySpace, MTV etc.

There is also a javascript API for adding songs, requesting feeds, pause and play etc.

If you right click, you can hit the remix button - this simply adds a cut up amen break to all of the onBeat events - making your clean music dirty.

!!Why did you create it?
I wanted to show how one web-interface can play all manner of media in a fast, gapless way, regardless of where on the internet the media is located. It can be deployed on any website with just three lines of code and transforms all media file links automatically become player buttons.

!!Presenting?
If 56 hours awake doesn't catch me first...
Check it out @ <del>shogunmedia.co.uk</del><ins>&lt;a href='http://shogunmedia.co.uk&quot;&gt;here&lt;/a&gt;</ins>

!!API's/tools used:
SoundCloud API
EchoNest API
AS3 / FlexSDK
PHP / JS (for passing files to the player)
</pre></description>
	</item>

	<item>
	  <title>Amenator</title>
	  <pubDate>Mon, 13 Jul 2009 11:51:44 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Amenator</link>
	  <description><pre id="diff"><del>Plays without pausing any media file on the internet. Be it from your local server, a link to a blogpost, or even RSS feeds and IPTC. </del><ins>!!Creators
*zen</ins>

<del>Clicking</del><ins>!!About the hack
Plays without gaps any media file on the internet. Be it from your local server, a link to a blogpost, or even RSS feeds and data from API's. 

In this case clicking</ins> on the star brings up a searchbar that allow you to access all music in the SoundCloud. 

Visual synthesis is happening in realtime and offers events to listen to such as onBeat, as well as a visual markup language for drawing visualisers.

<del>If you right click, you can hit the remix button - this simply adds</del><ins>The media player also streams FLV and MP4 files so that with</ins> a <del>cut up amen break to all</del><ins>bit</ins> of <del>the onBeat events - making your clean music dirty.</del><ins>script-fu it could integrate directly with YouTube, mySpace, MTV etc.</ins>

<del>The media player</del><ins>There is</ins> also<del> streams FLV and MP4 files so that with</del> a <del>bit of scriptfu it can integrate directly with YouTube</del><ins>javascript API for adding songs, requesting feeds, pause and play</ins> etc.

<del>There is also a javascript API for adding songs, requesting feeds, pause and play etc, which means that with only three lines,</del><ins>If you right click,</ins> you<del> too</del> can <del>deploy</del><ins>hit</ins> the <del>media player on your site</del><ins>remix button</ins> - <del>where</del><ins>this simply adds a cut up amen break to</ins> all <del>media files automatically become active buttons.</del><ins>of the onBeat events - making your clean music dirty.</ins>

<ins>!!Why did you create it?
I wanted to show how one web-interface can play all manner of media in a fast, gapless way, regardless of where on the internet the media is located. It can be deployed on any website with just three lines of code and transforms all media file links automatically become player buttons.

!!Presenting?
If 56 hours awake doesn't catch me first...</ins>
Check it out @ shogunmedia.co.uk
<ins>
!!API's/tools used:
SoundCloud API
EchoNest API
AS3 / FlexSDK
PHP / JS (for passing files to the player)</ins>
</pre></description>
	</item>

	<item>
	  <title>SpaceBass</title>
	  <pubDate>Mon, 13 Jul 2009 09:59:45 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=SpaceBass</link>
	  <description><pre id="diff">A retro scrolling shooter where gameplay modifies music and music modifies gameplay in a glorious feedback <del>loop.</del><ins>loop:

http://murderdeathkitty.net/output/spacebass/


</ins>
</pre></description>
	</item>

	<item>
	  <title>Cantarino</title>
	  <pubDate>Mon, 13 Jul 2009 09:49:35 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Cantarino</link>
	  <description><pre id="diff">!!Creators
* Peter Knight

!!About the hack
This is a series of hacks:
* Hacking the Auduino synthesiser library to be a vocal tract model.
* Adding a library of speech sounds
* Building a sequencer to control the synthesiser parameters
No additional hardware is used on the Arduino. The sound on the video is coming straight from a pin on the Arduino.
Following the tradition in Arduino project names, Cantarino means little singer.

!!Why did you create it?
* With this library published, anyone will be able to synthesise speech and song on Arduino, with no additional hardware. I'd like to see what crazy things other people make from it.
* Why the track: Max Mathews programmed an IBM704 to sing Daisy Bell in 1962. This was the inspiration for HAL's song in 2001.<del> Max/MSP is named after Max Mathews.</del>
* Everyone knows giant robots need a voice. My plan for world domination takes one step forward.
<del>
!!Presenting?
Yes</del>

!!API's/tools used:
* Arduino IDE
* Arduino Duemilanove

!!Screenshots, photos or videos
<del>Video: [http://www.youtube.com/watch?v=CoHDCOw-Hco]
{html}&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/CoHDCOw-Hco&amp;hl=en&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/CoHDCOw-Hco&amp;hl=en&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;object width=&quot;400&quot; height=&quot;300&quot;&gt;&lt;param</del><ins>{html}&lt;object width=&quot;500&quot; height=&quot;375&quot;&gt;&lt;param</ins> name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;movie&quot; <del>value=&quot;http://vimeo.com/moogaloop.swf?clip_id=5560654&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot;</del><ins>value=&quot;http://vimeo.com/moogaloop.swf?clip_id=5577046&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&quot;</ins> /&gt;&lt;embed <del>src=&quot;http://vimeo.com/moogaloop.swf?clip_id=5560654&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot;</del><ins>src=&quot;http://vimeo.com/moogaloop.swf?clip_id=5577046&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1&quot;</ins> type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; <del>width=&quot;400&quot; height=&quot;300&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;&lt;a href=&quot;http://vimeo.com/5560654&quot;&gt;Daisy Bell - Tech demo on Arduino&lt;/a&gt; from &lt;a href=&quot;http://vimeo.com/user988264&quot;&gt;Peter Knight&lt;/a&gt; on &lt;a href=&quot;http://vimeo.com&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;{/html}
Pic: [http://www.flickr.com/photos/cathedrow/3712740062/]</del><ins>width=&quot;500&quot; height=&quot;375&quot;&gt;&lt;/embed&gt;&lt;/object&gt;{/html}</ins>

<del>!!Source</del><ins>!!Download</ins>
Source<ins> and documentation</ins> is <del>in SVN</del><ins>forming</ins> at [http://code.google.com/p/tinkerit]<del> . Documentation and formal release in the next few days.</del>
</pre></description>
	</item>

	<item>
	  <title>Theremag</title>
	  <pubDate>Mon, 13 Jul 2009 08:07:03 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Theremag</link>
	  <description><pre id="diff">!!Creators
* Jono Cole
* Jonty Wareing

!!About the hack
A theremin emulator running on an Android device using the built-in <del>Magnetometer</del><ins>magnetometer</ins> and a magnet for control.

Which was then subverted into pitch-bending Michael Jackson.

!!Why did you create it?
Because we wanted to create a musical instrument, and the magnetometer in the G1 is awesome.

!!Presenting?
Yes. (Three times, due to various amounts of device-killing fail)

!!API's/tools used:
* http://developer.android.com/index.html
* http://audacity.sourceforge.net/

!!Screenshots, photos or videos

Soon!

!!Source code

Soon! (We're really lazy)
</pre></description>
	</item>

	<item>
	  <title>Theremag</title>
	  <pubDate>Mon, 13 Jul 2009 07:23:01 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Theremag</link>
	  <description><pre id="diff">!!Creators
* Jono Cole
* Jonty Wareing

!!About the hack
A theremin emulator running on an Android device using the built-in Magnetometer and a magnet for control.

Which was then subverted into pitch-bending Michael Jackson.

!!Why did you create it?
Because we wanted to create a musical instrument, and the magnetometer in the G1 is awesome.

!!Presenting?
<del>Yes</del><ins>Yes. (Three times, due to various amounts of device-killing fail)</ins>

!!API's/tools used:
* http://developer.android.com/index.html
* http://audacity.sourceforge.net/

!!Screenshots, photos or videos

Soon!

!!Source code

Soon! (We're really lazy)
</pre></description>
	</item>

	<item>
	  <title>Theremag</title>
	  <pubDate>Mon, 13 Jul 2009 05:46:04 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Theremag</link>
	  <description><pre id="diff"><del>A</del><ins>!!Creators
* Jono Cole
* Jonty Wareing

!!About the hack
A</ins> theremin emulator running on an <del>android</del><ins>Android</ins> device using the built-in Magnetometer and a magnet for control.

Which was then subverted into pitch-bending Michael Jackson.

<del>Code</del><ins>!!Why did you create it?
Because we wanted to create a musical instrument,</ins> and <del>video coming soon, we're</del><ins>the magnetometer in the G1 is awesome.

!!Presenting?
Yes

!!API's/tools used:
* http://developer.android.com/index.html
* http://audacity.sourceforge.net/

!!Screenshots, photos or videos

Soon!

!!Source code

Soon! (We're</ins> really <del>lazy.</del><ins>lazy)</ins>
</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Mon, 13 Jul 2009 05:39:57 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">!! Creator - Rain Ashford<ins> http://rainycatz.wordpress.com</ins>

!! About the hack

I've been working with computational art for a number of years to create interactive artworks incorporating sound, so I was really excited when I discovered microproccessors for rapid prototyping. for this project I wanted to created a fine art textiles, interactitive sound artwork.

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

Lilypad arduino is a wearable form of the popular arduino microprocessor, it's connected/wired up by conductive thread. Using the arduino compiler the code is written in C on my Mac and then uploaded to the lilypad via a FTDI Basic Breakout - 3.3V board &amp; USB cable.

[http://musichackday.org/uploads/1247438924.jpg]

!! More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

!! Fiddly?
Yep - all the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


!! API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

!! More screenshots?
See http://www.flickr.com/photos/37996583811@N01/3710521183/

!!<del> Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 *</del> For a <del>chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of</del><ins>write up and documented</ins> code <del>first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}
</del><ins>go to: http://rainycatz.wordpress.com/2009/07/13/musichackday-2009-my-hack-twinklestarduino/</ins>
</pre></description>
	</item>

	<item>
	  <title>Enter the name of your project (41532)</title>
	  <pubDate>Mon, 13 Jul 2009 04:19:35 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Enter+the+name+of+your+project+%2841532%29</link>
	  <description><pre id="diff"></pre></description>
	</item>

	<item>
	  <title>Enter the name of your project (41532)</title>
	  <pubDate>Mon, 13 Jul 2009 04:19:19 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Enter+the+name+of+your+project+%2841532%29</link>
	  <description><pre id="diff"><ins>A theremin emulator running on an android device using the built-in Magnetometer and a magnet for control.

Which was then subverted into pitch-bending Michael Jackson.

Code and video coming soon, we're really lazy.</ins>
</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Mon, 13 Jul 2009 03:11:37 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">!! Creator - Rain Ashford

!! About the hack
<ins>
I've been working with computational art for a number of years to create interactive artworks incorporating sound, so I was really excited when I discovered microproccessors for rapid prototyping. for this project I wanted to created a fine art textiles, interactitive sound artwork.</ins>

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

Lilypad arduino is a wearable form of the popular arduino microprocessor, it's connected/wired up by conductive thread. Using the arduino compiler the code is written in C on my Mac and then uploaded to the lilypad via a FTDI Basic Breakout - 3.3V board &amp; USB cable.

[http://musichackday.org/uploads/1247438924.jpg]

!! More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

!! Fiddly?
Yep - all the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


!! API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

!! More screenshots?
See http://www.flickr.com/photos/37996583811@N01/3710521183/

!! Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>CloudPost</title>
	  <pubDate>Mon, 13 Jul 2009 03:02:11 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=CloudPost</link>
	  <description><pre id="diff">!!Creators
* App: Ullrich Schäfer
* Coffee: Alex L

!!About the hack
CloudPost is a cocoa based desktop uploader for SoundCloud. It integrates the users address-book &amp; allows fast private sharing of tracks. With our last minute hax0r extention it also allows users to save music directly from any music app (e.g. Garageband) directly yo soundcloud or a friend from their address-book.

!!Why did you create it?
To make the world a happier place by freeing the imprisoned sounds of your desktop with the help of the almighty cloud.

!!Presenting?
If you want

!!API's/tools used:
* SoundCloud API

!!Screenshots, photos or videos
<ins>
{html} &lt;object width=&quot;640&quot; height=&quot;400&quot;&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;movie&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=5561296&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=FF7700&amp;amp;fullscreen=1&quot; /&gt;&lt;embed src=&quot;http://vimeo.com/moogaloop.swf?clip_id=5561296&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=1&amp;amp;color=FF7700&amp;amp;fullscreen=1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; width=&quot;640&quot; height=&quot;400&quot;&gt;&lt;/embed&gt;&lt;/object&gt; {/html} 
</ins>
[http://musichackday.org/uploads/1247402041.png]
</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Sun, 12 Jul 2009 16:05:33 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">!! Creator - Rain Ashford

!! About the hack

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

Lilypad arduino is a wearable form of the popular arduino microprocessor, it's connected/wired up by conductive thread.<ins> Using the arduino compiler the code is written in C on my Mac and then uploaded to the lilypad via a FTDI Basic Breakout - 3.3V board &amp; USB cable.</ins>

[http://musichackday.org/uploads/1247438924.jpg]

!! More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

!! Fiddly?
Yep - all the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


!! API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

!! More screenshots?
See http://www.flickr.com/photos/37996583811@N01/3710521183/

!! Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Sun, 12 Jul 2009 16:01:44 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">!! Creator - Rain Ashford

!! About the hack

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)
<ins>
Lilypad arduino is a wearable form of the popular arduino microprocessor, it's connected/wired up by conductive thread.</ins>

[http://musichackday.org/uploads/1247438924.jpg]

!! More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

!! Fiddly?
Yep - all the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


!! API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

!! More screenshots?
See http://www.flickr.com/photos/37996583811@N01/3710521183/

!! Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Sun, 12 Jul 2009 15:59:50 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff"><del>Creator</del><ins>!! Creator - Rain Ashford</ins>

<del>    * Rain Ashford

About</del><ins>!! About</ins> the hack

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

[http://musichackday.org/uploads/1247438924.jpg]

<del>More</del><ins>!! More</ins> about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

<del>All</del><ins>!! Fiddly?
Yep - all</ins> the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


<del>API's/tools</del><ins>!! API's/tools</ins> used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

<del>Screenshots

http://www.flickr.com/photos/37996583811@N01/3710521183/</del><ins>!! More screenshots?
See http://www.flickr.com/photos/37996583811@N01/3710521183/</ins>

<del>Here's</del><ins>!! Here's</ins> the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Sun, 12 Jul 2009 15:54:05 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">Creator

    * Rain Ashford

About the hack

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

<ins>[http://musichackday.org/uploads/1247438924.jpg]</ins>

More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

All the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

Screenshots

http://www.flickr.com/photos/37996583811@N01/3710521183/

Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Sun, 12 Jul 2009 15:52:50 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">Creator

    * Rain Ashford

About the hack

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

<del>[http://lionwiki.0o.cz/1247438924.jpg]</del>

More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

All the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

Screenshots

http://www.flickr.com/photos/37996583811@N01/3710521183/

Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Sun, 12 Jul 2009 15:51:44 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">Creator

    * Rain Ashford

About the hack

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)

<del>[1247438924.jpg]</del><ins>[http://lionwiki.0o.cz/1247438924.jpg]</ins>

More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

All the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

Screenshots

http://www.flickr.com/photos/37996583811@N01/3710521183/

Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>TwinkleStarduino</title>
	  <pubDate>Sun, 12 Jul 2009 15:49:31 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=TwinkleStarduino</link>
	  <description><pre id="diff">Creator

    * Rain Ashford

About the hack

My original idea was to get a Twitter feed to sent tweets to an LCD screen to show tweets to Twinkle and trigger her to sing - BUT - I bought the wrong LCD screen which runs on 5v, when I needed the basic one that runs on 3.3v!

Soooo... I've got Twinkle singing with a buzzer and Lilypad arduino which is sending the buzzer note frequencies - to make things a bit more interesting I've added an accelerometer which changes the pitch of the note when you move Twinkle about - I've added a button so you can toggle between straight and bent pitch Twinkle :-)
<ins>
[1247438924.jpg]</ins>

More about the sounds:

 * Uses a LilyPad speaker module to produce simple musical notes.For a chart of the frequencies of different notes see: http://www.phy.mtu.edu/~suits/notefreqs.html

* A note in one octave is twice the frequency of the same note in the octave
below.  We define here the frequencies of the notes in octave 8.  To get notes in lower octaves, we just divide by two however many times.

There is an array of note frequencies.  Index the array essentially by note
letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just duplicated to make this indexing work.  The play() function below does all of this for you :)

All the components are connected by conductive thread - none of these must touch each other or you'll get a short circuit - which is a challenge in itself :-)


API's/tools used:

    * Sadly no APIs - see above
    * Lilypad arduino, buzzer, accelerometer, LEDs, conductive thread, felt, canvas.

Screenshots

http://www.flickr.com/photos/37996583811@N01/3710521183/

Here's the code - enjoy - love @rainycat xxx

/*
 *
 * Uses a LilyPad speaker module to produce simple musical notes
 * For a chart of the frequencies of different notes see:
 * http://www.phy.mtu.edu/~suits/notefreqs.html
 */

// 
// #include &quot;arduino.h&quot;  // only for testing compiling with g++

int ledPin = 13;        // LED is connected to digital pin 13
int speakerPin = 9;     // speaker connected to digital pin 9
int catseye1 = 5;       // cat's eye no1
int catseye2 = 12;      // cat's eye no2
int moveSensor = 3;     // analogue input for accelerometer
int buttonPin = 11;     // button input

// A note in one octave is twice the frequency of the same note in the octave
// below.  We define here the frequencies of the notes in octave 8.  To get
// notes in lower octaves, we just divide by two however many times.

#define NOTE_C8         4186
#define NOTE_CSHARP8    4434
#define NOTE_D8         4698
#define NOTE_DSHARP8    4978
#define NOTE_E8         5274
#define NOTE_F8         5587
#define NOTE_FSHARP8    5919
#define NOTE_G8         6271
#define NOTE_GSHARP8    6644
#define NOTE_A8         7040
#define NOTE_ASHARP8    7458
#define NOTE_B8         7902

// This is an array of note frequencies.  Index the array essentially by note
// letter multiplied by two (A = 0, B = 2, C = 4, etc.).  Add one to index for
// &quot;sharp&quot; note.  Where no sharp note exists, the natural note is just
// duplicated to make this indexing work.  The play() function below does all
// of this for you :)

int octave_notes[14] = {
	NOTE_A8, NOTE_ASHARP8,
	NOTE_B8, NOTE_B8,
	NOTE_C8, NOTE_CSHARP8,
	NOTE_D8, NOTE_DSHARP8,
	NOTE_E8, NOTE_E8,
	NOTE_F8, NOTE_FSHARP8,
	NOTE_G8, NOTE_GSHARP8,
};

// This variable tracks the current state of the eye LEDs.
int eyes;

// Arduino runs this bit of code first, then repeatedly calls loop() below.  So
// all initialisation of variables and setting of initial pin modes (input or
// output) can be done here.

void setup() {
	pinMode(ledPin, OUTPUT);        // sets the ledPin to be an output
	pinMode(speakerPin, OUTPUT);    // sets the speakerPin to be an output
	eyes = LOW;                     // initial state of cats eyes is LOW
	pinMode(catseye1, OUTPUT);      // sets the cats eye1 to be an output
	pinMode(catseye2, OUTPUT);      // sets the cats eye2 to be an output
	pinMode(buttonPin, INPUT);      // sets the cats eye2 to be an output
//        Serial.begin(9600);
}

// Arduino will run this over and over again once setup() is done.

void loop()
{
        read_accel();
	play_tune();    // call the play_tune() function
	delay(2000);    // delay for 2 seconds
}

// -------------------------------------------------------------------------

// A function to toggle the cat's eyes on and off.
void flash_eyes()
{
	// Invert the desired state of the cat's eyes:
	if (eyes == LOW) {
		eyes = HIGH;
	} else {
		eyes = LOW;
	}

	// Write the new value to all the LED pins:
	digitalWrite(ledPin, eyes);
	digitalWrite(catseye1, eyes);
	digitalWrite(catseye2, eyes);
}

// -------------------------------------------------------------------------

// Read accelerometer
int read_accel()
{
  static int last_accel = 0;
  int in = analogRead(moveSensor);
  int diff = last_accel - in;
  last_accel = in;
//  Serial.println(diff);
  if (diff &lt; -5 || diff &gt; 5) {
    return diff;
  }
  return 0;
}

// To produce a tone, this function toggles the speaker output pin at the
// desired frequency (in Hz).  It calculates how many times to do this to
// produce a note of the desired length (in milliseconds).

void beep(unsigned char speakerPin, int frequency, long duration)
{

	int i;
	long delayAmount = (long)(1000000/frequency);
	long loopTime = (long)((duration*1000)/(delayAmount*2));

        int accel_diff = 0;
        int button_in = digitalRead(buttonPin);
	for (i = 0; i &lt; loopTime; i++) {
                if (button_in == HIGH &amp;&amp; (i &amp; 31) == 0) {              
                  accel_diff = read_accel();
                }
  		digitalWrite(speakerPin, HIGH);
		delayMicroseconds(delayAmount + accel_diff);
		digitalWrite(speakerPin, LOW);
		delayMicroseconds(delayAmount + accel_diff);
	}
}

void play(unsigned char speakerPin, const char *note, long duration)
{
        int octave_number = 4;  // default to octave 4
	int i = 0;

	// Check for valid note letter
	if (note[i] &gt;= 'A' &amp;&amp; note[i] &lt;= 'G') {
		// Calculate index into octave_notes[]
		int note_index = (note[i] - 'A') * 2;
		i++;
		// Check for sharp sign
		if (note[i] == '#') {
			note_index++;
			i++;
		}
		// Check for an octave number
		if (note[i] &gt;= '0' &amp;&amp; note[i] &lt;= '8') {
			octave_number = note[i] - '0';
			i++;
		}
		// Fetch the note frequency from the octave_notes[] table
		int frequency = octave_notes[note_index];

		// That will be the frequency for the note in octave 8, so we
		// need to divide it by two for each octave lower that we
		// actually want.

		// The '&gt;&gt;' operator is a useful shorthand that (for integers
		// &gt;= 0) basically translates to &quot;divide by two this many
		// times&quot;, so we will use that:

		frequency = frequency &gt;&gt; (8 - octave_number);

		// Actually play the note!
		beep(speakerPin, frequency, duration);
	}
}

void play_tune()
{
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// up
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -bove
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// world
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// so
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// high
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// like
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// a
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// dia-
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// -mond
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// in
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// the
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 1000);	// sky

	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// twin-
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 500);	// -kle
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// lit-
	flash_eyes(); play(speakerPin, &quot;A6&quot;, 500);	// -tle
	flash_eyes(); play(speakerPin, &quot;G6&quot;, 1000);	// star
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// how
	flash_eyes(); play(speakerPin, &quot;F6&quot;, 500);	// i
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// won-
	flash_eyes(); play(speakerPin, &quot;E6&quot;, 500);	// -der
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// what
	flash_eyes(); play(speakerPin, &quot;D6&quot;, 500);	// you
	flash_eyes(); play(speakerPin, &quot;C6&quot;, 1000);	// are

}

</pre></description>
	</item>

	<item>
	  <title>Pix n Mixer</title>
	  <pubDate>Sun, 12 Jul 2009 15:29:30 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Pix+n+Mixer</link>
	  <description><pre id="diff">!!Creators
* Daniel Morris
* Neville Daniel
* Help from Adam Lindsay / The Echo Nest

!!About the hack
Beatmatches 3 songs, specificed from the local hard disk, splits them into their component bars. Then you can preview and pick bars you like and assemble them into sequence using a web front end, and hear them back as MP3.

Allows a user to combine their favourite bars from different music songs into a single coherent audio file.  Python beatmatches track', creates audio file for each bar remixes tracks together.

Simple rack web app with ajax/json goodness to tie it all together!

!!Why did you create it?
<del>Because we want</del><ins>We wanted</ins> to make awesome remixes that sound good as easily as possible!

!!Presenting?
Yes

!!API's/tools used:
* EchoNest Remix SDK
* Ruby / Rack
* JQuery / singlemp3player

!!Screenshot
[http://img.skitch.com/20090712-mbaqyytu68reia2a9eq1b9yiap.tif]

!!Video
[http://www.youtube.com/watch?v=YD2coTyrASI]
</pre></description>
	</item>

	<item>
	  <title>Pix n Mixer</title>
	  <pubDate>Sun, 12 Jul 2009 15:28:55 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Pix+n+Mixer</link>
	  <description><pre id="diff">!!Creators
* Daniel Morris
* Neville Daniel
* Help from Adam Lindsay / The Echo Nest

!!About the hack
Beatmatches 3 songs, specificed from the local hard disk, splits them into their component bars. Then you can preview and pick bars you like and assemble them into sequence using a web front end, and hear them back as MP3.

Allows a user to combine their favourite bars from different music songs into a single coherent audio file.  Python beatmatches track', creates audio file for each bar remixes tracks together.

Simple rack web app with ajax/json goodness to tie it all together!

!!Why did you create it?
Because we <del>wanted</del><ins>want</ins> to make awesome remixes <del>semi programatically :P</del><ins>that sound good as easily as possible!</ins>

!!Presenting?
Yes

!!API's/tools used:
* EchoNest Remix SDK
* Ruby / Rack
* JQuery / singlemp3player

!!Screenshot
[http://img.skitch.com/20090712-mbaqyytu68reia2a9eq1b9yiap.tif]

!!Video
[http://www.youtube.com/watch?v=YD2coTyrASI]
</pre></description>
	</item>

	<item>
	  <title>Pix n Mixer</title>
	  <pubDate>Sun, 12 Jul 2009 15:27:53 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Pix+n+Mixer</link>
	  <description><pre id="diff">!!Creators
* Daniel Morris
* Neville Daniel
* Help from Adam Lindsay / The Echo Nest

!!About the hack
Beatmatches 3 songs, specificed from the local hard disk, splits them into their component bars. Then you can preview and pick bars you like and assemble them into sequence using a web front end, and hear them back as MP3.

Allows a user to combine their favourite bars from different music songs into a single coherent audio file.  Python beatmatches track', creates audio file for each bar remixes tracks together.

Simple rack web app with ajax/json goodness to tie it all together!

!!Why did you create it?
Because we wanted to make awesome remixes semi programatically :P

!!Presenting?
Yes

!!API's/tools used:
* EchoNest Remix SDK
* Ruby / Rack
* JQuery / singlemp3player

<del>!!Screenshots, photos or videos</del><ins>!!Screenshot</ins>
[http://img.skitch.com/20090712-mbaqyytu68reia2a9eq1b9yiap.tif]
<ins>
!!Video
[http://www.youtube.com/watch?v=YD2coTyrASI]</ins>
</pre></description>
	</item>

	<item>
	  <title>MakeMyMixtape</title>
	  <pubDate>Sun, 12 Jul 2009 15:11:14 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=MakeMyMixtape</link>
	  <description><pre id="diff">[http://www.makemymixtape.com/1234.png]


!!Creators
* Matt Jeffery
* Jameel Syed
* Greg Mead
(musicmetric)

!!About the hack
Tell us your favourite genre and we return a pre-mixed audio file featuring the top artists for that genre.

!!Why did you create it?
Useful for quickly making a mix CD. Ideal for parties or mp3 players where internet access might not be available for standard streaming music sites.<ins> It still a bit of a novice DJ - but it's learning...</ins>

!!Presenting?
Yes

!!API's/tools used:
*Last.fm
*echonest

!!URL
http://www.MakeMyMixtape.com
</pre></description>
	</item>

	<item>
	  <title>MakeMyMixtape</title>
	  <pubDate>Sun, 12 Jul 2009 15:10:37 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=MakeMyMixtape</link>
	  <description><pre id="diff">[http://www.makemymixtape.com/1234.png]


!!Creators
* Matt Jeffery
* Jameel Syed
* Greg Mead
(musicmetric)

!!About the hack
Tell us your favourite genre and we return a pre-mixed audio file featuring the top artists for that genre.

!!Why did you create it?
Useful for quickly making a mix CD. Ideal for parties or mp3 players where internet access might not be available for standard streaming music sites.

!!Presenting?
Yes

!!API's/tools used:
*Last.fm
*echonest

!!URL
<del>www.MakeMyMixtape.com</del><ins>http://www.MakeMyMixtape.com</ins>
</pre></description>
	</item>

	<item>
	  <title>Music Zeitgeist</title>
	  <pubDate>Sun, 12 Jul 2009 14:36:21 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=Music+Zeitgeist</link>
	  <description><pre id="diff">!!Creator
* Cristiano Betta

!!About the hack
Wordle visualisation of the music lyrics for the last 6 decades. Out of necessity I had to build my own API on top of EveryHit.com.

!!Why did you create it?
Because I was wondering if it's possible to display the musical culture shifts from decade to decade in an other way than through the top charts.

!!Presenting?
Yes

!!API's/tools used:
* Build my own EveryHit.com API
* Used LyricsWiki API
* Wordle.net

!!ToDos
* Probably interesting to convert my EveryHit API into a SPARQL endpoint.

<del>!!Links</del><ins>!!Link</ins>
* <del>[http://blog.cristianobetta.com] for updates and eventual release</del><ins>[http://zeitgeist.cristianobetta.com] </ins>
</pre></description>
	</item>

	<item>
	  <title>ookoi_ShakeNRoll</title>
	  <pubDate>Sun, 12 Jul 2009 14:09:24 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=ookoi_ShakeNRoll</link>
	  <description><pre id="diff"> ...RjDj-scene, hacked from scratch by the ookoi during the Music Hack Day, 11 + 12 july 2009, at the Guardian Offices, London UK ... thanks to Florian Waldner  and Frank Barknecht ... 

Shake your iPhone to move from track to track ... Roll to balance the sounds' volume ... Download the scene on your iPhone's Safari from http://rjdj.me/sharescene/ookoi-shakenroll/

 <del>Visit</del><ins>Learn about the</ins> ookoi @ http://ookoi.nl and keep track @ http://soundblog.net

[http://www.park.nl/digidivi/img/ookoiear.gif] 


</pre></description>
	</item>

	<item>
	  <title>ookoi_ShakeNRoll</title>
	  <pubDate>Sun, 12 Jul 2009 12:56:58 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=ookoi_ShakeNRoll</link>
	  <description><pre id="diff"> <del>... Hacked</del><ins>...RjDj-scene, hacked from scratch</ins> by the ookoi during the Music Hack Day, 11 + 12 july 2009, at the Guardian Offices, London UK ... thanks to Florian Waldner  and Frank Barknecht ... 

Shake your iPhone to move from track to track ... Roll to balance the sounds' volume ... Download the scene on your iPhone's Safari from http://rjdj.me/sharescene/ookoi-shakenroll/

 Visit ookoi @ http://ookoi.nl and keep track @ http://soundblog.net

[http://www.park.nl/digidivi/img/ookoiear.gif] 


</pre></description>
	</item>

	<item>
	  <title>ookoi_ShakeNRoll</title>
	  <pubDate>Sun, 12 Jul 2009 12:38:42 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=ookoi_ShakeNRoll</link>
	  <description><pre id="diff"><del>ookoi's &quot;Shake 'n' Roll&quot;

 ...</del><ins> ...</ins> Hacked by<ins> the</ins> ookoi during the Music Hack Day, 11 + 12 july 2009, at the Guardian Offices, London UK ... thanks to Florian Waldner  and Frank Barknecht ... 

Shake your iPhone to move from track to track ... Roll to balance the sounds' volume ... Download the scene on your iPhone's Safari from http://rjdj.me/sharescene/ookoi-shakenroll/

 Visit ookoi @ http://ookoi.nl and keep track @ http://soundblog.net

[http://www.park.nl/digidivi/img/ookoiear.gif] 


</pre></description>
	</item>

	<item>
	  <title>ookoi_ShakeNRoll</title>
	  <pubDate>Sun, 12 Jul 2009 12:38:13 -0700</pubDate>
	  <link>http://musichackday.org/hacks.php?page=ookoi_ShakeNRoll</link>
	  <description><pre id="diff">ookoi's &quot;Shake 'n' Roll&quot;<del> ...</del><ins>

 ...</ins> Hacked by ookoi during the Music Hack Day, 11 + 12 july 2009, at the Guardian Offices, London UK ... thanks to Florian Waldner  and Frank Barknecht ... <del>Shake</del><ins>

Shake</ins> your iPhone to move from track to track ... Roll to balance the sounds' volume ... <del>Visit</del><ins>Download the scene on your iPhone's Safari from http://rjdj.me/sharescene/ookoi-shakenroll/

 Visit</ins> ookoi @ http://ookoi.nl and keep track @ http://soundblog.net

[http://www.park.nl/digidivi/img/ookoiear.gif] 


</pre></description>
	</item>
</channel>
</rss>