<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://karaoke.kjams.com/w/index.php?action=history&amp;feed=atom&amp;title=Code%2Fnew_AUTOMAGIC_iTunes_Crossfader</id>
	<title>Code/new AUTOMAGIC iTunes Crossfader - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://karaoke.kjams.com/w/index.php?action=history&amp;feed=atom&amp;title=Code%2Fnew_AUTOMAGIC_iTunes_Crossfader"/>
	<link rel="alternate" type="text/html" href="https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;action=history"/>
	<updated>2026-06-09T12:09:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6227&amp;oldid=prev</id>
		<title>Deusexmachina at 17:12, 29 September 2010</title>
		<link rel="alternate" type="text/html" href="https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6227&amp;oldid=prev"/>
		<updated>2010-09-29T17:12:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;amp;diff=6227&amp;amp;oldid=6155&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Deusexmachina</name></author>
	</entry>
	<entry>
		<id>https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6155&amp;oldid=prev</id>
		<title>Deusexmachina at 18:44, 21 July 2010</title>
		<link rel="alternate" type="text/html" href="https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6155&amp;oldid=prev"/>
		<updated>2010-07-21T18:44:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:44, 21 July 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nowiki&lt;/del&gt;&amp;gt;-- Please have iTunes and kJams running before launching this script and&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Here is the autoCrossFade script. Just past it into an empty AppleScript document, save and go:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;-- Please have iTunes and kJams running before launching this script and&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- have a playlist selected in iTunes  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- have a playlist selected in iTunes  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- The simple logic of the script assumes that if iTunes is playing and this script is run,  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- The simple logic of the script assumes that if iTunes is playing and this script is run,  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l91&quot;&gt;Line 91:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 94:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    end tell&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    end tell&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end repeat&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end repeat&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key kjams_www-mw_:diff:1.41:old-6154:rev-6155:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Deusexmachina</name></author>
	</entry>
	<entry>
		<id>https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6154&amp;oldid=prev</id>
		<title>Deusexmachina at 18:42, 21 July 2010</title>
		<link rel="alternate" type="text/html" href="https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6154&amp;oldid=prev"/>
		<updated>2010-07-21T18:42:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:42, 21 July 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Please have iTunes and kJams running before launching this script and&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/ins&gt;-- Please have iTunes and kJams running before launching this script and&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- have a playlist selected in iTunes  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- have a playlist selected in iTunes  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- The simple logic of the script assumes that if iTunes is playing and this script is run,  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- The simple logic of the script assumes that if iTunes is playing and this script is run,  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key kjams_www-mw_:diff:1.41:old-6153:rev-6154:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Deusexmachina</name></author>
	</entry>
	<entry>
		<id>https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6153&amp;oldid=prev</id>
		<title>Deusexmachina at 18:40, 21 July 2010</title>
		<link rel="alternate" type="text/html" href="https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6153&amp;oldid=prev"/>
		<updated>2010-07-21T18:40:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:40, 21 July 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Please have iTunes and kJams running before launching this script and  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- Please have iTunes and kJams running before launching this script and&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- have a playlist selected in iTunes  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- have a playlist selected in iTunes  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- The simple logic of the script assumes that if iTunes is playing and this script is run,  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;-- The simple logic of the script assumes that if iTunes is playing and this script is run,  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Deusexmachina</name></author>
	</entry>
	<entry>
		<id>https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6152&amp;oldid=prev</id>
		<title>Deusexmachina: Created page with &#039;-- Please have iTunes and kJams running before launching this script and  -- have a playlist selected in iTunes  -- The simple logic of the script assumes that if iTunes is playi…&#039;</title>
		<link rel="alternate" type="text/html" href="https://karaoke.kjams.com/w/index.php?title=Code/new_AUTOMAGIC_iTunes_Crossfader&amp;diff=6152&amp;oldid=prev"/>
		<updated>2010-07-21T18:39:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;-- Please have iTunes and kJams running before launching this script and  -- have a playlist selected in iTunes  -- The simple logic of the script assumes that if iTunes is playi…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Please have iTunes and kJams running before launching this script and &lt;br /&gt;
-- have a playlist selected in iTunes &lt;br /&gt;
-- The simple logic of the script assumes that if iTunes is playing and this script is run, &lt;br /&gt;
--  you want to cross fade over to kJams.. Alternately, if iTunes is not playing a track, &lt;br /&gt;
--  it assumes you want to cross fade over to iTunes. &lt;br /&gt;
-- when you are ready to cross fade to kJams, make sure your next song is &lt;br /&gt;
-- highlighted/selected.  It will NOT automatically go to the next track in &lt;br /&gt;
-- your kJams playlist.&lt;br /&gt;
-- Unlike the original version of this script, you do not need to set your max volume levels. Instead, it will poll iTunes and kJams for their current volumes, and then cross fade using those values. Even if these volumes are very different, it will fade them such that they reach their appropriate values at the same time. No more need for these values to be identical!&lt;br /&gt;
-- Although I have tested this code, I make no guarantees with this code, &lt;br /&gt;
-- any disasters that occur are not my fault.  Use at your own risk!! &lt;br /&gt;
&lt;br /&gt;
set kSpeakers to 0&lt;br /&gt;
--sets how long in seconds between each step in the fade &lt;br /&gt;
set fadeDelay to 0.1&lt;br /&gt;
set kScriptCommand_PLAY_PAUSE to 1&lt;br /&gt;
set kScriptCommand_STOP to 2&lt;br /&gt;
--Get current audio volume from kJams&lt;br /&gt;
tell application &amp;quot;kJams Pro&amp;quot; to set kJamsMaxVolume to get volume kSpeakers&lt;br /&gt;
-- Number of steps in fade&lt;br /&gt;
set fadeSteps to 20&lt;br /&gt;
--set all volumes to cross fade starting values &lt;br /&gt;
--set iTune volume maximum.&lt;br /&gt;
tell application &amp;quot;iTunes&amp;quot; to set iTunesMaxVolume to the sound volume&lt;br /&gt;
--sets how much in percentage the volume is decreased per step&lt;br /&gt;
set kJFadeStep to kJamsMaxVolume / fadeSteps&lt;br /&gt;
set iTFadeStep to iTunesMaxVolume / fadeSteps&lt;br /&gt;
--this is the minimum volume setting &lt;br /&gt;
set MinVolume to 0&lt;br /&gt;
&lt;br /&gt;
-- Playstate will be either 1 for iTunes or 0 for kJams&lt;br /&gt;
set playState to 0&lt;br /&gt;
set prevPlayState to 0&lt;br /&gt;
&lt;br /&gt;
set kPlayModeType_STOPPED to 0&lt;br /&gt;
set kPlayModeType_PLAYING to 1&lt;br /&gt;
set kPlayModeType_PAUSED to 2&lt;br /&gt;
repeat&lt;br /&gt;
   tell application &amp;quot;kJams Pro&amp;quot;&lt;br /&gt;
      set playMode to get mode&lt;br /&gt;
   end tell&lt;br /&gt;
   tell application &amp;quot;iTunes&amp;quot;&lt;br /&gt;
      if (playMode = kPlayModeType_PLAYING) then&lt;br /&gt;
         set playState to 0&lt;br /&gt;
         -- If prevPlayState is not the same as the current state&lt;br /&gt;
         if (prevPlayState = 1) then&lt;br /&gt;
            set kJamsVolume to MinVolume&lt;br /&gt;
            tell application &amp;quot;kJams Pro&amp;quot; to set volume kSpeakers level MinVolume&lt;br /&gt;
            repeat until (iTunesVolume ≤ 0 and kJamsVolume ≥ kJamsMaxVolume)&lt;br /&gt;
               set iTunesVolume to (iTunesVolume - iTFadeStep)&lt;br /&gt;
               set kJamsVolume to (kJamsVolume + kJFadeStep)&lt;br /&gt;
               set the sound volume to iTunesVolume&lt;br /&gt;
               tell application &amp;quot;kJams Pro&amp;quot; to set volume kSpeakers level kJamsVolume&lt;br /&gt;
               delay fadeDelay&lt;br /&gt;
            end repeat&lt;br /&gt;
            next track&lt;br /&gt;
            pause&lt;br /&gt;
         end if&lt;br /&gt;
         -- I repeat these lines in case you decide to change the volume levels while you are working. Otherwise, they will always reset to the original values.&lt;br /&gt;
         --Get current audio volume from kJams&lt;br /&gt;
         --tell application &amp;quot;kJams Pro&amp;quot; to set kJamsMaxVolume to get volume kSpeakers&lt;br /&gt;
         --set kJFadeStep to kJamsMaxVolume / fadeSteps&lt;br /&gt;
      else&lt;br /&gt;
         set playState to 1&lt;br /&gt;
         if (prevPlayState = 0) then&lt;br /&gt;
            -- I repeat these lines in case you decide to change the volume levels while you are working. Otherwise, they will always reset to the original values.&lt;br /&gt;
            --Get current audio volume from kJams&lt;br /&gt;
            tell application &amp;quot;kJams Pro&amp;quot; to set kJamsMaxVolume to get volume kSpeakers&lt;br /&gt;
            set kJFadeStep to kJamsMaxVolume / fadeSteps&lt;br /&gt;
            tell application &amp;quot;kJams Pro&amp;quot; to set volume kSpeakers level MinVolume&lt;br /&gt;
            &lt;br /&gt;
            --set all volumes to cross fade starting values &lt;br /&gt;
            set iTunesVolume to MinVolume&lt;br /&gt;
            set the sound volume to MinVolume&lt;br /&gt;
            play&lt;br /&gt;
            repeat until iTunesVolume ≥ iTunesMaxVolume&lt;br /&gt;
               set iTunesVolume to (iTunesVolume + iTFadeStep)&lt;br /&gt;
               set the sound volume to iTunesVolume&lt;br /&gt;
               --tell application &amp;quot;kJams Pro&amp;quot; to set volume kSpeakers level MinVolume&lt;br /&gt;
               delay fadeDelay&lt;br /&gt;
            end repeat&lt;br /&gt;
         end if&lt;br /&gt;
         -- I repeat these lines in case you decide to change the volume levels while you are working. Otherwise, they will always reset to the original values.&lt;br /&gt;
         --Get current audio volume from iTunes&lt;br /&gt;
         set iTunesMaxVolume to the sound volume&lt;br /&gt;
         set iTFadeStep to iTunesMaxVolume / fadeSteps&lt;br /&gt;
         &lt;br /&gt;
      end if&lt;br /&gt;
      set prevPlayState to playState&lt;br /&gt;
      delay 0.5&lt;br /&gt;
   end tell&lt;br /&gt;
end repeat&lt;/div&gt;</summary>
		<author><name>Deusexmachina</name></author>
	</entry>
</feed>