Skip to main content

Topic: foo_run 0.3.7 (Read 452979 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Pollux88
  • [*]
Re: foo_run 0.3.7
Reply #525
Great plugin. I use it to run Spek spectral viewer on files (to tell fake lossless from real lossless), because fooCDtect gives dubious results more often than not.
However if the file is an image+cue sheet, playlist references the .cue file, so when you feed the path to Spek, it tries to open .cue file and expectedly fails. I wrote a little script to circumvent this.
Code: [Select]
D:\spek.exe "$if($and($stricmp($right(%path%,7),wav.cue),$stricmp($left(%__codec%,6),Monkey)),$left(%path%,$sub($len(%path%),7))ape,$if($and($stricmp($right(%path%,7),wav.cue),$stricmp(%__codec%,WavPack)),$left(%path%,$sub($len(%path%),6))wv,$if($and($stricmp($right(%path%,7),wav.cue),$stricmp(%__codec%,FLAC)),$left(%path%,$sub($len(%path%),7))flac,$if($stricmp($right(%path%,7),ape.cue),$left(%path%,$sub($len(%path%),7))ape,$if($stricmp($right(%path%,6),wv.cue),$left(%path%,$sub($len(%path%),6))wv,$if($stricmp($right(%path%,8),flac.cue),$left(%path%,$sub($len(%path%),8))flac,$if($and($stricmp($ext(%path%),cue),$stricmp(%__codec%,FLAC)),$left(%path%,$sub($len(%path%),3))flac,$if($and($stricmp($ext(%path%),cue),$stricmp(%__codec%,WavPack)),$left(%path%,$sub($len(%path%),3))wv,$if($and($stricmp($ext(%path%),cue),$stricmp($left(%__codec%,6),Monkey)),$left(%path%,$sub($len(%path%),3))ape,%path%)))))))))"
It relies on the .cue file being named either exactly the same as .flac, .ape, or .wv file, or be named the same and end with .wav.cue, .ape.cue, etc. This should cover most of the cases, but if there are differences in file names before extension, it will not work.
Hope someone finds this helpful.

  • davideleo
  • [*][*][*][*]
Re: foo_run 0.3.7
Reply #526
Any suggestion for a script that runs a google image search of the album art? The picture is either in the parent directory or an embedded icon.
I'm late

  • radecke
  • [*][*]
Re: foo_run 0.3.7
Reply #527
Any suggestion for a script that runs a google image search of the album art? The picture is either in the parent directory or an embedded icon.

is use album art downloader for that: https://sourceforge.net/projects/album-art/

here's the script:
".\AlbumArtDownloader\AlbumArt.exe" /ar "%album artist%" /al "%album%" /p "$replace(%path%,%filename_ext%,)folder.%%extension%%" /minSize 300 /coverType front
--> neugablonz.de ;)

  • jazzthieve
  • [*][*][*][*]
Re: foo_run 0.3.7
Reply #528
Any suggestion for a script that runs a google image search of the album art? The picture is either in the parent directory or an embedded icon.

Here's what I use for google
Code: [Select]
https://www.google.be/search?safe=off&hl=en&site=imghp&tbm=isch&source=hp&biw=1920&bih=927&q=$replace(%artist%,' ','+','&','and')+$replace(%album%,' ','+','&','and')

  • fabiospark
  • [*][*][*][*][*]
Re: foo_run 0.3.7
Reply #529
Any suggestion for a script that runs a google image search of the album art? The picture is either in the parent directory or an embedded icon.

is use album art downloader for that: https://sourceforge.net/projects/album-art/

here's the script:
".\AlbumArtDownloader\AlbumArt.exe" /ar "%album artist%" /al "%album%" /p "$replace(%path%,%filename_ext%,)folder.%%extension%%" /minSize 300 /coverType front
I've tried to use your string but I'm getting an error.
Shall I have to complete it or change it in same way?

Thanks.

  • PeteG
  • [*][*][*]
Re: foo_run 0.3.7
Reply #530
@fabiospark

Are you using 64 bit Windows? It might be the ".\" in the path that's giving trouble. From the AAD change log:
Quote
Installer now points to "Program Files" rather than "Program Files (x86)" on 64 bit systems.
Hence you should use full path:
Code: [Select]
"C:\Program Files\AlbumArtDownloader\AlbumArt.exe" [options]
Here's another one you can try, with automatic saving of images by type
Code: [Select]
"C:\Program Files\AlbumArtDownloader\albumart.exe" /ar "%album artist%" /al "%album%" /p "$replace(%path%,%filename_ext%,)'%type(cover,cover,back,inside,cd)%'.'%extension%'"
In AAD's main window set Group by: Type and Sort by: Size.
cover is written twice to avoid naming an unknown image type unknown(!). Rename as wanted, e.g. folder,folder or front,front.

Edit: Typo
  • Last Edit: 11 June, 2016, 09:47:53 PM by PeteG

  • fabiospark
  • [*][*][*][*][*]
Re: foo_run 0.3.7
Reply #531
Sorry not to have noticed it before but it seems I have some problem
with AAD itself because when I launch it I'm getting a window with this error:

Quote
Searching for scripts...
Found 1 files: [util.boo]...
Loading references: [System.Web]...
Compiling scripts...
util.boo(76,12): error BCE0005: Unknown identifier: 'Regex'.

and I don't know what it means nor what to do.
I posted the issue in the HA AAD thread and I'm waiting for an answer.
If somebody here can help me about it, she/he'll be welcome.

Thanks.

  • fabiospark
  • [*][*][*][*][*]
Re: foo_run 0.3.7
Reply #532
Sorry to reply to myself but I understood that I didn't install the scripts,
together with AAD.
Now I did it and it seems to work.

Now a couple of questions:

Is there a way to download and save automatically album arts and artist pictures?

And, as I've started to be interested in album covers and artist pictures
only since I started to think to copy all my music on an Android device, now
that FB mobile has begun to walk, let me ask if somebody can help me to
understand which settings (picture size, picture files location, etc) should
I use to reach my goal.

Thanks.

  • fuffi
  • [*][*][*][*]
foo_run 0.3.7 and foobar2000_v1.3.11_beta_1 having problems? or is it just me...
Reply #533
Hello,

can anybody confirm, that foo_run 0.3.7 does not work/run smoothly with foobar2000_v1.3.11_beta_1 ?
Otherwise it would be a crazy coincidence...but some commands are executed, some are not (reproducable).

Not working (but did all the years until today):
Code: [Select]
"..\..\tc+path.cmd" /D /O /S /T "$substr(%_path%,0,$strrchr(%_path%,'\'))"
(opens a batch which opens a program called total commander with the current path of the selected track)
result:
Code: [Select]
Run: Cannot execute ""..\..\tc+path.cmd" /D /O /S /T "C:\William S. Burroughs\1998 - The Best Of William Burroughs From Giorno Poetry Systems (Mercury)\""

Not working (but did all the years until today):
Code: [Select]
".\user-components\AlbumArtDownloaderXUI\AlbumArt.exe" /ar "[%artist%]" /al "[%album%]" /p "C:\mp3\%%name%%.%%extension%%"
result:
Code: [Select]
Run: Cannot execute "".\user-components\AlbumArtDownloaderXUI\AlbumArt.exe" /ar "William S. Burroughs" /al "The Best Of William Burroughs From Giorno Poetry Systems" /p "C:\mp3\%name%.%extension%""

Working:
Code: [Select]
http://www.discogs.com/search?type=all&q=[$replace(%title%,' - ',+, ,+,'_',+,'&',+,'(',,')',,'[',,']',)]&btn=Search
(opens the default browser with discogs site, looking for the title of the selected track)
result: opens my brower ... fine.

I'm not sure, its me (the computer) or the new beta.
thanks/cheers/keep up the good work!

  • fuffi
  • [*][*][*][*]
Re: foo_run 0.3.7
Reply #534
EDIT: forgot to mention, that returning to the backup'ed files brought back the functionality which did not work in the beta of f2k.

  • fuffi
  • [*][*][*][*]
Re: foo_run 0.3.7
Reply #535
EDIT2: This "bug" is also found in the latest *stable* version of f2k 1.3.11, so I guess, if this component isnt updated, it'll never work again.
sadly... but thank you for the good time and all the time you saved me!

  • PeteG
  • [*][*][*]
Re: foo_run 0.3.7
Reply #536
@fuffi
I use this for AAD:
Code: [Select]
"C:\Program Files\AlbumArtDownloader\albumart.exe" /ar "%album artist%" /al "%album%" /p "$replace(%path%,%filename_ext%,)'%type(cover,cover,back,inside,cd)%'.'%extension%'"
Replace path to AAD. Replace %album artist% with %artist%.

Using your TC parameters (no idea what they do, too lazy to find out) – but without a cmd file – these two work as expected:
Code: [Select]
"C:\Program Files '('x86')'\totalcmd\totalcmd.exe" /D /O /S /T "$substr(%_path%,0,$strrchr(%_path%,'\'))"
Code: [Select]
"C:\Program Files\totalcmd\totalcmd64.exe" /D /O /S /T "$substr(%_path%,0,$strrchr(%_path%,'\'))"

foobar2000 v1.3.11. Total Commander 32/64 8.52a. Album Art Downloader 1.0.2.0.

  • fuffi
  • [*][*][*][*]
Re: foo_run 0.3.7
Reply #537
Thank you PeteG,

I cannot change the paths to the programs (TC or AAD or any other I use), because I'm in portable modus.
So those relative paths a essentially for starting those needed little helpers, like AAD or TC ...and will not work with absolute paths like "C:\foo\bar\2000\..."

I now, out of lazyness, updated f2k to the latest version, and copied back the old foobar2000.exe over the new one... ;-)
Works. (I know, I shouldnt do that...)

  • wcs13
  • [*][*][*]
Re: foo_run 0.3.7
Reply #538
Hi everybody,

Ideally I would need a foo_run command (linked to a shortcut key) tnat would :
- Send the currently selected song to a second instance of foobar (for prelistening purposes),
- [Option] Add it at the end of an existing playlist of the second instance (even if that playlist is not selected in the second instance),
- Start playing it immediataly.
- [Option] With the same shortcut key, make it Play/Pause : First press = send it to instane 2 + play, second press = pause. All that without leaving instance 1. I suppose this could be achieved with two separate shortcut keys, but it would be so much easier with only one, right ? ;)

Can this be achieved ? How ? Thanks.

Right now I have tried this simple command (see attached picture) but it doesn't work at all, nothing happens...

  • wcs13
  • [*][*][*]
Re: foo_run 0.3.7
Reply #539
Anyway, issue solved, well, sort of : https://hydrogenaud.io/index.php?topic=112703.new#info_928780 . Thanks !

  • xsdaver
  • [*]
Re: foo_run 0.3.7
Reply #540
I've been using foo_run for quite a while to turn on and off amplifiers through Promixis Girder.  I run batch files like this one using run services:

AmpOn.bat: "c:\program files (x86)\promixis\girder51\event.exe" AmpOffNow

This passes the text AmpOffNow to Girder which turns the amp off.  Simple, works.  Here's the run services setup window to run this batch file:



So now I'm trying to run another batch file to energize bits on my parallel port to change inputs on a little preamp/crossover I made.  This is one of the batch files:

select1.bat: copy 01.bin lpt1

If I double click on the batch file it works.  If I use run services from Foobar2000 to do it it does not work.  The DOS window flashes up but nothing happens.  This is the command in run services preferences:



I've tried it with and without the quotes, doesn't make a difference.  The path and file name was filled in by browsing from the setup window so it's entered correctly.  What am I missing?

  • xsdaver
  • [*]
Re: foo_run 0.3.7
Reply #541
So today everything works fine. I didn't change anything, it just started working.

  • JonnyGo
  • [*]
Re: foo_run 0.3.7
Reply #542
Thank for this foo_run. This will halp me make Foobar2000 and VLC work together.

===============================
Here what I do to play video in VLC and lessen audio with Foobar2000.

Step 1: Install Foobar2000 Component "Recorder".
Step 2: Install a "Virtual Audio Driver".
Step 3: In Win, set default audio input / output to Virtual Audio Driver.
Step 4: Start VLC and in Foobar2000 / File / Add Location, type "record://".

Foobar2000 Component "Recorder", Information:
- As of Nov 2016, the version is v0.1 2010-01-23.
- It record audio from the default sound card input.
- Only usable with "record://" in playlist entry syntax.
- Default audio format is 16 bit 44,100 Hz.
- The audio format is listed under File / Preferences / Advanced.
- After component installation, in Foobar2000,
  a right click on the component provide require information.

VLC
- Set VLC volume control to 100%, never over.
- Set VLC / Tools/ Audio track synchronization, -0.500 s.

Virtual Audio Driver, Information:
- The installation package could automatically install
  one Virtual Audio Driver for input and one for output,
  connect the Virtual Audio Driver output to the input,
  and set the default audio format to 16 bit 44,100 Hz.
- A setup software come with the Virtual Audio Driver.
- You may need to do this manually.
- Virtual Audio Driver = Virtual Audio Cable
- "VAC" (Wikipedia, Virtual Audio Cables) worked fine for me.


  • per1234
  • [*]
Re: foo_run 0.3.7
Reply #543
Is there any way to make this work with %ispaused%? That field is always absent no matter what the playback state of foobar2000 is. I'm trying to pass the playback state to another application:
Code: [Select]
"C:\Program Files '('x86')'\EventGhost\EventGhost.exe" -e $if(%ispaused%,paused,playing)
passes "playing" even when foobar2000 is paused.

If that is not possible is there any other way to accomplish this in foobar2000?

  • PeteG
  • [*][*][*]
Re: foo_run 0.3.7
Reply #544
@per1234.
I don't know anything about EventGhost, but if the program accepts a dynamically updated text file as input you might find Now Playing Simple of interest.
In the components preferences:
Point to a text file, e.g. C:\Users\YourName\AppData\Roaming\foobar2000\Eventghost.txt (you don't need to create the file).
Uncheck Log mode if necessary.
Activate all Events.
Use the same formatting string as you suggested
Code: [Select]
$if(%ispaused%,paused,playing)
NPS can update the text file as well on foobar2000 exit.

PS. You'll need 7-zip or similar to unpack the component.

  • per1234
  • [*]
Re: foo_run 0.3.7
Reply #545
@PeteG indeed EventGhost can read from text files and your suggestion works great. Thanks so much for your help!

  • sho
  • [*]
Re: foo_run 0.3.7
Reply #546
I am trying to open video files with GOM Player using this command

Code: [Select]
"C:\Program Files\GRETECH\GomPlayer\GOM.exe" "%path%"

Why does it work with .avi files, but not with .mpg files?

Really confusing. GOM Player can open both of them.

EDIT: I've just noticed that Run services command does not appear  in the playlist menu  for some .avi files, while for some others it does? Also, for the .mpg files it doesn't appear.

  • Last Edit: 08 April, 2017, 02:27:34 PM by sho

  • sho
  • [*]
Re: foo_run 0.3.7
Reply #547
I am trying to open video files with GOM Player using this command

Code: [Select]
"C:\Program Files\GRETECH\GomPlayer\GOM.exe" "%path%"

Why does it work with .avi files, but not with .mpg files?

Really confusing. GOM Player can open both of them.

EDIT: I've just noticed that Run services command does not appear  in the playlist menu  for some .avi files, while for some others it does? Also, for the .mpg files it doesn't appear.


UPDATE: I put video files' paths and some other properties into tags of small mp3 files i purposely created to manage the video files. In addition I added some run actions and now I can control the video files via run service actions and created mp3 files (their tags).

I think this should do the job well, since I didn't find a way to directly manipulate actual video files in foobar.

  • fuffi
  • [*][*][*][*]
Re: foo_run 0.3.7
Reply #548
I've been using foo_run for quite a while to turn on and off amplifiers through Promixis Girder.  I run batch files like this one using run services:
[...]
select1.bat: copy 01.bin lpt1
[...]
I've tried it with and without the quotes, doesn't make a difference.  The path and file name was filled in by browsing from the setup window so it's entered correctly.  What am I missing?
This is old, I know,
but,
for debugging purpurses,
it would be a good idea to add a SET and a PAUSE command into the called batch-file(s). Maybe directly at the top of the batch-file(s) or at the end, so you could see any output.

This way, you could see/print out some enviroment variables (like PATH or any other important to you).
You could also add a ECHO %CD% to know the current working path, to figure out, if some commands used in the batch are accessible.
Most of the time, batches don't work (when called from external programs) because they don't find the executables or the relative paths used by commands like move or xcopy, etc, are not reachable from within the batch.

So knowing where you are, could be helpful :-)

I wrote this, because I read this line "select1.bat: copy 01.bin lpt1" which has no paths like "C:\path\select1.bat: copy D:\path\01.bin lpt1"

Also, sometimes the path inside the shortcut for the f2k executable is important too and sometimes you start foobar2000.exe directly from windows explorer inside the f2k-program folder and sometimes from the mentioned shortcut (which points to another folder, like in the screenshot (sorry, german lang OS))


A lot of things could go wrong, when you not knowing where you are 8-)

just my 2 cents.... no need to argue ;-)