提交 33bc06de 编写于 作者: L liukangcc

[update] add lvgl music demo.

上级 9684f34b
# files format check exclude path, please follow the instructions below to modify;
# If you need to exclude an entire folder, add the folder path in dir_path;
# If you need to exclude a file, add the path to the file in file_path.
dir_path:
- demo
from building import *
import os
cwd = GetCurrentDir()
......@@ -6,6 +7,13 @@ src = Glob('*.c')
CPPPATH = [cwd]
CPPDEFINES = ['STM32F4']
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
group = DefineGroup('LVGL-port', src, depend = ['BSP_USING_LVGL'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
Return('group')
Return('objs')
import rtconfig
from building import *
cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.cpp')
print("hello, world")
path = [cwd]
path += [cwd + '/src']
src += Glob('src/lv_demo_music/*.c')
src += Glob('src/lv_demo_music/assets/*.c')
path += [cwd + '/src/lv_demo_music']
path += [cwd + '/src/lv_demo_music/assets']
group = DefineGroup('LVGL-demo', src, depend = ['BSP_USING_LVGL'], CPPPATH = path)
Return('group')
/**
* @file lv_examples.h
*
*/
#ifndef LV_DEMO_H
#define LV_DEMO_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*If "lv_conf.h" is available from here try to use it later.*/
#ifdef __has_include
# if __has_include("lvgl.h")
# ifndef LV_LVGL_H_INCLUDE_SIMPLE
# define LV_LVGL_H_INCLUDE_SIMPLE
# endif
# endif
#endif
#ifdef __has_include
# if __has_include("lv_demo_conf.h")
# ifndef LV_DEMO_CONF_INCLUDE_SIMPLE
# define LV_DEMO_CONF_INCLUDE_SIMPLE
# endif
# endif
#endif
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
#include <lvgl.h>
#else
#include <lvgl.h>
#endif
#if defined(LV_DEMO_CONF_PATH)
#define __LV_TO_STR_AUX(x) #x
#define __LV_TO_STR(x) __LV_TO_STR_AUX(x)
#include __LV_TO_STR(LV_DEMO_CONF_PATH)
#undef __LV_TO_STR_AUX
#undef __LV_TO_STR
#elif defined(LV_DEMO_CONF_INCLUDE_SIMPLE)
#include "lv_demo_conf.h"
#else
#include <lv_conf.h>
#endif
#include "src/lv_demo_music/lv_demo_music.h"
/*********************
* DEFINES
*********************/
/*Test lvgl version*/
#if LV_VERSION_CHECK(8, 0, 0) == 0
#error "lv_demo: Wrong lvgl version"
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DEMO_H*/
/**
* @file lv_examples.h
* This file exists only to be compatible with Arduino's library structure
*/
#ifndef LV_DEMO_SRC_H
#define LV_DEMO_SRC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../lv_demo.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DEMO_SRC_H*/
# Music player demo
## Overview
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL. It works the best with display with 480x272 or 272x480 resolution.
![Music player demo with LVGL embedded GUI library](https://github.com/lvgl/lv_examples/blob/master/src/lv_demo_music/screenshot1.gif?raw=true)
## Run the demo
- In `lv_ex_conf.h` set `LV_USE_DEMO_MUSIC 1`
- With `LV_DEMO_MUSIC_AUTO_PLAY` enabled a ~60 sec demo will be played.
- After `lv_init()` and initializing the drivers call `lv_demo_music()`
## How the spectrum animation works
- `assets/spectrum.py` creates an array of spectrum values from a music. 4 band are created with 33 samples/sec: bass, bass-mid, mid, mid-treble.
- The spectrum meter UI does the followings:
- Zoom the album cover proportionality to the current bass value
- Display the 4 bands on the left side of a circle by default at 0°, 45°, 90°, 135°
- Add extra bars next to the "main bars" with a cosine shape. Add more bars for the lower bands.
- If the there is a large enough bass add a random offset to the position of the bars. E.g. start from 63° istead of 0°. (bars greater than 180° start again from 0°)
- If there no bass add 1 to the offset of the bars (it creates a "walking" effect)
- Mirror the bars to the right side of the circle
## Using spectrum.py
- install `librosa` with `pip3 install librosa`
- run `python sectrum.py my_file.mp3`
- see the result in `spectrum.h`
const uint16_t spectrum_1[][4] = {
{ 0, 0, 0, 0, },
{ 0, 9, 7, 8, },
{ 5, 39, 24, 29, },
{ 14, 44, 34, 45, },
{ 16, 25, 32, 48, },
{ 16, 18, 29, 44, },
{ 15, 20, 26, 40, },
{ 15, 19, 24, 37, },
{ 14, 19, 27, 42, },
{ 13, 17, 29, 39, },
{ 12, 17, 24, 31, },
{ 11, 17, 24, 29, },
{ 9, 19, 22, 26, },
{ 6, 19, 27, 35, },
{ 4, 18, 28, 38, },
{ 2, 17, 20, 26, },
{ 1, 15, 16, 20, },
{ 1, 27, 18, 18, },
{ 8, 52, 22, 31, },
{ 16, 44, 20, 39, },
{ 16, 29, 15, 25, },
{ 16, 28, 12, 14, },
{ 16, 27, 17, 14, },
{ 15, 23, 53, 36, },
{ 12, 20, 69, 51, },
{ 11, 19, 53, 47, },
{ 11, 20, 47, 43, },
{ 10, 19, 45, 43, },
{ 8, 16, 41, 43, },
{ 5, 15, 43, 46, },
{ 3, 12, 38, 42, },
{ 2, 12, 27, 36, },
{ 1, 12, 21, 35, },
{ 2, 34, 26, 34, },
{ 12, 55, 30, 30, },
{ 17, 38, 19, 18, },
{ 16, 25, 13, 13, },
{ 16, 21, 13, 11, },
{ 16, 17, 18, 19, },
{ 14, 18, 23, 40, },
{ 14, 16, 28, 44, },
{ 13, 17, 24, 35, },
{ 12, 15, 17, 32, },
{ 11, 14, 16, 27, },
{ 8, 13, 16, 27, },
{ 5, 12, 19, 28, },
{ 3, 11, 21, 32, },
{ 1, 16, 19, 29, },
{ 0, 20, 16, 18, },
{ 0, 20, 16, 29, },
{ 0, 17, 21, 46, },
{ 0, 13, 23, 41, },
{ 0, 11, 21, 33, },
{ 0, 11, 18, 31, },
{ 2, 34, 25, 32, },
{ 12, 52, 29, 36, },
{ 17, 28, 24, 36, },
{ 16, 19, 23, 33, },
{ 16, 19, 22, 30, },
{ 15, 19, 21, 31, },
{ 15, 19, 24, 35, },
{ 14, 20, 24, 35, },
{ 13, 21, 19, 22, },
{ 13, 21, 16, 15, },
{ 11, 20, 25, 17, },
{ 7, 21, 62, 42, },
{ 4, 19, 72, 56, },
{ 2, 15, 55, 49, },
{ 1, 15, 49, 40, },
{ 1, 17, 41, 31, },
{ 1, 20, 36, 33, },
{ 0, 19, 33, 36, },
{ 1, 15, 30, 31, },
{ 0, 17, 25, 22, },
{ 0, 20, 19, 15, },
{ 0, 20, 19, 14, },
{ 0, 17, 23, 15, },
{ 0, 15, 19, 14, },
{ 0, 15, 15, 14, },
{ 0, 12, 15, 18, },
{ 0, 11, 15, 25, },
{ 0, 12, 23, 43, },
{ 0, 14, 26, 48, },
{ 0, 12, 21, 36, },
{ 0, 11, 18, 27, },
{ 1, 21, 21, 25, },
{ 8, 42, 28, 30, },
{ 16, 34, 25, 29, },
{ 16, 22, 20, 20, },
{ 16, 22, 16, 14, },
{ 17, 21, 14, 15, },
{ 15, 16, 21, 33, },
{ 13, 15, 29, 46, },
{ 13, 16, 26, 37, },
{ 13, 15, 22, 32, },
{ 11, 14, 20, 30, },
{ 8, 12, 24, 34, },
{ 6, 15, 27, 40, },
{ 3, 17, 23, 34, },
{ 2, 16, 18, 28, },
{ 0, 13, 17, 29, },
{ 2, 31, 22, 26, },
{ 12, 52, 27, 33, },
{ 17, 34, 21, 35, },
{ 16, 23, 15, 22, },
{ 17, 20, 12, 17, },
{ 16, 23, 29, 21, },
{ 13, 22, 66, 39, },
{ 12, 20, 67, 47, },
{ 12, 21, 50, 40, },
{ 11, 23, 44, 32, },
{ 10, 23, 37, 31, },
{ 7, 17, 34, 40, },
{ 5, 14, 35, 49, },
{ 3, 12, 29, 41, },
{ 1, 12, 27, 37, },
{ 0, 16, 26, 31, },
{ 4, 40, 34, 32, },
{ 14, 47, 30, 29, },
{ 17, 25, 17, 21, },
{ 16, 22, 13, 14, },
{ 17, 20, 14, 14, },
{ 15, 17, 20, 27, },
{ 14, 15, 26, 44, },
{ 13, 16, 27, 41, },
{ 13, 16, 23, 29, },
{ 12, 14, 21, 27, },
{ 10, 14, 21, 28, },
{ 7, 16, 24, 31, },
{ 4, 12, 25, 32, },
{ 2, 11, 21, 25, },
{ 1, 10, 14, 14, },
{ 0, 11, 14, 16, },
{ 0, 13, 18, 35, },
{ 0, 13, 22, 45, },
{ 0, 11, 20, 37, },
{ 0, 11, 16, 29, },
{ 0, 14, 15, 22, },
{ 5, 40, 25, 24, },
{ 14, 44, 30, 37, },
{ 15, 24, 27, 35, },
{ 15, 15, 23, 31, },
{ 16, 12, 19, 28, },
{ 15, 13, 21, 31, },
{ 14, 16, 24, 41, },
{ 13, 16, 22, 39, },
{ 13, 13, 20, 29, },
{ 12, 15, 18, 19, },
{ 9, 18, 34, 24, },
{ 7, 18, 69, 49, },
{ 4, 17, 68, 55, },
{ 2, 16, 54, 51, },
{ 1, 14, 51, 47, },
{ 1, 13, 44, 46, },
{ 0, 11, 35, 43, },
{ 1, 11, 32, 40, },
{ 1, 11, 29, 39, },
{ 0, 9, 26, 34, },
{ 0, 12, 26, 31, },
{ 0, 13, 28, 31, },
{ 0, 13, 27, 30, },
{ 0, 12, 26, 28, },
{ 0, 10, 25, 27, },
{ 0, 11, 21, 26, },
{ 0, 11, 21, 28, },
{ 0, 13, 25, 40, },
{ 0, 14, 25, 37, },
{ 0, 13, 22, 33, },
{ 0, 14, 18, 29, },
{ 2, 30, 19, 26, },
{ 11, 51, 28, 36, },
{ 16, 32, 30, 39, },
{ 15, 23, 28, 33, },
{ 16, 19, 26, 29, },
{ 16, 18, 24, 26, },
{ 14, 20, 26, 32, },
{ 14, 21, 29, 37, },
{ 13, 22, 26, 28, },
{ 12, 22, 20, 17, },
{ 11, 23, 19, 16, },
{ 8, 23, 28, 27, },
{ 5, 18, 32, 40, },
{ 3, 17, 27, 33, },
{ 1, 15, 23, 20, },
{ 0, 17, 20, 15, },
{ 4, 41, 25, 25, },
{ 14, 51, 26, 34, },
{ 17, 32, 19, 26, },
{ 16, 28, 12, 16, },
{ 17, 25, 10, 11, },
{ 16, 28, 39, 25, },
{ 13, 24, 68, 47, },
{ 11, 22, 61, 48, },
{ 12, 20, 49, 44, },
{ 11, 19, 48, 40, },
{ 9, 17, 41, 41, },
{ 7, 15, 39, 45, },
{ 4, 14, 38, 45, },
{ 3, 16, 29, 36, },
{ 1, 15, 25, 33, },
{ 1, 21, 24, 33, },
{ 7, 46, 31, 31, },
{ 16, 41, 25, 23, },
{ 16, 23, 17, 16, },
{ 16, 21, 13, 11, },
{ 16, 18, 12, 11, },
{ 15, 19, 18, 29, },
{ 14, 17, 25, 53, },
{ 13, 17, 24, 44, },
{ 13, 16, 18, 32, },
{ 12, 16, 15, 27, },
{ 9, 15, 17, 29, },
{ 6, 15, 20, 30, },
{ 4, 13, 20, 31, },
{ 2, 15, 18, 27, },
{ 1, 16, 16, 16, },
{ 0, 15, 17, 20, },
{ 0, 15, 21, 39, },
{ 0, 14, 25, 43, },
{ 0, 12, 22, 34, },
{ 0, 10, 18, 30, },
{ 1, 20, 20, 28, },
{ 8, 45, 29, 38, },
{ 16, 40, 29, 40, },
{ 16, 24, 27, 28, },
{ 17, 20, 23, 20, },
{ 17, 21, 21, 18, },
{ 15, 23, 22, 25, },
{ 14, 22, 24, 37, },
{ 13, 23, 20, 28, },
{ 13, 23, 16, 17, },
{ 11, 21, 16, 15, },
{ 9, 20, 47, 29, },
{ 6, 19, 76, 49, },
{ 3, 18, 64, 49, },
{ 2, 19, 52, 46, },
{ 1, 19, 50, 43, },
{ 1, 18, 42, 41, },
{ 0, 17, 37, 43, },
{ 1, 14, 33, 42, },
{ 1, 13, 26, 36, },
{ 0, 13, 23, 31, },
{ 0, 14, 23, 28, },
{ 0, 17, 31, 32, },
{ 0, 16, 28, 32, },
{ 0, 13, 18, 25, },
{ 0, 11, 13, 20, },
{ 0, 11, 11, 19, },
{ 0, 12, 17, 37, },
{ 0, 14, 25, 50, },
{ 0, 14, 23, 42, },
{ 0, 12, 18, 34, },
{ 0, 13, 20, 29, },
{ 4, 37, 29, 28, },
{ 14, 49, 30, 31, },
{ 17, 28, 25, 29, },
{ 16, 21, 18, 19, },
{ 17, 20, 15, 14, },
{ 16, 20, 16, 23, },
{ 14, 18, 25, 43, },
{ 13, 17, 28, 44, },
{ 13, 17, 22, 28, },
{ 12, 17, 21, 21, },
{ 10, 19, 22, 18, },
{ 7, 22, 26, 25, },
{ 4, 19, 27, 35, },
{ 2, 16, 22, 28, },
{ 1, 17, 18, 19, },
{ 1, 25, 18, 17, },
{ 7, 46, 25, 28, },
{ 16, 38, 24, 37, },
{ 16, 20, 20, 29, },
{ 17, 21, 14, 16, },
{ 17, 22, 16, 13, },
{ 15, 25, 51, 30, },
{ 12, 20, 71, 48, },
{ 12, 22, 57, 48, },
{ 12, 22, 49, 39, },
{ 11, 23, 44, 33, },
{ 9, 20, 37, 32, },
{ 6, 21, 39, 44, },
{ 4, 17, 36, 46, },
{ 2, 17, 28, 34, },
{ 1, 20, 22, 21, },
{ 2, 34, 21, 16, },
{ 10, 58, 28, 16, },
{ 17, 40, 20, 14, },
{ 16, 25, 12, 11, },
{ 17, 18, 14, 10, },
{ 16, 17, 15, 14, },
{ 15, 20, 25, 37, },
{ 14, 21, 27, 47, },
{ 13, 19, 22, 34, },
{ 13, 17, 18, 25, },
{ 11, 17, 15, 23, },
{ 8, 19, 18, 22, },
{ 6, 18, 19, 22, },
{ 3, 15, 21, 23, },
{ 1, 15, 21, 20, },
{ 0, 12, 16, 14, },
{ 0, 11, 19, 27, },
{ 0, 15, 27, 44, },
{ 0, 13, 27, 40, },
{ 0, 10, 22, 30, },
{ 0, 10, 18, 26, },
{ 2, 28, 24, 26, },
{ 11, 51, 30, 33, },
{ 17, 30, 28, 40, },
{ 16, 19, 23, 34, },
{ 17, 18, 21, 25, },
{ 16, 17, 23, 23, },
{ 14, 14, 27, 31, },
{ 14, 11, 26, 36, },
{ 13, 17, 22, 27, },
{ 12, 21, 19, 17, },
{ 11, 20, 21, 15, },
{ 8, 20, 57, 38, },
{ 5, 20, 71, 54, },
{ 3, 14, 57, 54, },
{ 1, 13, 52, 44, },
{ 0, 15, 50, 38, },
{ 1, 16, 41, 33, },
{ 0, 20, 31, 28, },
{ 1, 18, 26, 22, },
{ 0, 20, 22, 17, },
{ 0, 20, 21, 16, },
{ 0, 20, 23, 20, },
{ 0, 23, 22, 25, },
{ 0, 22, 21, 24, },
{ 0, 22, 19, 21, },
{ 0, 23, 17, 21, },
{ 0, 23, 19, 28, },
{ 0, 23, 29, 39, },
{ 0, 17, 32, 43, },
{ 0, 17, 25, 38, },
{ 0, 20, 20, 26, },
{ 1, 22, 19, 19, },
{ 2, 28, 26, 19, },
{ 2, 29, 35, 15, },
{ 2, 28, 45, 14, },
{ 8, 28, 51, 15, },
{ 11, 27, 46, 14, },
{ 12, 26, 37, 13, },
{ 8, 27, 31, 12, },
{ 5, 22, 24, 11, },
{ 4, 13, 16, 10, },
{ 4, 6, 13, 9, },
{ 4, 5, 16, 11, },
{ 4, 7, 24, 16, },
{ 5, 8, 23, 19, },
{ 5, 6, 20, 20, },
{ 4, 5, 18, 19, },
{ 3, 4, 16, 16, },
{ 1, 3, 15, 15, },
{ 0, 2, 15, 13, },
{ 0, 1, 15, 11, },
{ 0, 1, 13, 11, },
{ 0, 1, 13, 12, },
{ 0, 2, 18, 14, },
{ 0, 3, 23, 16, },
{ 0, 3, 21, 17, },
{ 0, 3, 18, 15, },
{ 0, 5, 17, 13, },
{ 0, 5, 13, 9, },
{ 0, 3, 7, 4, },
{ 0, 1, 4, 2, },
{ 0, 0, 3, 1, },
{ 0, 0, 3, 1, },
{ 0, 0, 7, 4, },
{ 0, 0, 12, 8, },
{ 0, 0, 12, 10, },
{ 0, 0, 11, 10, },
{ 0, 0, 11, 9, },
{ 0, 1, 12, 9, },
{ 0, 2, 19, 12, },
{ 0, 3, 25, 15, },
{ 0, 4, 22, 16, },
{ 0, 5, 21, 14, },
{ 0, 4, 18, 9, },
{ 0, 4, 19, 11, },
{ 0, 5, 23, 16, },
{ 0, 5, 22, 14, },
{ 0, 4, 19, 12, },
{ 0, 5, 18, 12, },
{ 0, 4, 23, 13, },
{ 0, 5, 28, 15, },
{ 0, 4, 27, 17, },
{ 0, 3, 22, 17, },
{ 0, 3, 21, 16, },
{ 0, 3, 16, 11, },
{ 0, 2, 8, 5, },
{ 0, 0, 5, 3, },
{ 0, 0, 3, 1, },
{ 0, 0, 2, 1, },
{ 0, 1, 7, 4, },
{ 0, 2, 16, 10, },
{ 0, 3, 19, 14, },
{ 0, 3, 16, 13, },
{ 0, 3, 16, 14, },
{ 0, 2, 15, 13, },
{ 0, 2, 15, 13, },
{ 0, 3, 13, 12, },
{ 0, 3, 7, 5, },
{ 0, 1, 2, 1, },
{ 0, 0, 1, 1, },
{ 0, 0, 1, 1, },
{ 0, 0, 1, 1, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 2, 1, },
{ 0, 1, 11, 7, },
{ 0, 3, 21, 15, },
{ 0, 4, 21, 17, },
{ 0, 4, 18, 15, },
{ 0, 4, 19, 15, },
{ 0, 4, 21, 13, },
{ 0, 4, 24, 17, },
{ 0, 4, 27, 24, },
{ 0, 3, 23, 22, },
{ 0, 3, 20, 17, },
{ 0, 4, 18, 16, },
{ 0, 6, 13, 10, },
{ 0, 5, 5, 3, },
{ 0, 1, 2, 1, },
{ 0, 0, 2, 1, },
{ 0, 0, 1, 1, },
{ 0, 0, 1, 1, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
};
const uint16_t spectrum_2[][4] = {
{ 0, 0, 0, 0, },
{ 0, 8, 28, 14, },
{ 1, 35, 63, 31, },
{ 5, 62, 56, 35, },
{ 13, 49, 42, 30, },
{ 21, 24, 45, 31, },
{ 22, 15, 46, 37, },
{ 20, 9, 48, 35, },
{ 17, 12, 50, 33, },
{ 6, 11, 49, 35, },
{ 0, 10, 50, 40, },
{ 0, 11, 50, 37, },
{ 0, 14, 51, 37, },
{ 0, 18, 47, 33, },
{ 0, 16, 41, 27, },
{ 0, 13, 40, 24, },
{ 0, 10, 36, 23, },
{ 0, 7, 32, 25, },
{ 0, 7, 33, 25, },
{ 0, 7, 33, 29, },
{ 0, 8, 31, 33, },
{ 0, 8, 32, 32, },
{ 0, 9, 33, 31, },
{ 0, 11, 37, 31, },
{ 0, 13, 39, 33, },
{ 0, 16, 48, 47, },
{ 0, 11, 57, 45, },
{ 0, 7, 50, 36, },
{ 0, 5, 38, 29, },
{ 0, 5, 32, 30, },
{ 0, 4, 25, 26, },
{ 0, 5, 18, 17, },
{ 0, 5, 14, 12, },
{ 0, 6, 19, 17, },
{ 0, 5, 26, 22, },
{ 0, 16, 43, 27, },
{ 1, 46, 64, 31, },
{ 5, 60, 40, 24, },
{ 17, 42, 22, 16, },
{ 28, 23, 15, 9, },
{ 29, 16, 15, 10, },
{ 25, 12, 25, 20, },
{ 16, 14, 34, 24, },
{ 11, 13, 34, 24, },
{ 10, 11, 31, 26, },
{ 10, 15, 29, 23, },
{ 10, 15, 23, 13, },
{ 10, 15, 20, 7, },
{ 11, 15, 28, 12, },
{ 11, 13, 35, 20, },
{ 10, 14, 39, 23, },
{ 10, 14, 40, 28, },
{ 10, 14, 36, 29, },
{ 11, 13, 29, 21, },
{ 10, 13, 27, 15, },
{ 10, 15, 29, 17, },
{ 11, 16, 32, 26, },
{ 10, 15, 35, 27, },
{ 11, 29, 60, 30, },
{ 8, 56, 56, 27, },
{ 11, 54, 25, 17, },
{ 23, 28, 20, 13, },
{ 29, 16, 19, 11, },
{ 27, 12, 19, 17, },
{ 22, 14, 28, 24, },
{ 11, 15, 34, 25, },
{ 11, 11, 37, 26, },
{ 11, 12, 35, 26, },
{ 11, 13, 26, 19, },
{ 11, 17, 23, 16, },
{ 10, 26, 39, 39, },
{ 3, 20, 43, 48, },
{ 1, 14, 43, 38, },
{ 0, 12, 40, 31, },
{ 0, 9, 40, 31, },
{ 0, 8, 37, 30, },
{ 0, 8, 32, 30, },
{ 0, 5, 28, 33, },
{ 0, 4, 25, 28, },
{ 0, 6, 28, 21, },
{ 0, 6, 33, 19, },
{ 0, 5, 33, 21, },
{ 0, 4, 36, 25, },
{ 0, 4, 39, 34, },
{ 0, 4, 40, 35, },
{ 0, 4, 41, 31, },
{ 0, 4, 40, 28, },
{ 0, 4, 41, 26, },
{ 0, 4, 38, 33, },
{ 0, 3, 34, 31, },
{ 0, 4, 26, 21, },
{ 0, 10, 31, 18, },
{ 1, 41, 65, 22, },
{ 4, 67, 46, 14, },
{ 15, 55, 18, 6, },
{ 28, 26, 16, 5, },
{ 31, 14, 16, 6, },
{ 29, 9, 16, 6, },
{ 22, 16, 19, 6, },
{ 12, 15, 22, 7, },
{ 12, 13, 22, 7, },
{ 11, 13, 20, 6, },
{ 11, 14, 22, 7, },
{ 11, 18, 28, 20, },
{ 11, 23, 26, 21, },
{ 11, 18, 19, 9, },
{ 11, 15, 18, 5, },
{ 11, 14, 17, 4, },
{ 11, 16, 16, 9, },
{ 11, 18, 21, 21, },
{ 11, 21, 20, 16, },
{ 11, 17, 17, 6, },
{ 11, 16, 17, 4, },
{ 11, 16, 17, 4, },
{ 12, 18, 22, 17, },
{ 11, 21, 44, 44, },
{ 5, 14, 56, 52, },
{ 1, 11, 57, 41, },
{ 0, 9, 39, 29, },
{ 0, 8, 35, 25, },
{ 0, 9, 37, 22, },
{ 0, 12, 34, 21, },
{ 0, 9, 27, 21, },
{ 0, 5, 19, 17, },
{ 0, 4, 16, 14, },
{ 0, 18, 38, 17, },
{ 2, 52, 67, 22, },
{ 5, 66, 38, 17, },
{ 17, 43, 25, 18, },
{ 26, 18, 25, 18, },
{ 26, 11, 21, 18, },
{ 24, 10, 24, 18, },
{ 15, 16, 28, 21, },
{ 12, 14, 27, 22, },
{ 11, 13, 25, 20, },
{ 11, 15, 24, 15, },
{ 11, 16, 20, 12, },
{ 11, 16, 24, 10, },
{ 11, 18, 40, 15, },
{ 11, 14, 38, 19, },
{ 11, 14, 35, 23, },
{ 11, 13, 32, 28, },
{ 12, 13, 29, 19, },
{ 11, 14, 27, 18, },
{ 11, 15, 32, 26, },
{ 11, 14, 39, 27, },
{ 11, 15, 38, 29, },
{ 12, 19, 39, 24, },
{ 12, 34, 68, 25, },
{ 9, 63, 59, 25, },
{ 12, 57, 30, 22, },
{ 21, 27, 26, 19, },
{ 24, 16, 23, 21, },
{ 24, 17, 18, 16, },
{ 23, 19, 17, 12, },
{ 11, 22, 28, 21, },
{ 3, 22, 34, 26, },
{ 2, 21, 36, 28, },
{ 2, 24, 32, 24, },
{ 3, 39, 56, 25, },
{ 4, 58, 71, 39, },
{ 9, 50, 41, 36, },
{ 17, 29, 30, 28, },
{ 22, 20, 30, 22, },
{ 22, 14, 32, 23, },
{ 21, 13, 30, 23, },
{ 10, 22, 38, 26, },
{ 6, 47, 60, 31, },
{ 6, 64, 43, 23, },
{ 15, 48, 18, 12, },
{ 24, 24, 16, 9, },
{ 26, 15, 24, 13, },
{ 22, 13, 33, 21, },
{ 20, 15, 36, 30, },
{ 8, 29, 57, 33, },
{ 4, 57, 61, 27, },
{ 10, 54, 37, 21, },
{ 17, 29, 32, 22, },
{ 21, 16, 31, 26, },
{ 23, 11, 28, 26, },
{ 20, 13, 27, 19, },
{ 12, 21, 36, 19, },
{ 7, 48, 72, 31, },
{ 5, 68, 59, 32, },
{ 13, 51, 38, 31, },
{ 24, 24, 32, 29, },
{ 26, 16, 34, 28, },
{ 22, 10, 36, 26, },
{ 17, 15, 38, 27, },
{ 10, 14, 40, 28, },
{ 10, 10, 40, 32, },
{ 10, 12, 42, 35, },
{ 10, 13, 46, 34, },
{ 10, 15, 48, 31, },
{ 10, 17, 40, 26, },
{ 10, 17, 34, 24, },
{ 10, 14, 32, 24, },
{ 10, 13, 30, 22, },
{ 10, 13, 30, 23, },
{ 10, 14, 30, 21, },
{ 10, 15, 29, 22, },
{ 10, 14, 28, 22, },
{ 10, 15, 30, 25, },
{ 10, 17, 34, 28, },
{ 11, 20, 36, 33, },
{ 10, 21, 48, 49, },
{ 4, 14, 63, 54, },
{ 1, 11, 53, 41, },
{ 0, 10, 38, 25, },
{ 0, 9, 31, 18, },
{ 0, 10, 24, 20, },
{ 0, 12, 18, 16, },
{ 0, 8, 15, 11, },
{ 0, 5, 21, 14, },
{ 0, 5, 28, 15, },
{ 0, 15, 44, 18, },
{ 2, 46, 60, 23, },
{ 5, 61, 36, 15, },
{ 16, 42, 21, 11, },
{ 28, 21, 15, 7, },
{ 30, 15, 14, 7, },
{ 25, 13, 19, 12, },
{ 16, 14, 23, 12, },
{ 11, 12, 31, 13, },
{ 11, 10, 31, 13, },
{ 10, 13, 25, 14, },
{ 11, 17, 22, 10, },
{ 10, 16, 18, 7, },
{ 11, 15, 17, 10, },
{ 11, 14, 20, 11, },
{ 11, 13, 25, 15, },
{ 11, 14, 34, 17, },
{ 10, 14, 33, 15, },
{ 10, 14, 32, 15, },
{ 10, 13, 35, 14, },
{ 10, 13, 34, 14, },
{ 10, 14, 31, 14, },
{ 10, 14, 34, 15, },
{ 10, 32, 63, 21, },
{ 8, 62, 58, 17, },
{ 11, 57, 39, 11, },
{ 23, 27, 32, 11, },
{ 26, 15, 25, 11, },
{ 26, 12, 18, 11, },
{ 22, 14, 18, 10, },
{ 10, 15, 29, 13, },
{ 10, 14, 33, 13, },
{ 10, 13, 31, 14, },
{ 10, 15, 27, 13, },
{ 11, 19, 26, 17, },
{ 9, 25, 44, 39, },
{ 3, 19, 44, 46, },
{ 0, 14, 37, 36, },
{ 0, 11, 30, 23, },
{ 0, 9, 29, 19, },
{ 0, 8, 28, 17, },
{ 0, 8, 24, 16, },
{ 0, 5, 20, 17, },
{ 0, 4, 21, 17, },
{ 0, 3, 18, 13, },
{ 0, 16, 33, 15, },
{ 1, 47, 59, 23, },
{ 7, 60, 40, 19, },
{ 17, 40, 32, 15, },
{ 22, 21, 31, 12, },
{ 23, 13, 33, 13, },
{ 21, 13, 32, 12, },
{ 14, 20, 36, 14, },
{ 4, 20, 34, 16, },
{ 0, 21, 32, 17, },
{ 0, 23, 27, 14, },
{ 0, 29, 35, 13, },
{ 1, 56, 66, 23, },
{ 4, 71, 47, 15, },
{ 15, 55, 19, 4, },
{ 27, 26, 14, 3, },
{ 30, 15, 13, 3, },
{ 28, 8, 12, 4, },
{ 21, 14, 16, 8, },
{ 12, 14, 17, 7, },
{ 11, 12, 17, 4, },
{ 11, 13, 17, 3, },
{ 11, 13, 17, 3, },
{ 10, 13, 17, 7, },
{ 10, 13, 22, 18, },
{ 10, 14, 36, 23, },
{ 11, 12, 43, 22, },
{ 11, 12, 36, 21, },
{ 11, 13, 37, 20, },
{ 11, 14, 39, 19, },
{ 10, 16, 32, 18, },
{ 11, 15, 25, 17, },
{ 11, 15, 21, 13, },
{ 11, 13, 21, 11, },
{ 11, 15, 24, 18, },
{ 10, 21, 47, 44, },
{ 4, 15, 55, 50, },
{ 0, 12, 44, 38, },
{ 0, 11, 36, 30, },
{ 0, 12, 26, 24, },
{ 0, 11, 22, 17, },
{ 0, 10, 25, 24, },
{ 0, 6, 34, 28, },
{ 0, 3, 35, 25, },
{ 0, 4, 27, 23, },
{ 0, 16, 36, 18, },
{ 2, 49, 60, 19, },
{ 5, 65, 36, 16, },
{ 16, 42, 23, 24, },
{ 25, 19, 23, 24, },
{ 25, 11, 24, 19, },
{ 22, 8, 29, 22, },
{ 15, 15, 34, 26, },
{ 11, 13, 36, 27, },
{ 10, 14, 32, 23, },
{ 10, 16, 28, 17, },
{ 10, 16, 30, 15, },
{ 11, 21, 43, 30, },
{ 7, 22, 43, 44, },
{ 1, 13, 20, 40, },
{ 0, 10, 13, 33, },
{ 0, 9, 18, 32, },
{ 0, 9, 27, 43, },
{ 0, 9, 36, 49, },
{ 0, 6, 36, 35, },
{ 0, 2, 29, 28, },
{ 0, 1, 26, 26, },
{ 0, 1, 26, 27, },
{ 0, 1, 34, 28, },
{ 0, 1, 39, 35, },
{ 0, 1, 33, 35, },
{ 0, 2, 26, 34, },
{ 0, 2, 23, 32, },
{ 0, 2, 25, 28, },
{ 0, 2, 32, 37, },
{ 0, 2, 38, 45, },
{ 0, 2, 26, 41, },
{ 0, 2, 14, 28, },
{ 0, 2, 14, 26, },
{ 0, 8, 33, 35, },
{ 0, 16, 54, 51, },
{ 0, 16, 52, 52, },
{ 0, 15, 52, 43, },
{ 0, 14, 40, 28, },
{ 0, 13, 38, 27, },
{ 0, 14, 36, 26, },
{ 0, 18, 38, 24, },
{ 0, 15, 38, 24, },
{ 0, 13, 34, 27, },
{ 0, 13, 33, 27, },
{ 0, 13, 35, 27, },
{ 0, 14, 43, 35, },
{ 0, 14, 59, 45, },
{ 0, 10, 61, 39, },
{ 0, 9, 59, 34, },
{ 0, 11, 54, 37, },
{ 0, 15, 51, 39, },
{ 0, 15, 57, 37, },
{ 0, 12, 68, 37, },
{ 0, 9, 72, 43, },
{ 0, 10, 66, 45, },
{ 0, 13, 57, 47, },
{ 1, 39, 78, 49, },
{ 5, 63, 63, 37, },
{ 14, 48, 45, 33, },
{ 21, 23, 45, 36, },
{ 23, 15, 49, 39, },
{ 21, 10, 51, 39, },
{ 16, 13, 52, 38, },
{ 6, 12, 62, 38, },
{ 0, 10, 68, 45, },
{ 0, 12, 70, 46, },
{ 0, 18, 74, 45, },
{ 0, 21, 70, 42, },
{ 0, 18, 51, 33, },
{ 0, 15, 45, 29, },
{ 0, 12, 45, 30, },
{ 0, 9, 47, 30, },
{ 0, 9, 45, 28, },
{ 0, 11, 40, 31, },
{ 1, 11, 38, 39, },
{ 0, 11, 39, 46, },
{ 0, 12, 41, 42, },
{ 1, 14, 46, 36, },
{ 0, 16, 47, 38, },
{ 0, 16, 53, 55, },
{ 0, 10, 58, 54, },
{ 0, 9, 50, 37, },
{ 0, 7, 42, 28, },
{ 0, 5, 37, 30, },
{ 0, 5, 27, 27, },
{ 0, 6, 19, 18, },
{ 0, 7, 15, 13, },
{ 0, 8, 21, 17, },
{ 0, 6, 29, 23, },
{ 0, 16, 44, 27, },
{ 2, 46, 63, 29, },
{ 5, 60, 40, 24, },
{ 17, 43, 21, 16, },
{ 28, 22, 16, 9, },
{ 30, 15, 14, 11, },
{ 26, 13, 24, 21, },
{ 16, 16, 35, 25, },
{ 11, 14, 38, 25, },
{ 12, 12, 35, 27, },
{ 11, 15, 32, 24, },
{ 11, 16, 24, 13, },
{ 11, 16, 22, 9, },
{ 12, 15, 31, 16, },
{ 11, 15, 42, 23, },
{ 11, 14, 51, 26, },
{ 11, 14, 57, 31, },
{ 10, 14, 55, 32, },
{ 11, 13, 49, 24, },
{ 11, 14, 46, 21, },
{ 11, 15, 51, 23, },
{ 10, 15, 53, 29, },
{ 10, 14, 51, 28, },
{ 10, 26, 65, 31, },
{ 8, 54, 54, 28, },
{ 11, 53, 28, 20, },
{ 24, 28, 27, 15, },
{ 30, 15, 29, 13, },
{ 27, 11, 29, 18, },
{ 22, 13, 35, 24, },
{ 11, 14, 41, 27, },
{ 11, 11, 43, 26, },
{ 10, 11, 38, 25, },
{ 11, 13, 29, 19, },
{ 11, 17, 26, 18, },
{ 10, 26, 42, 46, },
{ 4, 20, 44, 56, },
{ 0, 15, 43, 41, },
{ 0, 12, 43, 31, },
{ 0, 9, 41, 32, },
{ 0, 8, 39, 30, },
{ 0, 9, 35, 31, },
{ 0, 5, 30, 32, },
{ 0, 4, 24, 29, },
{ 0, 6, 27, 21, },
{ 0, 6, 31, 19, },
{ 0, 5, 33, 20, },
{ 0, 4, 36, 24, },
{ 0, 5, 38, 32, },
{ 0, 4, 41, 37, },
{ 0, 4, 39, 32, },
{ 0, 4, 40, 28, },
{ 0, 3, 40, 29, },
{ 0, 3, 38, 34, },
{ 0, 3, 34, 32, },
{ 0, 4, 27, 22, },
{ 0, 10, 31, 19, },
{ 1, 40, 63, 28, },
{ 4, 65, 47, 19, },
{ 14, 53, 26, 11, },
{ 26, 23, 37, 16, },
{ 28, 14, 35, 15, },
{ 26, 12, 31, 13, },
{ 20, 15, 44, 17, },
{ 12, 16, 41, 15, },
{ 12, 15, 43, 20, },
{ 11, 14, 52, 25, },
{ 11, 17, 46, 18, },
{ 11, 16, 44, 17, },
{ 11, 13, 51, 21, },
{ 11, 14, 41, 18, },
{ 11, 18, 31, 12, },
{ 12, 20, 27, 12, },
{ 11, 19, 25, 13, },
{ 12, 16, 41, 18, },
{ 12, 15, 48, 19, },
{ 11, 17, 37, 15, },
{ 11, 19, 26, 10, },
{ 11, 19, 22, 9, },
{ 12, 19, 24, 18, },
{ 11, 22, 43, 43, },
{ 5, 15, 55, 50, },
{ 0, 12, 58, 37, },
{ 0, 10, 44, 29, },
{ 0, 9, 37, 25, },
{ 0, 9, 38, 24, },
{ 0, 12, 34, 22, },
{ 0, 9, 26, 21, },
{ 0, 5, 19, 18, },
{ 0, 4, 15, 13, },
{ 0, 18, 37, 17, },
{ 2, 52, 65, 23, },
{ 5, 67, 36, 18, },
{ 17, 42, 22, 17, },
{ 26, 20, 23, 15, },
{ 26, 12, 21, 15, },
{ 24, 11, 23, 17, },
{ 16, 16, 29, 19, },
{ 12, 14, 29, 23, },
{ 11, 13, 26, 20, },
{ 11, 15, 25, 13, },
{ 11, 16, 21, 11, },
{ 11, 16, 22, 10, },
{ 10, 16, 39, 15, },
{ 11, 14, 40, 19, },
{ 10, 14, 41, 25, },
{ 10, 13, 42, 29, },
{ 11, 12, 44, 24, },
{ 11, 13, 43, 25, },
{ 10, 15, 47, 31, },
{ 10, 14, 55, 29, },
{ 9, 15, 56, 26, },
{ 10, 18, 50, 27, },
{ 11, 33, 71, 28, },
{ 9, 62, 57, 25, },
{ 11, 56, 32, 24, },
{ 20, 28, 31, 23, },
{ 24, 16, 32, 22, },
{ 23, 15, 28, 15, },
{ 21, 18, 24, 14, },
{ 10, 21, 33, 24, },
{ 3, 20, 38, 27, },
{ 2, 21, 37, 26, },
{ 3, 24, 32, 23, },
{ 3, 37, 53, 24, },
{ 4, 55, 69, 39, },
{ 8, 49, 41, 40, },
{ 18, 29, 33, 29, },
{ 15, 18, 37, 23, },
{ 5, 12, 43, 26, },
{ 3, 14, 45, 27, },
{ 4, 15, 47, 28, },
{ 4, 16, 44, 31, },
{ 4, 18, 42, 27, },
{ 5, 19, 37, 18, },
{ 5, 28, 51, 21, },
{ 4, 56, 69, 28, },
{ 6, 65, 41, 19, },
{ 18, 40, 30, 22, },
{ 20, 31, 55, 30, },
{ 9, 55, 64, 28, },
{ 10, 52, 39, 21, },
{ 18, 29, 36, 23, },
{ 14, 38, 59, 30, },
{ 7, 60, 56, 26, },
{ 12, 51, 29, 17, },
{ 20, 29, 30, 18, },
{ 17, 41, 64, 29, },
{ 6, 63, 54, 31, },
{ 13, 49, 38, 31, },
{ 23, 24, 36, 30, },
{ 24, 16, 40, 30, },
{ 22, 10, 42, 27, },
{ 18, 15, 46, 27, },
{ 10, 13, 48, 30, },
{ 10, 11, 47, 34, },
{ 10, 12, 51, 36, },
{ 10, 13, 57, 35, },
{ 9, 14, 56, 31, },
{ 9, 16, 42, 27, },
{ 10, 17, 34, 24, },
{ 9, 14, 34, 23, },
{ 9, 13, 35, 23, },
{ 10, 13, 35, 23, },
{ 10, 13, 34, 23, },
{ 10, 13, 32, 21, },
{ 10, 14, 30, 22, },
{ 10, 15, 33, 25, },
{ 10, 18, 36, 27, },
{ 10, 20, 36, 31, },
{ 9, 21, 49, 50, },
{ 4, 13, 60, 51, },
{ 0, 10, 50, 35, },
{ 0, 10, 38, 23, },
{ 0, 9, 33, 21, },
{ 0, 10, 25, 20, },
{ 0, 12, 20, 17, },
{ 0, 8, 16, 13, },
{ 0, 5, 19, 13, },
{ 0, 5, 28, 14, },
{ 0, 15, 46, 18, },
{ 2, 44, 61, 23, },
{ 5, 59, 36, 15, },
{ 17, 42, 19, 11, },
{ 27, 21, 13, 8, },
{ 28, 15, 14, 8, },
{ 24, 12, 20, 12, },
{ 15, 14, 23, 13, },
{ 10, 12, 31, 13, },
{ 10, 11, 31, 13, },
{ 11, 13, 25, 13, },
{ 10, 17, 21, 10, },
{ 10, 16, 18, 7, },
{ 10, 14, 19, 10, },
{ 10, 13, 27, 12, },
{ 10, 13, 34, 17, },
{ 10, 14, 44, 19, },
{ 10, 13, 47, 21, },
{ 10, 13, 46, 20, },
{ 11, 12, 50, 18, },
{ 10, 12, 52, 18, },
{ 10, 13, 51, 19, },
{ 10, 13, 48, 19, },
{ 10, 30, 67, 22, },
{ 8, 59, 58, 18, },
{ 10, 54, 40, 13, },
{ 22, 27, 32, 13, },
{ 25, 14, 29, 13, },
{ 24, 11, 26, 13, },
{ 21, 13, 25, 13, },
{ 11, 14, 34, 16, },
{ 10, 12, 36, 16, },
{ 10, 12, 34, 15, },
{ 10, 16, 29, 14, },
{ 10, 19, 27, 19, },
{ 9, 25, 45, 42, },
{ 3, 19, 46, 48, },
{ 1, 12, 37, 35, },
{ 0, 11, 29, 23, },
{ 0, 9, 29, 20, },
{ 0, 9, 27, 18, },
{ 0, 9, 23, 17, },
{ 0, 5, 20, 20, },
{ 0, 4, 20, 18, },
{ 0, 4, 18, 14, },
{ 0, 15, 32, 16, },
{ 1, 46, 57, 24, },
{ 7, 56, 42, 17, },
{ 15, 37, 32, 13, },
{ 21, 21, 31, 12, },
{ 21, 14, 36, 12, },
{ 21, 13, 34, 14, },
{ 14, 19, 37, 17, },
{ 3, 20, 36, 18, },
{ 0, 22, 35, 17, },
{ 0, 23, 30, 15, },
{ 0, 28, 34, 14, },
{ 1, 53, 64, 30, },
{ 3, 67, 56, 32, },
{ 13, 49, 42, 30, },
{ 23, 22, 42, 28, },
{ 26, 12, 40, 25, },
{ 24, 8, 44, 25, },
{ 19, 13, 47, 27, },
{ 11, 13, 42, 20, },
{ 11, 10, 40, 18, },
{ 10, 12, 41, 18, },
{ 10, 12, 44, 16, },
{ 10, 11, 36, 16, },
{ 10, 12, 33, 19, },
{ 10, 13, 44, 24, },
{ 10, 13, 48, 23, },
{ 9, 12, 44, 24, },
{ 9, 12, 43, 28, },
{ 10, 15, 45, 25, },
{ 11, 17, 40, 24, },
{ 10, 15, 35, 31, },
{ 11, 14, 34, 32, },
{ 10, 12, 37, 25, },
{ 11, 14, 37, 23, },
{ 10, 19, 52, 44, },
{ 4, 13, 63, 48, },
{ 0, 11, 52, 35, },
{ 0, 10, 42, 26, },
{ 0, 13, 36, 24, },
{ 0, 12, 28, 20, },
{ 0, 10, 34, 21, },
{ 0, 6, 39, 21, },
{ 0, 2, 35, 21, },
{ 0, 5, 33, 20, },
{ 0, 17, 41, 21, },
{ 2, 47, 60, 20, },
{ 5, 62, 37, 14, },
{ 16, 41, 23, 17, },
{ 24, 20, 26, 17, },
{ 25, 11, 29, 15, },
{ 23, 9, 28, 16, },
{ 16, 13, 27, 19, },
{ 12, 11, 30, 20, },
{ 10, 12, 33, 19, },
{ 11, 13, 33, 19, },
{ 11, 15, 32, 20, },
{ 10, 15, 30, 22, },
{ 10, 19, 37, 25, },
{ 10, 24, 57, 24, },
{ 10, 19, 54, 23, },
{ 9, 17, 54, 20, },
{ 10, 13, 55, 24, },
{ 9, 15, 55, 28, },
{ 10, 19, 65, 28, },
{ 9, 19, 69, 27, },
{ 10, 17, 56, 26, },
{ 10, 19, 52, 23, },
{ 10, 32, 71, 24, },
{ 9, 57, 65, 20, },
{ 12, 50, 48, 17, },
{ 18, 23, 44, 17, },
{ 21, 15, 39, 18, },
{ 20, 13, 37, 19, },
{ 17, 13, 40, 19, },
{ 8, 11, 45, 19, },
{ 0, 8, 46, 22, },
{ 0, 8, 44, 22, },
{ 0, 5, 42, 20, },
{ 0, 8, 40, 27, },
{ 0, 13, 50, 45, },
{ 0, 14, 54, 50, },
{ 0, 12, 55, 40, },
{ 0, 13, 57, 32, },
{ 0, 14, 53, 31, },
{ 0, 35, 71, 33, },
{ 4, 59, 62, 26, },
{ 12, 46, 39, 22, },
{ 19, 22, 38, 22, },
{ 22, 16, 37, 22, },
{ 21, 14, 37, 21, },
{ 17, 17, 34, 19, },
{ 7, 17, 38, 26, },
{ 0, 11, 50, 33, },
{ 0, 8, 55, 36, },
{ 0, 9, 54, 35, },
{ 0, 11, 50, 32, },
{ 0, 13, 54, 32, },
{ 0, 11, 62, 37, },
{ 0, 10, 58, 33, },
{ 0, 11, 53, 30, },
{ 0, 13, 44, 31, },
{ 0, 34, 42, 34, },
{ 2, 47, 33, 24, },
{ 5, 34, 30, 16, },
{ 5, 22, 32, 15, },
{ 7, 19, 33, 15, },
{ 6, 19, 31, 15, },
{ 3, 17, 36, 14, },
{ 2, 14, 35, 15, },
{ 3, 14, 35, 15, },
{ 3, 13, 35, 15, },
{ 2, 13, 35, 18, },
{ 1, 12, 35, 17, },
{ 2, 13, 28, 13, },
{ 1, 11, 27, 13, },
{ 2, 8, 29, 14, },
{ 1, 9, 28, 14, },
{ 3, 11, 24, 15, },
{ 3, 10, 22, 14, },
{ 2, 10, 21, 12, },
{ 1, 10, 23, 11, },
{ 1, 11, 22, 12, },
{ 1, 9, 19, 11, },
{ 1, 9, 20, 10, },
{ 1, 9, 19, 10, },
{ 2, 11, 18, 9, },
{ 2, 10, 18, 10, },
{ 0, 9, 18, 9, },
{ 0, 10, 19, 9, },
{ 0, 13, 19, 8, },
{ 0, 12, 21, 9, },
{ 1, 8, 20, 9, },
{ 1, 7, 17, 9, },
{ 1, 9, 16, 8, },
{ 1, 9, 15, 8, },
{ 1, 9, 15, 7, },
{ 0, 7, 15, 6, },
{ 0, 9, 15, 7, },
{ 1, 8, 12, 6, },
{ 0, 6, 11, 5, },
{ 0, 6, 12, 5, },
{ 0, 6, 12, 5, },
{ 0, 5, 13, 4, },
{ 0, 3, 12, 4, },
{ 0, 3, 10, 3, },
{ 0, 3, 8, 3, },
{ 0, 3, 8, 3, },
{ 0, 3, 7, 3, },
{ 0, 3, 7, 2, },
{ 0, 2, 5, 2, },
{ 0, 2, 4, 2, },
{ 0, 1, 4, 1, },
{ 0, 1, 4, 1, },
{ 0, 1, 3, 1, },
{ 0, 0, 2, 1, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
};
const uint16_t spectrum_3[][4] = {
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 1, 1, 0, },
{ 0, 1, 1, 0, },
{ 0, 1, 1, 0, },
{ 0, 2, 2, 0, },
{ 0, 2, 2, 0, },
{ 0, 2, 3, 0, },
{ 0, 3, 3, 0, },
{ 0, 3, 3, 0, },
{ 0, 4, 3, 0, },
{ 0, 4, 4, 0, },
{ 0, 4, 5, 0, },
{ 0, 4, 5, 0, },
{ 1, 4, 6, 0, },
{ 1, 4, 6, 1, },
{ 1, 4, 6, 1, },
{ 1, 6, 7, 1, },
{ 1, 7, 7, 1, },
{ 1, 7, 7, 1, },
{ 1, 8, 9, 1, },
{ 1, 8, 11, 1, },
{ 1, 7, 9, 1, },
{ 1, 6, 10, 1, },
{ 1, 7, 10, 1, },
{ 1, 9, 11, 1, },
{ 0, 10, 13, 1, },
{ 0, 12, 12, 1, },
{ 0, 12, 13, 2, },
{ 0, 12, 23, 5, },
{ 0, 23, 65, 20, },
{ 0, 49, 56, 16, },
{ 2, 53, 11, 1, },
{ 5, 37, 25, 4, },
{ 13, 25, 25, 3, },
{ 16, 14, 8, 0, },
{ 11, 11, 11, 1, },
{ 5, 12, 14, 2, },
{ 2, 8, 8, 0, },
{ 2, 14, 38, 7, },
{ 1, 28, 51, 9, },
{ 5, 20, 20, 2, },
{ 7, 16, 45, 15, },
{ 4, 40, 68, 21, },
{ 2, 56, 25, 6, },
{ 3, 39, 5, 0, },
{ 9, 22, 9, 1, },
{ 13, 11, 5, 0, },
{ 11, 9, 25, 5, },
{ 5, 24, 51, 9, },
{ 4, 24, 27, 4, },
{ 7, 13, 6, 1, },
{ 5, 14, 13, 2, },
{ 3, 10, 9, 1, },
{ 3, 6, 23, 8, },
{ 2, 25, 68, 22, },
{ 1, 54, 48, 14, },
{ 3, 48, 7, 1, },
{ 7, 33, 25, 4, },
{ 13, 24, 20, 3, },
{ 15, 13, 4, 0, },
{ 10, 11, 12, 2, },
{ 4, 11, 11, 1, },
{ 2, 6, 7, 1, },
{ 2, 16, 43, 8, },
{ 2, 27, 46, 8, },
{ 6, 18, 12, 2, },
{ 6, 18, 52, 17, },
{ 4, 44, 64, 19, },
{ 2, 53, 16, 4, },
{ 4, 34, 5, 0, },
{ 10, 19, 7, 1, },
{ 13, 10, 3, 0, },
{ 10, 11, 31, 6, },
{ 4, 26, 50, 9, },
{ 5, 21, 21, 3, },
{ 7, 14, 12, 2, },
{ 5, 17, 22, 3, },
{ 3, 14, 11, 1, },
{ 4, 9, 31, 11, },
{ 3, 31, 70, 22, },
{ 1, 54, 38, 11, },
{ 3, 43, 10, 2, },
{ 8, 31, 26, 5, },
{ 14, 22, 17, 3, },
{ 15, 12, 5, 0, },
{ 9, 11, 12, 2, },
{ 3, 10, 9, 1, },
{ 3, 6, 12, 2, },
{ 2, 19, 47, 9, },
{ 3, 26, 40, 7, },
{ 6, 16, 14, 4, },
{ 6, 21, 59, 19, },
{ 3, 50, 58, 17, },
{ 2, 54, 9, 2, },
{ 5, 33, 6, 1, },
{ 11, 17, 7, 1, },
{ 13, 9, 4, 0, },
{ 9, 14, 37, 7, },
{ 3, 27, 48, 9, },
{ 6, 19, 15, 2, },
{ 7, 13, 9, 1, },
{ 5, 13, 13, 2, },
{ 3, 8, 5, 0, },
{ 3, 9, 41, 14, },
{ 2, 36, 69, 22, },
{ 1, 56, 29, 8, },
{ 3, 41, 3, 0, },
{ 8, 23, 7, 1, },
{ 13, 11, 4, 0, },
{ 11, 9, 21, 4, },
{ 5, 23, 50, 10, },
{ 4, 24, 30, 5, },
{ 7, 14, 6, 1, },
{ 5, 13, 13, 2, },
{ 3, 11, 9, 1, },
{ 3, 6, 19, 7, },
{ 2, 22, 66, 21, },
{ 1, 47, 51, 15, },
{ 1, 43, 4, 0, },
{ 6, 25, 2, 0, },
{ 11, 13, 2, 0, },
{ 12, 7, 4, 0, },
{ 7, 8, 15, 2, },
{ 1, 11, 18, 2, },
{ 2, 10, 14, 2, },
{ 2, 11, 25, 4, },
{ 2, 18, 32, 4, },
{ 3, 18, 30, 5, },
{ 3, 19, 53, 16, },
{ 3, 43, 68, 20, },
{ 1, 57, 23, 5, },
{ 4, 41, 19, 3, },
{ 10, 28, 28, 4, },
{ 16, 17, 14, 1, },
{ 13, 11, 9, 1, },
{ 7, 12, 15, 2, },
{ 2, 8, 11, 0, },
{ 2, 9, 27, 5, },
{ 2, 24, 53, 10, },
{ 4, 23, 30, 4, },
{ 7, 14, 29, 9, },
{ 5, 30, 67, 21, },
{ 2, 56, 40, 11, },
{ 2, 47, 3, 0, },
{ 7, 27, 7, 1, },
{ 13, 14, 5, 0, },
{ 12, 8, 13, 2, },
{ 7, 20, 47, 9, },
{ 3, 26, 38, 6, },
{ 6, 15, 6, 0, },
{ 6, 13, 12, 2, },
{ 4, 12, 12, 1, },
{ 3, 7, 10, 3, },
{ 2, 16, 58, 19, },
{ 1, 45, 61, 19, },
{ 2, 47, 12, 3, },
{ 5, 32, 21, 4, },
{ 12, 27, 26, 4, },
{ 16, 15, 8, 0, },
{ 12, 10, 9, 1, },
{ 5, 12, 13, 2, },
{ 2, 8, 5, 0, },
{ 2, 10, 32, 6, },
{ 1, 26, 51, 10, },
{ 5, 22, 21, 3, },
{ 7, 14, 36, 12, },
{ 5, 35, 68, 21, },
{ 2, 57, 32, 8, },
{ 3, 43, 3, 0, },
{ 8, 24, 7, 1, },
{ 13, 12, 5, 0, },
{ 11, 8, 19, 4, },
{ 6, 22, 50, 10, },
{ 4, 25, 33, 5, },
{ 7, 14, 8, 1, },
{ 6, 16, 21, 3, },
{ 3, 15, 16, 2, },
{ 4, 9, 16, 6, },
{ 3, 21, 64, 21, },
{ 1, 47, 54, 16, },
{ 1, 46, 7, 1, },
{ 6, 31, 23, 4, },
{ 12, 24, 22, 4, },
{ 16, 13, 5, 0, },
{ 11, 11, 10, 2, },
{ 4, 11, 11, 2, },
{ 2, 6, 5, 0, },
{ 2, 13, 38, 7, },
{ 1, 27, 48, 9, },
{ 6, 19, 15, 2, },
{ 7, 16, 45, 15, },
{ 4, 39, 67, 20, },
{ 2, 53, 23, 6, },
{ 4, 36, 4, 0, },
{ 9, 20, 7, 1, },
{ 14, 10, 3, 0, },
{ 11, 10, 26, 5, },
{ 5, 24, 51, 10, },
{ 4, 23, 26, 4, },
{ 7, 13, 6, 1, },
{ 5, 13, 14, 2, },
{ 3, 10, 8, 1, },
{ 3, 6, 24, 8, },
{ 2, 25, 68, 21, },
{ 2, 48, 46, 13, },
{ 2, 42, 2, 0, },
{ 7, 27, 7, 1, },
{ 13, 15, 6, 0, },
{ 13, 8, 10, 2, },
{ 7, 18, 46, 9, },
{ 2, 26, 41, 7, },
{ 6, 16, 7, 0, },
{ 6, 13, 12, 5, },
{ 4, 12, 14, 7, },
{ 3, 7, 9, 4, },
{ 2, 14, 53, 18, },
{ 1, 44, 61, 21, },
{ 1, 56, 14, 8, },
{ 4, 36, 7, 5, },
{ 10, 20, 14, 8, },
{ 13, 12, 12, 6, },
{ 8, 8, 16, 4, },
{ 3, 11, 25, 4, },
{ 2, 10, 20, 2, },
{ 2, 9, 21, 6, },
{ 2, 16, 30, 15, },
{ 3, 17, 26, 12, },
{ 3, 18, 39, 13, },
{ 3, 32, 70, 25, },
{ 2, 56, 45, 19, },
{ 7, 46, 24, 9, },
{ 13, 37, 19, 5, },
{ 10, 32, 28, 5, },
{ 15, 21, 20, 2, },
{ 15, 12, 8, 0, },
{ 9, 12, 13, 2, },
{ 3, 12, 11, 1, },
{ 3, 8, 14, 2, },
{ 2, 19, 48, 9, },
{ 3, 27, 42, 7, },
{ 6, 16, 17, 4, },
{ 6, 21, 59, 19, },
{ 3, 49, 57, 19, },
{ 2, 53, 10, 7, },
{ 5, 33, 6, 5, },
{ 11, 17, 7, 4, },
{ 13, 9, 5, 2, },
{ 9, 14, 37, 7, },
{ 3, 26, 47, 8, },
{ 6, 19, 16, 2, },
{ 7, 13, 10, 1, },
{ 5, 13, 14, 2, },
{ 3, 8, 6, 0, },
{ 3, 9, 41, 14, },
{ 2, 35, 69, 21, },
{ 1, 53, 29, 8, },
{ 3, 39, 13, 2, },
{ 9, 30, 27, 5, },
{ 15, 20, 15, 2, },
{ 14, 11, 6, 1, },
{ 8, 12, 13, 2, },
{ 2, 9, 8, 1, },
{ 3, 6, 18, 4, },
{ 2, 22, 51, 10, },
{ 4, 25, 35, 6, },
{ 7, 14, 19, 6, },
{ 6, 24, 64, 22, },
{ 2, 52, 50, 17, },
{ 2, 50, 6, 6, },
{ 6, 29, 7, 5, },
{ 12, 15, 7, 4, },
{ 13, 8, 8, 2, },
{ 8, 17, 43, 8, },
{ 2, 27, 44, 8, },
{ 6, 17, 10, 1, },
{ 6, 14, 17, 3, },
{ 4, 16, 21, 3, },
{ 4, 11, 8, 1, },
{ 4, 13, 49, 16, },
{ 2, 39, 66, 20, },
{ 2, 48, 20, 5, },
{ 4, 34, 17, 3, },
{ 10, 29, 27, 4, },
{ 15, 17, 11, 1, },
{ 13, 10, 7, 1, },
{ 7, 11, 13, 2, },
{ 2, 8, 7, 0, },
{ 2, 8, 25, 5, },
{ 2, 24, 51, 10, },
{ 4, 24, 27, 4, },
{ 7, 14, 28, 10, },
{ 5, 30, 68, 23, },
{ 2, 55, 42, 15, },
{ 2, 47, 5, 6, },
{ 7, 26, 8, 5, },
{ 13, 13, 6, 3, },
{ 12, 8, 13, 3, },
{ 7, 19, 47, 9, },
{ 3, 26, 39, 7, },
{ 6, 15, 6, 0, },
{ 6, 13, 12, 2, },
{ 4, 12, 11, 1, },
{ 3, 6, 9, 3, },
{ 2, 15, 58, 19, },
{ 1, 47, 62, 18, },
{ 1, 55, 12, 3, },
{ 4, 34, 5, 1, },
{ 11, 18, 7, 1, },
{ 13, 9, 3, 0, },
{ 9, 13, 35, 7, },
{ 3, 26, 49, 9, },
{ 5, 20, 17, 2, },
{ 7, 13, 9, 1, },
{ 5, 13, 14, 2, },
{ 2, 8, 6, 1, },
{ 3, 8, 37, 13, },
{ 2, 33, 69, 23, },
{ 1, 56, 33, 12, },
{ 3, 43, 3, 6, },
{ 8, 22, 4, 5, },
{ 13, 11, 4, 3, },
{ 10, 6, 6, 1, },
{ 4, 9, 17, 3, },
{ 1, 11, 16, 2, },
{ 2, 9, 14, 3, },
{ 2, 13, 30, 9, },
{ 2, 17, 28, 9, },
{ 3, 17, 28, 8, },
{ 2, 23, 65, 21, },
{ 2, 50, 55, 16, },
{ 2, 53, 9, 1, },
{ 6, 36, 25, 4, },
{ 13, 25, 25, 3, },
{ 16, 14, 9, 0, },
{ 11, 11, 13, 1, },
{ 4, 12, 14, 1, },
{ 2, 7, 9, 1, },
{ 2, 14, 39, 7, },
{ 1, 28, 49, 8, },
{ 6, 19, 17, 2, },
{ 7, 16, 46, 15, },
{ 4, 40, 66, 21, },
{ 2, 55, 23, 10, },
{ 4, 39, 6, 5, },
{ 9, 21, 8, 4, },
{ 13, 11, 5, 2, },
{ 11, 9, 26, 5, },
{ 5, 24, 51, 9, },
{ 4, 23, 26, 4, },
{ 7, 13, 7, 1, },
{ 5, 13, 15, 2, },
{ 3, 10, 10, 1, },
{ 3, 6, 24, 9, },
{ 2, 25, 68, 22, },
{ 1, 52, 45, 13, },
{ 2, 46, 8, 1, },
{ 7, 32, 25, 4, },
{ 14, 23, 20, 3, },
{ 15, 13, 5, 0, },
{ 10, 11, 12, 2, },
{ 4, 10, 12, 1, },
{ 2, 5, 8, 1, },
{ 2, 17, 43, 9, },
{ 2, 27, 44, 8, },
{ 6, 17, 12, 2, },
{ 6, 18, 53, 18, },
{ 4, 46, 62, 20, },
{ 2, 55, 15, 7, },
{ 4, 35, 7, 5, },
{ 10, 19, 10, 4, },
{ 14, 10, 5, 2, },
{ 10, 12, 32, 6, },
{ 4, 26, 49, 9, },
{ 5, 21, 19, 3, },
{ 7, 14, 12, 2, },
{ 5, 17, 22, 3, },
{ 3, 13, 10, 1, },
{ 4, 9, 33, 11, },
{ 3, 32, 69, 21, },
{ 1, 57, 37, 9, },
{ 2, 46, 11, 2, },
{ 8, 32, 26, 5, },
{ 15, 21, 17, 2, },
{ 15, 12, 5, 0, },
{ 9, 11, 12, 2, },
{ 3, 10, 9, 1, },
{ 3, 6, 13, 3, },
{ 2, 20, 49, 9, },
{ 3, 27, 40, 7, },
{ 6, 15, 15, 4, },
{ 6, 21, 60, 20, },
{ 3, 49, 56, 18, },
{ 2, 53, 9, 6, },
{ 5, 31, 7, 5, },
{ 11, 17, 7, 4, },
{ 13, 9, 5, 2, },
{ 9, 14, 39, 7, },
{ 3, 26, 48, 8, },
{ 6, 18, 14, 1, },
{ 7, 13, 9, 1, },
{ 5, 13, 13, 2, },
{ 3, 8, 5, 0, },
{ 2, 9, 42, 15, },
{ 2, 36, 68, 21, },
{ 1, 52, 27, 7, },
{ 3, 37, 5, 0, },
{ 9, 22, 10, 1, },
{ 13, 12, 6, 0, },
{ 11, 9, 23, 5, },
{ 5, 23, 50, 10, },
{ 4, 24, 28, 4, },
{ 7, 14, 6, 1, },
{ 5, 13, 12, 2, },
{ 3, 11, 8, 2, },
{ 3, 6, 20, 7, },
{ 2, 23, 66, 22, },
{ 1, 53, 50, 17, },
{ 2, 50, 6, 6, },
{ 6, 28, 4, 5, },
{ 12, 13, 4, 3, },
{ 11, 7, 3, 1, },
{ 6, 4, 2, 0, },
{ 1, 2, 1, 0, },
{ 0, 1, 1, 0, },
{ 0, 1, 4, 0, },
{ 0, 1, 5, 0, },
{ 0, 1, 6, 2, },
{ 0, 10, 52, 18, },
{ 0, 43, 67, 20, },
{ 1, 58, 21, 4, },
{ 4, 42, 21, 3, },
{ 11, 30, 29, 4, },
{ 16, 20, 13, 1, },
{ 13, 12, 12, 1, },
{ 6, 12, 19, 1, },
{ 2, 9, 13, 0, },
{ 2, 9, 27, 5, },
{ 2, 26, 50, 10, },
{ 4, 24, 27, 4, },
{ 7, 14, 30, 10, },
{ 5, 31, 68, 22, },
{ 2, 55, 39, 14, },
{ 2, 47, 6, 6, },
{ 7, 26, 11, 5, },
{ 13, 14, 9, 3, },
{ 12, 8, 15, 3, },
{ 7, 20, 48, 9, },
{ 3, 26, 38, 6, },
{ 7, 15, 7, 0, },
{ 6, 13, 13, 2, },
{ 4, 12, 12, 1, },
{ 3, 7, 11, 4, },
{ 2, 16, 59, 20, },
{ 1, 48, 62, 18, },
{ 1, 55, 13, 2, },
{ 5, 37, 22, 4, },
{ 11, 27, 25, 4, },
{ 15, 15, 7, 0, },
{ 12, 11, 10, 1, },
{ 5, 12, 13, 2, },
{ 2, 8, 6, 0, },
{ 2, 11, 34, 7, },
{ 1, 26, 52, 9, },
{ 5, 22, 21, 3, },
{ 7, 14, 39, 13, },
{ 4, 35, 68, 22, },
{ 2, 55, 31, 11, },
{ 3, 42, 8, 5, },
{ 8, 24, 11, 4, },
{ 12, 13, 7, 3, },
{ 11, 9, 22, 4, },
{ 5, 23, 53, 10, },
{ 3, 25, 33, 5, },
{ 6, 14, 10, 1, },
{ 5, 16, 22, 3, },
{ 3, 15, 16, 2, },
{ 4, 8, 19, 6, },
{ 3, 22, 64, 20, },
{ 1, 51, 51, 14, },
{ 1, 51, 9, 1, },
{ 5, 34, 24, 3, },
{ 11, 24, 25, 3, },
{ 13, 14, 9, 0, },
{ 10, 11, 12, 2, },
{ 4, 11, 13, 2, },
{ 2, 7, 9, 1, },
{ 2, 13, 40, 8, },
{ 1, 26, 48, 9, },
{ 4, 18, 16, 2, },
{ 5, 15, 46, 15, },
{ 3, 40, 65, 21, },
{ 1, 54, 24, 9, },
{ 2, 36, 10, 5, },
{ 7, 19, 11, 4, },
{ 10, 9, 9, 3, },
{ 8, 9, 28, 5, },
{ 3, 23, 50, 9, },
{ 2, 22, 25, 4, },
{ 4, 12, 11, 1, },
{ 3, 12, 19, 2, },
{ 1, 9, 14, 2, },
{ 1, 6, 28, 9, },
{ 1, 25, 68, 21, },
{ 0, 50, 44, 12, },
{ 1, 41, 9, 1, },
{ 3, 22, 11, 1, },
{ 6, 11, 11, 1, },
{ 6, 6, 15, 2, },
{ 3, 17, 46, 8, },
{ 1, 23, 40, 7, },
{ 2, 14, 13, 1, },
{ 2, 11, 14, 2, },
{ 1, 10, 13, 2, },
{ 1, 5, 14, 3, },
{ 1, 12, 58, 18, },
{ 0, 38, 64, 20, },
{ 0, 42, 17, 7, },
{ 1, 22, 14, 5, },
{ 3, 9, 16, 5, },
{ 4, 4, 13, 3, },
{ 2, 5, 16, 2, },
{ 0, 10, 21, 3, },
{ 0, 8, 19, 2, },
{ 0, 8, 21, 5, },
{ 0, 13, 32, 9, },
{ 0, 14, 31, 7, },
{ 0, 13, 42, 11, },
{ 0, 25, 70, 19, },
{ 0, 37, 37, 8, },
{ 0, 23, 18, 2, },
{ 1, 16, 30, 4, },
{ 2, 12, 22, 3, },
{ 2, 6, 16, 2, },
{ 1, 6, 20, 3, },
{ 0, 6, 20, 3, },
{ 0, 6, 21, 3, },
{ 0, 14, 50, 7, },
{ 0, 18, 42, 5, },
{ 0, 9, 24, 5, },
{ 0, 13, 64, 17, },
{ 0, 27, 57, 14, },
{ 0, 20, 17, 5, },
{ 0, 8, 16, 4, },
{ 1, 5, 17, 4, },
{ 1, 2, 16, 3, },
{ 0, 8, 40, 6, },
{ 0, 15, 46, 7, },
{ 0, 9, 20, 4, },
{ 0, 5, 18, 4, },
{ 0, 5, 19, 4, },
{ 0, 3, 16, 3, },
{ 0, 4, 46, 10, },
{ 0, 16, 69, 13, },
{ 0, 17, 28, 6, },
{ 0, 7, 20, 4, },
{ 0, 8, 29, 5, },
{ 0, 6, 21, 5, },
{ 0, 2, 17, 5, },
{ 0, 3, 20, 5, },
{ 0, 3, 18, 6, },
{ 0, 2, 23, 6, },
{ 0, 8, 45, 7, },
{ 0, 9, 32, 6, },
{ 0, 4, 25, 7, },
{ 0, 8, 59, 12, },
{ 0, 12, 44, 10, },
{ 0, 6, 17, 7, },
{ 0, 2, 17, 8, },
{ 0, 1, 17, 7, },
{ 0, 1, 18, 7, },
{ 0, 4, 41, 7, },
{ 0, 7, 40, 8, },
{ 0, 3, 18, 9, },
{ 0, 2, 20, 9, },
{ 0, 3, 22, 10, },
{ 0, 2, 17, 10, },
{ 0, 2, 43, 10, },
{ 0, 6, 52, 10, },
{ 0, 5, 21, 11, },
{ 0, 2, 21, 11, },
{ 0, 2, 25, 11, },
{ 0, 2, 16, 11, },
{ 0, 0, 14, 11, },
{ 0, 1, 15, 11, },
{ 0, 0, 14, 12, },
{ 0, 1, 23, 12, },
{ 0, 3, 37, 13, },
{ 0, 2, 22, 13, },
{ 0, 1, 22, 14, },
{ 0, 3, 43, 14, },
{ 0, 3, 26, 13, },
{ 0, 1, 11, 13, },
{ 0, 0, 12, 15, },
{ 0, 0, 11, 16, },
{ 0, 0, 13, 17, },
{ 0, 1, 27, 17, },
{ 0, 2, 21, 17, },
{ 0, 0, 10, 16, },
{ 0, 0, 11, 16, },
{ 0, 0, 11, 18, },
{ 0, 0, 10, 18, },
{ 0, 0, 26, 18, },
{ 0, 1, 26, 19, },
{ 0, 1, 11, 19, },
{ 0, 0, 9, 19, },
{ 0, 0, 8, 18, },
{ 0, 0, 8, 18, },
{ 0, 0, 13, 18, },
{ 0, 1, 15, 18, },
{ 0, 0, 8, 18, },
{ 0, 0, 8, 16, },
{ 0, 0, 9, 16, },
{ 0, 0, 8, 16, },
{ 0, 0, 11, 16, },
{ 0, 1, 16, 15, },
{ 0, 1, 10, 14, },
{ 0, 0, 9, 14, },
{ 0, 0, 10, 14, },
{ 0, 0, 9, 14, },
{ 0, 0, 9, 14, },
{ 0, 0, 10, 15, },
{ 0, 0, 10, 17, },
{ 0, 0, 11, 17, },
{ 0, 0, 12, 16, },
{ 0, 0, 13, 15, },
{ 0, 0, 13, 16, },
{ 0, 3, 11, 14, },
{ 1, 4, 11, 12, },
{ 2, 3, 12, 13, },
{ 3, 2, 14, 12, },
{ 3, 2, 12, 11, },
{ 3, 2, 10, 9, },
{ 3, 2, 8, 7, },
{ 3, 2, 8, 7, },
{ 3, 2, 8, 6, },
{ 3, 2, 9, 6, },
{ 3, 2, 10, 6, },
{ 3, 2, 10, 7, },
{ 3, 2, 8, 6, },
{ 3, 2, 7, 6, },
{ 3, 2, 9, 5, },
{ 3, 2, 9, 6, },
{ 3, 2, 10, 6, },
{ 3, 2, 10, 7, },
{ 3, 2, 13, 8, },
{ 3, 2, 18, 11, },
{ 3, 2, 18, 12, },
{ 3, 2, 17, 11, },
{ 3, 3, 17, 11, },
{ 3, 3, 18, 11, },
{ 3, 3, 18, 8, },
{ 3, 3, 14, 5, },
{ 3, 3, 15, 6, },
{ 3, 3, 14, 6, },
{ 2, 3, 13, 8, },
{ 2, 3, 13, 9, },
{ 2, 2, 11, 10, },
{ 2, 2, 15, 12, },
{ 2, 2, 17, 13, },
{ 2, 2, 14, 11, },
{ 2, 2, 14, 11, },
{ 2, 2, 17, 12, },
{ 2, 2, 15, 13, },
{ 2, 2, 15, 10, },
{ 2, 2, 14, 8, },
{ 2, 2, 12, 9, },
{ 2, 2, 12, 10, },
{ 2, 2, 14, 11, },
{ 2, 2, 16, 12, },
{ 2, 2, 18, 10, },
{ 1, 3, 20, 10, },
{ 2, 3, 18, 12, },
{ 1, 3, 17, 13, },
{ 2, 3, 20, 13, },
{ 2, 3, 20, 13, },
{ 2, 3, 17, 11, },
{ 2, 4, 12, 10, },
{ 2, 3, 12, 11, },
{ 3, 3, 13, 10, },
{ 3, 3, 13, 10, },
{ 3, 3, 13, 9, },
{ 3, 3, 13, 9, },
{ 3, 3, 17, 10, },
{ 3, 3, 21, 10, },
{ 3, 3, 16, 11, },
{ 3, 3, 13, 10, },
{ 3, 3, 11, 8, },
{ 3, 3, 10, 9, },
{ 3, 3, 8, 10, },
{ 3, 3, 7, 8, },
{ 3, 3, 7, 8, },
{ 2, 3, 12, 8, },
{ 2, 2, 16, 11, },
{ 2, 2, 18, 14, },
{ 2, 2, 20, 17, },
{ 2, 2, 19, 18, },
{ 2, 3, 23, 19, },
{ 2, 3, 22, 18, },
{ 2, 3, 18, 15, },
{ 2, 3, 16, 14, },
{ 2, 3, 15, 13, },
{ 2, 3, 15, 12, },
{ 2, 3, 13, 10, },
{ 2, 3, 10, 10, },
{ 2, 3, 9, 10, },
{ 2, 3, 10, 11, },
{ 2, 3, 10, 12, },
{ 2, 3, 10, 14, },
{ 1, 3, 12, 15, },
{ 1, 3, 17, 17, },
{ 1, 2, 21, 16, },
{ 1, 2, 18, 16, },
{ 1, 2, 13, 15, },
{ 1, 2, 11, 13, },
{ 1, 2, 12, 13, },
{ 1, 2, 11, 14, },
{ 1, 2, 11, 14, },
{ 1, 3, 12, 16, },
{ 1, 3, 11, 17, },
{ 1, 3, 13, 19, },
{ 1, 4, 14, 20, },
{ 1, 4, 13, 20, },
{ 1, 4, 13, 24, },
{ 1, 4, 14, 25, },
{ 1, 3, 13, 22, },
{ 1, 3, 12, 17, },
{ 1, 4, 12, 17, },
{ 2, 5, 10, 19, },
{ 3, 4, 9, 20, },
{ 3, 4, 10, 21, },
{ 3, 3, 13, 22, },
{ 3, 3, 15, 19, },
{ 3, 3, 16, 18, },
{ 3, 3, 15, 19, },
{ 3, 3, 13, 18, },
{ 3, 3, 15, 18, },
{ 3, 3, 18, 20, },
{ 3, 3, 17, 23, },
{ 3, 3, 11, 21, },
{ 3, 3, 9, 21, },
{ 3, 3, 10, 21, },
{ 3, 3, 10, 19, },
{ 3, 3, 10, 19, },
{ 3, 3, 11, 18, },
{ 3, 4, 11, 18, },
{ 3, 4, 13, 21, },
{ 3, 5, 14, 22, },
{ 3, 5, 13, 20, },
{ 2, 5, 11, 19, },
{ 2, 5, 11, 20, },
{ 2, 5, 11, 19, },
{ 2, 5, 10, 19, },
{ 2, 5, 10, 19, },
{ 2, 5, 13, 20, },
{ 2, 4, 14, 21, },
{ 2, 4, 12, 22, },
{ 2, 4, 13, 23, },
{ 2, 4, 14, 22, },
{ 2, 4, 14, 21, },
{ 2, 4, 15, 22, },
{ 2, 4, 16, 23, },
{ 2, 4, 17, 23, },
{ 2, 4, 17, 23, },
{ 2, 4, 13, 21, },
{ 2, 4, 11, 22, },
{ 2, 4, 12, 24, },
{ 2, 4, 10, 24, },
{ 2, 4, 9, 25, },
{ 2, 4, 10, 25, },
{ 2, 4, 12, 27, },
{ 2, 4, 12, 30, },
{ 2, 4, 12, 33, },
{ 2, 4, 14, 31, },
{ 2, 4, 16, 29, },
{ 2, 4, 15, 30, },
{ 2, 4, 13, 29, },
{ 2, 4, 12, 32, },
{ 2, 4, 13, 31, },
{ 2, 4, 11, 29, },
{ 2, 4, 12, 28, },
{ 2, 4, 11, 27, },
{ 2, 4, 11, 25, },
{ 2, 4, 15, 23, },
{ 2, 4, 17, 25, },
{ 2, 4, 18, 25, },
{ 2, 4, 18, 24, },
{ 2, 4, 17, 26, },
{ 2, 4, 15, 24, },
{ 2, 4, 14, 23, },
{ 2, 4, 14, 24, },
{ 1, 5, 14, 27, },
{ 1, 5, 16, 27, },
{ 1, 4, 18, 25, },
{ 1, 4, 16, 26, },
{ 1, 3, 16, 25, },
{ 1, 3, 17, 26, },
{ 1, 3, 18, 24, },
{ 1, 2, 18, 25, },
{ 1, 2, 17, 27, },
{ 1, 2, 15, 24, },
{ 1, 2, 14, 23, },
{ 1, 2, 16, 23, },
{ 1, 2, 15, 24, },
{ 1, 2, 14, 24, },
{ 1, 3, 13, 24, },
{ 1, 3, 14, 23, },
{ 1, 3, 15, 23, },
{ 1, 3, 16, 22, },
{ 1, 3, 18, 23, },
{ 1, 3, 18, 25, },
{ 1, 3, 18, 32, },
{ 1, 4, 18, 29, },
{ 1, 4, 16, 22, },
{ 1, 4, 18, 20, },
{ 1, 3, 17, 20, },
{ 1, 3, 15, 20, },
{ 1, 2, 16, 18, },
{ 1, 2, 16, 17, },
{ 1, 2, 16, 17, },
{ 1, 2, 19, 17, },
{ 1, 2, 22, 17, },
{ 1, 2, 24, 18, },
{ 1, 2, 22, 18, },
{ 1, 2, 21, 17, },
{ 1, 2, 20, 16, },
{ 1, 4, 18, 15, },
{ 1, 4, 16, 14, },
{ 3, 3, 15, 15, },
{ 3, 2, 16, 16, },
{ 3, 2, 17, 17, },
{ 3, 3, 15, 17, },
{ 3, 3, 17, 18, },
{ 3, 2, 18, 17, },
{ 3, 2, 19, 16, },
{ 3, 3, 22, 15, },
{ 3, 2, 23, 16, },
{ 3, 2, 22, 20, },
{ 3, 2, 22, 18, },
{ 3, 2, 22, 16, },
{ 3, 2, 21, 15, },
{ 3, 2, 22, 17, },
{ 3, 2, 23, 17, },
{ 3, 2, 20, 16, },
{ 3, 2, 20, 17, },
{ 3, 2, 25, 17, },
{ 3, 2, 29, 16, },
{ 3, 3, 29, 15, },
{ 3, 3, 27, 14, },
{ 3, 3, 25, 15, },
{ 3, 3, 26, 15, },
{ 3, 3, 27, 13, },
{ 3, 3, 27, 13, },
{ 2, 3, 27, 13, },
{ 2, 2, 27, 14, },
{ 2, 2, 28, 13, },
{ 2, 2, 26, 13, },
{ 2, 2, 32, 16, },
{ 2, 2, 33, 15, },
{ 2, 2, 31, 13, },
{ 2, 2, 25, 13, },
{ 2, 2, 27, 15, },
{ 2, 2, 28, 16, },
{ 2, 2, 27, 13, },
{ 2, 2, 25, 11, },
{ 2, 2, 23, 11, },
{ 2, 2, 22, 12, },
{ 2, 2, 23, 11, },
{ 2, 3, 25, 11, },
{ 2, 3, 23, 14, },
{ 2, 3, 22, 14, },
{ 2, 3, 25, 15, },
{ 2, 3, 27, 15, },
{ 2, 3, 24, 14, },
{ 2, 3, 23, 12, },
{ 2, 4, 22, 10, },
{ 2, 4, 20, 9, },
{ 2, 3, 20, 9, },
{ 3, 3, 18, 8, },
{ 3, 3, 18, 8, },
{ 3, 3, 19, 8, },
{ 3, 3, 19, 9, },
{ 3, 3, 21, 9, },
{ 3, 3, 22, 9, },
{ 3, 3, 23, 10, },
{ 3, 3, 23, 11, },
{ 3, 3, 22, 11, },
{ 3, 3, 19, 11, },
{ 3, 3, 18, 10, },
{ 3, 3, 18, 9, },
{ 3, 3, 20, 11, },
{ 2, 3, 22, 14, },
{ 2, 2, 20, 13, },
{ 2, 2, 19, 11, },
{ 2, 2, 21, 11, },
{ 2, 2, 23, 13, },
{ 2, 3, 20, 12, },
{ 2, 3, 19, 10, },
{ 2, 3, 20, 10, },
{ 2, 3, 20, 9, },
{ 2, 3, 19, 9, },
{ 2, 3, 19, 10, },
{ 2, 3, 18, 9, },
{ 2, 3, 18, 7, },
{ 2, 3, 19, 7, },
{ 2, 3, 19, 7, },
{ 2, 3, 19, 9, },
{ 2, 3, 21, 10, },
{ 2, 3, 21, 9, },
{ 1, 3, 20, 8, },
{ 1, 2, 19, 7, },
{ 1, 2, 16, 6, },
{ 1, 2, 15, 6, },
{ 1, 2, 16, 6, },
{ 1, 2, 16, 5, },
{ 1, 2, 16, 5, },
{ 1, 3, 20, 7, },
{ 1, 3, 24, 10, },
{ 1, 3, 25, 13, },
{ 1, 4, 23, 12, },
{ 1, 4, 24, 12, },
{ 1, 4, 23, 10, },
{ 1, 4, 23, 8, },
{ 1, 3, 21, 8, },
{ 1, 3, 17, 7, },
{ 1, 3, 16, 5, },
{ 1, 5, 16, 5, },
{ 3, 5, 16, 5, },
{ 3, 4, 19, 6, },
{ 3, 4, 19, 7, },
{ 3, 4, 18, 7, },
{ 3, 3, 18, 7, },
{ 3, 3, 22, 7, },
{ 3, 3, 21, 6, },
{ 3, 3, 21, 6, },
{ 3, 3, 20, 7, },
{ 3, 3, 19, 6, },
{ 3, 3, 19, 6, },
{ 3, 3, 20, 6, },
{ 3, 3, 19, 7, },
{ 3, 3, 17, 8, },
{ 3, 3, 20, 9, },
{ 3, 3, 19, 8, },
{ 3, 3, 18, 10, },
{ 3, 3, 24, 14, },
{ 3, 4, 26, 11, },
{ 3, 4, 22, 9, },
{ 3, 5, 17, 8, },
{ 2, 5, 16, 8, },
{ 2, 5, 13, 7, },
{ 2, 5, 12, 5, },
{ 2, 5, 11, 4, },
{ 2, 5, 10, 3, },
{ 2, 4, 10, 3, },
{ 2, 4, 11, 4, },
{ 2, 4, 13, 5, },
{ 2, 4, 15, 6, },
{ 2, 4, 14, 6, },
{ 2, 3, 15, 6, },
{ 2, 3, 13, 5, },
{ 2, 3, 13, 4, },
{ 1, 3, 11, 4, },
{ 1, 3, 10, 4, },
{ 1, 3, 10, 4, },
{ 1, 3, 11, 4, },
{ 1, 3, 11, 4, },
{ 1, 4, 11, 5, },
{ 1, 4, 11, 6, },
{ 1, 3, 13, 5, },
{ 1, 3, 14, 7, },
{ 1, 3, 13, 6, },
{ 1, 3, 9, 4, },
{ 1, 3, 8, 3, },
{ 1, 3, 8, 2, },
{ 1, 3, 7, 2, },
{ 1, 3, 5, 2, },
{ 1, 3, 5, 2, },
{ 1, 3, 5, 2, },
{ 1, 2, 6, 2, },
{ 1, 3, 7, 2, },
{ 1, 2, 6, 2, },
{ 1, 2, 6, 2, },
{ 1, 2, 7, 2, },
{ 1, 2, 8, 2, },
{ 1, 2, 6, 2, },
{ 1, 2, 6, 2, },
{ 1, 2, 7, 1, },
{ 1, 2, 5, 1, },
{ 1, 2, 5, 1, },
{ 0, 2, 5, 1, },
{ 0, 2, 4, 1, },
{ 0, 2, 4, 1, },
{ 0, 2, 5, 1, },
{ 0, 1, 4, 1, },
{ 0, 1, 4, 1, },
{ 0, 1, 4, 1, },
{ 0, 1, 5, 1, },
{ 0, 1, 4, 1, },
{ 0, 1, 4, 1, },
{ 0, 0, 3, 1, },
{ 0, 0, 3, 0, },
{ 0, 0, 2, 0, },
{ 0, 0, 2, 0, },
{ 0, 0, 2, 0, },
{ 0, 0, 2, 0, },
{ 0, 0, 2, 0, },
{ 0, 0, 2, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 1, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
{ 0, 0, 0, 0, },
};
/**
* @file lv_demo_music.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_demo_music.h"
#if LV_USE_DEMO_MUSIC
#include "lv_demo_music_main.h"
#include "lv_demo_music_list.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
#if LV_DEMO_MUSIC_AUTO_PLAY
static void auto_step_cb(lv_timer_t * timer);
#endif
/**********************
* STATIC VARIABLES
**********************/
static lv_obj_t * ctrl;
static lv_obj_t * list;
static const char * title_list[] = {
"Waiting for true love",
"Need a Better Future",
"Vibrations",
"Why now?",
"Never Look Back",
"It happened Yesterday",
"Feeling so High",
"Go Deeper",
"Find You There",
"Until the End",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
};
static const char * artist_list[] = {
"The John Smith Band",
"My True Name",
"Robotics",
"John Smith",
"My True Name",
"Robotics",
"Robotics",
"Unknown artist",
"Unknown artist",
"Unknown artist",
"Unknown artist",
"Unknown artist",
"Unknown artist",
"Unknown artist",
"Unknown artist",
};
static const char * genre_list[] = {
"Rock • 1997",
"Drum'n bass • 2016",
"Psy trance • 2020",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
"Metal • 2015",
};
static const uint32_t time_list[] = {
1*60 + 14,
2*60 + 26,
1*60 + 54,
2*60 + 24,
2*60 + 37,
3*60 + 33,
1*60 + 56,
3*60 + 31,
2*60 + 20,
2*60 + 19,
2*60 + 20,
2*60 + 19,
2*60 + 20,
2*60 + 19,
};
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
void lv_demo_music(void)
{
lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x343247), 0);
list = _lv_demo_music_list_create(lv_scr_act());
ctrl = _lv_demo_music_main_create(lv_scr_act());
#if LV_DEMO_MUSIC_AUTO_PLAY
lv_timer_create(auto_step_cb, 1000, NULL);
#endif
}
const char * _lv_demo_music_get_title(uint32_t track_id)
{
if(track_id >= sizeof(title_list) / sizeof(title_list[0])) return NULL;
return title_list[track_id];
}
const char * _lv_demo_music_get_artist(uint32_t track_id)
{
if(track_id >= sizeof(artist_list) / sizeof(artist_list[0])) return NULL;
return artist_list[track_id];
}
const char * _lv_demo_music_get_genre(uint32_t track_id)
{
if(track_id >= sizeof(genre_list) / sizeof(genre_list[0])) return NULL;
return genre_list[track_id];
}
uint32_t _lv_demo_music_get_track_length(uint32_t track_id)
{
if(track_id >= sizeof(time_list) / sizeof(time_list[0])) return 0;
return time_list[track_id];
}
/**********************
* STATIC FUNCTIONS
**********************/
#if LV_DEMO_MUSIC_AUTO_PLAY
static void auto_step_cb(lv_timer_t * t)
{
LV_UNUSED(t);
static uint32_t state = 0;
#if LV_DEMO_MUSIC_LARGE
const lv_font_t * font_small = &lv_font_montserrat_22;
const lv_font_t * font_large = &lv_font_montserrat_32;
#else
const lv_font_t * font_small = &lv_font_montserrat_12;
const lv_font_t * font_large = &lv_font_montserrat_16;
#endif
switch(state) {
case 5:
_lv_demo_music_album_next(true);
break;
case 6:
_lv_demo_music_album_next(true);
break;
case 7:
_lv_demo_music_album_next(true);
break;
case 8:
_lv_demo_music_play(0);
break;
#if LV_DEMO_MUSIC_SQUARE || LV_DEMO_MUSIC_ROUND
case 11:
lv_obj_scroll_by(ctrl, 0, -LV_VER_RES, LV_ANIM_ON);
break;
case 13:
lv_obj_scroll_by(ctrl, 0, -LV_VER_RES, LV_ANIM_ON);
break;
#else
case 12:
lv_obj_scroll_by(ctrl, 0, -LV_VER_RES, LV_ANIM_ON);
break;
#endif
case 15:
lv_obj_scroll_by(list, 0, -300, LV_ANIM_ON);
break;
case 16:
lv_obj_scroll_by(list, 0, 300, LV_ANIM_ON);
break;
case 18:
_lv_demo_music_play(1);
break;
case 19:
lv_obj_scroll_by(ctrl, 0, LV_VER_RES, LV_ANIM_ON);
break;
#if LV_DEMO_MUSIC_SQUARE || LV_DEMO_MUSIC_ROUND
case 20:
lv_obj_scroll_by(ctrl, 0, LV_VER_RES, LV_ANIM_ON);
break;
#endif
case 30:
_lv_demo_music_play(2);
break;
case 40: {
lv_obj_t * bg = lv_layer_top();
lv_obj_set_style_bg_color(bg, lv_color_hex(0x6f8af6), 0);
lv_obj_set_style_text_color(bg, lv_color_white(), 0);
lv_obj_set_style_bg_opa(bg, LV_OPA_COVER, 0);
lv_obj_fade_in(bg, 400, 0);
lv_obj_t * dsc = lv_label_create(bg);
lv_obj_set_style_text_font(dsc, font_small, 0);
lv_label_set_text(dsc, "The average FPS is");
lv_obj_align(dsc, LV_ALIGN_TOP_MID, 0, 90);
lv_obj_t * num = lv_label_create(bg);
lv_obj_set_style_text_font(num, font_large, 0);
#if LV_USE_PERF_MONITOR
lv_label_set_text_fmt(num, "%d", lv_refr_get_fps_avg());
#endif
lv_obj_align(num, LV_ALIGN_TOP_MID, 0, 120);
lv_obj_t * attr = lv_label_create(bg);
lv_obj_set_style_text_align(attr, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_set_style_text_font(attr, font_small, 0);
#if LV_DEMO_MUSIC_SQUARE || LV_DEMO_MUSIC_ROUND
lv_label_set_text(attr, "Copyright 2020 LVGL Kft.\nwww.lvgl.io | lvgl@lvgl.io");
#else
lv_label_set_text(attr, "Copyright 2020 LVGL Kft. | www.lvgl.io | lvgl@lvgl.io");
#endif
lv_obj_align(attr, LV_ALIGN_BOTTOM_MID, 0, -10);
break;
}
case 41:
lv_scr_load(lv_obj_create(NULL));
_lv_demo_music_pause();
break;
}
state++;
}
#endif /*LV_DEMO_MUSIC_AUTO_PLAY*/
#endif /*LV_USE_DEMO_MUSIC*/
/**
* @file lv_demo_music.h
*
*/
#ifndef LV_DEMO_MUSIC_H
#define LV_DEMO_MUSIC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../../lv_demo.h"
#if LV_USE_DEMO_MUSIC
/*********************
* DEFINES
*********************/
#if LV_DEMO_MUSIC_LARGE
# define LV_DEMO_MUSIC_HANDLE_SIZE 40
#else
# define LV_DEMO_MUSIC_HANDLE_SIZE 20
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_demo_music(void);
const char * _lv_demo_music_get_title(uint32_t track_id);
const char * _lv_demo_music_get_artist(uint32_t track_id);
const char * _lv_demo_music_get_genre(uint32_t track_id);
uint32_t _lv_demo_music_get_track_length(uint32_t track_id);
/**********************
* MACROS
**********************/
#endif /*LV_USE_DEMO_MUSIC*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DEMO_MUSIC_H*/
/**
* @file lv_demo_music_list.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_demo_music_list.h"
#if LV_USE_DEMO_MUSIC
#include "lv_demo_music_main.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id);
static void btn_click_event_cb(lv_event_t * e);
/**********************
* STATIC VARIABLES
**********************/
static lv_obj_t * list;
static const lv_font_t * font_small;
static const lv_font_t * font_medium;
static lv_style_t style_scrollbar;
static lv_style_t style_btn;
static lv_style_t style_btn_pr;
static lv_style_t style_btn_chk;
static lv_style_t style_btn_dis;
static lv_style_t style_title;
static lv_style_t style_artist;
static lv_style_t style_time;
LV_IMG_DECLARE(img_lv_demo_music_btn_list_play);
LV_IMG_DECLARE(img_lv_demo_music_btn_list_pause);
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent)
{
#if LV_DEMO_MUSIC_LARGE
font_small = &lv_font_montserrat_16;
font_medium = &lv_font_montserrat_22;
#else
font_small = &lv_font_montserrat_12;
font_medium = &lv_font_montserrat_16;
#endif
lv_style_init(&style_scrollbar);
lv_style_set_width(&style_scrollbar, 4);
lv_style_set_bg_opa(&style_scrollbar, LV_OPA_COVER);
lv_style_set_bg_color(&style_scrollbar, lv_color_hex3(0xeee));
lv_style_set_radius(&style_scrollbar, LV_RADIUS_CIRCLE);
lv_style_set_pad_right(&style_scrollbar, 4);
static const lv_coord_t grid_cols[] = {LV_GRID_CONTENT, LV_GRID_FR(1), LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
#if LV_DEMO_MUSIC_LARGE
static const lv_coord_t grid_rows[] = {35, 30, LV_GRID_TEMPLATE_LAST};
#else
static const lv_coord_t grid_rows[] = {22, 17, LV_GRID_TEMPLATE_LAST};
#endif
lv_style_init(&style_btn);
lv_style_set_bg_opa(&style_btn, LV_OPA_TRANSP);
lv_style_set_grid_column_dsc_array(&style_btn, grid_cols);
lv_style_set_grid_row_dsc_array(&style_btn, grid_rows);
lv_style_set_grid_row_align(&style_btn, LV_GRID_ALIGN_CENTER);
lv_style_set_layout(&style_btn, LV_LAYOUT_GRID);
#if LV_DEMO_MUSIC_LARGE
lv_style_set_pad_right(&style_btn, 30);
#else
lv_style_set_pad_right(&style_btn, 20);
#endif
lv_style_init(&style_btn_pr);
lv_style_set_bg_opa(&style_btn_pr, LV_OPA_COVER);
lv_style_set_bg_color(&style_btn_pr, lv_color_hex(0x4c4965));
lv_style_init(&style_btn_chk);
lv_style_set_bg_opa(&style_btn_chk, LV_OPA_COVER);
lv_style_set_bg_color(&style_btn_chk, lv_color_hex(0x4c4965));
lv_style_init(&style_btn_dis);
lv_style_set_text_opa(&style_btn_dis, LV_OPA_40);
lv_style_set_img_opa(&style_btn_dis, LV_OPA_40);
lv_style_init(&style_title);
lv_style_set_text_font(&style_title, font_medium);
lv_style_set_text_color(&style_title, lv_color_hex(0xffffff));
lv_style_init(&style_artist);
lv_style_set_text_font(&style_artist, font_small);
lv_style_set_text_color(&style_artist,lv_color_hex(0xb1b0be));
lv_style_init(&style_time);
lv_style_set_text_font(&style_time, font_medium);
lv_style_set_text_color(&style_time, lv_color_hex(0xffffff));
/*Create an empty transparent container*/
list = lv_obj_create(parent);
lv_obj_remove_style_all(list);
lv_obj_set_size(list, LV_HOR_RES, LV_VER_RES - LV_DEMO_MUSIC_HANDLE_SIZE);
lv_obj_set_y(list, LV_DEMO_MUSIC_HANDLE_SIZE);
lv_obj_add_style(list, &style_scrollbar, LV_PART_SCROLLBAR);
lv_obj_set_flex_flow(list, LV_FLEX_FLOW_COLUMN);
uint32_t track_id;
for(track_id = 0; _lv_demo_music_get_title(track_id); track_id++) {
add_list_btn(list, track_id);
}
#if LV_DEMO_MUSIC_SQUARE || LV_DEMO_MUSIC_ROUND
lv_obj_set_scroll_snap_y(list, LV_SCROLL_SNAP_CENTER);
#endif
_lv_demo_music_list_btn_check(0, true);
return list;
}
void _lv_demo_music_list_btn_check(uint32_t track_id, bool state)
{
lv_obj_t * btn = lv_obj_get_child(list, track_id);
lv_obj_t * icon = lv_obj_get_child(btn, 0);
if(state) {
lv_obj_add_state(btn, LV_STATE_CHECKED);
lv_img_set_src(icon, &img_lv_demo_music_btn_list_pause);
lv_obj_scroll_to_view(btn, LV_ANIM_ON);
}
else {
lv_obj_clear_state(btn, LV_STATE_CHECKED);
lv_img_set_src(icon, &img_lv_demo_music_btn_list_play);
}
}
/**********************
* STATIC FUNCTIONS
**********************/
static lv_obj_t * add_list_btn(lv_obj_t * parent, uint32_t track_id)
{
uint32_t t = _lv_demo_music_get_track_length(track_id);
char time[32];
lv_snprintf(time, sizeof(time), "%d:%02d", t / 60, t % 60);
const char * title = _lv_demo_music_get_title(track_id);
const char * artist = _lv_demo_music_get_artist(track_id);
lv_obj_t * btn = lv_obj_create(parent);
lv_obj_remove_style_all(btn);
#if LV_DEMO_MUSIC_LARGE
lv_obj_set_size(btn, lv_pct(100), 110);
#else
lv_obj_set_size(btn, lv_pct(100), 60);
#endif
lv_obj_add_style(btn, &style_btn, 0);
lv_obj_add_style(btn, &style_btn_pr, LV_STATE_PRESSED);
lv_obj_add_style(btn, &style_btn_chk, LV_STATE_CHECKED);
lv_obj_add_style(btn, &style_btn_dis, LV_STATE_DISABLED);
lv_obj_add_event_cb(btn, btn_click_event_cb, LV_EVENT_CLICKED, NULL);
if(track_id >= 3) {
lv_obj_add_state(btn, LV_STATE_DISABLED);
}
lv_obj_t * icon = lv_img_create(btn);
lv_img_set_src(icon, &img_lv_demo_music_btn_list_play);
lv_obj_set_grid_cell(icon, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_CENTER, 0, 2);
lv_obj_t * title_label = lv_label_create(btn);
lv_label_set_text(title_label, title);
lv_obj_set_grid_cell(title_label, LV_GRID_ALIGN_START, 1, 1, LV_GRID_ALIGN_CENTER, 0, 1);
lv_obj_add_style(title_label, &style_title, 0);
lv_obj_t * artist_label = lv_label_create(btn);
lv_label_set_text(artist_label, artist);
lv_obj_add_style(artist_label, &style_artist, 0);
lv_obj_set_grid_cell(artist_label, LV_GRID_ALIGN_START, 1, 1, LV_GRID_ALIGN_CENTER, 1, 1);
lv_obj_t * time_label = lv_label_create(btn);
lv_label_set_text(time_label, time);
lv_obj_add_style(time_label, &style_time, 0);
lv_obj_set_grid_cell(time_label, LV_GRID_ALIGN_END, 2, 1, LV_GRID_ALIGN_CENTER, 0, 2);
LV_IMG_DECLARE(img_lv_demo_music_list_border);
lv_obj_t * border = lv_img_create(btn);
lv_img_set_src(border, &img_lv_demo_music_list_border);
lv_obj_set_width(border, lv_pct(120));
lv_obj_align(border, LV_ALIGN_BOTTOM_MID, 0, 0);
lv_obj_add_flag(border, LV_OBJ_FLAG_IGNORE_LAYOUT);
return btn;
}
static void btn_click_event_cb(lv_event_t * e)
{
lv_obj_t * btn = lv_event_get_target(e);
uint32_t idx = lv_obj_get_child_id(btn);
_lv_demo_music_play(idx);
}
#endif /*LV_USE_DEMO_MUSIC*/
/**
* @file lv_demo_music_list.h
*
*/
#ifndef LV_DEMO_MUSIC_LIST_H
#define LV_DEMO_MUSIC_LIST_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_demo_music.h"
#if LV_USE_DEMO_MUSIC
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent);
void _lv_demo_music_list_btn_check(uint32_t track_id, bool state);
/**********************
* MACROS
**********************/
#endif /*LV_USE_DEMO_MUSIC*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DEMO_MUSIC_LIST_H*/
/**
* @file lv_demo_music_main.h
*
*/
#ifndef LV_DEMO_MUSIC_MAIN_H
#define LV_DEMO_MUSIC_MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_demo_music.h"
#if LV_USE_DEMO_MUSIC
/*********************
* DEFINES
*********************/
#define LV_DEMO_MUSIC_SQUARE (LV_HOR_RES_MAX <= 240 && LV_VER_RES_MAX <= 240 && LV_HOR_RES_MAX == LV_VER_RES_MAX ? 1 : 0)
#if LV_DEMO_MUSIC_SQUARE
#define LV_DEMO_MUSIC_LANDSCAPE 0
#define LV_DEMO_MUSIC_PORTRAIT 0
#else
#define LV_DEMO_MUSIC_LANDSCAPE (LV_HOR_RES_MAX > LV_VER_RES_MAX ? 1 : 0)
#define LV_DEMO_MUSIC_PORTRAIT (!LV_DEMO_MUSIC_LANDSCAPE)
#endif
#define LV_DEMO_LIST_CTRL_OVERLAP 60
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent);
void _lv_demo_music_play(uint32_t id);
void _lv_demo_music_resume(void);
void _lv_demo_music_pause(void);
void _lv_demo_music_album_next(bool next);
/**********************
* MACROS
**********************/
#endif /*LV_USE_DEMO_MUSIC*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DEMO_MUSIC_MAIN_H*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册