---
title: "LVGL: Music player"
canonical_url: https://developer.repebble.com/pebbleos/docs/samples/third_party/lvgl/music/
last_updated: 2026-11-21
sdk_version: 4.44
---
# LVGL: Music player

Source: https://developer.repebble.com/pebbleos/docs/samples/third_party/lvgl/music/

This sample runs the music player demo that comes with [LVGL](https://developer.repebble.com/pebbleos/docs/third_party/lvgl.md): a screen full of artwork, text and an animated spectrum that plays by itself and follows the touchscreen. It enables the demo and the fonts it uses with LVGL’s own options in its `prj.conf`, and what the board needs, such as its GPU, in `boards/<board>.conf`.

Unlike the other samples it does not end.

Run:

`pbl samples samples/third_party/lvgl/music`

Boards:

every board

## Sources

src/main.c

```
#include \<stdio.h\>#include \<pbl/kernel/delay.h\>#include \<demos/lv\_demos.h\>#include \<pbl\_lvgl.h\>int main(void) {int ret;ret = pbl\_lvgl\_init();if (ret != 0) {fprintf(stderr, "lvgl: init failed (%d)\n", ret);return ret;}/\* The demos come with LVGL, each enabled by its CONFIG\_LV\_USE\_DEMO\_\* option. \*/lv\_demo\_music();printf("lvgl: music player on %dx%d\n",(int)lv\_display\_get\_horizontal\_resolution(pbl\_lvgl\_get\_display()),(int)lv\_display\_get\_vertical\_resolution(pbl\_lvgl\_get\_display()));while (true) {pbl\_sleep\_ms(lv\_timer\_handler());}}
```

## Output

```
lvgl: music player on \d+x\d+
```

Generated from PebbleOS [4bbc630fa](https://github.com/coredevices/pebbleos/commit/4bbc630fa451369e352c06b8276c7fe37c67f4fd). This page is maintained in the pebbleos repository: [docs/samples/third\_party/lvgl/music.md](https://github.com/coredevices/pebbleos/blob/4bbc630fa451369e352c06b8276c7fe37c67f4fd/docs/samples/third_party/lvgl/music.md).
