<?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>WinSoft.se</title>
	<atom:link href="http://www.winsoft.se/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.winsoft.se</link>
	<description>Development with focus on Visual Basic .NET</description>
	<lastBuildDate>Sat, 05 May 2012 10:27:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Roland&#8217;s Ratrace (track 2)</title>
		<link>http://www.winsoft.se/2012/05/rolands-ratrace-track-2/</link>
		<comments>http://www.winsoft.se/2012/05/rolands-ratrace-track-2/#comments</comments>
		<pubDate>Sat, 05 May 2012 10:27:08 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1905</guid>
		<description><![CDATA[Another C64 cover. Track 2 from Roland&#8217;s Ratrace by Martin Galway.]]></description>
			<content:encoded><![CDATA[<p>Another C64 cover. Track 2 from Roland&#8217;s Ratrace by Martin Galway.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/mbZa0PT3UG0" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/05/rolands-ratrace-track-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zoids by Rob Hubbard</title>
		<link>http://www.winsoft.se/2012/04/zoids-by-rob-hubbard/</link>
		<comments>http://www.winsoft.se/2012/04/zoids-by-rob-hubbard/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 21:02:54 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1901</guid>
		<description><![CDATA[A cover version of Zoids by Rob Hubbard.]]></description>
			<content:encoded><![CDATA[<p>A cover version of Zoids by Rob Hubbard.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/7YbLMBhGqpc" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/04/zoids-by-rob-hubbard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making music in Basic 7.0 part 5</title>
		<link>http://www.winsoft.se/2012/04/making-music-in-basic-7-0-part-5/</link>
		<comments>http://www.winsoft.se/2012/04/making-music-in-basic-7-0-part-5/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 17:39:27 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[C128]]></category>
		<category><![CDATA[SID Music]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1891</guid>
		<description><![CDATA[You can add pitch bending using the SOUND command. By itself, you cannot use envelopes, just flat sounds in any given pitch. The arguments are voice (1, 2 or 3), frequency (0 to 65535), duration (16 = one second), pitch bend direction (0 = up, 1 = down, 2 sine up and down), minimum frequency, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.winsoft.se/wp-content/uploads/music.jpg"><img class="alignright size-full wp-image-1856" title="Commodore 128 music" src="http://www.winsoft.se/wp-content/uploads/music.jpg" alt="" width="400" height="301" /></a>You can add pitch bending using the <strong>SOUND</strong> command. By itself, you cannot use envelopes, just flat sounds in any given pitch. The arguments are <strong>voice</strong> (1, 2 or 3), <strong>frequency</strong> (0 to 65535), <strong>duration</strong> (16 = one second), <strong>pitch bend direction</strong> (0 = up, 1 = down, 2 sine up and down), <strong>minimum frequency</strong>, <strong>pitch bend speed</strong>, <strong>waveform</strong> (0 = triangle, 1 = saw tooth, 2 = square, 3 = noise) and finally <strong>pulse width</strong> (if waveform is 2).</p>
<p>This will make a straight beep, that will play for two seconds:</p>
<pre>SOUND 1, 4000, 32</pre>
<p>And now for something completely different, a hysterical vibrato!</p>
<pre>SOUND 1, 5000, 32, 2, 3000, 800, 1</pre>
<p>To add an envelope to the sound, you use what you know on the <strong>PLAY</strong> command, and add the <strong>SOUND</strong> command immediatly before. Make sure you trigger them on the same voice.</p>
<p>Both the <strong>SOUND</strong> command and the <strong>PLAY</strong> command (in combination with the <strong>ENVELOPE</strong> command and the <strong>T</strong> synthesize control character) allows you to control the waveform that is being used. When combining them, <strong>PLAY</strong> decides, not <strong>SOUND</strong>. Type in this in your Commodore 128. You might want to reset your machine first, to set all parameters to default.</p>
<pre>10 SOUND 1, 5000, 32, 2, 3000, 800, 1
20 PLAY "V1T5C"</pre>
<p>Cool, right? <a href="http://www.winsoft.se/temp/combine.mp3" target="_blank">Click here to</a> listen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/04/making-music-in-basic-7-0-part-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.winsoft.se/temp/combine.mp3" length="9302" type="audio/mpeg" />
		</item>
		<item>
		<title>What&#8217;s all this then?</title>
		<link>http://www.winsoft.se/2012/04/whats-all-this-then/</link>
		<comments>http://www.winsoft.se/2012/04/whats-all-this-then/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 20:34:01 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Visual Basic 10]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1882</guid>
		<description><![CDATA[This might look strange to a C programmer: Dim I(10) As Integer Console.WriteLine(I.Length) Dim J(I.Length - 1) As Integer Console.Write(J.Length) This will give the output 11 and 11. The array named I has 11 elements because the last index (10) is given when the array is created. The array named J has 11 elements bacause [...]]]></description>
			<content:encoded><![CDATA[<p>This might look strange to a C programmer:</p>
<pre>Dim I(10) As Integer
Console.WriteLine(I.Length)
Dim J(I.Length - 1) As Integer
Console.Write(J.Length)</pre>
<p>This will give the output <strong>11</strong> and <strong>11</strong>. The array named <strong>I</strong> has 11 elements because the last index (10) is given when the array is created. The array named <strong>J</strong> has 11 elements bacause Length (11) &#8211; 1 equals 10, and a 0-based array with last element 10 gives you 11 elements. Confusing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/04/whats-all-this-then/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-related implicit type casting</title>
		<link>http://www.winsoft.se/2012/04/non-related-implicit-type-casting/</link>
		<comments>http://www.winsoft.se/2012/04/non-related-implicit-type-casting/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 15:38:53 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Visual Basic 10]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1884</guid>
		<description><![CDATA[As always, I use Visual Basic in strict mode. I have this function that expects a Foo array: Sub DoSomething(X() As Foo) Console.WriteLine(X.Length) End Sub What I&#8217;m showing here is true for single variables too, but I am showing this using arrays. This cannot be called using an Integer array as follows: DoSomething({1, 2, 3}) [...]]]></description>
			<content:encoded><![CDATA[<p>As always, I use Visual Basic in strict mode. I have this function that expects a Foo array:</p>
<pre>Sub DoSomething(X() As Foo)
   Console.WriteLine(X.Length)
End Sub</pre>
<p>What I&#8217;m showing here is true for single variables too, but I am showing this using arrays. This cannot be called using an Integer array as follows:</p>
<pre>DoSomething({1, 2, 3})</pre>
<p>Adding a Integer constructor to the Foo class does not help. However, you can add a widening operator to the Foo class, and define how an implicit conversion is done, like so:</p>
<pre>Public Class Foo

   Private mX As Integer

   Public Sub New(X As Integer)
      Me.mX = X
   End Sub

   <strong>Shared Widening Operator CType(X As Integer) As Foo
      Return New Foo(X)
   End Operator</strong>

End Class</pre>
<p>Now, both the above method call is accepted. And because this also works on arrays, this simple line constructs three Foo objects:</p>
<pre>Dim X() As Foo = {4, 5, 6}</pre>
<p>The equivalent with a single (non arrayed) object would look like this:</p>
<pre>Dim Y As Foo = 7</pre>
<p>The opposite to <strong>Widening</strong> is called <strong>Narrowing</strong> and is used to define explicit type casts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/04/non-related-implicit-type-casting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shadow of the Beast</title>
		<link>http://www.winsoft.se/2012/04/shadow-of-the-beast/</link>
		<comments>http://www.winsoft.se/2012/04/shadow-of-the-beast/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 18:29:51 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Geeky]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1879</guid>
		<description><![CDATA[The 1989 mega hit Shadow of the Beast, a run through of the different versions.]]></description>
			<content:encoded><![CDATA[<p>The 1989 mega hit <a href="http://en.wikipedia.org/wiki/Shadow_of_the_Beast" target="_blank">Shadow of the Beast</a>, a run through of the different versions.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/C3b4h-MUjGo" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/04/shadow-of-the-beast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rob Reid: The $8 billion iPod</title>
		<link>http://www.winsoft.se/2012/03/rob-reid-the-8-billion-ipod/</link>
		<comments>http://www.winsoft.se/2012/03/rob-reid-the-8-billion-ipod/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 13:10:30 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[Copyright]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1875</guid>
		<description><![CDATA[A new kind of science. Rob Reid talks about Copyright Math. Thanks, Klas Dahlén!]]></description>
			<content:encoded><![CDATA[<p>A new kind of science. Rob Reid talks about Copyright Math.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/GZadCj8O1-0" frameborder="0" allowfullscreen></iframe></p>
<p>Thanks, Klas Dahlén!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/03/rob-reid-the-8-billion-ipod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making music in Basic 7.0 part 4</title>
		<link>http://www.winsoft.se/2012/03/making-music-in-basic-7-0-part-4/</link>
		<comments>http://www.winsoft.se/2012/03/making-music-in-basic-7-0-part-4/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 12:40:20 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[C128]]></category>
		<category><![CDATA[SID Music]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1872</guid>
		<description><![CDATA[Apart from PLAY, the commands that are available for making sounds and music are TEMPO, ENVELOPE, SOUND and FILTER. TEMPO lets you control playback speed. The slowest is 1 and the fastest is 255. ENVELOPE lets you modify the ten predefined instruments. You set the instruments using the T control character (0 to 9). The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.winsoft.se/wp-content/uploads/music.jpg"><img class="alignright size-full wp-image-1856" title="Commodore 128 music" src="http://www.winsoft.se/wp-content/uploads/music.jpg" alt="" width="400" height="301" /></a>Apart from <strong>PLAY</strong>, the commands that are available for making sounds and music are <strong>TEMPO</strong>, <strong>ENVELOPE</strong>, <strong>SOUND</strong> and <strong>FILTER</strong>.</p>
<p><strong>TEMPO</strong> lets you control playback speed. The slowest is 1 and the fastest is 255.</p>
<p><strong>ENVELOPE</strong> lets you modify the ten predefined instruments. You set the instruments using the T control character (0 to 9). The arguments are:</p>
<p>- The instrument you want to overwrite (0 to 9)<br />
- Attack rate (0 to 15)<br />
- Decay rate (0 to 15)<br />
- Sustain level (0 to 15)<br />
- Release rate (0 to 15)<br />
- Waveform (0=triangle, 1=sawtooth, 2=square with adjustable pulse width, 3=noise, 4=ring modulation)<br />
- Pulse width (0 to 4095) &#8211; only relevant if waveform is set to 2.</p>
<p>This program creates 5 similar instruments that differ in pulse width, and uses them in a simple riff.</p>
<pre>10 ENVELOPE 0,0,5,0,0,2,100
20 ENVELOPE 1,0,5,0,0,2,300
30 ENVELOPE 2,0,5,0,0,2,500
40 ENVELOPE 3,0,5,0,0,2,700
50 ENVELOPE 4,0,5,0,0,2,900
60 TEMPO 40
70 PLAY "V1O2Q"
80 FOR I=1 TO 2
90 PLAY "T0CCT1CCT2CCT3CCT4CCT3CCT2CCT1CC"
100 NEXT</pre>
<p><a href="http://www.winsoft.se/temp/pulsewidth.mp3" target="_blank">Click here</a> to listen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/03/making-music-in-basic-7-0-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.winsoft.se/temp/pulsewidth.mp3" length="0" type="audio/mpeg" />
		</item>
		<item>
		<title>Shame on you, Microsoft!</title>
		<link>http://www.winsoft.se/2012/03/shame-on-you-microsoft/</link>
		<comments>http://www.winsoft.se/2012/03/shame-on-you-microsoft/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 10:45:32 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[Skeptical movement]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1869</guid>
		<description><![CDATA[This is Deepak Chopra: Chopra is an pseudo scientist and a magical healer who uses (or missuses) scientific buzzwords to make his mumbo jumbo sound plausible. Now, guess who Microsoft hires to inspire their partners in this years world wide partner conference? The charlatan himself! Money well spent? It&#8217;s a shame, Microsoft! (Thanks Jesper Johag.)]]></description>
			<content:encoded><![CDATA[<p>This is Deepak Chopra:</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/Z-FaXD_igv4" frameborder="0" allowfullscreen></iframe></p>
<p>Chopra is an pseudo scientist and a magical healer who uses (or missuses) scientific buzzwords to make his mumbo jumbo sound plausible. Now, guess who <a href="http://www.digitalwpc.com/WPC2012/Agenda/Pages/GuestSpeakers.aspx#fbid=iKE8BgvLtDP" target="_blank">Microsoft hires</a> to inspire their partners in this years world wide partner conference? The charlatan himself! Money well spent? It&#8217;s a shame, Microsoft!</p>
<p>(Thanks Jesper Johag.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/03/shame-on-you-microsoft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making music in Basic 7.0 part 3</title>
		<link>http://www.winsoft.se/2012/03/making-music-in-basic-7-0-part-3/</link>
		<comments>http://www.winsoft.se/2012/03/making-music-in-basic-7-0-part-3/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 13:43:42 +0000</pubDate>
		<dc:creator>Anders Hesselbom</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[C128]]></category>
		<category><![CDATA[SID Music]]></category>

		<guid isPermaLink="false">http://www.winsoft.se/?p=1860</guid>
		<description><![CDATA[When you use the other synthesizer control characters (O, T, U and X), they apply no matter of what voice (V) you have chosen. So when you for example use O to set the octave (0 to 6), all the following notes, regardless of voice, will be played in that octave. This example will play [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.winsoft.se/wp-content/uploads/music.jpg"><img class="alignright size-full wp-image-1856" title="Commodore 128 music" src="http://www.winsoft.se/wp-content/uploads/music.jpg" alt="" width="400" height="301" /></a>When you use the other <strong>synthesizer control characters</strong> (O, T, U and X), they apply no matter of what voice (V) you have chosen. So when you for example use O to set the octave (0 to 6), all the following notes, regardless of voice, will be played in that octave. This example will play the notes C, D and E in voice 1, octave one. C, D E in voice 1, octave 2, and finally C (at the same time as the previous E), D and E in voice 2, octave 2.</p>
<pre>PLAY "V1O1 CDE O2 CDE V2 CDE"</pre>
<p>T (0 to 9) lets you chose from 10 predefined envelopes. The predefined envelopes emulates different instruments (0 is piano, 1 is accordion and so on). Envelopes differ in attack rate, decay rate, sustain level, release rate and waveform. This song uses a harpsichord bass (T6), a drum (T3) and some xylophone (T9).</p>
<pre>10 FOR I=1 TO 4
20 PLAY "V1O2T6QCCT3O5CO2T6C"
30 PLAY "V2O5T9CV3G"
40 NEXT</pre>
<p>U (0 to 15) controls the volume, but not on the next note, but also on any playing note. This will therefore play both C notes using volume 2.</p>
<pre>PLAY "U15 C U2 C"</pre>
<p>Finally, X (0 or 1) is used to turn the frequency filter on (1) or off (0).</p>
<p><iframe width="480" height="360" src="http://www.youtube.com/embed/Jja2pF_qUlI" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.winsoft.se/2012/03/making-music-in-basic-7-0-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

