Skip to main content
Topic: How to - Add extra buttons to foobar? (Read 590 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to - Add extra buttons to foobar?

In the fight of getting my music-collection in shape, I found out about foobar and its cool plugin quick tagger.
I've made a demo + tutorial, how to quickly tag genre, mood and energy to your music in 25 seconds per track!

https://www.youtube.com/watch?v=h3dYAMNywOI

After I wanted to do multiple actions based on same shortcut keybinding wise, I realised quick tagger wouldnt do the trick.
but Masstagger does!

Now that I got the hang of this, I want to go a step further.
Like what if I could display extra buttons that would do the shortcut keybindings (so I dont have to remember all the shortcuts).
I came up with a quick mockup, like this:



Sure, it doesnt have to look this fancy, but u guys prolly get the point.

How would I create extra buttons in foobar (with a simple ''what-it-does:Low energy'' showing on top) and when clicked,
it would do a shortcut key-binding (for example CTRL-1 to set the Energy to Low RATING WMP-wise) ?

Re: How to - Add extra buttons to foobar?

Reply #1
Hey there,

I would say you have two options: the easy way and the hard way! ;) The easy way would simply be using the built-in method to create a row of toolbar buttons. (Right-click default toolbar > Customize buttons...) Find some images online or make them yourself to label the buttons what you need. The downside to this being, 1) it has to be an actual row of buttons (not like that fancy image), and 2) getting the images into small toolbar-sized .ICO forms while not looking blurry can be frustrating. Every time I've tried to make some myself, foobar does not like showing them clearly. It probably helps if the toolbar is on its own separate line from the menus or anything else.

The hard way would be getting the JScript Panel plugin and learning to code light amounts of javascript to make any kind of buttons and foobar layout you can imagine. I believe a bit of the background is done for you, as it comes with examples and you can study other folks work, like the trilogy of JS Smooth scripts. I've been meaning to get into this myself when I get a spare 6 months. :D From what I've glanced at I believe you can make buttons using either image files, or by using picture fonts (must be installed) and referencing a character in the script for each button. After you learn the ropes there is a discussion thread to ask for help, probably worth reading a lot of it first as well.

EDIT: As for putting key bindings on the (toolbar) buttons [...] Oh, Masstagger scripts, they can be found through the context menu to go on to buttons.

Best of luck 8)


Re: How to - Add extra buttons to foobar?

Reply #3
If you want more flexibility to shape foobar in the way you want you need to move away from using default ui. Columns UI is a good alternative while still being accessible instead of using jscript which I wouldn't advise at all unless you have prior programming skills specifically using javascript.

familiarize yourself with the basics of columns ui and panel stack splitter.

From the panel stack splitter wiki, things you'll need:
To display an image:
Code: [Select]
$imageabs(x,y,w,h,path,OPTIONS,n,alpha,OPTIONS2)

To set a text button:
Code: [Select]
$textbutton(x,y,w,h,text,mover_text,command,options1,options2)

You can use an image button if you want that:
Code: [Select]
$imagebutton(x,y,w,h,path,mover_path,command,options1,options2)

The command part let's you set any action you like. This also includes masstagger actions.

Re: How to - Add extra buttons to foobar?

Reply #4
Awesome, thank you guys!

For now, I'll settle with Columns UI component and using custom-made PNG's, binded to the Quick and Masstagger actions.

Not finished yet, but it starts to look like something  ;)


Re: How to - Add extra buttons to foobar?

Reply #5
That looks pretty sweet @snowseals 8) - they are some big buttons!

Man, foobar is massive time sink. I swear I lost 12 hours yesterday. :D

Re: How to - Add extra buttons to foobar?

Reply #6
Haha, indeed!

Made a button, so all the dummy fields will be written to the more common comment tag, so any DJ app will read it \o/
https://gyazo.com/8ae22ea85060ab30e9e02f6f9c6125f6

Speaking of....
Is there a way to make this concept a package, so ppl could import it straight away (incl. premade-buttons + actions)?

I assume they would need to install Columns UI + Quick/Masstagger 1st.

And will this work on a MAC too using the Mac-variant of foobar?
Or should they use a WINE bottler in order to have the same functionality (esp. afraid the PNG buttons won't work @ native mac app)


Re: How to - Add extra buttons to foobar?

Reply #7
Made a quick video demo + portable version of it (and created relative paths for the pics on the buttons, so should be all good):

https://youtu.be/e64nKI7p9_Y

Portable version: https://mega.nz/#!lR4nFSIS!010IPMZJUqIK4aAEQ1mEKL5kpR-0VEqm64AydQM7hxg
Virustotal report: https://www.virustotal.com/#/file/f50a04164255dfaa590f97c16a5ffa80f701327ae442ab488a729bdfe8931a54/detection

Re: How to - Add extra buttons to foobar?

Reply #8
Snowseals the mega link is now down, can you please reshare your layout, it would be really appreciated.

 

 
SimplePortal 1.0.0 RC1 © 2008-2018