Invoking script file from song title

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
carl1011
Posts: 41
Joined: Tue Mar 24, 2015 3:56 pm

Invoking script file from song title

Post by carl1011 »

My son recently purchased G-Force and I'm helping him with programming. I wrote a script file which works using the keyboard 'Read' command. Documentation indicates two other ways to invoke a script file. I'm interested in using the 'song title' to initiate a script sequence rather than the keyboard. I can find no information as to which file directory to save the script file so it can be read by G-Force on the start of the song being played. Also, what are the naming conventions e.g. should it have an extension of "txt" or "py"?

carl1011
Posts: 41
Joined: Tue Mar 24, 2015 3:56 pm

Post by carl1011 »

I need to add additional information.

I did place the script file in the G-Force "scripts" directory with a .txt extension. But on loading the visualizer in Windows 7 Media Player it still wouldn't read the script based on the song title. The file is an MP3 with the name ID the same as the directory file name.

I turned on the G-Force "debug" mode and can see there is no activity being recorded during startup to read the script file. I have a duplicate of the script file attached to key "3" and it runs using the "Read" script method in the Help dialog box.

jerohm
Senior Member
Posts: 421
Joined: Fri Jan 09, 2009 5:19 pm

Post by jerohm »

I haven't played with scripts much, since they have been converted to Python. So the first thing, I ASSume that your script files need to have the '.py' extension.

I believe the script file needs to have the exact same 'base' name as the music file you are trying to play.

That said, the script files, prior to 5.x, were indeed '.txt' files, and I am not completely convinced that all the features that used to work, or were available, still work after the Python re-write. Don't overlook there are TWO script folders (Win7), The global scripts folder:
- C:\Program Files (x86)\SoundSpectrum\G-Force\Scripts
and
- C:\Users\Accountname\AppData\Roaming\SoundSpectrum\G-Force\Scripts
for your personal stuff.

I am NOT the one that is the authority on this subject, but it might give you a few things to try.

luck

(FWIW - I actually spent a few minutes, and I COULDN'T get it to work)

carl1011
Posts: 41
Joined: Tue Mar 24, 2015 3:56 pm

Post by carl1011 »

Thanks Jerohm for the reply. I actually have three script files with the same song title as the filename in the scripts directory and other pertinent directories (just in case) - one file with no extension, one with "txt" and the other with "py". None of them work.

As indicated before I did turn on the debugger to watch the effect my code has on the visualizer. So far the only success I've had with scripting is to force the visualizer window to go full size on startup.

I used to program in my youth but Python seems very hostile to my sloppy formatting habits.

jerohm
Senior Member
Posts: 421
Joined: Fri Jan 09, 2009 5:19 pm

Post by jerohm »

... which is 'one' of my main beefs with Python, and the whole object paradigm. While is ENFORCES discipline when trying to coordinate a plethora of programmers' efforts, its syntax also adds a level of arcane abstraction, making simple tasks a chore (, saying nothing about its intelligibility to the layman ). Python makes for a crappy 'general purpose' scripting solution PERIOD! (If there is even the least amount of doubt in your mind about this, look at a pre 5.x script, and what it has now morphed into... YOU HAVE GOT TO BE KIDDING :? !!!)

but G-Force REMAINS my favorite program EVER!!

People scoff/belittle Perl, but what it 'may' lack in readability, is more than compensated by its ability to address reasonably complex tasks, with minimal effort... but of course, these are just my findings.
:wink:

File a problem report and get your issue in queue.

FrankN
Posts: 316
Joined: Thu Mar 07, 2013 11:19 pm

Post by FrankN »

Hi Guys,

I see and here you on this issue. Carl, why don't you open up a support query, and we'll work on this together? When we get a solution, we'll post it here.

Jerohm, I'm sorry you don't like our scripting regime, but we wanted to transfer over to something with more support and documentation than we can currently provide. We also wanted something that would be readable. Every language has it's drawbacks, and you're right on the money with your complaints. We'll do our best to address them in the future.

carl1011
Posts: 41
Joined: Tue Mar 24, 2015 3:56 pm

Post by carl1011 »

I submitted a query to G-Force support and received the following reply "the title track scripting feature was not carried over when we changed to the Python regime."

Following the update to Python this feature was removed but the documentation was not updated. It's unfortunate that song title scripting is no longer available but using keyboard scripting assignment is a good alternate.

FrankN
Posts: 316
Joined: Thu Mar 07, 2013 11:19 pm

Post by FrankN »

Yes, and I'm working on correcting the documentation. Thanks for your support, Carl!

Post Reply