Crossfade: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
Oss (talk | contribs)
No edit summary
Oss (talk | contribs)
No edit summary
Line 1: Line 1:
I'm putting the finishing touches on the new script and testing it out, it should be out by this weekend.
Apologies for the delay.  I wanted to test the script adequately before releasing it.


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.
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.
Line 10: Line 10:


#Applications -> Utilities -> Terminal.App
#Applications -> Utilities -> Terminal.App
#sudo easy_install -U setuptools
#sudo easy_install -U setuptools   # this is not required if you are running Snow Leopard
#sudo easy_install appscript
#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.
After downloading the crossfader script, 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:
The first time you run the script, it will create a configuration file in ~/Library/Application Support/Faded/faded.ini


'''auto = True'''
These are the user configurable parameters, and here's how they work:


This can be set True or False.  If set to True, the script will continuously loop.  It checks for 3 conditions:
'''mix = auto'''
 
This can be set auto or manual.  If set to auto, 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 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.

Revision as of 20:33, 27 October 2009

Apologies for the delay. I wanted to test the script adequately before releasing it.

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
  2. sudo easy_install -U setuptools # this is not required if you are running Snow Leopard
  3. sudo easy_install appscript


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


The first time you run the script, it will create a configuration file in ~/Library/Application Support/Faded/faded.ini

These are the user configurable parameters, and here's how they work:

mix = auto

This can be set auto or manual. If set to auto, 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.

If auto = False, then the script must be manually invoked for each time you want to mix between the apps. This mimics the function of the old version.

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