<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Converting 24PPQ Midi Sync in Java/Processing</title>
	<atom:link href="http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/feed/" rel="self" type="application/rss+xml" />
	<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/</link>
	<description>Mr. Anti-Focus</description>
	<lastBuildDate>Wed, 01 Feb 2012 12:07:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Edmund Klaus</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-847</link>
		<dc:creator>Edmund Klaus</dc:creator>
		<pubDate>Fri, 25 Feb 2011 07:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-847</guid>
		<description>&lt;p&gt;Right. The sequencer is a little beast.&lt;/p&gt;

&lt;p&gt;But last night i did some speed test on it. I tried to play 1/512 notes with the speed set to 240 BPM, what is something that maybe only Aphex Twin will ever use ;-). And it did well. At this rate the time between two notes is at 1,953125 ms. I measured that, and it matched well, except of sometimes a latency of 1 ms appeared. What mybe was because of System.out.println statements. So i think it is nice to use the java sequencer, to get a nice timed midi sequencing.&lt;/p&gt;

&lt;p&gt;I will give the syncing problem another try. I&#039;ve worked out some new strategy to sync it. Hopefully this will finally work.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Right. The sequencer is a little beast.</p>

<p>But last night i did some speed test on it. I tried to play 1/512 notes with the speed set to 240 BPM, what is something that maybe only Aphex Twin will ever use <img src='http://grantmuller.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . And it did well. At this rate the time between two notes is at 1,953125 ms. I measured that, and it matched well, except of sometimes a latency of 1 ms appeared. What mybe was because of System.out.println statements. So i think it is nice to use the java sequencer, to get a nice timed midi sequencing.</p>

<p>I will give the syncing problem another try. I&#8217;ve worked out some new strategy to sync it. Hopefully this will finally work.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: ed.klaus</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-845</link>
		<dc:creator>ed.klaus</dc:creator>
		<pubDate>Thu, 24 Feb 2011 20:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-845</guid>
		<description>&lt;p&gt;So i will have a look at your GOLSequencer code. Thank you for your replies.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>So i will have a look at your GOLSequencer code. Thank you for your replies.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Grant Muller</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-844</link>
		<dc:creator>Grant Muller</dc:creator>
		<pubDate>Thu, 24 Feb 2011 18:47:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-844</guid>
		<description>&lt;p&gt;Thats correct. For the GOLSequencer, I have basically built a sequencer, and all the event handling for starts, stops, syncs, etc take place right in there. The Sequencer class is a little draconian, you should be able to do it without needing that class.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thats correct. For the GOLSequencer, I have basically built a sequencer, and all the event handling for starts, stops, syncs, etc take place right in there. The Sequencer class is a little draconian, you should be able to do it without needing that class.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Edmund Klaus</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-843</link>
		<dc:creator>Edmund Klaus</dc:creator>
		<pubDate>Thu, 24 Feb 2011 18:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-843</guid>
		<description>&lt;p&gt;Yeah it&#039;s very tricky. :-)&lt;/p&gt;

&lt;p&gt;So if i get that right, you don&#039;t even use the &quot;javax.sound.midi.Sequencer&quot; class to handle your MidiEvents / MidiMessages. And send your midi messages by yourself? Directly from your step sequencer application? Is that correct?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yeah it&#8217;s very tricky. <img src='http://grantmuller.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>So if i get that right, you don&#8217;t even use the &#8220;javax.sound.midi.Sequencer&#8221; class to handle your MidiEvents / MidiMessages. And send your midi messages by yourself? Directly from your step sequencer application? Is that correct?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Grant Muller</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-842</link>
		<dc:creator>Grant Muller</dc:creator>
		<pubDate>Thu, 24 Feb 2011 17:26:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-842</guid>
		<description>&lt;p&gt;This is where it would get a bit tricky. To feed these message back in you effectively have to intercept the original sync messages from some external device (say, from your DAW) and use another thread to sub divide and resend those new pulses to your application. In the case of the RWMidi library, the MidiInput class is simply an implementation of javax.sound.midi.Receiver. The overridden &#039;send&#039; method in this class contains the code to create a thread, subdivide the incoming pulses and send them out to a &#039;plug&#039; method. The plug methodology is based on reflection and assumes you have an event handler in your app that can do something with the incoming values. You can see that code &lt;a href=&quot;https://github.com/gmuller/rwmidi/blob/master/src/rwmidi/MidiInput.java&quot; rel=&quot;nofollow&quot;&gt;here on github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know if you have any questions, but that is how I handled it in a raw fashion. I&#039;m not certain how you would do that with the Sequencer object, but you could create a separate Receiver method like this and feed that sequencer with the new pulses.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is where it would get a bit tricky. To feed these message back in you effectively have to intercept the original sync messages from some external device (say, from your DAW) and use another thread to sub divide and resend those new pulses to your application. In the case of the RWMidi library, the MidiInput class is simply an implementation of javax.sound.midi.Receiver. The overridden &#8216;send&#8217; method in this class contains the code to create a thread, subdivide the incoming pulses and send them out to a &#8216;plug&#8217; method. The plug methodology is based on reflection and assumes you have an event handler in your app that can do something with the incoming values. You can see that code <a href="https://github.com/gmuller/rwmidi/blob/master/src/rwmidi/MidiInput.java" rel="nofollow">here on github</a></p>

<p>Let me know if you have any questions, but that is how I handled it in a raw fashion. I&#8217;m not certain how you would do that with the Sequencer object, but you could create a separate Receiver method like this and feed that sequencer with the new pulses.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Edmund Klaus</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-841</link>
		<dc:creator>Edmund Klaus</dc:creator>
		<pubDate>Thu, 24 Feb 2011 10:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-841</guid>
		<description>&lt;p&gt;This is a very interesting article. I am at the moment working on a flexible midi looper that meets my needs. The way it works, is that i let it run and play some notes and it repeats them on and on again. This is the first stage. Later i want it to manage more tracks at one time, change loop positions, ...&lt;/p&gt;

&lt;p&gt;I found out that the standard Java Midi sequencer is not synchronizable at all. So first i started to calculate the incoming clock data bpm and set this in the sequencer (setTempoInBPM(...)). But that is no synchronizing at all. Next i did it in another way, i took the incoming sync messages (24 per quarter note) and everytime i got one, i called &quot;setTickPosition(...)&quot; on the sequencer. The correct tick position is taken from an array that i instanciated before. This works perfect. My sequencer is perfectly synced, even at fast BPM changes.&lt;/p&gt;

&lt;p&gt;The problem is: I don&#039;t want a step sequencer, with a hard resolution of 16th or 32th notes. I want the sequecer to play a note event on every position it is recorded and to hold the note a slong as it has been recorded.&lt;/p&gt;

&lt;p&gt;But: &quot;setTickPosition(...)&quot; behaves in a way that it send an &quot;all notes off&quot;, when it is called to go to a specified tick. I think that is a good idea, because if it has to move a few ticks away from the current position it could loos for example a &quot;note off&quot; event and hold a note forever!&lt;/p&gt;

&lt;p&gt;I took a look at your code, where you split the 24 sync messages up to several ones, but did not find the code where you feed the sync messages to the sequencer. Do you also do it in the way, i am trying to do that?&lt;/p&gt;

&lt;p&gt;Maybe you have some idea, how to &quot;really&quot; synchronize the java sequencer (not step sequencer). Or is it already synchronized proper, int the way you do that.&lt;/p&gt;

&lt;p&gt;Would be great if you&#039;d have some idea on that.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is a very interesting article. I am at the moment working on a flexible midi looper that meets my needs. The way it works, is that i let it run and play some notes and it repeats them on and on again. This is the first stage. Later i want it to manage more tracks at one time, change loop positions, &#8230;</p>

<p>I found out that the standard Java Midi sequencer is not synchronizable at all. So first i started to calculate the incoming clock data bpm and set this in the sequencer (setTempoInBPM(&#8230;)). But that is no synchronizing at all. Next i did it in another way, i took the incoming sync messages (24 per quarter note) and everytime i got one, i called &#8220;setTickPosition(&#8230;)&#8221; on the sequencer. The correct tick position is taken from an array that i instanciated before. This works perfect. My sequencer is perfectly synced, even at fast BPM changes.</p>

<p>The problem is: I don&#8217;t want a step sequencer, with a hard resolution of 16th or 32th notes. I want the sequecer to play a note event on every position it is recorded and to hold the note a slong as it has been recorded.</p>

<p>But: &#8220;setTickPosition(&#8230;)&#8221; behaves in a way that it send an &#8220;all notes off&#8221;, when it is called to go to a specified tick. I think that is a good idea, because if it has to move a few ticks away from the current position it could loos for example a &#8220;note off&#8221; event and hold a note forever!</p>

<p>I took a look at your code, where you split the 24 sync messages up to several ones, but did not find the code where you feed the sync messages to the sequencer. Do you also do it in the way, i am trying to do that?</p>

<p>Maybe you have some idea, how to &#8220;really&#8221; synchronize the java sequencer (not step sequencer). Or is it already synchronized proper, int the way you do that.</p>

<p>Would be great if you&#8217;d have some idea on that.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: RWMidi, GMS, and GOL Sequencer: Adventures in Social Coding &#124; Grant Muller</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-835</link>
		<dc:creator>RWMidi, GMS, and GOL Sequencer: Adventures in Social Coding &#124; Grant Muller</dc:creator>
		<pubDate>Fri, 18 Feb 2011 16:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-835</guid>
		<description>&lt;p&gt;[...] A short time after that, Mr. Keston approached me with what I thought at the time was a strange requirement: modify the library to support greater than 24PPQ for recognizing 64th and 128th note resolutions. In plain English, John wanted the GMS to support 64 and 128 notes using plain-jane MIDI clock. I thought it couldn’t be done, but loved the challenge, and modified the RWMidi library accordingly. It was a doozy. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] A short time after that, Mr. Keston approached me with what I thought at the time was a strange requirement: modify the library to support greater than 24PPQ for recognizing 64th and 128th note resolutions. In plain English, John wanted the GMS to support 64 and 128 notes using plain-jane MIDI clock. I thought it couldn’t be done, but loved the challenge, and modified the RWMidi library accordingly. It was a doozy. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Grant Muller</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-329</link>
		<dc:creator>Grant Muller</dc:creator>
		<pubDate>Fri, 01 Jan 2010 17:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-329</guid>
		<description>&lt;p&gt;No problem Daniel, thanks for the comment. Let me know what you come up with in the end. One of the harder things to wrap your mind around is that amount of time that passes in-between each pulse, and that your implementation will be limited by the number of instructions you can process in that span of time. In a C++ or lower level code implementation its not an issue to drop to 48 or 96 PPQ, but with something like Java you&#039;ll never be able to handle that many pulses per quarter note at &quot;regular&quot; tempos (120 bpm+). One non-code workaround is of course just to double the tempo of the source clock, and count two measures for one on your client. Let me know!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>No problem Daniel, thanks for the comment. Let me know what you come up with in the end. One of the harder things to wrap your mind around is that amount of time that passes in-between each pulse, and that your implementation will be limited by the number of instructions you can process in that span of time. In a C++ or lower level code implementation its not an issue to drop to 48 or 96 PPQ, but with something like Java you&#8217;ll never be able to handle that many pulses per quarter note at &#8220;regular&#8221; tempos (120 bpm+). One non-code workaround is of course just to double the tempo of the source clock, and count two measures for one on your client. Let me know!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Rosenstark</title>
		<link>http://grantmuller.com/converting-24ppq-midi-sync-in-javaprocessing/comment-page-1/#comment-328</link>
		<dc:creator>Daniel Rosenstark</dc:creator>
		<pubDate>Fri, 01 Jan 2010 11:32:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.grantmuller.com/?p=664#comment-328</guid>
		<description>&lt;p&gt;I am so amazed and glad I found this article. I just realized that reacting to 24-pulses-per-quarter is totally wrong, but I had no idea what to do. Of course I still have to read, understand, and implement what you wrote, but finding your article was half the battle. I&#039;ll report back when I&#039;ve finished that, but thanks in advance!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am so amazed and glad I found this article. I just realized that reacting to 24-pulses-per-quarter is totally wrong, but I had no idea what to do. Of course I still have to read, understand, and implement what you wrote, but finding your article was half the battle. I&#8217;ll report back when I&#8217;ve finished that, but thanks in advance!</p>]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
