IPB

Welcome Guest ( Log In | Register )

20 Pages V  « < 14 15 16 17 18 > »   
Reply to this topicStart new topic
foo_run 0.3.7, run external applications from foobar2000
bsw11
post Dec 14 2010, 00:55
Post #376





Group: Members
Posts: 128
Joined: 19-April 09
From: Los Angeles CA
Member No.: 69081



This plugin is FANTASTIC!!

I am just one step away from total success.

I am using AutoIt to get around FB2K's limitation on not being able to change the output device - that works perfectly (if anyone is interested in the scripts let me know) assigned to function keys.

What I need to complete the deal is a way to query the current song automatically as it starts up and based on if the song is 2 or multi channel run one of my 2 scripts. If anyone know how to make this work, please provide me the needed scripting.

One other tweak needed is a way to only make the call if the channels are changed from the last track to the current otherwise there will be a small drop out in the sound.

Thanks!

This post has been edited by bsw11: Dec 14 2010, 00:58
Go to the top of the page
+Quote Post
lee321987
post Dec 14 2010, 10:00
Post #377





Group: Members
Posts: 13
Joined: 13-July 08
Member No.: 55759



You probably want Foobar to run the apps, which I don't know how to do, but a dirtier way would be to use AutoIt...
In Foobar2000:
File > Preferences > Display > Default User Interface > ---- the text box called "Status Bar"
What you type here effects the bottom "status bar" of Foobars' window.
Add a few very rare characters, and "%channels%" like:
CODE
▲▲▲%channels%

Then use "WinGetText" in AutoIt.
Oh, and the AutoIt code for those three triangles is:
CODE
$MyString = ChrW(9650) & ChrW(9650) & ChrW(9650)


This post has been edited by lee321987: Dec 14 2010, 10:02
Go to the top of the page
+Quote Post
bsw11
post Dec 14 2010, 17:51
Post #378





Group: Members
Posts: 128
Joined: 19-April 09
From: Los Angeles CA
Member No.: 69081



YES! After I did the post that is exactly what I was thinking - pass the channels into autoit and do all the logic in there. Can't I just pass %channels% on the command line? If not can you tell me how to type in those special characters in FB2K?

I am not very script code oriented - any way you could give me the autoit script as well?

I have already made the device change work from autoit - all I need is the code to do the logic as in:

load last_channel file
If channels = last_channels exit
If channels = 2 then
(code to set device to 2 ch which I have)
else
(code to set device to multich which I have)
endif
save last_channels to a file.

Also what code do I need to make this execute at the start of each track? Should I use foo_schedule or can it be done by foo_run?


THANKS!!!

This post has been edited by bsw11: Dec 14 2010, 17:51
Go to the top of the page
+Quote Post
bsw11
post Dec 14 2010, 21:37
Post #379





Group: Members
Posts: 128
Joined: 19-April 09
From: Los Angeles CA
Member No.: 69081



Edit - I got it working !!! I just used "| 6ch |" as the match and it works!

So I am using foo_scheduler to fire off the script at the start of each play - is that the way to do this?

Also I tired using %channels% on the command line but all I ever got was Stereo no matter what the source - seems like a bug of some type in foo_run. This would have been easier to do.



This post has been edited by bsw11: Dec 14 2010, 22:18
Go to the top of the page
+Quote Post
lee321987
post Dec 15 2010, 09:12
Post #380





Group: Members
Posts: 13
Joined: 13-July 08
Member No.: 55759



To type those chars into foobar, you could copy+paste them from this page, or in AutoIt:
CODE
Clipput(ChrW(9650) & ChrW(9650) & ChrW(9650))

will put them in your clipboard.

foo_scheduler seems like the perfect way to do it. I didn't even know it existed.
I figured out a way to do it from command line:
Foobar2000 for some reason (?) won't run the context commands created by "foo_run", but the component "foo_runcmd" will:
http://www.hydrogenaudio.org/forums/index....showtopic=46852
or
http://foosion.foobar2000.org/components/
it's called "Run Command" on that page. Install it, and restart Foobar.

Create a new foo_run Service, (I'll "Lable" it NumChan), and set the "path" to:
CODE
"<path to your AutoIt script>" %channels%


Set your Scheduler command to:
CODE
<path to foobar2000.exe> /runcmd-playing="Run service/NumChan"


Question:
How were you getting %channels% to pass to anything from command line?

This post has been edited by lee321987: Dec 15 2010, 09:15
Go to the top of the page
+Quote Post
lee321987
post Dec 15 2010, 11:17
Post #381





Group: Members
Posts: 13
Joined: 13-July 08
Member No.: 55759



The AutoIt script would be something like this:
CODE
$numchan = $cmdline[1]

$historyFile = @ScriptDir & '\lastChannels.txt'
$fileHandle = FileOpen($historyFile, 0)
$lastChans = FileRead($fileHandle)
FileClose($fileHandle)

If $lastChans = $numchan Then
Exit
ElseIf $numchan = 'Stereo' Then
;put under here what happens if the current track is stereo

ElseIf $numchan = '6ch' Then
;put under here what happens if it's 6 channel

EndIf

$fileHandle = FileOpen($historyFile, 2)
FileWrite($fileHandle, $numchan)
FileClose($fileHandle)

To keep track of last_channels, it will create and use a file called "lastChannels.txt" in the dir the script is run from.
You may want to add some more "ElseIf" statements especially one for if the result is "mono", and maybe one for "2ch" (if that's ever even a possible value of %channels%).

This post has been edited by lee321987: Dec 15 2010, 11:23
Go to the top of the page
+Quote Post
Porcus
post Dec 15 2010, 13:29
Post #382





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



QUOTE (bsw11 @ Dec 14 2010, 21:37) *
So I am using foo_scheduler to fire off the script at the start of each play - is that the way to do this?


Well, I only just downloaded foo_default_videoplayer, which -- when it encounters a filetype you specify -- will run an external file.
That means it is possible to retrieve this information from foobar2000. Don't ask me how.

A suggestion could be to save the 6chs in a different format (if they are FLAC you could probably only rename to .FLA? If they are lossy, do they fit a Matroska container?), and -- whichever way it is done -- take action based on filetype.

Or, if the 6ch audio is the only oddballs you have in your collection: configure a default "videoplayer" to play these -- this could merely be another foobar2000.exe!
Problem: Tell foobar to resume playback with next item when done with this.

This post has been edited by Porcus: Dec 15 2010, 13:30


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
zucca
post Dec 16 2010, 14:00
Post #383





Group: Members
Posts: 3
Joined: 6-June 09
Member No.: 70427



for Wikipedia Discography

CODE
"http://en.wikipedia.org/wiki/Special:Search?search=%artist% discography"
Go to the top of the page
+Quote Post
djphatic
post Jan 21 2011, 20:17
Post #384





Group: Members
Posts: 47
Joined: 13-December 09
From: Yorkshire
Member No.: 75891



I currently have 2 services mp3brfix and pcutmp3 as follows;

mp3brfix
CODE
cmd /c "java.exe -jar "C:\pcutmp3\mp3brfix.jar" -f "$directory_path(%path%)\%filename%.mp3"


pcutmp3
CODE
cmd /c "java.exe -jar "C:\pcutmp3\pcutmp3.jar" --cue "%path%" "$directory_path(%path%)\%__referenced_file%" --dir "$directory_path(%path%)\%album artist% - %album%" --out "%%n %%p - %%t"


Does anyone know how I could combine the 2 into one service so that mp3brfix will run first, fix the mp3 and the when finished pcutmp3 will run and split the file accordingly?

This post has been edited by djphatic: Jan 21 2011, 20:18
Go to the top of the page
+Quote Post
d_A_y
post Feb 27 2011, 10:02
Post #385





Group: Members
Posts: 1
Joined: 7-November 08
Member No.: 61921



i got an error on 64bit windows - for example, service "C:\Program Files (x86)\Mp3tag\Mp3tag.exe" isn't executing, log says
QUOTE
Run: Cannot execute "C:\Program Files "

double quoting the command just adds an extra quote in log:
QUOTE
Run: Cannot execute ""C:\Program Files "


it seems "(" is to blame - for example, service "C:\Program kinda files\Mp3tag\Mp3tag.exe" executing ok.
is there any way to fix that?
Go to the top of the page
+Quote Post
marc2003
post Feb 27 2011, 10:35
Post #386





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



"C:\Program Files '('x86')'\Mp3tag\Mp3tag.exe"
Go to the top of the page
+Quote Post
lvqcl
post Feb 27 2011, 10:37
Post #387





Group: Developer
Posts: 3206
Joined: 2-December 07
Member No.: 49183



"C:\Program Files '('x86')'\Mp3tag\Mp3tag.exe"

added: %$^$& !

This post has been edited by lvqcl: Feb 27 2011, 10:38
Go to the top of the page
+Quote Post
Bryter
post Mar 5 2011, 01:15
Post #388





Group: Members
Posts: 104
Joined: 28-March 10
Member No.: 79397



Is there any way to create a button inside Columns UI and link it to a foo_run command? I am interested in having a discogs button which will help me tag files easier.
I read (almost smile.gif ) all the pages of this thread, and i could not find an answer.
Go to the top of the page
+Quote Post
shiphtfour
post Apr 13 2011, 07:49
Post #389





Group: Members
Posts: 43
Joined: 26-May 09
Member No.: 70147



Can anyone help get foo_run to launch a search on beatport for the artist name?
Go to the top of the page
+Quote Post
Purple Monkey
post Apr 13 2011, 13:17
Post #390





Group: Members
Posts: 473
Joined: 25-June 05
Member No.: 22962



It doesn't look like that is possible since that site is completely flash (ugh!), with no URL search patterns as far as I can tell.

But there is one for the mobile site, although that might not be much use:
CODE
http://m.beatport.com/search/?query=$replace(%artist%, ,+)
Go to the top of the page
+Quote Post
shiphtfour
post Apr 16 2011, 19:19
Post #391





Group: Members
Posts: 43
Joined: 26-May 09
Member No.: 70147



Thanks Purple Monkey, I didn't think of using the mobile site. Serves its purpose for me, because I am just using Beatport to find the full release date of albums and eps.
Go to the top of the page
+Quote Post
vogliadicane
post Apr 16 2011, 23:41
Post #392





Group: Members
Posts: 298
Joined: 17-February 09
Member No.: 67105



@Purple Monkey: cool, tried to find a solution, but didn't think of the mobile version. So, thanks for apple for not accepting FLASH smile.gif
Go to the top of the page
+Quote Post
Ringo78
post Jun 15 2011, 02:43
Post #393





Group: Members
Posts: 10
Joined: 21-May 09
Member No.: 70007



QUOTE (hongmei @ Aug 2 2006, 10:26) *
discogs Artist Album
CODE
http://www.discogs.com/search?type=all&q=$replace(%artist%, ,+)&btn=Search
http://www.discogs.com/search?type=releases&q=$replace(%album%, ,+)&btn=Search


I'm looking for some help with Run Service scripts to search Discogs. The above quote is almost there but not quite.

What I'm trying to do is use foo_discogs to tag Year, Genre and Style - where musicbrainz is lacking. However while using the 'Find Release' interface is fine 95% of the time, sometimes theres a problem and I need a url from the site itself. For example with various artist compilations, odd characters, etc.

So I'd like to search for the following;

1. 'Album Artist' only
2. 'Album' only
3. 'Album Artist' + 'Album'

Also I'd like if 'Album Artist' is 'Various Artists', for this search string to be changed to 'Various'. Unfortunately searching for 'Various Artists - Scott Pilgrim' won't work, while 'Various Scott Pilgrim' will.



(Actually... I'd also quite like the above parameters for searching Album Art Exchange and Allmusic.)

Thanks for any advice smile.gif
Go to the top of the page
+Quote Post
JJForums
post Jun 23 2011, 02:59
Post #394





Group: Members
Posts: 87
Joined: 31-January 08
Member No.: 50934



help with foo_run and mp3 tag, i use this to open files in fb2k with mp3tag, and it opens the folder of the file: "C:\Program Files '('x86')'\Mp3tag\Mp3tag.exe" "$directory_path(%path%)" but when it is opened in mp3tag, the files are unselected, is possible auto select the openend files in mp3tag? thanks!
Go to the top of the page
+Quote Post
tpijag
post Jun 23 2011, 03:04
Post #395





Group: Members
Posts: 2337
Joined: 19-May 08
Member No.: 53637



Do you mean that mp3tag opens and nothing else or that the files are in mp3tag but unselected.
Assuming the first, this works for me
QUOTE
"C:\Program Files\Mp3tag\Mp3tag.exe" "$replace(%_path%,%_filename_ext%,)"
Go to the top of the page
+Quote Post
JJForums
post Jun 23 2011, 03:22
Post #396





Group: Members
Posts: 87
Joined: 31-January 08
Member No.: 50934



yes, it works, but the mp3tag doesn't select the files, they go to mp3tag but unselected, so, i have to select to do something, i want to know if is possible to mp3tag open with files just selected.
Go to the top of the page
+Quote Post
tpijag
post Jun 23 2011, 03:41
Post #397





Group: Members
Posts: 2337
Joined: 19-May 08
Member No.: 53637



Have no idea. The mp3tag forum is pretty active, maybe they can be of assistance.
For me, Ctrl-A is not too taxing biggrin.gif
Go to the top of the page
+Quote Post
Bryter
post Jul 3 2011, 17:33
Post #398





Group: Members
Posts: 104
Joined: 28-March 10
Member No.: 79397



I just figured that i can add custom buttons to foobar that will run foo_run programs/websites. How did i miss this before? huh.gif
Anyway, i would really appreciate if someone could help me to make a command that will open what.cd's artist page. This is what the search engine looks like in Chrome:

CODE
http://what.cd/artist.php?artistname=%s


Anyway to make compatible with foo_run?
Go to the top of the page
+Quote Post
tnnds
post Jul 3 2011, 17:43
Post #399





Group: Members
Posts: 17
Joined: 21-June 11
Member No.: 91731



http://what.cd/artist.php?artistname=$replace(%artist%, ,+)
Go to the top of the page
+Quote Post
Bryter
post Jul 3 2011, 18:48
Post #400





Group: Members
Posts: 104
Joined: 28-March 10
Member No.: 79397



^Perfect! Thank you so much smile.gif
Go to the top of the page
+Quote Post

20 Pages V  « < 14 15 16 17 18 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th April 2014 - 06:22