SURPRISE! Pause after each track / insert blanks

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

pauseophile

New member
Joined
Dec 19, 2008
Messages
4
Points
0
I want to make each track into a SURPRISE: after a track I want to PAUSE for about 1 minute (or any given time) before the next track is played.

It seems simple but I don't know Applescript at all. Anyone?

An alternative way would be to insert blanks between tracks. I found such a script, dated in 2001, but it doesn't work in nowadays-iTunes anymore.

I would be very grateful!

the pause-o-phile
 

pauseophile

New member
Joined
Dec 19, 2008
Messages
4
Points
0
You're right. sorry, I'm a newbie here, it seems i'm not allowed to post links.
Its on malcolmadamsDOTcom slash scrx/insblanks.sit.hqx
and on dougscriptsDOTcom slash itunes/scripts/sjsxcont.php

I came up with this, i hoped it would be simple like this, but I'm not a programmer:

repeat
tell application "iTunes"
play some track of playlist "test"
if player position is finish of current track then
end if
delay 20
end tell
end repeat

Only thing is the track doesn't finish now,
 

pauseophile

New member
Joined
Dec 19, 2008
Messages
4
Points
0
I FOUND IT OUT!!!!!

I'm very happy and flippin and tripping with this new play-mode. Check it out! I have 50.000+ tracks in iTunes and its a real treat to be surprised by the music, by adding pauses between them (remember the newsheadlines about music for foltering purposes?). Here's the code I've written, paste it in scripteditor:

repeat
tell application "iTunes"
play some track of playlist "yourplaylistname"
delay (get the duration of the current track)
pause
delay 60
end tell
end repeat


Of course it's also very simple to turn this into a basic needledropper:

repeat
tell application "iTunes"
play some track of playlist "yourplaylistname"
delay 10
end tell
end repeat
 

pauseophile

New member
Joined
Dec 19, 2008
Messages
4
Points
0
I made a better version, it's called PauseBetweenTracks and I mailed it to Doug at dougscripts-DOT-com. I hope you will be able to find it there.
If not, here it is:


(*
PauseBetweenTracks by AartJan Bergshoeff, aartjan.nl, 2008

*****PRESS ESCAPE to end the script and to return to iTunes*****

This scripts adds a pause between tracks and neatly fades out each track.
It plays random tracks of a given playlist. You can set the volume, the name of the playlist, the fade duration and the length of the pause.

Set fadeout duration delay to zero on slower computers.
*)
repeat

tell application "iTunes"

set the sound volume to 70 -- set the volume 0-100
play some track of playlist "DVD" -- Change this to your playlist
delay (get the duration of the current track) - 8 -- Start fadeout
repeat with i from sound volume to 0 by -1
set the sound volume to i
delay 0.09 -- Adjust this to change fadeout duration
end repeat
pause
delay 90 -- Seconds of pause between tracks

end tell

end repeat
 

S2_Mac

New member
Joined
Oct 24, 2006
Messages
4,876
Points
0
Location
About 3 feet in front of the monitor
Hey, that's great. I tried to look up the NeedleDrop script you mentioned, but the download link has gone dead. Wanted to look at the others, but had no StuffIt laying around ;-) oh well....

In case you'd like to do more of this kind of stuff, here's a version with some common "features" added -- user-selected playlist and volume level instead of hardwired code, increment play count when tracks don't finish, a fudge factor, and configuration up top.

Code:
property fade_time : 8 -- integer seconds
property time_between_tracks : 90 -- integer seconds
-- if tracks finish before they fully fade, make fade_adjustment smaller; 
-- if tracks fully fade well before they finish, make fade_adjustment larger.
property fade_adjustment : 72 -- should be integer ~ in range 60 to 80


tell application "iTunes"
	-- only run if playlist is selected
	set src to container of view of front browser window
	if kind of src is not library then display dialog "Select a playlist" buttons {"Cancel"} default button 1 with icon 0
	
	-- get the selected playlist
	set play_list to view of front browser window
	
	-- store user's current volume level
	set user_volume to the sound volume -- will be integer 0-100
	if user_volume = 0 then set user_volume to 70
	
	-- set a time increment for fading
	set fade_increment to ((((fade_adjustment * fade_time) / user_volume) div 1) * 0.01)
	
	-- if fade time is short, cut the work in half
	set decr to -1
	if (fade_time < 4) and (user_volume > 50) then
		set fade_increment to fade_increment * 2
		set decr to -2
	end if
	
	repeat
		set the sound volume to user_volume
		play some track of play_list
		set trak to current track
		delay (get the duration of the current track) - fade_time
		repeat with i from user_volume to 0 by decr
			set the sound volume to i
			delay fade_increment
		end repeat
		pause
		
		-- if track isn't finished, increment its play count
		try
			if current track is trak then set played count of current track to ((played count of current track) + 1)
		end try
		
		delay time_between_tracks
	end repeat
	
end tell
 
Top