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

Re: fruitbox MP3 jukebox

Fri Jan 26, 2018 9:22 pm

bernyone wrote:
Fri Jan 26, 2018 9:10 pm
hi mike

just installed 1.5 on the miniJuke loaded TouchOne but no responce when i touch the screen.....

any ideas?

Jon
Have you programmed the left, right, skip, random and volume up/down buttons for touch input? By default they are mapped to the keyboard.

To map them for touch input, run fruitbox in config buttons mode...

Code: Select all

sudo ./fruitbox --config-buttons
Then just touch the screen when prompted for those buttons, and for all other buttons just press <ESC> on the keyboard. Then fruitbox will create a file called 'fruitbox.btn' which it then uses when you run it normally to map the buttons.

I deliberately didn't include the button mappings in the skin config file because your button hardware will be particular to your setup, and so this way makes the skins work for everyone's button mappings without having to modify the skin.

Let me know how you get on...

Cheers,
Mike

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

Re: fruitbox MP3 jukebox

Fri Jan 26, 2018 9:27 pm

GPIO bouncing is not really caused by the GPIO pin. Sometimes the glitches come though the ground or power planes also.

In QLC+ I added 200ms of hysteresis to take care of the problem in software. The GPIO pins are polled every 50ms in QLC+.
So you need to have m_counter and m_value for every GPIO pin.
HYSTERESIS_TRESHOLD could be 3.
This is because we live with an imperfect computer. I have not been able to fix this in hardware. The GPIO pins are glitchy and you usually get one glitch for every 2 hours of run time without this software fix.

Code: Select all

uchar newVal = dataRead.toUInt();
if (newVal != gpio->m_value)
{
    gpio->m_count++;
    if (gpio->m_count > HYSTERESIS_THRESHOLD) 
    {
        qDebug() << "Value read: GPIO:" << gpio->m_number << "val:" <<  newVal;
        gpio->m_value = newVal;
        gpio->m_count = 0;
        emit valueChanged(gpio->m_number, gpio->m_value);
    }
} 
else 
{
    gpio->m_count = 0;
}

bernyone
Posts: 50
Joined: Fri Sep 29, 2017 8:42 pm

Re: fruitbox MP3 jukebox

Fri Jan 26, 2018 9:33 pm

fruitbox wrote:
Fri Jan 26, 2018 9:22 pm

Have you programmed the left, right, skip, random and volume up/down buttons for touch input? By default they are mapped to the keyboard.

To map them for touch input, run fruitbox in config buttons mode...

Code: Select all

sudo ./fruitbox --config-buttons
Then just touch the screen when prompted for those buttons, and for all other buttons just press <ESC> on the keyboard. Then fruitbox will create a file called 'fruitbox.btn' which it then uses when you run it normally to map the buttons.

I deliberately didn't include the button mappings in the skin config file because your button hardware will be particular to your setup, and so this way makes the skins work for everyone's button mappings without having to modify the skin.

Let me know how you get on...

Cheers,
Mike
Dohh my bad!!!

all sorted

once again Mike you sir are a LEGEND!

Jon

OklahomaGreyBeard
Posts: 35
Joined: Thu Feb 11, 2016 3:14 am

Re: fruitbox MP3 jukebox

Sat Jan 27, 2018 7:33 am

I'm still having a few issues with control of the title strips or "pages". The strip I'm currently using is this one.
blackstrip.jpg
blackstrip.jpg (21.8 KiB) Viewed 1759 times
I'm running into issues with the artist not always fitting, especially now that it can be two artists. The page size is 380x128 but as you can see the area for the artist is only 280px wide. The program however will let text run up to the full width of 380 before it shrinks and condenses it.

My solution would be to allow setting not only the page size, but the text box size for each element. Then the x,y coordinates would be placing the top left corner of the text box within the confines of the page/strip. So with the page size above of 380x128 and an "artist" text box of 280x24, placing it at 50 52 would put it dead center of the strip. You could then have title1 and title2 and allow the same parameters allowing for borders on the strips and more precise placement of each one. It would even allow the option of a strip with the artist on top and two selections below. For album mode it could use "tracklist" as a holder for the entire track listing. (I am guessing as I haven't even looked at album mode)

Then again, I may just be missing something obvious that's already there and just need a hammer thrown at my head to point it out.

BTW, your software just may cost me a divorce if I keep buying parts for a steampunk themed jukebox on eBay. That brass crap is expensive..

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

Re: fruitbox MP3 jukebox

Sat Jan 27, 2018 9:58 am

OklahomaGreyBeard wrote:
Sat Jan 27, 2018 7:33 am
I'm still having a few issues with control of the title strips or "pages". The strip I'm currently using is this one.

blackstrip.jpg

I'm running into issues with the artist not always fitting, especially now that it can be two artists. The page size is 380x128 but as you can see the area for the artist is only 280px wide. The program however will let text run up to the full width of 380 before it shrinks and condenses it.

My solution would be to allow setting not only the page size, but the text box size for each element. Then the x,y coordinates would be placing the top left corner of the text box within the confines of the page/strip. So with the page size above of 380x128 and an "artist" text box of 280x24, placing it at 50 52 would put it dead center of the strip. You could then have title1 and title2 and allow the same parameters allowing for borders on the strips and more precise placement of each one. It would even allow the option of a strip with the artist on top and two selections below. For album mode it could use "tracklist" as a holder for the entire track listing. (I am guessing as I haven't even looked at album mode)

Then again, I may just be missing something obvious that's already there and just need a hammer thrown at my head to point it out.

BTW, your software just may cost me a divorce if I keep buying parts for a steampunk themed jukebox on eBay. That brass crap is expensive..
Hi Mike

I see your point about the text sizing; agreed it doesn't give you the flexibility you need (currently there is only one cfg parameter 'TextCondenseLimit' which defines the borders for everything). Your suggestion is a good one and I think I'll implement it by adding an extra number at the end of the text definitions which will indicate the text area width. This way each text box will have it's own unique width as you wanted. If the text is wider than this, it'll be shrunk horizontally to fit exactly in this width. I won't add an extra parameter value for the text height as fruitbox doesn't condense vertically.

Already part of the text description are x and y offsets (the last two numbers) which allow you to position the text elements anywhere on the pages.

If I make the new value default to the width of the object they are rendered in, then in their absence it will all work normally, so this means the existing skin configs will not need changing.

Hope this works for you?

Oh, and sorry to hear about you marital situation...perhaps I should put a disclaimer in the user guide...

Cheers
Mike

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

Re: fruitbox MP3 jukebox

Sat Jan 27, 2018 1:15 pm

I just started to use the TouchOne skin. It feels nice and the volume control works perfectly with AudioInjector HAT!

The touch interface works really well. Thanks!

My "jukebox" does not have a silver lining. Just a ghettoblaster with AUX input and the RaspberryPi attached to the book shelves.
Image

JLanza89
Posts: 3
Joined: Thu Jan 25, 2018 8:35 am

Re: fruitbox MP3 jukebox

Sun Jan 28, 2018 3:54 am

quiero conectar un hdd portátil, formato ntfs, con 40 gb de musica mp3. como deveria hacerlo?

I want to connect a portable hdd, ntfs format, with 40 gb of mp3 music. How should I do it?

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

Re: fruitbox MP3 jukebox

Sun Jan 28, 2018 2:19 pm

JLanza89 wrote:
Sun Jan 28, 2018 3:54 am
quiero conectar un hdd portátil, formato ntfs, con 40 gb de musica mp3. como deveria hacerlo?

I want to connect a portable hdd, ntfs format, with 40 gb of mp3 music. How should I do it?
Hi

You need to mount your hdd and then change the skin config file MusicPath parameter to point to it.

Instructions are near the end of the user guide (under memory sticks but its the same for HDDs)

Cheers,
Mike

alfarero
Posts: 8
Joined: Sun Jan 21, 2018 2:36 pm

Re: fruitbox MP3 jukebox

Sun Jan 28, 2018 3:20 pm

the furniture of my project restoring it

Image

https://ibb.co/fj3gdb

Image

bernyone
Posts: 50
Joined: Fri Sep 29, 2017 8:42 pm

Re: fruitbox MP3 jukebox

Sun Jan 28, 2018 6:45 pm

Hi mike

Upgraded the big juke to 1.5 this evening,
Changed the gpio buttons to usb (joystick buttons) but a few dont work even tho they were accepted when i ran the --configure-buttons script...
A-E works fine
1-4 works
Left + right works
Skip works
Random works

Quit + volume up & down do not work...

There also seams to be quite a delay from pressing the button and fruitbox responding (although this could be a hardware issue rather than software)

Any suggestions?

Jon

alfarero
Posts: 8
Joined: Sun Jan 21, 2018 2:36 pm

Re: fruitbox MP3 jukebox

Sun Jan 28, 2018 10:35 pm

hello thank you explain how to configure or map buttons both GPIO or USB interface thanks I can not configure it

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

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 12:02 am

bernyone wrote:
Sun Jan 28, 2018 6:45 pm
Hi mike

Upgraded the big juke to 1.5 this evening,
Changed the gpio buttons to usb (joystick buttons) but a few dont work even tho they were accepted when i ran the --configure-buttons script...
A-E works fine
1-4 works
Left + right works
Skip works
Random works

Quit + volume up & down do not work...

There also seams to be quite a delay from pressing the button and fruitbox responding (although this could be a hardware issue rather than software)

Any suggestions?

Jon
Hi Jon

Any chance you could post your 'fruitbox.btn' file? Also could you run 'evtest' (you may have to 'sudo apt-get install evtest' first, and send me it's output (I.e. the list of devices it detects)?

Cheers,
Mike

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

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 12:05 am

alfarero wrote:
Sun Jan 28, 2018 10:35 pm
hello thank you explain how to configure or map buttons both GPIO or USB interface thanks I can not configure it
Hi,

Code: Select all

sudo ./fruitbox --config-buttons
...then just press your buttons when prompted. This will generate the file 'fruitbox.btn' which is then used when you run fruitbox normally. If you are using GPIO then you need to run fruitbox in sudo mode.

Cheers,
Mike

JLanza89
Posts: 3
Joined: Thu Jan 25, 2018 8:35 am

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 7:45 am

Can someone guide me what can I do with this error?
happens after closing the program and try to open it again.

pi@raspberrypi:~/rpi-fruitbox-master $ sudo ./fruitbox --cfg skins/WallJuke/fruitbox.cfg

fruitbox v1.5 (Jan 26 2018, 18:19:37) by Mike Kingsley
A customisable MP3 Retro Jukebox for the Raspberry Pi
NOTE: Couldn't install keyboard
SkinSize = 1024 768
Detecting display...1440 x 900 (60Hz)
NOTE: Skin size will be scaled to fit display
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 18 requests (18 known processed) with 0 events remaining.

OklahomaGreyBeard
Posts: 35
Joined: Thu Feb 11, 2016 3:14 am

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 8:06 am

So the current push here seems to build the steampunk jukebox I've had rolling around in my head for years. The acquisition of parts has begun and here is what the screen is looking like so far. Once it's done if anyone is interested I'll make the skin available. I'm making the selection numbers as a separate file so there will be the option of just number, alpha numeric, or touch.
Steamed_Mock_small.jpg
Steamed_Mock_small.jpg (197.62 KiB) Viewed 1591 times
Also, here's the title strip itself if anyone wants it alone.
steamstrip.jpg
steamstrip.jpg (31.57 KiB) Viewed 1591 times
Comments/suggestions welcome. I intentionally didn't add a lot of gears or the standard "steampunk" stuff since it will all be part of the cabinet.

-mike

OklahomaGreyBeard
Posts: 35
Joined: Thu Feb 11, 2016 3:14 am

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 8:10 am

JLanza89 wrote:
Mon Jan 29, 2018 7:45 am

XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
Since it's a X Server error, I'll assume you're running it from the GUI desktop. It just seemed to do all sorts of random stuff when I did that. Mike recommends booting to the console and running it there and I've had no issues (other than my own stupidity) running it that way. He may have more details though..

-The Other Mike

cybercloporte
Posts: 2
Joined: Mon Jan 29, 2018 5:53 pm

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 6:03 pm

Hi, first of all, thank you for this great job. I can't make working joystick in fuitbox. In fruitbox.cfg, i have this :

Code: Select all

#[joystick]
#Bitmap = ../glass.png
#Offset = -10 -10
#Size 330 50
So i delete the # in the fruitbox.cfg, but after reboot, fruitbox don't boot. There's no file named glass.png in the skin folder ! (walljuke skin).

How can i use my xbox360 usb controller in fruitbox ?

Thanks

alfarero
Posts: 8
Joined: Sun Jan 21, 2018 2:36 pm

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 7:07 pm

I have put a usb interface on the keyboards and they work well they go fast when you go to choose the first song. But when I add more songs in line, the buttons slow down and it takes a few seconds to recognize them. Some suggestion thanks

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

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 7:24 pm

cybercloporte wrote:
Mon Jan 29, 2018 6:03 pm
Hi, first of all, thank you for this great job. I can't make working joystick in fuitbox. In fruitbox.cfg, i have this :

Code: Select all

#[joystick]
#Bitmap = ../glass.png
#Offset = -10 -10
#Size 330 50
So i delete the # in the fruitbox.cfg, but after reboot, fruitbox don't boot. There's no file named glass.png in the skin folder ! (walljuke skin).

How can i use my xbox360 usb controller in fruitbox ?

Thanks
Hi,

There may be a glass.png file in another skin directory...if so you need to copy it over. Or you can use any bitmap - it's just used to highlight the position of the joystick. (I think there's a suitable one in TouchOne called 'touch.png' or 'touch_red.png').

Just pug in your USB controller and then configure the buttons...

Code: Select all

./fruitbox --config-buttons

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

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 7:27 pm

alfarero wrote:
Mon Jan 29, 2018 7:07 pm
I have put a usb interface on the keyboards and they work well they go fast when you go to choose the first song. But when I add more songs in line, the buttons slow down and it takes a few seconds to recognize them. Some suggestion thanks
Hi,

That's sounds a bit iffy...I may have to experiment a bit to see if I can work out what's happening. What skin are you using?

Also, can you run 'evtest' (see a previous post about that), and send me the output; what devices it picks up and what buttons it thinks your USB interface is providing. If you're not familiar with evtest a quick google will help; it's farily simple to use.

Cheers,
Mike

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

Re: fruitbox MP3 jukebox

Mon Jan 29, 2018 7:28 pm

fruitbox wrote:
Mon Jan 29, 2018 12:02 am
bernyone wrote:
Sun Jan 28, 2018 6:45 pm
Hi mike

Upgraded the big juke to 1.5 this evening,
Changed the gpio buttons to usb (joystick buttons) but a few dont work even tho they were accepted when i ran the --configure-buttons script...
A-E works fine
1-4 works
Left + right works
Skip works
Random works

Quit + volume up & down do not work...

There also seams to be quite a delay from pressing the button and fruitbox responding (although this could be a hardware issue rather than software)

Any suggestions?

Jon
Hi Jon

Any chance you could post your 'fruitbox.btn' file? Also could you run 'evtest' (you may have to 'sudo apt-get install evtest' first, and send me it's output (I.e. the list of devices it detects)?

Cheers,
Mike
Hi Again,

any news on that btn file for me?

Cheers,
Mike

Hebert
Posts: 1
Joined: Mon Jan 29, 2018 11:56 pm

Re: fruitbox MP3 jukebox

Tue Jan 30, 2018 12:02 am

Hi everyone! I'm setting up my jukebox. I'm looking forward to incrementing by putting RGB LED strip and it would be cool if they were controlled by this program based on the rhythm of the song. Is it possible to control the GPIO pins as output based on music rhythm?

OklahomaGreyBeard
Posts: 35
Joined: Thu Feb 11, 2016 3:14 am

Re: fruitbox MP3 jukebox

Tue Jan 30, 2018 3:54 am

So while I'm working on the hardware and skin, Fruitbox running in auto mode has pretty much become my default music player as it happily shuffles through my songs. At the moment, I've pared the track list down to just under 4000 songs. The only problem is while I love a wide variety of music, there are times where I just want to hear a specific subset of songs. This got me to thinking about perhaps a genre mode. I see it as the "auto" button cycles through a set of modes defined in the skin as well as a play all mode. something like AutoGenres = Classic Rock, Soft Jazz, 80's, Metal, Disco and each time you press the auto button it cycles through each mode sitting a variable that could be displayed in the skin. Fruitbox then selects the songs to play based on that Genre.

Then again, maybe this was all triggered by hearing Van Halen, and Anthrax with Tiptoe Through the Tulips between them :roll: ....

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

Re: fruitbox MP3 jukebox

Tue Jan 30, 2018 8:10 am

OklahomaGreyBeard wrote:
Tue Jan 30, 2018 3:54 am
So while I'm working on the hardware and skin, Fruitbox running in auto mode has pretty much become my default music player as it happily shuffles through my songs. At the moment, I've pared the track list down to just under 4000 songs. The only problem is while I love a wide variety of music, there are times where I just want to hear a specific subset of songs. This got me to thinking about perhaps a genre mode. I see it as the "auto" button cycles through a set of modes defined in the skin as well as a play all mode. something like AutoGenres = Classic Rock, Soft Jazz, 80's, Metal, Disco and each time you press the auto button it cycles through each mode sitting a variable that could be displayed in the skin. Fruitbox then selects the songs to play based on that Genre.

Then again, maybe this was all triggered by hearing Van Halen, and Anthrax with Tiptoe Through the Tulips between them :roll: ....
Great idea...I'll see what I can do.

cybercloporte
Posts: 2
Joined: Mon Jan 29, 2018 5:53 pm

Re: fruitbox MP3 jukebox

Tue Jan 30, 2018 6:06 pm

Hi, i try to navigate in fruitbox whit my xbox360 controller. I copy, in TouchOne Skins folder, touch.png and rename it "glass.png", and i put it in WallJuke skin folder. I plug the controller and i configure it with "./fruitbox --config-buttons" successfully. When i reboot, i have this message : Error couldn't load display object 'skins/WallJuke/ ../glass.png". So, the system stop booting. I tried with another images, that i rename "glass.png, same problem ! I think glass.png must have a particular resolution, what can i do ?

Thanks

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: No registered users and 10 guests