Skip to content
YulliilPublic

About

A .lrc parser library written in C++

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liblrc

A lightweight .lrc lyric parser library written in C++, still WIP.

Progress

Stage1: Core Engine (Completed)

Class Lyric is completed and usable, which means you can handle lyrics manually, include lyric.h to get started. Hooray~

Stage2: .lrc Parser (WIP)

A parser for .lrc to Lyric will be implemented in this stage, WIP.

Quick Start

#include "lyric.h"

// The .lrc parser (in stage2) is WIP...Zzzzzzzzzzzz
// The parser is currently dreaming about regex and line endings.
// Check back later! 
// Currently we need ourselves to be the parser for demonstration!

Lyric lrc;
lrc.add(10000, "Hello World"); // Add lyric at 10s
lrc.add(15000, "ハローワールド");
lrc.add(5000, "你好,世界");


std::string text = lrc.get_line_by_index(2); // 你好,世界

lrc.sort(); // Previously not sorted

// Find line at 16s
int32_t idx = lrc.get_index(16000); // idx = 2
text = lrc.get_line_by_index(idx); // ハローワールド

// Simpler way to find line by time. Inplemented same as above
text = lrc.get_line_by_time(12000); // Hello World

For more detailed usage, see examples/engine_test.cpp.

About

A .lrc parser library written in C++

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages