User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Wed Feb 19, 2020 2:03 pm

Hi zLagose

That looks correct; have you double checked the filename and locations? If you want you can zip the skin up and send it to me to check.

Cheers
Mike

User avatar
zLagos
Posts: 46
Joined: Wed Apr 11, 2018 3:32 pm
Location: Villanueva de la Cañada (Madrid) ESPAÑA

Re: fruitbox MP3 jukebox

Thu Feb 20, 2020 10:17 am

fruitbox wrote:
Wed Feb 19, 2020 2:03 pm
Hi zLagose

That looks correct; have you double checked the filename and locations? If you want you can zip the skin up and send it to me to check.

Cheers
Mike
Hi Mike

I have already sent you the skin by email.

And by the way I told you one thing, the boot options --load-playlist and --save-playlist do not see anything operational.

Wouldn't it be better to have an option in the fruitbox.cfg? Something like:

Code: Select all

 SaveLoadPlayList = <filename> 
And if this line is missing or has no filename, fruitbox would ignore it, but if not, it would save and read the <filename> file.

Also the boot lines, like this one, will become too long:

Code: Select all

/home/pi/rpi-fruitbox-master/fruitbox --choose-cfg skins.txt /home/pi/rpi-fruitbox-master/skins/Touch6Albums/fruitbox.cfg --no-database-update -load- playlist mp3.txt --save-playlist mp3.txt
Well, it's just an idea, you don't have to listen to me.

Thanks for your help.

DA313
Posts: 23
Joined: Fri Jun 07, 2019 12:00 am
Location: United States, Georgia

Re: fruitbox MP3 jukebox

Fri Feb 21, 2020 5:35 am

Mike,

I just got a touchscreen to start a second (I know, right!?!?!) jukebox project. I'm having trouble calibrating the buttons to the TouchOne skin. How can I see where on the screen the button is so that I touch it in the right place for the button config file?

I searched the forum, but forgive me if I missed the answer somewhere.

Joe
"From this nettle, danger, we pluck this flower, safety." (Shakespeare, Henry IV)

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Fri Feb 21, 2020 8:35 am

DA313 wrote:
Fri Feb 21, 2020 5:35 am
Mike,

I just got a touchscreen to start a second (I know, right!?!?!) jukebox project. I'm having trouble calibrating the buttons to the TouchOne skin. How can I see where on the screen the button is so that I touch it in the right place for the button config file?

I searched the forum, but forgive me if I missed the answer somewhere.

Joe
Hi Joe

Run fruitbox as follows...

Code: Select all

sudo ./fruitbox --config-buttons --calibrate-touch
Then, for your buttons you want to be controlled by touch, when asked, just touch the screen *anywhere*. All this does is tell fruitbox that those buttons are touch controlled. What region of the screen they correspond to is specific to the skin, and hence is defined in the [touch areas] section of the skin configuration file.

Cheers
Mike

User avatar
zLagos
Posts: 46
Joined: Wed Apr 11, 2018 3:32 pm
Location: Villanueva de la Cañada (Madrid) ESPAÑA

Re: fruitbox MP3 jukebox

Fri Feb 21, 2020 11:25 am

zLagos wrote:
Thu Feb 20, 2020 10:17 am
fruitbox wrote:
Wed Feb 19, 2020 2:03 pm
Hi zLagose

That looks correct; have you double checked the filename and locations? If you want you can zip the skin up and send it to me to check.

Cheers
Mike
Hi Mike

I have already sent you the skin by email.

And by the way I told you one thing, the boot options --load-playlist and --save-playlist do not see anything operational.

Wouldn't it be better to have an option in the fruitbox.cfg? Something like:

Code: Select all

 SaveLoadPlayList = <filename> 
And if this line is missing or has no filename, fruitbox would ignore it, but if not, it would save and read the <filename> file.

Also the boot lines, like this one, will become too long:

Code: Select all

/home/pi/rpi-fruitbox-master/fruitbox --choose-cfg skins.txt /home/pi/rpi-fruitbox-master/skins/Touch6Albums/fruitbox.cfg --no-database-update -load- playlist mp3.txt --save-playlist mp3.txt
Well, it's just an idea, you don't have to listen to me.

Thanks for your help.
Este tema queda cerrado y solucionado.

Este arranque funciona perfectamente:

Code: Select all

/home/pi/rpi-fruitbox-master/fruitbox --cfg /home/pi/rpi-fruitbox-master/skins/TouchWhite/fruitbox.cfg  --load-playlist mp3.txt --save-playlist mp3.txt

User avatar
zLagos
Posts: 46
Joined: Wed Apr 11, 2018 3:32 pm
Location: Villanueva de la Cañada (Madrid) ESPAÑA

Re: fruitbox MP3 jukebox

Fri Feb 21, 2020 7:42 pm

Hi, Mike

I have a problem with the Mute button, and I think this time I haven't eaten any space.

I have created a mute_button.png button and a mute_pressed.txt file that contains:

Code: Select all

$IF_BUTTON_MUTE_PRESSED$DRAW_BITMAP$END_IF
$IF_NOT_BUTTON_MUTE_PRESSED$UNDRAW_BITMAP$END_IF
And in the fruitbox.cfg I have the following:

Code: Select all

[status]
Position = 108 359
Size = 54 54
Bitmap = mute_button.png
Contents = mute_pressed.txt


[touch areas]
ButtonVol-       =  54 359 54 54
ButtonMute       = 108 359 54 54 
ButtonVol+       = 162 359 54 54
I don't know if I need anything else, because the mute_button doesn't appear on the screen when I press its region and of course the fruitbox doesn't shut up.

Thanks for your help.

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Fri Feb 21, 2020 8:06 pm

zLagos wrote:
Fri Feb 21, 2020 7:42 pm
Hi, Mike

I have a problem with the Mute button, and I think this time I haven't eaten any space.
Hi

Is the mute button configured for touch? In fruitbox.btn you need the line...

Code: Select all

ButtonMute = Touch
If not, the mute button will default to the 'M' key on the keyboard.

If all this seems over complicated, then there's a good reason; I deliberately split the button mapping from the skin files, because then that means that a skin is independent of your hardware (button) setup...so if anyone designs a skin it can potentially be used by someone else whose buttons are mapped differently (I.e. controlled by GPIO and not the keyboard for example). The skin config file not the button mapping file holds the touch regions because of course the touch regions relate to the design of the skin itself, (and are only used if a button has been mapped for touch input). The status objects to animate the button presses again are skin and not button hardware related so that's why they are part of the skin too. This approach gives the most flexible solution.

Cheers
Mike

DA313
Posts: 23
Joined: Fri Jun 07, 2019 12:00 am
Location: United States, Georgia

Re: fruitbox MP3 jukebox

Fri Feb 21, 2020 10:23 pm

fruitbox wrote:
Fri Feb 21, 2020 8:35 am
DA313 wrote:
Fri Feb 21, 2020 5:35 am
Mike,

I just got a touchscreen to start a second (I know, right!?!?!) jukebox project. I'm having trouble calibrating the buttons to the TouchOne skin. How can I see where on the screen the button is so that I touch it in the right place for the button config file?

I searched the forum, but forgive me if I missed the answer somewhere.

Joe
Hi Joe

Run fruitbox as follows...

Code: Select all

sudo ./fruitbox --config-buttons --calibrate-touch
Then, for your buttons you want to be controlled by touch, when asked, just touch the screen *anywhere*. All this does is tell fruitbox that those buttons are touch controlled. What region of the screen they correspond to is specific to the skin, and hence is defined in the [touch areas] section of the skin configuration file.

Cheers
Mike
As always, you are awesome.
"From this nettle, danger, we pluck this flower, safety." (Shakespeare, Henry IV)

User avatar
karrika
Posts: 1115
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 9:25 am

I just got a new Pi4 cheap and decided to give the compilation a try. It obviously compiles out of the box with minor changes to the Makefile. I used the stock allegro5 and stock libmpg123.

One thing I tought of doing is to build the gpio on top of /dev/gpiomem instead of /dev/mem. The benefit would be that there is no reason to run as root after this as the standard pi-user is a member of gpio.

Another thing is to add a keyword --no-splash to bypass the rolling fruitbox logo at startup.

I used Fruitbox for demonstrating entries of a programming competition last year. This year I would love to create a new skin and make a presentation application for Silly Ventures in Gdansk.

The basic change I would like to do is introduce a new startup option --no-splash for starting up Fruitbox faster without the extra intro. Another desired addition would be a button Launch that would allow me to exit Fruitbox and launch a new application.

In this way I could present small video clips about contestants. When you want to try out the game you press "Launch" and then the Fruitbox ends and the emulation application starts. The launch data "launch.sh onduty" would be in the music db. When the game is finished you automatically launch Fruitbox again.

I don't need to include these functions in github. But if you feel that this kind of use of Fruitbox is within the frames of the project I could later make a pull request.

Image
I found out that WurlyVideo looked really nice inside this fake jukebox frame. Lots of people were amazed by the moving records. It was kind of an eye catcher at the expo.

Once they got interested in a game I had a small USB joypad for playing the game and run it in full screen in my 10" HDMI display.

The fruitbox was controlled by a standard USB numeric keypad. I just glued on new labels to every keytop. The ESC key was used as "Launch".

The screen run on AA batteries and the Pi + speakers run of a 13000mAh power pack. Easy to set up and light to carry around the world.
Last edited by karrika on Sat Feb 22, 2020 9:45 am, edited 1 time in total.

User avatar
zLagos
Posts: 46
Joined: Wed Apr 11, 2018 3:32 pm
Location: Villanueva de la Cañada (Madrid) ESPAÑA

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 9:44 am

fruitbox wrote:
Fri Feb 21, 2020 8:06 pm
zLagos wrote:
Fri Feb 21, 2020 7:42 pm
Hi, Mike

I have a problem with the Mute button, and I think this time I haven't eaten any space.
Hi

Is the mute button configured for touch? In fruitbox.btn you need the line...

Code: Select all

ButtonMute = Touch
If not, the mute button will default to the 'M' key on the keyboard.

If all this seems over complicated, then there's a good reason; I deliberately split the button mapping from the skin files, because then that means that a skin is independent of your hardware (button) setup...so if anyone designs a skin it can potentially be used by someone else whose buttons are mapped differently (I.e. controlled by GPIO and not the keyboard for example). The skin config file not the button mapping file holds the touch regions because of course the touch regions relate to the design of the skin itself, (and are only used if a button has been mapped for touch input). The status objects to animate the button presses again are skin and not button hardware related so that's why they are part of the skin too. This approach gives the most flexible solution.

Cheers
Mike
Indeed, that has been exactly what happened to me. In the skin, going from 9 buttons to 15, I forgot to add the ButtonMute, which is 16. When not being in the foreground, I counted 15 buttons on the screen and forgot the mute button, which only appears when pressed.
Good thing you've seen it right away.
Thank you. As always, your help is priceless, Mike.

Saludos,
Iñaki.

User avatar
zLagos
Posts: 46
Joined: Wed Apr 11, 2018 3:32 pm
Location: Villanueva de la Cañada (Madrid) ESPAÑA

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 9:47 am

karrika wrote:
Sat Feb 22, 2020 9:25 am
The basic change I would like to do is introduce a new startup option --no-splash for starting up Fruitbox faster without the extra intro. Another desired addition would be a button Launch that would allow me to exit Fruitbox and launch a new application.
To me in particular, the splash of the beginning seems to me one of the most nice features of fruitbox. It does not bother anything and lasts just the right time.
It's just my opinion, of course.
Regards

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 9:51 am

karrika wrote:
Sat Feb 22, 2020 9:25 am

Image
Hi Karrika

I'm always open to improving fruitbox. The /dev/gpiomem implementation is especially of interest to me since running fruitbox in super user mode has always bothered me. The launch feature again sounds useful too. I'm not excited about the --no-splash option because it could remove the free fruitbox advert! However, I'll accept it to be included if it improves your presentation (and since the source code is freely available someone could hack it out anyway!)

If you've made any of these changes feel free to send them to me...probably best not as a GitHub pull request because the code base I'm working on now for the next release has a lot of changes in relative to the current release so it'll be easier for me to incorporate them manually I think. You can email to me at rpi-fruitbox (at) outlook (dot) com

Once again, thanks for your ideas and contribution.

Cheers
Mike

User avatar
karrika
Posts: 1115
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 10:42 am

Thanks Mike,

I also like the animated fruitbox logo. Perhaps it would be ok to touch a dummy file like /tmp/fruitbox at startup. In cases where fruitbox has frequent re-starts it would show the logo at most once per 10 minutes.

Then at first startup you get the logo and during the presentation it gets automatically muted.

Edit. There could be an option
--suppress-logo 60

If the option is not given it works as today - you always see the logo at startup.

If the option is given:
- if /tmp/fruitbox is missing or it is older than 60 s show logo at startup
- after logo is shown touch /tmp/fruitbox

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 1:02 pm

Hi Karrika

No worries, it's all done (--no-splash option and /dev/gpiomem modifications). They will be in the next release. I'll also add the 'Launch' feature for the next release too.

Cheers,
Mike

User avatar
karrika
Posts: 1115
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 8:05 pm

Thanks Mike! Sounds awesome. I assume I should start working on my Silly Ventures skin in that case. It should have an Atari flavour with lots of retro/pinball feelings from the past.

malice007
Posts: 3
Joined: Sat Feb 22, 2020 8:29 pm
Location: Pittsburgh, PA
Contact: Website

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 8:40 pm

Installed FruitBox, using the TouchOne Skin. But I have a ton of Unknown Titles. I edits all the MP3s Meta thinking this may be it but I still have it. Makes it look horrible when you scroll and see Unknown for like 3 pages or more. Any suggestions on fixing this to clean it up?

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Sat Feb 22, 2020 8:40 pm

karrika wrote:
Sat Feb 22, 2020 8:05 pm
Thanks Mike! Sounds awesome. I assume I should start working on my Silly Ventures skin in that case. It should have an Atari flavour with lots of retro/pinball feelings from the past.
Sounds great. The new version has lots of new cool features. Existing skins will need to be modified slightly, but nothing too serious.

Cheers
Mike

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Sun Feb 23, 2020 8:49 am

malice007 wrote:
Sat Feb 22, 2020 8:40 pm
Installed FruitBox, using the TouchOne Skin. But I have a ton of Unknown Titles. I edits all the MP3s Meta thinking this may be it but I still have it. Makes it look horrible when you scroll and see Unknown for like 3 pages or more. Any suggestions on fixing this to clean it up?
Hi

How are you editing the mp3 tags? I use mp3tag for windows. Also make sure the "comment" mp3 tags are empty (there is a known bug in the mp3 library I'm using which affects the tag data extraction if the comment field is not empty). And just to be sure, make sure you delete the fruitbox.db file after editing your tags to make sure fruitbox regenerates it (although this should happen automatically)

If all else fails you can (sudo) edit the fruitbox.db manually and change the title strings in there, but this isn't recommended as your changes will be lost if you refresh your database if you add more music in the future.

Cheers
Mike

User avatar
zLagos
Posts: 46
Joined: Wed Apr 11, 2018 3:32 pm
Location: Villanueva de la Cañada (Madrid) ESPAÑA

Re: fruitbox MP3 jukebox

Sun Feb 23, 2020 11:01 am

Hi, Mike

I found a small problem with the NoDuplicates option. This option prevents duplicate songs that are on the waiting list.

But it does not do well. Today, for example, I was listening to Knockin 'On Heaven's Door by Guns N' Roses and I remembered the Raign version, which I certainly love. But as Guns N 'Roses was playing, he wouldn't let me add Raign's. I thought I had a problem with fruitbox, but it's not like that, only that the NoDuplicates just checks the song's title, regardless of the artist's name, so if I wanted to listen to the half dozen versions of the song "Yesterday "I have in my music collection, I couldn't do it.

The solution seems to me that it should not be complicated. Just check the artist and the song title before deciding if it is duplicated or not.

Could you fix it?

Thank you, as always, for your invaluable help.

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Sun Feb 23, 2020 12:02 pm

zLagos wrote:
Sun Feb 23, 2020 11:01 am
Hi, Mike

I found a small problem with the NoDuplicates option. This option prevents duplicate songs that are on the waiting list.
Sure, no problem. I'll add it to the bug fixes in the next release. Thanks for reporting it.

Cheers
Mike

malice007
Posts: 3
Joined: Sat Feb 22, 2020 8:29 pm
Location: Pittsburgh, PA
Contact: Website

Re: fruitbox MP3 jukebox

Sun Feb 23, 2020 1:23 pm

fruitbox wrote:
Sun Feb 23, 2020 8:49 am
malice007 wrote:
Sat Feb 22, 2020 8:40 pm
Installed FruitBox, using the TouchOne Skin. But I have a ton of Unknown Titles. I edits all the MP3s Meta thinking this may be it but I still have it. Makes it look horrible when you scroll and see Unknown for like 3 pages or more. Any suggestions on fixing this to clean it up?
Hi

How are you editing the mp3 tags? I use mp3tag for windows. Also make sure the "comment" mp3 tags are empty (there is a known bug in the mp3 library I'm using which affects the tag data extraction if the comment field is not empty). And just to be sure, make sure you delete the fruitbox.db file after editing your tags to make sure fruitbox regenerates it (although this should happen automatically)

If all else fails you can (sudo) edit the fruitbox.db manually and change the title strings in there, but this isn't recommended as your changes will be lost if you refresh your database if you add more music in the future.

Cheers
Mike

Mike,

Thanks I will download another editor and see what it does.

DA313
Posts: 23
Joined: Fri Jun 07, 2019 12:00 am
Location: United States, Georgia

Re: fruitbox MP3 jukebox

Sun Feb 23, 2020 9:22 pm

So, new problem with touchscreen (I'm learning by trial and error, heavy on the error part).

I set the pi to autoboot to fruitbox using the TouchOne skin... which is great until you need to shut it down. I had inadvertently --config-buttons to everything being a touchscreen input without realizing the skin had no OFF button. With no ability to hit ESC or F12, I was forced to turn it off by killing the power. I want to make a jukebox totally controlled by the touchscreen for the less tech savvy.

My question therefore is this, two fold:
1) Is there a touchscreen skin with an off button already configured? and if not
2) How do I edit a skin (such as TouchOne) to have that option?

Joe
"From this nettle, danger, we pluck this flower, safety." (Shakespeare, Henry IV)

biertraeger
Posts: 1
Joined: Mon Feb 24, 2020 9:17 am

Re: fruitbox MP3 jukebox

Mon Feb 24, 2020 9:41 am

DA313 wrote: 2) How do I edit a skin (such as TouchOne) to have that option?
Hi Joe,
you can add buttons by editing the skin's cfg file.
To add a touch button you need to add 2 thing
1) status object

Code: Select all

[status]
Position = <x position in px> <y position in px>
Size = <width in px> <height in px>
Bitmap = <.bmp, .jpg, .png of your button>
Have a look to the user guide if you want to add other features to your status object.

2) touch area

Code: Select all

[touch areas]
ButtonESC =  <x position in px> <y position in px> <width in px> <height in px>)
Greetz Matthias

User avatar
fruitbox
Posts: 439
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Mon Feb 24, 2020 7:05 pm

biertraeger wrote:
Mon Feb 24, 2020 9:41 am


Hi Joe,
you can add buttons by editing the skin's cfg file.
To add a touch button you need to add 2 thing
1) status object
2) touch area

Greetz Matthias
Hi,

The status object is only required if you want to animate your button, but you also need to make sure the escape button is configured for touch input in the fruitbox.btn file...

Code: Select all

ButtonEsc = touch
As well as the [touch area] addition that Matthias has mentioned, you'll need to add the esc button graphic to the skin artwork (probably foreground.png in your case).

Cheers
Mike

User avatar
zLagos
Posts: 46
Joined: Wed Apr 11, 2018 3:32 pm
Location: Villanueva de la Cañada (Madrid) ESPAÑA

Re: fruitbox MP3 jukebox

Tue Feb 25, 2020 9:33 am

DA313 wrote:
Sun Feb 23, 2020 9:22 pm
So, new problem with touchscreen (I'm learning by trial and error, heavy on the error part).

I set the pi to autoboot to fruitbox using the TouchOne skin... which is great until you need to shut it down. I had inadvertently --config-buttons to everything being a touchscreen input without realizing the skin had no OFF button. With no ability to hit ESC or F12, I was forced to turn it off by killing the power. I want to make a jukebox totally controlled by the touchscreen for the less tech savvy.

My question therefore is this, two fold:
1) Is there a touchscreen skin with an off button already configured? and if not
2) How do I edit a skin (such as TouchOne) to have that option?

Joe
Hola

If you are interested, I can send you this skin that I made based on TouchOne. It is something more complete.
screenshot.jpg
screenshot.jpg (133.66 KiB) Viewed 709 times
Saludos, iOtero

Return to “Graphics, sound and multimedia”