Crossfade: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
New page: Try this: [http://www.kjams.com/forum/viewtopic.php?t=265 Crossfade between kJams and iTunes] I'll (oss) be updating this script RSN since Dave has now implemented the ability to detect t...
 
Oss (talk | contribs)
No edit summary
Line 1: Line 1:
I'm putting the finishing touches on the new script and testing it out.
The new script is written in python, but still uses the applescript stuff Dave has exposed to kJams.  This is done through the appscript module.  Since python is already included on your mac, we just need to install the appscript module.
Make sure you have an internet connection before attempting the below steps!
Perform the following to install the appscript module.
#Applications -> Utilities -> Terminal.App
sudo easy_install -U setuptools
sudo easy_install appscript
After downloading the crossfader script (not uploaded yet), place the script  where you'd like to install it.  It might be handy to have on your dock.
Now if you open that script with a text editor, you can alter anything you'd like, but unless you're looking to break something, I'd only alter the values below:
'''auto = True'''
This can be set True or False.  If set to True, the script will continuously loop.  It checks for 3 conditions:
If the currently playing kJams song has the number of seconds left as defined in the '''seconds_left''' parameter, it will automatically starting fading out kjams, and fading in iTunes.
If the kJams state has changed from stopped to playing, then start fading out iTunes and start fading in kJams.
If the kJams state has changed from playing to stopped, then start fading in iTunes.
'''seconds_left = 7'''
This is the number of seconds left in the kJams track before the auto crossfade begins.
'''fade_step  = 5'''
This is the percentage increment of which the volume is increased or decreased.
'''fade_delay = .2'''
This is the number of seconds waited between each fade_step.
'''max_volume = 80'''
This is the maximum volume you want set for both kJams and iTunes.
'''min_volume = 0'''
This is the minimum volume you want set for both kJams and iTunes.
If you're still looking for the older version:
Try this: [http://www.kjams.com/forum/viewtopic.php?t=265 Crossfade between kJams and iTunes]
Try this: [http://www.kjams.com/forum/viewtopic.php?t=265 Crossfade between kJams and iTunes]
I'll (oss) be updating this script RSN since Dave has now implemented the ability to detect the play mode in AppleScript.  The script is going to be re-written in python, using the appscript module.  Python is my language of choice, so I'll be more comfortable.  More comfortable = more features :).  I'll leave the old one around for folks who are used to it.

Revision as of 05:08, 8 October 2009


I'm putting the finishing touches on the new script and testing it out.

The new script is written in python, but still uses the applescript stuff Dave has exposed to kJams. This is done through the appscript module. Since python is already included on your mac, we just need to install the appscript module.


Make sure you have an internet connection before attempting the below steps!

Perform the following to install the appscript module.


  1. Applications -> Utilities -> Terminal.App

sudo easy_install -U setuptools sudo easy_install appscript


After downloading the crossfader script (not uploaded yet), place the script where you'd like to install it. It might be handy to have on your dock.


Now if you open that script with a text editor, you can alter anything you'd like, but unless you're looking to break something, I'd only alter the values below:

auto = True

This can be set True or False. If set to True, the script will continuously loop. It checks for 3 conditions:

If the currently playing kJams song has the number of seconds left as defined in the seconds_left parameter, it will automatically starting fading out kjams, and fading in iTunes.

If the kJams state has changed from stopped to playing, then start fading out iTunes and start fading in kJams.

If the kJams state has changed from playing to stopped, then start fading in iTunes.


seconds_left = 7

This is the number of seconds left in the kJams track before the auto crossfade begins.

fade_step = 5

This is the percentage increment of which the volume is increased or decreased.

fade_delay = .2

This is the number of seconds waited between each fade_step.

max_volume = 80

This is the maximum volume you want set for both kJams and iTunes.

min_volume = 0

This is the minimum volume you want set for both kJams and iTunes.


If you're still looking for the older version:


Try this: Crossfade between kJams and iTunes