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

Re: fruitbox MP3 jukebox

Sun Feb 03, 2019 3:44 pm

Scally wrote:
Sat Feb 02, 2019 5:26 pm
Yes please, my arcade is all done, and is running on Jessie. Too late for me to change that now, so I would be really grateful if you could also release the Jessie update, then, when the kids get bored of games, they can listen to my music :twisted:

Thank you!
Hi Scally

fruitbox version 1.14 for Jessie is now on GitHub

Cheers,
Mike

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Mon Feb 04, 2019 4:54 pm

KGP2005 wrote:
Sun Feb 03, 2019 12:34 pm
Hi Mike

I know you help alot, and i also just hope to can fix this error. I have been looking forward for some time to start "my" project jukebox after i find your videos on youtube.

It was a dobble tread, but i still get the error after i wrote, and you fixed it.

Kim
fruitbox wrote:
Sat Feb 02, 2019 11:56 pm
KGP2005 wrote:
Sat Feb 02, 2019 6:53 pm
I have same problem, stil have it after downloading

Do i have to change source to something else?

Wierd...after I corrected the install file I downloaded it to try it and it worked ok, but obviously there is still a problem with it. I'll take another look...
Do you have an update on this?

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

Re: fruitbox MP3 jukebox

Mon Feb 04, 2019 5:15 pm

KGP2005 wrote:
Mon Feb 04, 2019 4:54 pm

Do you have an update on this?
Hi Kim

Sorry the link was wrong in the README.md file to wget the install script file. I've now corrected it so please try again.

Cheers
Mike

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Tue Feb 05, 2019 5:18 pm

fruitbox wrote:
Mon Feb 04, 2019 5:15 pm
KGP2005 wrote:
Mon Feb 04, 2019 4:54 pm

Do you have an update on this?
Hi Kim

Sorry the link was wrong in the README.md file to wget the install script file. I've now corrected it so please try again.

Cheers
Mike
Thanks, now working....

BUT...

When running i get this error - Couldn´t open configuration file 'skins/Miketv/fruitbox.cfg, i can run the Walljuke skin. Any idea?

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

Re: fruitbox MP3 jukebox

Tue Feb 05, 2019 7:28 pm

KGP2005 wrote:
Tue Feb 05, 2019 5:18 pm

Thanks, now working....

BUT...

When running i get this error - Couldn´t open configuration file 'skins/Miketv/fruitbox.cfg, i can run the Walljuke skin. Any idea?
Check your path names...linux is case sensitive.

Mike

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Thu Feb 07, 2019 1:18 pm

fruitbox wrote:
Tue Feb 05, 2019 7:28 pm
KGP2005 wrote:
Tue Feb 05, 2019 5:18 pm

Thanks, now working....

BUT...

When running i get this error - Couldn´t open configuration file 'skins/Miketv/fruitbox.cfg, i can run the Walljuke skin. Any idea?
Check your path names...linux is case sensitive.

Mike

Only MikeTv who is not working with my touchscreen, TouchOne is working, but not all the "buttoms" is working, can you guide me how to change that?

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

Re: fruitbox MP3 jukebox

Thu Feb 07, 2019 3:51 pm

KGP2005 wrote:
Thu Feb 07, 2019 1:18 pm

Only MikeTv who is not working with my touchscreen, TouchOne is working, but not all the "buttoms" is working, can you guide me how to change that?
Hi
You have to configure the correct buttons for touch input rather than keyboard, so run fruitbox with the --config-buttons option and follow the instructions. In your case, just press the screen each time fruitbox asks for a button you want to use in touch mode... any other buttons you don't need for the skin just press the ESC keyboard key. When it has finished, fruitbox will create a file called fruitbox.btn which it will use in the future. Now run fruitbox again normally (ie. without the --config-buttons option) and it should all work ok.

Please read the user guide if you are unsure.

Cheers
Mike

Scally
Posts: 20
Joined: Mon Mar 05, 2018 10:22 am

Re: fruitbox MP3 jukebox

Sun Feb 10, 2019 12:57 pm

fruitbox wrote:
Sun Feb 03, 2019 3:44 pm
Scally wrote:
Sat Feb 02, 2019 5:26 pm
Yes please, my arcade is all done, and is running on Jessie. Too late for me to change that now, so I would be really grateful if you could also release the Jessie update, then, when the kids get bored of games, they can listen to my music :twisted:

Thank you!
Hi Scally

fruitbox version 1.14 for Jessie is now on GitHub

Cheers,
Mike
I was able to install the update today. My arcade doesn't have a keyboard, but by chance I discovered that by typing the config-buttons command into my PC's Putty window it started up on my arcade machine, which was a bit of luck. I had to delete the original button file as it caused the new version to crash, but it then recreated it ok when running the config-buttons.

The delay problem is solved! So many thanks for your effort on that. I'm curious as to what you found caused that delay before?

However, I have 2 of these USB controllers plugged into my pi, and I noticed that although the joysticks are identified separately, e.g. as 0 0 1 and 1 0 1 for left on each, the buttons have duplicate numbers, so my player 1 button 0 has the same code (e.g. 292) as the player 2 button 0, so I am unable to assign different functions to each side (which I intended to use as A-B-C and 1-2-3 functions). On your version 1.11 they did show up separately, so I wonder if this is something you could look into?

FYI, I only updated the executable, no other files, in case that matters.

Then, on my WallJuke skin, I also noticed that the skin shows the labels as A1-4, B1-4, but when I use the joystick to move around, the bottom right status box shows the labels as A0..9, B0..9, so doesn't match the skin. Given than I only have 6 buttons for each player, it would be great to match the A1-4 labelling. I didn't spot anything in the skin cfg file, but maybe I missed a statement somewhere.

Thanks again!

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

Re: fruitbox MP3 jukebox

Mon Feb 11, 2019 10:36 pm

Hi Scally,
Scally wrote:
Sun Feb 10, 2019 12:57 pm
The delay problem is solved! So many thanks for your effort on that. I'm curious as to what you found caused that delay before?
Glad the new release has fixed your delay problem. I wasn't exactly sure what the issue was, but I did notice that the DragonRise controllers produced a vast amount of Z-axis analogue joystick events, from the looks of it due to a noisy analogue signal from the stick. In the release of fruitbox up to 1.12 the input events were handled by the Allegro library, and I suspect it was being swamped by these events. The re-coded input handling in release 1.14 no longer uses the Allegro library, and I filter out joystick events I don't need and this has appeared to remove the lag.
Scally wrote:
Sun Feb 10, 2019 12:57 pm
However, I have 2 of these USB controllers plugged into my pi, and I noticed that although the joysticks are identified separately, e.g. as 0 0 1 and 1 0 1 for left on each, the buttons have duplicate numbers, so my player 1 button 0 has the same code (e.g. 292) as the player 2 button 0, so I am unable to assign different functions to each side (which I intended to use as A-B-C and 1-2-3 functions). On your version 1.11 they did show up separately, so I wonder if this is something you could look into?
I deliberately didn't mark "Key" button events with a device ID (like I do with the Joystick (ABS) events) because I assumed Key type buttons generating the same event code would like be to treated as the same. Obviously I was wrong! So I have changed it as requested, and it's available in release 1.15, coming soon.
Scally wrote:
Sun Feb 10, 2019 12:57 pm
FYI, I only updated the executable, no other files, in case that matters.

Then, on my WallJuke skin, I also noticed that the skin shows the labels as A1-4, B1-4, but when I use the joystick to move around, the bottom right status box shows the labels as A0..9, B0..9, so doesn't match the skin. Given than I only have 6 buttons for each player, it would be great to match the A1-4 labelling. I didn't spot anything in the skin cfg file, but maybe I missed a statement somewhere.
If you have upgraded from release 1.11 to 1.14 then you need to also update your skins, because in release 1.12 I changed the way the select codes are specified in the skin config file. Please see the below post for details...

viewtopic.php?f=38&t=188723&p=1327531&s ... 1#p1327531

Cheers,
Mike

kramg
Posts: 22
Joined: Sun Jan 27, 2019 10:49 pm
Location: Ottawa, Canada

Re: fruitbox MP3 jukebox

Tue Feb 12, 2019 5:11 am

A follow up on my earlier post about a streaming jukebox..

It is possible to stream the output of fruitbox running on a pi 2 or 3 throughout your home using the following chain:

fruitbox -> ALSA loopback device -> DarkIce -> IceCast

The IceCast server can run on the pi or elsewhere. Configuration of DarkIce and IceCast are pretty straightforward. The only tricky part is the configuration of the loopback device which must be set as default in order to work with fruitbox. If anybody wants it, my .asoundrc is:

Code: Select all

# .asoundrc

pcm.!default {
	type plug
	slave.pcm "hw:Loopback"
} 

pcm.loopin {
	type plug
	slave.pcm "hw:Loopback,0,0"
}

pcm.loopout {
	type plug
	slave.pcm "hw:Loopback,1,0"
}

Some points to note:

This redirects all sounds from fruitbox (or anything using the default audio out) so:

- you will hear your coin drops and page turn sound effects in the stream. If that's not desireable you could, I think, have an external (to fruitbox) player, play them to your sound card using a [status] output.

- you won't hear your music on the fruitbox machine unless you run a streaming client directed to the sound card on the fruitbox machine. In my case I use squeezelite since I already use the LMS infrastructure, but, you could use any player that can receive an http stream.

This will not work on the piZero. Not entirely true, it just sounds terrible.

I still believe a better approach would be to output the mp3 file directly to an http stream using something like mpd or ezstream. I played around a bit with MPD but it seemed to be a bit resource intensive so lately I've been playing with ezstream which rather than reencoding the raw stream to the soundcard just pushes the mp3 file to the icecast server. I've had it running concurrently with fruitbox on a PiZero playing two different songs, one to the soundcard and one to the icecast server and had no problems with either stuttering. I have also verified that you can refresh the ezstream playlist. Now I just have to see if I can piece it all together using the available status outputs.

Cheers,

- gustav
Last edited by kramg on Wed Feb 20, 2019 3:58 pm, edited 1 time in total.

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Tue Feb 12, 2019 1:20 pm

fruitbox wrote:
Thu Feb 07, 2019 3:51 pm
KGP2005 wrote:
Thu Feb 07, 2019 1:18 pm

Only MikeTv who is not working with my touchscreen, TouchOne is working, but not all the "buttoms" is working, can you guide me how to change that?
Hi
You have to configure the correct buttons for touch input rather than keyboard, so run fruitbox with the --config-buttons option and follow the instructions. In your case, just press the screen each time fruitbox asks for a button you want to use in touch mode... any other buttons you don't need for the skin just press the ESC keyboard key. When it has finished, fruitbox will create a file called fruitbox.btn which it will use in the future. Now run fruitbox again normally (ie. without the --config-buttons option) and it should all work ok.

Please read the user guide if you are unsure.

Cheers
Mike
Is it ./fruitbox --config-buttons, because that not working,
sudo ./fruitbox --config-buttons make error - XIO: fatal IO error 11 (Resource temporalily unavailable) on X server ":0.0"
after 9 requests (8 known processed) with 0 event remaining

User avatar
rpt007
Posts: 57
Joined: Sat Jan 21, 2017 8:03 am
Location: Germany

Re: fruitbox MP3 jukebox

Tue Feb 12, 2019 2:45 pm

@KGP2005:

I hope I understood your issue - if not come back with more details.
Looking at your command it is not clear to be seen, if you have one or two "-" after "./fruitbox" -> you need two "-".

Make sure that you are in the correct starting directory:
In my case it is: /home/pi/rpi-fruitbox-master/

Then you start the button configuration with

Code: Select all

./fruitbox --config-buttons
If you are logged in as "pi" you will have sudoer-permissions and don't need to have "sudo" in front of a command - but it won't hurt anyway.
Assuming you are coming from Windows -> linux OS is much more strict (straight) compared to Windows.
So make sure you follow the fruitbox user guide precisely.

Cheers
Raimund

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Tue Feb 12, 2019 3:24 pm

rpt007 wrote:
Tue Feb 12, 2019 2:45 pm
@KGP2005:

I hope I understood your issue - if not come back with more details.
Looking at your command it is not clear to be seen, if you have one or two "-" after "./fruitbox" -> you need two "-".

Make sure that you are in the correct starting directory:
In my case it is: /home/pi/rpi-fruitbox-master/

Then you start the button configuration with

Code: Select all

./fruitbox --config-buttons
If you are logged in as "pi" you will have sudoer-permissions and don't need to have "sudo" in front of a command - but it won't hurt anyway.
Assuming you are coming from Windows -> linux OS is much more strict (straight) compared to Windows.
So make sure you follow the fruitbox user guide precisely.

Cheers
Raimund
When running

Code: Select all

./fruitbox --config-buttons
from my /hom/pi/rpi-fruitbox-master root, it shows the fruitbox logo, and the write : ERROR: gpio mmap error
Try running fruitbox as sudo (i.e. sudo ./fruitbox --cfg ...)

I have no problem when starting the fruitbox, but have to setup my touchscreen, so the buttons are correct

User avatar
rpt007
Posts: 57
Joined: Sat Jan 21, 2017 8:03 am
Location: Germany

Re: fruitbox MP3 jukebox

Tue Feb 12, 2019 8:12 pm

Hi,

as I don't use fruitbox with the touch screen feature, I have no idea, if it is possible to have buttons as well as touch simultaneously - hope, Mike can jump in and help you out.

Raimund

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

Re: fruitbox MP3 jukebox

Tue Feb 12, 2019 9:33 pm

rpt007 wrote:
Tue Feb 12, 2019 8:12 pm
Hi,

as I don't use fruitbox with the touch screen feature, I have no idea, if it is possible to have buttons as well as touch simultaneously - hope, Mike can jump in and help you out.

Raimund
Hi

Yes, fruitbox supports a mixture of button types, so you can have touch, GPIO, joysticks and keyboards all at the same time. You need to run fruitbox as sudo when configuring or testing buttons, and if using GPIO in normal mode. If you look closely when you got the mmap error message it gave you a clue ;)

Regarding the X11 error, I'm not 100% sure about this but it could be that you are launching from the desktop and not a pure command line as I recommend.

Cheers
Mike

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Wed Feb 13, 2019 5:06 pm

fruitbox wrote:
Tue Feb 12, 2019 9:33 pm
rpt007 wrote:
Tue Feb 12, 2019 8:12 pm
Hi,

as I don't use fruitbox with the touch screen feature, I have no idea, if it is possible to have buttons as well as touch simultaneously - hope, Mike can jump in and help you out.

Raimund
Hi

Yes, fruitbox supports a mixture of button types, so you can have touch, GPIO, joysticks and keyboards all at the same time. You need to run fruitbox as sudo when configuring or testing buttons, and if using GPIO in normal mode. If you look closely when you got the mmap error message it gave you a clue ;)

Regarding the X11 error, I'm not 100% sure about this but it could be that you are launching from the desktop and not a pure command line as I recommend.

Cheers
Mike
Hi Mike

I got it to work, so now i can set up my touchscreen..

I did try...

Code: Select all

sudo ./fruitbox --config-buttons
before i posted, and it made error. I tried some other commands but no luck..
Waited some times, some reboots and tried

Code: Select all

sudo ./fruitbox --config-buttons
again, and then work, and still do.
I dont know what i have done..

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Wed Feb 13, 2019 5:08 pm

Is it possible to disable ESC for exit fruitbox?

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

Re: fruitbox MP3 jukebox

Wed Feb 13, 2019 7:57 pm

KGP2005 wrote:
Wed Feb 13, 2019 5:08 pm
Is it possible to disable ESC for exit fruitbox?
Hi,

You can't disable it completely, but you could remap it to a code you'll never use.

You can either remap it using the config buttons option, or simply edit your existing fruitbox.btn file with an editor and add it (i.e. something like ButtonQuit = Key 999)

Cheers
Mike

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Fri Feb 15, 2019 2:43 pm

I have followed this guide

Automatically mount USB memory stick on power up
------------------------------------------------

If your music is stored on a USB memory stick, you can automatically
mount the USB memory stick at boot time by typing the following
commands:

sudo mkdir -p /mnt/usb
sudo nano /etc/fstab

When inside the nano editor, add the following line at the end
of the table...

/dev/sda1 /mnt/usb vfat defaults 0 0

Save (Ctrl-O), then Quit nano (Ctrl-X). Then in your fruitbox
configuration file, set the 'MusicPath' parameter to '/mnt/usb/'

But where or how can i see that its mounted?

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

Re: fruitbox MP3 jukebox

Fri Feb 15, 2019 4:25 pm

KGP2005 wrote: But where or how can i see that its mounted?
Just type

Code: Select all

sudo ls /mnt/usb/
which should show you what's on it and hence if it's mounted.

Mike

KGP2005
Posts: 11
Joined: Sat Feb 02, 2019 6:50 pm

Re: fruitbox MP3 jukebox

Fri Feb 15, 2019 8:37 pm

fruitbox wrote:
Fri Feb 15, 2019 4:25 pm
KGP2005 wrote: But where or how can i see that its mounted?
Just type

Code: Select all

sudo ls /mnt/usb/
which should show you what's on it and hence if it's mounted.

Mike
Thanks Mike

I can see i have have some music on it, but when i try to start fruitbox it says...
database ´´ not found, so i will create it for you....
a lot of text...
And then..
Searching /mnt/usb/
ERROR : Couldn´t create ´´
and no more

I have tried the things, you write and other on page 12
My database is on the sd-card, not usb
My usb is

Code: Select all

/mnt/usb/Music/Music
My MusicPath is ...

Code: Select all

/mnt/usb/Music/Music/
I have tried with .. in front to, but no luck
And nothing in Database

User avatar
rpt007
Posts: 57
Joined: Sat Jan 21, 2017 8:03 am
Location: Germany

Re: fruitbox MP3 jukebox

Fri Feb 15, 2019 11:24 pm

Hi,

on page 34 (3rd post) you will find a step-by-step instruction how to get fruitbox take care of your music on a USB device.
If you follow that instruction really step-by-step you should get fruitbox run as expected.

Before posting these instruction steps I repeated all those steps again and again with two addt'l micro SD cards which I use as backups (just in case). And I always got a working application.

Avoid mounting your USB device with sda.. in fstab; it will work on the command line level, IF sda is correct - sometimes the USB device is registered as sdb..

To mount your USB device at boot time, use its unique identifyer (UUID) as this is really unique for each device and check for the right format of your stick (vfat = FAT32 only). How to identify the UUID and how the fstab entry should look like - see the instruction as mentioned above.

Good luck
Raimund

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

Re: fruitbox MP3 jukebox

Sat Feb 16, 2019 7:49 am

Also are you running fruitbox in sudo mode? It could be a permissions problem?

fastfrank
Posts: 14
Joined: Thu Dec 20, 2018 12:50 am

Re: fruitbox MP3 jukebox

Sat Feb 16, 2019 3:32 pm

JasonLong wrote:
Thu Apr 19, 2018 5:35 am
Hi Mike,

Awsome work on fruitbox. Saw it and decided to go big with it. Bought a 1962 Wurlitzer 2610 that had been left outside in the rain for many years. Wouldnt even consider it a parts machine. But all the chrome and trim was in ok shape. So I rebuilt the wood cabinet better than the original and cleaned up the chrome and aluminum and transferred it over to the new cabinet. In place of the song title holders I put in a 23" screen, new speakers, a commercial amp and a raspberry pi running fruitbox. Created a skin that looks like the 2610 originally did with 100 songs on a page. Got the original buttons working with fruitbox no problem.

My question is (and sorry if its been asked before) is there any way to exclude a button from the song database build? i.e. the 2610 has no I key its A through H and J and K. Guess they did that so no one confused the I with a 1. The issue I am having is I had to set up button j as i and k as j so that the song selection would work correctly. Now in the selection part of the skin pressing j displays i. Is this just a matter of using $IF_BUTTON_I_PRESSED in the selection part of the skin to bandaid it or is there another solution? Not entirely sure how the displays work yet. I have been focused on everything else. If you want a copy of my skin or a screenshot let me know. Id be more than happy to share pictures of the build if anyone is interested.

Thanks
Jason
Sounds like a great project Jason looking into doing something similar with a wallbox . I have 3 complete wallboxes sitting in boxes
Have every thing complete as far as fruitbox setup goes.
I have the the original selector buttons for the wall box but I am at a complete loss as to how to wire them so they interact with pi and fruitbox .
Parts list wiring schematic etc.
Any and all help would be greatly appreciated
Thanks

User avatar
rpt007
Posts: 57
Joined: Sat Jan 21, 2017 8:03 am
Location: Germany

Re: fruitbox MP3 jukebox

Sun Feb 17, 2019 9:02 am

There are several ways to use the wallbox buttons.
1. use Raspi‘s GPIOs as input pins
2. use an old USB Keyboard and its built in controller (there are several instructions in youtube)
3. use an Arduino Leonardo or Teensy as button-USB converter

In my Wurlitzer project I use the original keyboard buttons with a Teensy 3.2.
I added some additional buttons which will use the Teensy and GPIO.

First thing you wanna do: get a multimeter and find out how your keyboards work.
So, if you count one wire more than buttons of a keyboard, most likely there is one common wire and this common wire connects with the very button which you press.
Identify that common wire (using the ohm measuring) and mark the other ones which get connected to common when pressing a button with its number.

Modern keyboards are wired in arrays (matrices) to reduce the number of wires.

But first tell us what kind of keyboard you have and then we can assist you with the next steps.
Raimund

Return to “Graphics, sound and multimedia”