<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Programming (new threads)</title>
		<link>http://midi.wikidot.com/forum/c-4058/programming</link>
		<description>Threads in the forum category &quot;Programming&quot; - This is totally the best spot... no joke. Talk here about programming issues, bugs, successes, or changes.</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://midi.wikidot.com/forum/t-7907</guid>
				<title>Multi line text</title>
				<link>http://midi.wikidot.com/forum/t-7907/multi-line-text</link>
				<description></description>
				<pubDate>Thu, 19 Apr 2007 03:24:25 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey guys,</p> <p>I made a multi line writer for outputting stuff to the screen. I tried to copy off God's code, but it unfortunately was pretty rough. God thinks readability is overrated. Anyways, it doesn't actually seem like that hard of a thing, and it isn't, except for one thing..</p> <p>The friggin newline character! aka: \n</p> <p>I can't figure out why, but it won't register these buggers. When it parses in the xml files, though, it seems to add in a bunch of \r and \n tags at every carriage return, which is weird that it'd do both… anyways, it sees the \r tags and does a carriage return, but it simply doesn't seem to see the \n character anywhere. I actually added a case statement to alert me if it saw them, but I've gotten nothing.</p> <p>And yet, because the \n chars are there, they're mucking up the output from the writer. There may be another error (some off by 1 thing) that I can fix, but until I can get rid of these phantom \n chars, it's too hard to figure out. Any ideas?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-7365</guid>
				<title>XML !</title>
				<link>http://midi.wikidot.com/forum/t-7365/xml</link>
				<description></description>
				<pubDate>Mon, 09 Apr 2007 15:29:32 +0000</pubDate>
				<wikidot:authorName>manojalpa</wikidot:authorName>				<wikidot:authorUserId>8124</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>If you give me an XML layout for anything I can start filling it in (For instance all the tutorial stuff, memo stuff, things the head is going to say when you mouse over locations….)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-7342</guid>
				<title>Zyk transformation bug</title>
				<link>http://midi.wikidot.com/forum/t-7342/zyk-transformation-bug</link>
				<description></description>
				<pubDate>Mon, 09 Apr 2007 05:17:08 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello hello,</p> <p>If you've been in the music lab or the zykatorium (that's my spelling and I'm sticking to it!), you may have noticed that the zyk doesn't really transform correctly. Mostly, it's because the UpdateTransforms method seems to like working with the incremental changes that are handed each game cycle in the lab or zykatorium. However, I'm not sure how to modify the Zyk model from the original attribute input. So, for example, even though I hand a totally maxed out Zyk in, it looks like a pip-squeak in the lab because it doesn't update the model. It does once you enter the level, but I can't seem to figure out how to achieve this transform for the TestZyk. Gordon, can you help me out here? Thanks!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-7210</guid>
				<title>Thumbs.db</title>
				<link>http://midi.wikidot.com/forum/t-7210/thumbs-db</link>
				<description></description>
				<pubDate>Fri, 06 Apr 2007 01:46:18 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Blah… I'm a perpetrator of thumbs.db on svn… but thing is, I don't actutally see the thumbs.db file in my explorer windows… isn't it a hidden file that should be shown if you have hidden files viewable? I'm a bit puzzled by this, since I would like to find it and remove from svn… any suggestions?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-7200</guid>
				<title>svn weirdness</title>
				<link>http://midi.wikidot.com/forum/t-7200/svn-weirdness</link>
				<description></description>
				<pubDate>Thu, 05 Apr 2007 21:42:37 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>hey, just wanted to alert you guys that I think I've confused svn a bit while trying to load in a new background file for the main menu… tell me if you experience trouble.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-7179</guid>
				<title>CRASHED by the Tile</title>
				<link>http://midi.wikidot.com/forum/t-7179/crashed-by-the-tile</link>
				<description></description>
				<pubDate>Thu, 05 Apr 2007 13:39:29 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ok, so in the latest version of the Tile.cs file, looks like we're getting all manner of crazy errors, like trying to do bad implicit casts and such. Are you guys aware of those, or is it just a problem on my computer? Looks like Kevin and Gordon were working on it a lot last night, so I guess I'll find out today in class. Thing is that I can't seem to update to a previous revision just to work on the Music Lab, because it will always give me that dreaded "NoSuitableGraphicsDevice" error…. *sigh*. Ah well. Hopefully we'll work this out in class today.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-6818</guid>
				<title>Drawing part of a Texture2D</title>
				<link>http://midi.wikidot.com/forum/t-6818/drawing-part-of-a-texture2d</link>
				<description></description>
				<pubDate>Fri, 30 Mar 2007 04:12:09 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hmm… this shouldn't be so hard to figure out.</p> <p>Do any of you guys know how to draw just a part of an image, like what you would do to draw an animation where you just want to draw a small part of the whole texture?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-6718</guid>
				<title>Woot we&#039;ve got speed!</title>
				<link>http://midi.wikidot.com/forum/t-6718/woot-we-ve-got-speed</link>
				<description></description>
				<pubDate>Wed, 28 Mar 2007 16:06:45 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Wow, this place has been a ghost town lately… but anyways…</p> <p>Kevin/Gordon/Sascha… I'm not sure what you did, but the game game runs just fine on my computer now…probably also Chelsea's too then… silky smooth. Sascha said he thinks that it might have been that darn dice texture, but who knows. Point is, don't try to fix it, because it runs nicely now. Excellent stuff!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-5746</guid>
				<title>PreferMultiSampling</title>
				<link>http://midi.wikidot.com/forum/t-5746/prefermultisampling</link>
				<description></description>
				<pubDate>Fri, 09 Mar 2007 01:23:05 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So I've figured that the graphics.PreferMultiSampling option set to true in the start of the game is what is making the game sometimes run, sometimes bug out when I run it. Just wondering… is it for anti aliasing like I think it is, or something else, and why won't our game run without it? I can comment it out and the game runs ok for a bit, but when trying to play a note in the lab or moving in the "game game", the game crashes and gives me thus:</p> <p><em>LoaderLock Detected:<br /> Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.</em></p> <p>Since the bug for whatever reason seems to be occurring more often that I can't run the game at all and must just keep trying again and again until it does run with PreferMultiSampling set to true, this is kinda a bit of a problem… is it happening to anybody else?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-5291</guid>
				<title>issues with color</title>
				<link>http://midi.wikidot.com/forum/t-5291/issues-with-color</link>
				<description></description>
				<pubDate>Thu, 01 Mar 2007 00:25:13 +0000</pubDate>
				<wikidot:authorName>SaschaAdler</wikidot:authorName>				<wikidot:authorUserId>1552</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey all,</p> <p>I think the codebase needs a bit of tweaking with regards to the how Zyk color is handled in the ZykAttributes class. Apart from the fact that there need to be more colors than are listed, I am confused as to the purpose of the "darkColor" flag. As far as I understand it, the Zyk will have a lighter color if a major key is used, and a darker color if the minor key is used, so why is there a flag instead of a more complex system?</p> <p>-Sascha</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4841</guid>
				<title>Game state enum</title>
				<link>http://midi.wikidot.com/forum/t-4841/game-state-enum</link>
				<description></description>
				<pubDate>Wed, 21 Feb 2007 02:23:46 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Does anybody know a good reason to keep the game state enum (the high level one… only 3 possible states right now) in the MusicMonsters class only? I have added it to the util.cs file for public access by other classes so that they can change the game state back to another location. For example, if I want to exit the music lab state, I need to be able to change the gameState back to main menu state or something, which I do from within the MIDIKeyboardInput class.</p> <p>Does anybody see some sort of encapsulation problem with putting it in util instead of keeping it privately within MusicMonsters?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4833</guid>
				<title>busted code!</title>
				<link>http://midi.wikidot.com/forum/t-4833/busted-code</link>
				<description></description>
				<pubDate>Tue, 20 Feb 2007 22:47:12 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ok swear to god… it wasn't me this time… but the MenuSystem draw function seems to be causing code explosion… Kevin do you know what's going on there?</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4605</guid>
				<title>Modeling</title>
				<link>http://midi.wikidot.com/forum/t-4605/modeling</link>
				<description>Modeling issues or information</description>
				<pubDate>Fri, 16 Feb 2007 17:06:58 +0000</pubDate>
				<wikidot:authorName>goro36</wikidot:authorName>				<wikidot:authorUserId>1575</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>heres a small animation library i found that we could use:<br /> <a href="http://www.codeplex.com/animationcomponents">http://www.codeplex.com/animationcomponents</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4493</guid>
				<title>Music Algorithms</title>
				<link>http://midi.wikidot.com/forum/t-4493/music-algorithms</link>
				<description></description>
				<pubDate>Wed, 14 Feb 2007 21:15:41 +0000</pubDate>
				<wikidot:authorName>manojalpa</wikidot:authorName>				<wikidot:authorUserId>8124</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So I'm starting to work on the algorithms and was wondering what methods you had in place, Ben.</p> <p>Also, I figured the sort of non-linear progression should work as such</p> <p>Level …..Amount<br /> 1……………1<br /> 2……………3<br /> 3……………6<br /> 4…………..10<br /> 5…………..15</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4462</guid>
				<title>Preprocessor stuff</title>
				<link>http://midi.wikidot.com/forum/t-4462/preprocessor-stuff</link>
				<description></description>
				<pubDate>Wed, 14 Feb 2007 04:34:00 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey programmers,</p> <p>Has anyone figured out how to place items in the code that are only compiled in debug mode? It's accomplished via preprocessor directives in C++, but I don't think you can use the same method in C#, and a quick search doesn't reveal too much in the way of help.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4232</guid>
				<title>Commenting in c#</title>
				<link>http://midi.wikidot.com/forum/t-4232/commenting-in-c</link>
				<description></description>
				<pubDate>Fri, 09 Feb 2007 19:13:53 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><a href="http://msdn.microsoft.com/msdnmag/issues/02/06/XMLC/">http://msdn.microsoft.com/msdnmag/issues/02/06/XMLC/</a></p> <p>This gives you the basic rundown of how xml commenting works in c#. But mostly what you need to know is to place "///" before a member of a class to get the automatic tags. &lt;summary&gt; and &lt;param&gt; are pretty self explanatory. Use &lt;remarks&gt; at the top of classes instead of &lt;summary&gt;.</p> <p>That's about all there is to it.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4227</guid>
				<title>byte arithmetic</title>
				<link>http://midi.wikidot.com/forum/t-4227/byte-arithmetic</link>
				<description></description>
				<pubDate>Fri, 09 Feb 2007 17:16:52 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>So the MIDI toolkit we are using is fond of using bytes in method calls rather than just integers… guess he really wants to save space. What I need to do, though, is be able to add and subtract numbers from a byte variable because I use those to give each pitch. C# unfortunately doesn't allow implicit conversion for byte arithmetic with integer constants. In other words…</p> <div class="code"> <pre> <code>b = b + 10 //b is a byte</code> </pre></div> <p>…doesn't fly. Compiler error. So… I says to myself I says… well I'll just overload the "+" operator for byte and integer args. No such luck. I tried to do it in the util.cs file. It seems that you can't just do that with integral types for both args. One parameter at least must be a class. Is this normally the case with other languages as well? And anybody see a way around this? It's not critical, but I'm looking to avoid massive amounts of explicit casting that will clutter up the code. Here is the failed method.</p> <div class="code"> <pre> <code>//C# doesn't allow implicit byte operations //such as "b = b + 10" where b is a byte. Used in MIDI data public static byte operator+(byte a, int b) { int c = (int)(a) + b; if (c &gt; 255) throw OverflowException("The requested byte addition was over 255"); else if (c &lt; 0) throw OverflowException("The requested byte addition was less than 0"); return (byte) c; }</code> </pre></div> <p>The error was "One of the parameters of a binary operator must be the containing type". It would seem that this could work if I could add the overload to the "Byte" class… C# uses actual objects for each integral type… so things like "int" are just shortnames for the actual objects. However, you can't mess with that stuff for obvious reasons.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-4061</guid>
				<title>Displaying text</title>
				<link>http://midi.wikidot.com/forum/t-4061/displaying-text</link>
				<description></description>
				<pubDate>Mon, 05 Feb 2007 20:33:25 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>As you may notice, there's no support for text output in XNA, even basic stuff, as there was in GameX. While it'll probably be included in later versions, our solution for now is BMFontgen, a little app made by a guy who worked on XNA that converts windows fonts into a bitmap and parses them in nicely for you to use.</p> <p><a href="http://blogs.msdn.com/garykac/articles/732007.aspx">http://blogs.msdn.com/garykac/articles/732007.aspx</a></p> <p>Go to there to learn how to use it. The code is on the SVN site as well as demos. You may not actually need to make the font yourself (which is fairly easy), but using them is probably something we'll all do, so be sure you know how.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-3986</guid>
				<title>XNA Tutorial</title>
				<link>http://midi.wikidot.com/forum/t-3986/xna-tutorial</link>
				<description>sites for XNA help</description>
				<pubDate>Sat, 03 Feb 2007 18:13:21 +0000</pubDate>
				<wikidot:authorName>goro36</wikidot:authorName>				<wikidot:authorUserId>1575</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Here are some sites I found that give some tutorials on XNA and C#:<br /> <a href="http://xna101.spaces.live.com/">http://xna101.spaces.live.com/</a><br /> <a href="http://learnxna.com/default.aspx">http://learnxna.com/default.aspx</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://midi.wikidot.com/forum/t-3863</guid>
				<title>C# midi interfacing</title>
				<link>http://midi.wikidot.com/forum/t-3863/c-midi-interfacing</link>
				<description></description>
				<pubDate>Wed, 31 Jan 2007 18:11:39 +0000</pubDate>
				<wikidot:authorName>BenHumberston</wikidot:authorName>				<wikidot:authorUserId>1601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hey programmers… I've been searching around on the net for how to interface with MIDI files/MIDI devices in the C# language. The language itself has basic operations, but they don't seem to be of much use unless you reaaaaally know what you're doing… which, in the case of MIDI, I don't (maybe Chelsea can help out there with how the file type works). So I've more been looking for community solutions to use. Here's one that I'm investigating…</p> <p><a href="http://www.codeproject.com/cs/media/MIDIToolkit.asp#StateMachineToolkit">http://www.codeproject.com/cs/media/MIDIToolkit.asp#StateMachineToolkit</a></p> <p>It seems to offer what we need, though I'm not sure if it will allow keyboard midi input… in fact midi input in general is still a mystery to me. Another one with less documentation:</p> <p><a href="http://www.gotdotnet.com/community/usersamples/details.aspx?sampleguid=89cde290-5580-40bf-90d2-5754b2e8137c">http://www.gotdotnet.com/community/usersamples/details.aspx?sampleguid=89cde290-5580-40bf-90d2-5754b2e8137c</a></p> <p>Seems more basic, but as I said, not too much doc. I'll ask the creators if they mind our using their work soon if one of these shows promise, or hey maybe we'll use something else entirely, or just use built in c#… tell me what you think.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>