KLWP Music Controls are the next step in this Kustom Beginner's guide. After this part you will be able to control your music player and display cover art through Kustom.
Kustom Beginner’s Guide – Part 4 – Music Controls
To get started
First you have to make sure that your Music Player supports the Android media service extension (source), otherwise it won't work with KLWP. Kustom also has to have notification access in Android settings.
Creating Music Controls
Most Music Controls consist of Play/Pause/Next/Previous buttons, cover art and a progress bar. All this is very easy to make in Kustom. When we have a look at kwerdenker's Komponent you can see that the background is the cover art, a bar contains the music controls and the artist and title info is stacked on top of this bar.
In the example Cover Art is added trough a bitmap and with advanced editing set to "$mi(cover)$" as the formula.
There is another way to add covert art which gives you more options. Add a shape and pick your desired form (square, circle, etc.). Then go to "FX" and change texture to bitmap and enter the Cover Art Formula through the advanced editor.
Now you have several options. Mode will stay "Fit Center" most of the time but some filters might be a nice touch.
You can also blur, dim and add shadow to the Cover Art.
Track Info as seen on the example can be added by simple text items to your Music Controls. Just go into the text editor and and the following formulas.
The Play/Pause Icon consists of a background shape and the icon which changes dynamically on touch. To accomplish that he used the formula
So, if the music is not playing then show "Play" (W) else show "Pause" (o).
You can use images also, the process is the same but your formula changes with the image locations as then and else.
Now you need the add the on touch action, do so accordingly to the next screen.
The next song control is done the same way as above.
And also the previouse song control can be done the same way.
On the left side there is a start app button. You can do with that whatever you like.
On the right side there is a button to go into Kustom. Again this is not crucial for a music player.
Note: The preset uses the old method because it was created before actual progress bars were implemented into Kustom. The new method is explained beneath.
Here a rectangle shape is used with texture set to horizontal gradient. On the offset you have to go to the advanced editor and...
... change it to "$mi(percent)$".
Using Progress Bar item
Kustom introduced an easier way to create progress bars, the progress bar item.
Simply add one to your preset and set the progress to "Music Playtime"
You can change the style to Circular if you like.
Color and Color Mode can be adjusted also.
This should give you various options for your progress bars.
Now at the end of the Kustom Music Controls guide you should easily be able to create your own music controls.
The next part of the Kustom Beginner's guide will be about maps.