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

Re: fruitbox MP3 jukebox

Wed Dec 05, 2018 1:50 pm

rpt007 wrote:
Wed Dec 05, 2018 11:52 am
One big issue for me is currently ... fruitbox doesn't recognize keycodes with 3-digits.
Hi Raimund

Could you capture the output of evtest and post it here please? I could try and work out what's wrong...

Cheers
Mike

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

Re: fruitbox MP3 jukebox

Wed Dec 05, 2018 4:15 pm

Hi Mike,

here is the output of the evtest:

Code: Select all

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1997 product 0x2433 version 0x101
Input device name: "  mini keyboard"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 1 (KEY_ESC)
    Event code 2 (KEY_1)
    Event code 3 (KEY_2)
    Event code 4 (KEY_3)
    Event code 5 (KEY_4)
    Event code 6 (KEY_5)
    Event code 7 (KEY_6)
    Event code 8 (KEY_7)
    Event code 9 (KEY_8)
    Event code 10 (KEY_9)
    Event code 11 (KEY_0)
    Event code 12 (KEY_MINUS)
    Event code 13 (KEY_EQUAL)
    Event code 14 (KEY_BACKSPACE)
    Event code 15 (KEY_TAB)
    Event code 16 (KEY_Q)
    Event code 17 (KEY_W)
    Event code 18 (KEY_E)
    Event code 19 (KEY_R)
    Event code 20 (KEY_T)
    Event code 21 (KEY_Y)
    Event code 22 (KEY_U)
    Event code 23 (KEY_I)
    Event code 24 (KEY_O)
    Event code 25 (KEY_P)
    Event code 26 (KEY_LEFTBRACE)
    Event code 27 (KEY_RIGHTBRACE)
    Event code 28 (KEY_ENTER)
    Event code 29 (KEY_LEFTCTRL)
    Event code 30 (KEY_A)
    Event code 31 (KEY_S)
    Event code 32 (KEY_D)
    Event code 33 (KEY_F)
    Event code 34 (KEY_G)
    Event code 35 (KEY_H)
    Event code 36 (KEY_J)
    Event code 37 (KEY_K)
    Event code 38 (KEY_L)
    Event code 39 (KEY_SEMICOLON)
    Event code 40 (KEY_APOSTROPHE)
    Event code 41 (KEY_GRAVE)
    Event code 42 (KEY_LEFTSHIFT)
    Event code 43 (KEY_BACKSLASH)
    Event code 44 (KEY_Z)
    Event code 45 (KEY_X)
    Event code 46 (KEY_C)
    Event code 47 (KEY_V)
    Event code 48 (KEY_B)
    Event code 49 (KEY_N)
    Event code 50 (KEY_M)
    Event code 51 (KEY_COMMA)
    Event code 52 (KEY_DOT)
    Event code 53 (KEY_SLASH)
    Event code 54 (KEY_RIGHTSHIFT)
    Event code 55 (KEY_KPASTERISK)
    Event code 56 (KEY_LEFTALT)
    Event code 57 (KEY_SPACE)
    Event code 58 (KEY_CAPSLOCK)
    Event code 59 (KEY_F1)
    Event code 60 (KEY_F2)
    Event code 61 (KEY_F3)
    Event code 62 (KEY_F4)
    Event code 63 (KEY_F5)
    Event code 64 (KEY_F6)
    Event code 65 (KEY_F7)
    Event code 66 (KEY_F8)
    Event code 67 (KEY_F9)
    Event code 68 (KEY_F10)
    Event code 69 (KEY_NUMLOCK)
    Event code 70 (KEY_SCROLLLOCK)
    Event code 71 (KEY_KP7)
    Event code 72 (KEY_KP8)
    Event code 73 (KEY_KP9)
    Event code 74 (KEY_KPMINUS)
    Event code 75 (KEY_KP4)
    Event code 76 (KEY_KP5)
    Event code 77 (KEY_KP6)
    Event code 78 (KEY_KPPLUS)
    Event code 79 (KEY_KP1)
    Event code 80 (KEY_KP2)
    Event code 81 (KEY_KP3)
    Event code 82 (KEY_KP0)
    Event code 83 (KEY_KPDOT)
    Event code 85 (KEY_ZENKAKUHANKAKU)
    Event code 86 (KEY_102ND)
    Event code 87 (KEY_F11)
    Event code 88 (KEY_F12)
    Event code 89 (KEY_RO)
    Event code 90 (KEY_KATAKANA)
    Event code 91 (KEY_HIRAGANA)
    Event code 92 (KEY_HENKAN)
    Event code 93 (KEY_KATAKANAHIRAGANA)
    Event code 94 (KEY_MUHENKAN)
    Event code 95 (KEY_KPJPCOMMA)
    Event code 96 (KEY_KPENTER)
    Event code 97 (KEY_RIGHTCTRL)
    Event code 98 (KEY_KPSLASH)
    Event code 99 (KEY_SYSRQ)
    Event code 100 (KEY_RIGHTALT)
    Event code 102 (KEY_HOME)
    Event code 103 (KEY_UP)
    Event code 104 (KEY_PAGEUP)
    Event code 105 (KEY_LEFT)
    Event code 106 (KEY_RIGHT)
    Event code 107 (KEY_END)
    Event code 108 (KEY_DOWN)
    Event code 109 (KEY_PAGEDOWN)
    Event code 110 (KEY_INSERT)
    Event code 111 (KEY_DELETE)
    Event code 113 (KEY_MUTE)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 116 (KEY_POWER)
    Event code 117 (KEY_KPEQUAL)
    Event code 119 (KEY_PAUSE)
    Event code 121 (KEY_KPCOMMA)
    Event code 122 (KEY_HANGUEL)
    Event code 123 (KEY_HANJA)
    Event code 124 (KEY_YEN)
    Event code 125 (KEY_LEFTMETA)
    Event code 126 (KEY_RIGHTMETA)
    Event code 127 (KEY_COMPOSE)
    Event code 128 (KEY_STOP)
    Event code 129 (KEY_AGAIN)
    Event code 130 (KEY_PROPS)
    Event code 131 (KEY_UNDO)
    Event code 132 (KEY_FRONT)
    Event code 133 (KEY_COPY)
    Event code 134 (KEY_OPEN)
    Event code 135 (KEY_PASTE)
    Event code 136 (KEY_FIND)
    Event code 137 (KEY_CUT)
    Event code 138 (KEY_HELP)
    Event code 140 (KEY_CALC)
    Event code 142 (KEY_SLEEP)
    Event code 150 (KEY_WWW)
    Event code 152 (KEY_SCREENLOCK)
    Event code 158 (KEY_BACK)
    Event code 159 (KEY_FORWARD)
    Event code 161 (KEY_EJECTCD)
    Event code 163 (KEY_NEXTSONG)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 165 (KEY_PREVIOUSSONG)
    Event code 166 (KEY_STOPCD)
    Event code 173 (KEY_REFRESH)
    Event code 176 (KEY_EDIT)
    Event code 177 (KEY_SCROLLUP)
    Event code 178 (KEY_SCROLLDOWN)
    Event code 179 (KEY_KPLEFTPAREN)
    Event code 180 (KEY_KPRIGHTPAREN)
    Event code 183 (KEY_F13)
    Event code 184 (KEY_F14)
    Event code 185 (KEY_F15)
    Event code 186 (KEY_F16)
    Event code 187 (KEY_F17)
    Event code 188 (KEY_F18)
    Event code 189 (KEY_F19)
    Event code 190 (KEY_F20)
    Event code 191 (KEY_F21)
    Event code 192 (KEY_F22)
    Event code 193 (KEY_F23)
    Event code 194 (KEY_F24)
    Event code 240 (KEY_UNKNOWN)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
  Event type 17 (EV_LED)
    Event code 0 (LED_NUML) state 0
    Event code 1 (LED_CAPSL) state 0
    Event code 2 (LED_SCROLLL) state 0
    Event code 3 (LED_COMPOSE) state 0
    Event code 4 (LED_KANA) state 0
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    250
    Repeat code 1 (REP_PERIOD)
      Value     33
Properties:
Testing ... (interrupt to exit)
Hope, you can find out why fruitbox insists of ignoring the multimedia keys.

Cheers,
Raimund

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

Re: fruitbox MP3 jukebox

Thu Dec 06, 2018 12:39 pm

rpt007 wrote:
Wed Dec 05, 2018 4:15 pm
Hope, you can find out why fruitbox insists of ignoring the multimedia keys.

Cheers,
Raimund
Hi Raimond

If you run fruitbox with the --test-buttons --input-device mini options, does it recognise the keys?

Mike

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

Re: fruitbox MP3 jukebox

Thu Dec 06, 2018 4:03 pm

Hi Mike,

the test showed some surprising results as the button press sometimes resulted in "Device number 0", very rarely the result was "Keyboard number".

Examples:

Button Test Result Miscellaneous
"1" "Device 2 0"
"2" "Device 3 0"
"0" "Device 11 0"
"A" "Device 30 0"
"S" "Device 31 0" "Keyboard 19"
"X" "Device 45 0"
"Space" "Device 57 0"

Multimedia Keys
"Up" "Device 103 0"
"Down" "Device 108 0"
"Left"" "Device 105 0" "Keyboard 82"
"Right" "Device 106 0"
"Volume Up" not detected
"Volume Dn" not detected
"Mute" not detected

Ending the test issued a NOTE: Opened input device 'mini' (/dev/input/event3)

I assume that the NOTE might be important as the Rii x8 keyboard comes up as 2 input devices when I run evtest (event3 and event4); maybe that gives you an idea what could causing this strange behaviour?
When selecting evtest for event4, the multimedia keys are identified (issueing the key codes).

Cheers and thanks in advance for all your excellent support
Raimund

PSEdit:
Next time I will use a spreadsheet for better readability as my (space-) formatting is always killed by the forum software

PSEdit2:
Just found some internet pages which I will have to study a bit more deeper; could give me an idea what to do.
https://www.rachaelandtom.info/content/ ... media-keys and
https://superuser.com/questions/290115/ ... p-in-linux

-> "showkey" registered all my keys including all special ones; so it registers event3 and event4 actions.

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

Re: fruitbox MP3 jukebox

Thu Dec 06, 2018 5:21 pm

Hi Raimund

That's encouraging. If you use the --config-buttons option instead of test buttons you will generate a button mapping file to use the keys you have chosen for future fruitbox runs.

I would then have a look at fruitbox.btn to see what it has chosen for the keys which give both device 0 and keyboard. You can always edit this file to change the mappings manually.

Cheers
Mike

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

Re: fruitbox MP3 jukebox

Thu Dec 06, 2018 11:32 pm

Hi Mike,

unfortunately the --config-buttons option doesn't register the special multimedia keys.
I tried to use different keys first and then edited the specific buttons with keyboard = ..., tested - no reaction while playing songs.

After that I edited the specific keys replacing "keyboard =" with "device = ... 0" -> same problem.

I remember that by chance in a very first installation, when I booted into desktop and afterwards to CLI, that the "Mute" and Volume keys worked. But I don't remember what keyboard model I had selected amongst those dozens of different models. Will keep trying.

Unfortunately there is no real information in either forum how to overcome that issue :(

Cheers and good night
Raimund

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

Re: fruitbox MP3 jukebox

Fri Dec 07, 2018 1:10 pm

I googled around for a solution, but it seems that all activities to get the multimedia keys alive are dependend on using X-screen.
But I boot directly into the command line starting fruitbox automatically.

All solutions come with Kodi, LibreElec etc. or people starting into desktop apps.
To activate the multimedia keys they use "keybind" with XF86.

My Linux knowledge is still at the bottom of a steep learning curve, but I think XF86 only works with X-desktop, isn't it?

I think that the mini keyboard is working on CLI level (as "showkey" registered all normal and special keys). So it seems that it has something to do with an internal mechanism of fruitbox.

Raimund

Mayki
Posts: 23
Joined: Thu Jun 21, 2018 5:28 am
Location: Czech Republic

Re: fruitbox MP3 jukebox

Sun Dec 09, 2018 7:55 pm

Mayki wrote:
Sun Nov 04, 2018 6:31 pm
I ordered board I-PAC 2. According to my research should work without problems with Fruitbox and Retropie, it emulates the keyboard.
I-PAC 2 it works very well, has no delays in control. Tested. Fruitbox has no problem with him. Zero-Delay DragonRise USB was not a good choice.

PS: Can someone give me or record a Fruitbox intro (loading) video? Thank you very much... ;)

Zero-Delay DragonRise USB
Image

I-PAC 2
Image

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

Re: fruitbox MP3 jukebox

Mon Dec 10, 2018 8:59 am

Just ordered myself one of those Dragonrise USB controllers so hopefully will be able to do some fruitbox debugging over the Christmas hols...

Cheers
Mike

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

Re: fruitbox MP3 jukebox

Wed Dec 12, 2018 5:27 pm

Mike,

I sent you a PM in the DWJukebox forum. Pls have a look there.
Thanks
Raimund

PittStone
Posts: 12
Joined: Mon Apr 23, 2018 6:48 pm

Re: fruitbox MP3 jukebox

Fri Dec 14, 2018 4:05 pm

Is .flac audio possible?

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

Re: fruitbox MP3 jukebox

Sat Dec 15, 2018 11:45 am

PittStone wrote:
Fri Dec 14, 2018 4:05 pm
Is .flac audio possible?
No sorry, just mp3 or Vorbis (embedded in ogv video/audio files)

Mike

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

Re: fruitbox MP3 jukebox

Sat Dec 15, 2018 9:19 pm

fruitbox wrote:
Mon Dec 10, 2018 8:59 am
Just ordered myself one of those Dragonrise USB controllers so hopefully will be able to do some fruitbox debugging over the Christmas hols...

Cheers
Mike
I'm very grateful that you have not forgotten about this. My arcade machine is done, so if you find a fix that would be fantastic!
Many thanks,
Scally

TnT
Posts: 1
Joined: Wed Dec 19, 2018 7:54 pm

Re: fruitbox MP3 jukebox

Wed Dec 19, 2018 8:36 pm

Hi Mike,

First let me say awesome work on this jukebox.
I'm just having one issue - for some reason fruit box is detecting the wrong screen resolution when it starts up.
I've tested it on a couple of different size/resolution tvs and the problem persists.
It is detecting a smaller resolution than the correct one, so it appears in a smaller window, and I can still see the command line text in the border around it.
For example, I'm currently connected to a 32inch tv with resolution of 1366x768, but when I run fruitbox it says:
Detecting display... 1184x684 (60Hz)

I've searched everywhere online and tried changing a lot of settings, read through the whole user guide but can't seem to find a solution.
I'm running it on a raspberry pi 3 b+ with retropie installed. It doesn't matter whether I run fruitbox from in emulation station / attract mode or from the command line.

Thanks,
Darren

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

Re: fruitbox MP3 jukebox

Thu Dec 20, 2018 7:17 am

Hi Darren

Fruitbox doesn't set any display resolution, it just reads it so it is probably a Raspberry Pi config issue. Have you checked what is in your /boot/config.txt file with regards video settings?

https://www.raspberrypi.org/documentati ... t/video.md

Also have you tried looking at the status using the tv service -s command?

If all looks correct, then it's a problem with the Allegro library fruitbox uses, and that's not something I can do anything about :(

EDIT: Maybe I could add an extra command line option to specify the display resolution rather than auto detect...perhaps this will fix your issue?

Cheers
Mike
Last edited by fruitbox on Fri Dec 21, 2018 9:22 pm, edited 1 time in total.

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

Re: fruitbox MP3 jukebox

Fri Dec 21, 2018 2:06 pm

Good Morning
I am in the process of building a Pi jukebox for my home man cave.
I have used Dw jukebox before in a windows environment and it worked flawlessly. Your Fruitbox version for the Pi is amazing from what I have seen thus far. Kudos to you for your skills on building it.
I need some help if anyone is able to assist it would be greatly appreciated. I am a complete beginner with raspberry pi and programming so please be gentle and detailed wherever possible.
I have managed to install fruitbox on the stretch lite version.
My issue is 2 fold
First how do edit edit skins/WallJuke/fruitbox.cfg and/or skins/NumberOne/fruitbox.cfg. specifically what are the commands to navigate /write and save to this file. I manage to enter the file but get lost after I cursor down the the line for the music path.

Second how do you determine the correct path for a usb where all my music is stored?
If I load raspian with desktop and navigate with file explorer it shows the path as "/media/pi/CFC7-514E/". All files are stored athe base of this drive no subfolders.
I have managed to get fruitbox to load using the command line prompt"./fruitbox --cfg skins/WallJuke/fruitbox.cfg" but sadly it returns the common error no music files found.
any and all help is greatly appreciated.

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

Re: fruitbox MP3 jukebox

Fri Dec 21, 2018 9:20 pm

fastfrank wrote:
Fri Dec 21, 2018 2:06 pm
Good Morning
I am in the process of building a Pi jukebox for my home man cave.
I have used Dw jukebox before in a windows environment and it worked flawlessly. Your Fruitbox version for the Pi is amazing from what I have seen thus far. Kudos to you for your skills on building it.
I need some help if anyone is able to assist it would be greatly appreciated. I am a complete beginner with raspberry pi and programming so please be gentle and detailed wherever possible.
I have managed to install fruitbox on the stretch lite version.
My issue is 2 fold
First how do edit edit skins/WallJuke/fruitbox.cfg and/or skins/NumberOne/fruitbox.cfg. specifically what are the commands to navigate /write and save to this file. I manage to enter the file but get lost after I cursor down the the line for the music path.

Second how do you determine the correct path for a usb where all my music is stored?
If I load raspian with desktop and navigate with file explorer it shows the path as "/media/pi/CFC7-514E/". All files are stored athe base of this drive no subfolders.
I have managed to get fruitbox to load using the command line prompt"./fruitbox --cfg skins/WallJuke/fruitbox.cfg" but sadly it returns the common error no music files found.
any and all help is greatly appreciated.
Hi,

Happy to help...

The following instructions assume you are not using the desktop but have booted straight to the command line (you can get the Raspberry Pi to do this from one of the desktop menus; configuration I think it is).

The easiest way to edit the the skin config file is using nano as follows:

Code: Select all

nano skins/WallJuke/fruitbox.cfg
...this should be typed from the command terminal when in the rpi-fruitbox-master directory. You can change to this directory by typing...

Code: Select all

cd ~/rpi-fruitbox-master
Inside the nano editor, use the cursor keys and home/end keys to move around. When on the line for the MusicPath, press End to move the cursor to the end of the line, then press backspace to remove the default value (../Music/). Then enter the path of your music (more on that later). Save the file by press Ctrl and O (that's the letter O not zero), and then quit the nano editor by pressing Ctrl and X.

Regarding your music path, I assume it's on a USB memory stick? If so, there's a section towards the end of the user guide to help you (which I've summarised below)...

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:

Code: Select all

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

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

Code: Select all

/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

Code: Select all

MusicPath = /mnt/usb/

Hope that helps?

Good luck, and thanks for using fruitbox.

Cheers,
Mike

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

Re: fruitbox MP3 jukebox

Sat Dec 22, 2018 12:44 am

Thank you for your help that solved my issue.
Much appreciated
Now to get the touch screen working with the wallbox skin.
Setup is Pi 3b with official 7 in touch screen running stretch lite and a PiFi dac 2.0
Image displays fine music path is now correct just no touch function.

Again thank you for your help Mike
BTW I am Mike also

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

Re: fruitbox MP3 jukebox

Sat Dec 22, 2018 7:09 am

fastfrank wrote:
Sat Dec 22, 2018 12:44 am
Thank you for your help that solved my issue.
Much appreciated
Now to get the touch screen working with the wallbox skin.
Setup is Pi 3b with official 7 in touch screen running stretch lite and a PiFi dac 2.0
Image displays fine music path is now correct just no touch function.

Again thank you for your help Mike
BTW I am Mike also
Hi Mike

Glad it's working now for you.

All controls for fruitbox default to the keyboard. If you want to re-map them to anything else (other keyboard keys, USB joysticks/controllers, GPIO or touch screens) then you need to run fruitbox in configure buttons mode...

Code: Select all

sudo ./fruitbox --config-buttons
...this will ask what you want to map each button to in turn. In your case just touch the screen for the buttons you want to be touch controlled. For buttons you wish to not change from their default value, just press the Escape key. When that's done, fruitbox will write the settings to a file called fruitbox.btn which it will then use next time you run fruitbox in normal mode. You can view this file (in nano) if you are curious or want to tweak the key mappings manually for any reason.

Beware though that the skin needs to be designed to support touch controls; currently only TouchOne and MikeTV are, not WallJuke. They can be modified but you'll need to define touch areas and create on screen graphical buttons and animate them with status objects. That's a whole new area of fun for you ;)

I think I will add some more detail to the user guide to clarify all this; you're not the first person to have asked.

Cheers
Mike

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

Re: fruitbox MP3 jukebox

Sat Dec 22, 2018 11:07 am

Again thank you for the help.
Much appreciated.
This an excellent program just what I was looking for

mallettron
Posts: 9
Joined: Sat Oct 06, 2018 9:42 am

Re: fruitbox MP3 jukebox

Sat Dec 22, 2018 9:20 pm

fastfrank wrote:
Sat Dec 22, 2018 12:44 am
Thank you for your help that solved my issue.
Much appreciated
Now to get the touch screen working with the wallbox skin.
Setup is Pi 3b with official 7 in touch screen running stretch lite and a PiFi dac 2.0
Image displays fine music path is now correct just no touch function.

Again thank you for your help Mike
BTW I am Mike also
Mike

If you are running the official case for the touch screen, be aware it will get warm
I had that problem (Pi 3b, pinomori bonnet amp), solved it by putting a new A+ in and leaving the back cover off, no problems anymore

The touch screen is good but I still need to use a BT keyboard for all the other controls, still in the process of designing a keypad for the rest I can attach via usb

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

Re: fruitbox MP3 jukebox

Sun Dec 23, 2018 12:52 am

I am leaving the back of the boards completely exposed in a larger cabinet with a grill with holes on the back and sides .
I do use a BT keyboard also.
Thnx for the heads up.
Much appreciated.

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

Re: fruitbox MP3 jukebox

Thu Dec 27, 2018 1:38 pm

Hi all fruitboxers and having had a Merry Christmas to all of you,

just to add my 2cents to the USB mounting issue:
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:
Code: Select all

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

When inside the nano editor, add the following line at the end of the table...
Code: Select all

/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
Code: Select all

MusicPath = /mnt/usb/

This is perfectly working for FAT32 formatted USB drives (which need to be plugged in at boot time).
If you want to use other formats, the line "/dev/sda1 ... " needs to be adjusted (-> have a look at the end of the article):
https://www.raspberrypi-spy.co.uk/2014/ ... pberry-pi/

More current information can be found here (e.g. USB automount, UUID vs dev/sda1):
viewtopic.php?t=205016

Cheers
Raimund

MobileMac
Posts: 8
Joined: Mon Nov 19, 2018 9:36 pm

Buttons keyboard hack

Thu Dec 27, 2018 4:23 pm

Hi all
I have gone my fruit box working fine. Well the software anyway.
I hacked a old keyboard to make the buttons from. I stripped down a old USB keyboard and removed the keyboard controller from the keyboard.
Then plugged the controller into a computer load up a notepad program. Them using a length of wire I shorted out the connections on the controller and looked at the computer to see which letter was displayed..once I got the right letter or number I just soldered a push switch to the 2 pads and them moved on the the next.
Anyone wanting to do this be aware not all keyboards have the same controller.. I spend a day online looking up the ASCI tables for keyboard controllers and found about a dozen different tables.. Some keyboards have extra keys i.e mute, vol up and down and other shortcut keys.
This is why I give up and just plugged in the controller and shorted the pads..Please note a single pad can display 2 or 3 letters.
I used a basic USB logitech keyboard..with NO extra shortcut keys.
Please note MOST USB ports on computers are short circuit protected. So you should be fine plugging it into your controller and shorting the pads. DO NOT short the wires on the USB lead. If you do by mistake don't worry your USB port may turn off but just unplug and plug in again this will reset the port. I CAN NOT GUARANTEE THIS.. SO IF YOU DO THIS YOU DO AT YOUR OWN RISK. As I said MOST USB ports are short circuit protected.
The pads on the circuit board are the connections to the keyboard membrane. They may look black, this is a carbon coating on the pads..You will need to remove this.. Do this with a light sand paper around 800 grit.. Sand it lightly till you see the copper track under the black carbon.
You can now solder to the pads.
Before anyone asks if you could use a bluetooth or wireless keyboard to do this. The answer is I don't know. But I can't see any reason why not...
But why would you want to? If you use a wireless keyboard you will have it power the controller with a battery or from the pi 3.3 or 5 volt GPIO pins.
Any way this is the pin combination on my controller.. Pad 1 on my controller was marked on the circuit board. Yours my not be. But as a general rule pad 1 is connected to the screen (ground) lead of the USB lead. Not to be confused with the black neutral wire. If your controller only as 4 wires connected to the controller. There is no screen (ground) lead. If there is 5 wires on the controller the wire that is warped around the other 4 is the ground wire.. It may have a sleeve over it.
A = pad 8 and 19
B = pad 9 and 18
C = pad 7 and 20
D = pad 6 and 13
E = pad 6 and 21
1 = pad 7 and 14
2 = pad 6 and 11
3 = pad 9 and 11
4 = pad 8 and 14
left arrow = pad 2 and 18 (to scroll back thought song list)
right arrow = pad 4 and 20 (to scroll forward thought list)
backspace = pad 3 and 24 ( to eject song playing).
Please be aware if you do as I did and plug into a computer, To see the letters and numbers displays.
You can while shorting out the pads turn on NUM LOCK. This will still display a number but from the number pad not the main keyboard.
When the controller is plugged it may turn off NUM LOCK and you will lose your numbers and end up with ( end, down arrow and pg up)
If your controller as LEDS to indicate NUM LOCK, CAP LOCK keep you eye on them.. If there come on, unplug and plug in again then recheck you number.

The wire I used again came from a old computer. I took a old 40 pin IDE HHD or CD rom lead and split it into 2 wires. But any small gauge paired wire will do.

These are all the buttons I need for the WallJuke skin.
I have tried to make this post easy for anyone to understand. I hope it helps all these people who are trying to use a joystick controller to do the same job.
The main advantage of doing it this way is..... Your raspberry pi and the fruitbox software see's this as a keyboard and so treats it as a keyboard. All you have done is only wired the keys you need. so NO setup or configuring of keys or buttons is needed.
If you need to update you OS software or fruitbox, Just unplug your buttons and plug in a keyboard. After update plug your buttons back in no reconfiguration needed.
Main disadvantage is it takes time, patients, and some wiring skills.
I hope this post is useful to some of you and as always thanks for taking the time to read it

MobileMac
Posts: 8
Joined: Mon Nov 19, 2018 9:36 pm

Re: fruitbox MP3 jukebox

Thu Dec 27, 2018 6:16 pm

Hi Again Everyone
Not sure how to explain this issue.. I am not sure if its a raspberry pi issue, a Raspbian Stretch issue or a fruitbox issue.
First the issue that got me to this point is the volume from the 3.5mm output jack.
I have tried to turn up the volume on the port but have no luck. I found lots of posts showing how to increase the volume, but to be honest may as well be written in Chinese for all the sense they make.
I just needed a simple easy to follow instructions to increase the volume.
I can't take the audio from the HDMI as my monitor as no audio output.

Anyway I gave up with that, and bought a JustBoom amp hat. After installing it and following the instructions on the justboom site. The only sound I can get out of it is a click every second " Click Click Click" I am not sure if this is because I need a driver for raspbian stretch?
Or if I have to configure fruitbox to see the hat?
If anyone out there knows how to set up this hat please Please let me know..

Now the main issue and one of the reasons for buying the justboom hat in the first place.
Although the 3.5mm jack works at low volume the audio signal that comes from it is noisy.
That is to say when fruitbox first loads you hear the pi initialize the 3.5mm port with a click and then a low hissing sound.
The low hiss is not a problem in itself it is not that noticeable when using the juke box.
But my design for my jukebox uses some LED VU meters and Spectrum analyzers on the front of my jukebox.
The VU and spectrum electronic control units do see the noise. They display it by lighting up the bottom 2 or 3 LED's on the VU and the bottom 3 or 4 rows of LED's on the spectrum.
So Cleaning up the audio signal for me is important.
By the way I tested both the vu and spectrum with a iPod and the work fine once the music stops playing there are no LEDS on

This is why at the beginning of this post I said I was not sure what was coursing the issue.
If anyone as any ideas please let me know
As always thanks for taking the time to read.

Return to “Graphics, sound and multimedia”