Note that this demo is useless when running in Standalone mode since the standalone vis never gets any info about when a track starts playing (and is only available in iTunes, JRMC, WMP, etc).
If you're new to SoundSpectrum visual scripting, check out G-Force/Scripts/Example Script.py and you can follow along as it runs using the patch below.
Code: Select all
    def OnTrackChange( self, inStartTime = -1 ):
        if inStartTime < 0:
            self.TrackChangeTime = self.mTimeIndex
        else:
            self.TrackChangeTime = inStartTime
        self.StopTrackOverlay()
        # Make new tracks cause a general visual changeup
        if TrackInfoIsAvailable():
            if self.mTimeIndex > self.TRACK_CHANGE_INITIAL_IGNORE:
                self.InsertVisEdit( self.mTrackStartVisEditParams )
            self.TrackChangePending = True
            self.AlbumCoverArtNeeded = True
            ###############################################################
            ###  Patch to run scripts with the name of songs that play  ###
            ###############################################################
            script_name = GetTrackText_Private( "#TITLE#-#ARTIST#.py" )
            script_pathname = "/Scripts/" + script_name
            if GetFileSize(script_pathname) > 0:
                print("Running: '%s'" % script_pathname)
                RunFile(script_pathname, self.CreateUserScript().namespace)
            else:
                print("Didn't find '%s' running other script" %  script_pathname)
                script_pathname = "/Scripts/Example Script.py"
                RunFile(script_pathname, self.CreateUserScript().namespace)