No "render between loop markers" option in CLI
A pull request for this has already been merged.
- #7004 by @DomClark — merged
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
We currently support exporting as a loop via --loop switch. However, there's no CLI counterpart of "render between loop markers" option.
The functionality was added by @curlymorphic via #1482, but it's available only in GUI. Adding the CLI option itself would be easy, but it needs some changes in the codebase.
I've tried simply adding the option, but it resulted in crashes. It's because the SongEditor constructor initializes Song::m_playPos[Song::Mode_PlaySong] via creating a TimeLineWidget instance. TimeLineWidget stores loop settings and it doesn't even get loaded in CLI mode.
https://github.com/LMMS/lmms/blob/f37ca49e6d52886d40858e23acd1d3ed32f97a71/src/core/Song.cpp#L1106-L1107
https://github.com/LMMS/lmms/blob/f37ca49e6d52886d40858e23acd1d3ed32f97a71/src/core/Song.cpp#L1124-L1127
GUI-independent parts of TimeLineWidget should be pulled out in order to fix the problem. I expect it will require some refactorings as well.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced Song.cpp sections around lines 1106-1107 and 1124-1127, then inspect TimeLineWidget and the existing --loop CLI handling. Separate the GUI-independent loop settings needed by CLI mode and verify that rendering between loop markers works without the previous crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100