<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Constellations</title>
	<atom:link href="http://constellations.cc/feed/" rel="self" type="application/rss+xml" />
	<link>http://constellations.cc</link>
	<description></description>
	<lastBuildDate>Sun, 04 Oct 2009 21:35:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Out in the Wild</title>
		<link>http://constellations.cc/2009/10/04/out-in-the-wild/</link>
		<comments>http://constellations.cc/2009/10/04/out-in-the-wild/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 21:35:01 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://constellations.cc/?p=52</guid>
		<description><![CDATA[Add-on number 1709, the sound of me pleading desperately for help.]]></description>
			<content:encoded><![CDATA[<p><a href="http://addons.songbirdnest.com/addon/1709">Add-on number 1709</a>, the sound of me pleading desperately for help.</p>
]]></content:encoded>
			<wfw:commentRss>http://constellations.cc/2009/10/04/out-in-the-wild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unexpectedly Rapid Progress</title>
		<link>http://constellations.cc/2009/05/31/unexpectedly-rapid-progress/</link>
		<comments>http://constellations.cc/2009/05/31/unexpectedly-rapid-progress/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 02:24:33 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://constellations.cc/?p=49</guid>
		<description><![CDATA[I&#8217;ve almost reached Milestone viii. It&#8217;s kind of hard to believe. One thing that I know I&#8217;ll need is some kind of JavaScript library that can take as input an asymmetrical (dis)similarity matrix and return coordinates on a plane for each member of that matrix, in order to visually arrange artists by similarity using Last.fm&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve almost reached <a href="/roadmap">Milestone viii</a>.  It&#8217;s kind of hard to believe.</p>
<p>One thing that I know I&#8217;ll need is some kind of JavaScript library that can take as input an asymmetrical (dis)similarity matrix and return coordinates on a plane for each member of that matrix, in order to visually arrange artists by similarity using Last.fm&#8217;s data.  I&#8217;m not really sure such a thing exists.</p>
]]></content:encoded>
			<wfw:commentRss>http://constellations.cc/2009/05/31/unexpectedly-rapid-progress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting a library-wide total playCount for a given artist</title>
		<link>http://constellations.cc/2009/05/29/getting-a-library-wide-total-playcount-for-a-given-artist/</link>
		<comments>http://constellations.cc/2009/05/29/getting-a-library-wide-total-playcount-for-a-given-artist/#comments</comments>
		<pubDate>Fri, 29 May 2009 23:58:30 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Milestone ii]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[media-page.js]]></category>
		<category><![CDATA[sbIMediaList]]></category>

		<guid isPermaLink="false">http://constellations.cc/?p=41</guid>
		<description><![CDATA[12345678910var destroyerPlays = LibraryUtils.mainLibrary.getItemsByProperty&#40;SBProperties.artistName,&#34;Destroyer&#34;&#41;; var destroyerPlaysNames = destroyerPlays.enumerate&#40;&#41;; destroyerPlayCounts = 0; while &#40;destroyerPlaysNames.hasMoreElements&#40;&#41;&#41; &#123; &#160; var thesePlayCounts = destroyerPlaysNames.getNext&#40;&#41;; &#160; if &#40;thesePlayCounts.getProperty&#40;SBProperties.playCount&#41;&#62;0&#41; &#123; &#160; &#160; destroyerPlayCounts = destroyerPlayCounts + parseInt&#40;thesePlayCounts.getProperty&#40;SBProperties.playCount&#41;&#41;; &#160; &#125;; &#125; alert &#40; destroyerPlayCounts &#41;; I know my variable names suck right now. I know. This took two and a half hours of [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container javascript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> destroyerPlays <span style="color: #339933;">=</span> LibraryUtils.<span style="color: #660066;">mainLibrary</span>.<span style="color: #660066;">getItemsByProperty</span><span style="color: #009900;">&#40;</span>SBProperties.<span style="color: #660066;">artistName</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;Destroyer&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> destroyerPlaysNames <span style="color: #339933;">=</span> destroyerPlays.<span style="color: #660066;">enumerate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
destroyerPlayCounts <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>destroyerPlaysNames.<span style="color: #660066;">hasMoreElements</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #003366; font-weight: bold;">var</span> thesePlayCounts <span style="color: #339933;">=</span> destroyerPlaysNames.<span style="color: #660066;">getNext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>thesePlayCounts.<span style="color: #660066;">getProperty</span><span style="color: #009900;">&#40;</span>SBProperties.<span style="color: #660066;">playCount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; destroyerPlayCounts <span style="color: #339933;">=</span> destroyerPlayCounts <span style="color: #339933;">+</span> parseInt<span style="color: #009900;">&#40;</span>thesePlayCounts.<span style="color: #660066;">getProperty</span><span style="color: #009900;">&#40;</span>SBProperties.<span style="color: #660066;">playCount</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000066;">alert</span> <span style="color: #009900;">&#40;</span> destroyerPlayCounts <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>I know my variable names suck right now.  I know.  This took two and a half hours of mucking around aimlessly before it worked.  That it works is what&#8217;s important.</p>
<p>My question is, doesn&#8217;t line 1 define <tt>destroyerPlays</tt> as a <tt><a href="http://developer.songbirdnest.com/documentation/trunk/sdkapi/interfacesb_i_media_list.html">sbIMediaList</a></tt> object?  Then why aren&#8217;t some of the <tt>sbIMediaList</tt> methods available to it?  And what is that <tt>enumerate</tt> method?  I couldn&#8217;t even find any documentation on it.  Apparently it takes no arguments and returns an <em>actual</em> <tt>sbIMediaList</tt>.</p>
<p>And why is <tt>SBProperties.playCount</tt> a string rather than an integer?</p>
]]></content:encoded>
			<wfw:commentRss>http://constellations.cc/2009/05/29/getting-a-library-wide-total-playcount-for-a-given-artist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Milestone i before the end of the month?</title>
		<link>http://constellations.cc/2009/05/29/milestone-i-before-the-end-of-the-month/</link>
		<comments>http://constellations.cc/2009/05/29/milestone-i-before-the-end-of-the-month/#comments</comments>
		<pubDate>Fri, 29 May 2009 05:18:03 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Milestone i]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[media-page.js]]></category>

		<guid isPermaLink="false">http://constellations.cc/?p=38</guid>
		<description><![CDATA[It&#8217;s not unlikely. 123456var artistNames = this._mediaListView.getDistinctValuesForProperty&#40;SBProperties.artistName&#41;; while &#40;artistNames.hasMore&#40;&#41;&#41; &#123; var someArtistName = document.createElement&#40;'label'&#41;; someArtistName.setAttribute&#40;'value',artistNames.getNext&#40;&#41;&#41;; var mediaViewBox = document.getElementById&#40;&#34;artistcloud-media-page-box&#34;&#41;; mediaViewBox.appendChild&#40;someArtistName&#41;; &#125;]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not <em>un</em>likely.</p>
<div class="codecolorer-container javascript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> artistNames <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>._mediaListView.<span style="color: #660066;">getDistinctValuesForProperty</span><span style="color: #009900;">&#40;</span>SBProperties.<span style="color: #660066;">artistName</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>artistNames.<span style="color: #660066;">hasMore</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> someArtistName <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'label'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
someArtistName.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'value'</span><span style="color: #339933;">,</span>artistNames.<span style="color: #660066;">getNext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> mediaViewBox <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;artistcloud-media-page-box&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> mediaViewBox.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>someArtistName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://constellations.cc/2009/05/29/milestone-i-before-the-end-of-the-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progress??  Impossible.</title>
		<link>http://constellations.cc/2009/05/28/progress-impossible/</link>
		<comments>http://constellations.cc/2009/05/28/progress-impossible/#comments</comments>
		<pubDate>Thu, 28 May 2009 22:43:24 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Milestone i]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[media-page.js]]></category>

		<guid isPermaLink="false">http://constellations.cc/?p=30</guid>
		<description><![CDATA[123456for&#40;var i=0;i&#60;=10000;i++&#41; &#123; &#160; if&#40;!this._mediaListView.getItemByIndex&#40;i&#41;&#41; break; &#160; var randArtist = document.createElement&#40;'label'&#41;; &#160; randArtist.setAttribute&#40;'value', this._mediaListView.getItemByIndex&#40;i&#41;.getProperty&#40;SBProperties.artistName&#41;&#41;; &#160; var mediaViewBox = document.getElementById&#40;&#34;artistcloud-media-page-box&#34;&#41;; mediaViewBox.appendChild&#40;randArtist&#41;; &#125; This code successfully lists all the artists in the current media list! Granted, they are heavily duplicated, because it lists the artist for each item in the list. And the Media View is not [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container javascript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;=</span><span style="color: #CC0000;">10000</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000066; font-weight: bold;">this</span>._mediaListView.<span style="color: #660066;">getItemByIndex</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #003366; font-weight: bold;">var</span> randArtist <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'label'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; randArtist.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'value'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>._mediaListView.<span style="color: #660066;">getItemByIndex</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getProperty</span><span style="color: #009900;">&#40;</span>SBProperties.<span style="color: #660066;">artistName</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #003366; font-weight: bold;">var</span> mediaViewBox <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;artistcloud-media-page-box&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> mediaViewBox.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>randArtist<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>This code successfully lists all the artists in the current media list!  Granted, they are heavily duplicated, because it lists the artist for each item in the list.  And the Media View is not scrollable (probably need to set <tt>overflow: auto</tt> in some CSS?).  And there is probably a much more efficient way to get this list.  And it makes the media list itself disappear.  And 10000 is a totally arbitrary number.  But it&#8217;s something.  (Is it obvious that I grew up on BASIC?)</p>
<p>How can I get a count of the number of items in <tt>this._mediaListView</tt>?</p>
]]></content:encoded>
			<wfw:commentRss>http://constellations.cc/2009/05/28/progress-impossible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The First Feeble Steps</title>
		<link>http://constellations.cc/2009/05/27/the-first-feeble-steps/</link>
		<comments>http://constellations.cc/2009/05/27/the-first-feeble-steps/#comments</comments>
		<pubDate>Thu, 28 May 2009 01:04:46 +0000</pubDate>
		<dc:creator>Jay</dc:creator>
				<category><![CDATA[Milestone i]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[media-page.js]]></category>

		<guid isPermaLink="false">http://constellations.cc/?p=5</guid>
		<description><![CDATA[123var randArtist = document.createElement&#40;'label'&#41;; randArtist.setAttribute&#40;'value', this._mediaListView.getItemByIndex&#40;287&#41;.getProperty&#40;SBProperties.artistName&#41;&#41;; var mediaViewBox = document.getElementById&#40;&#34;artistcloud-media-page-box&#34;&#41;; mediaViewBox.appendChild&#40;randArtist&#41;; I found this block of code that I created some time ago to perform the simple task of grabbing an artist name &#8212; any artist name &#8212; from the media library and displaying it in the Media View. It works, though I&#8217;m not quite [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container javascript mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> randArtist <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'label'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
randArtist.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'value'</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span>._mediaListView.<span style="color: #660066;">getItemByIndex</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">287</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getProperty</span><span style="color: #009900;">&#40;</span>SBProperties.<span style="color: #660066;">artistName</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> mediaViewBox <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;artistcloud-media-page-box&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> mediaViewBox.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>randArtist<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>I found this block of code that I created some time ago to perform the simple task of grabbing an artist name &#8212; any artist name &#8212; from the media library and displaying it in the Media View.  It works, though I&#8217;m not quite sure how.</p>
<p>Also am taking a look at <a href="http://wiki.songbirdnest.com/Developer/Recipe_Book/Extensions_and_Core/Media_Library/Enumerating_a_Library_or_List">this article</a>, since it seems able to get me closer to my <a href="/roadmap">first milestone</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://constellations.cc/2009/05/27/the-first-feeble-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

