<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - mGB clock rate]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/445/"/>
	<updated>2010-01-26T07:49:27Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/445/mgb-clock-rate/</id>
		<entry>
			<title type="html"><![CDATA[Re: mGB clock rate]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/7095/#p7095"/>
			<content type="html"><![CDATA[<p>Just tried, the delay works <img src="https://chipmusic.org/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> thanks again, also for arduinoboy and mGB <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[30003019]]></name>
				<uri>https://chipmusic.org/30003019</uri>
			</author>
			<updated>2010-01-26T07:49:27Z</updated>
			<id>https://chipmusic.org/forums/post/7095/#p7095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: mGB clock rate]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/6986/#p6986"/>
			<content type="html"><![CDATA[<p>sendByteToGameboy(0x90);&nbsp; &nbsp;//note on channel 1<br />delay(1);<br />sendByteToGameboy(0x30);&nbsp; &nbsp;// note pitch&nbsp; &nbsp;(range 0x00 - 0x7F)<br />delay(1);<br />sendByteToGameboy(0x7F);&nbsp; &nbsp;// note velocity&nbsp; &nbsp;(range 0x00 - 0x7F)</p><p>should work</p>]]></content>
			<author>
				<name><![CDATA[Trash80]]></name>
				<uri>https://chipmusic.org/Trash80</uri>
			</author>
			<updated>2010-01-25T23:54:41Z</updated>
			<id>https://chipmusic.org/forums/post/6986/#p6986</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: mGB clock rate]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/6985/#p6985"/>
			<content type="html"><![CDATA[<p>Thanks for the answer <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /> I don&#039;t really get, what you&#039;re describing with your easiest first step (the whole thing should generate the MIDi data in the arduino without the need of a PC), but I guess I were just going too fast when I expected to be too slow. Guess I should do a little math now <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[30003019]]></name>
				<uri>https://chipmusic.org/30003019</uri>
			</author>
			<updated>2010-01-25T23:50:02Z</updated>
			<id>https://chipmusic.org/forums/post/6985/#p6985</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: mGB clock rate]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/6973/#p6973"/>
			<content type="html"><![CDATA[<p>ok so...</p><div class="quotebox"><blockquote><p>but I&#039;m getting quite random results when sending MIDI data with the sendByteToGameboy(byte send_byte) function from arduinoboy.</p></blockquote></div><p>Note: low battery power can also result in wacky behavior.</p><div class="quotebox"><blockquote><p>As far as I understand from the code, the MIDI command is sent bitwise, and each bit goes along with two clock signals, one 0, one 1.</p></blockquote></div><p>Correct</p><div class="quotebox"><blockquote><p>What I&#039;m wondering right now is whether that&#039;s all it takes to control mGB (and therefore I just don&#039;t quite get MIDI)</p></blockquote></div><p>Yes, the midi processing is done inside of mGB itself, all the arduino does is push the bytes to the gb.<br />this site helps in understanding how midi works: <a href="http://www.gweep.net/~prefect/eng/reference/protocol/midispec.html" target="_blank">http://www.gweep.net/~prefect/eng/refer &#133; ispec.html</a></p><div class="quotebox"><blockquote><p>or if the transmission must also be at a specific baud rate (like the 31250bps for MIDI).</p></blockquote></div><p>Yeah the only important thing here is if the bytes come in too fast the gameboy wont be able to read them. so to be safe I would not run serial at anything faster than 38000baud, but it might be better to go slower than midi, not faster- if you have the option.</p><p>As for the rest, the easiest first step would be to use the arduino&#039;s usb serial at a baud of 38000, you need to have arduinoboy code work at that rate, which is already in the code as:<br />boolean usbMode&nbsp; &nbsp;= true; //sets the baud to 38000</p><p>And use some program (max,pd,processing) to send midi serial data to the arduino.</p>]]></content>
			<author>
				<name><![CDATA[Trash80]]></name>
				<uri>https://chipmusic.org/Trash80</uri>
			</author>
			<updated>2010-01-25T23:17:42Z</updated>
			<id>https://chipmusic.org/forums/post/6973/#p6973</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: mGB clock rate]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/6959/#p6959"/>
			<content type="html"><![CDATA[<p>no one? :-(</p><p>*bump*</p>]]></content>
			<author>
				<name><![CDATA[30003019]]></name>
				<uri>https://chipmusic.org/30003019</uri>
			</author>
			<updated>2010-01-25T22:54:02Z</updated>
			<id>https://chipmusic.org/forums/post/6959/#p6959</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[mGB clock rate]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/6101/#p6101"/>
			<content type="html"><![CDATA[<p>Hi there,</p><p>I tried to bring this to the arduinoboy group and to trash80 directly, as well as on 8bc, but still no luck with an answer, maybe I get one here? <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I&#039;m trying to build an arduino-based hardware controller for mGB, but I&#039;m getting quite random results when sending MIDI data with the sendByteToGameboy(byte send_byte) function from arduinoboy. As far as I understand from the code, the MIDI command is sent bitwise, and each bit goes along with two clock signals, one 0, one 1.</p><p>What I&#039;m wondering right now is whether that&#039;s all it takes to control mGB (and therefore I just don&#039;t quite get MIDI) or if the transmission must also be at a specific baud rate (like the 31250bps for MIDI). If the baud rate matters, I guess I could use the serial out of the arduino to send the data to the DMGs serial in, but I&#039;m puzzled how to send the clock signal at the same time. I guess I could also just send MIDI date through serial out to an arduinoboy, but I&#039;d prefer to keep ist simple and direct between the controller and mGB.</p>]]></content>
			<author>
				<name><![CDATA[30003019]]></name>
				<uri>https://chipmusic.org/30003019</uri>
			</author>
			<updated>2010-01-21T21:49:20Z</updated>
			<id>https://chipmusic.org/forums/post/6101/#p6101</id>
		</entry>
</feed>
