-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes issue #2129 ("can't export as loop with CLI") #2131
Conversation
Could you please update the man page and include this feature in it? I think this should be documented 🍷 |
Done. I have also added lmms.io and the github page as URLs and have updated the date of the man page. |
Also, if you don't mind adding another change, I never put this feature into the |
I changed the sf links in #2124 |
Fair enough, although it can be copied directly from the help if you change your mind. :) https://github.com/LMMS/lmms/blob/master/src/core/main.cpp#L198 |
NP, we'll just hit a merge conflict on one of the PR's then and we can fix it then. |
👍 |
I have changed my mind. :) The |
What does it mean to export as a loop? Is this just exporting only the
portion of the song enclosed by the song editor's loop points, but
otherwise producing a "normal" wav/ogg file? If so, I would suggest the
long option "--use-loop-points" instead.
Or does it export the whole song, but write different options into the
wav/ogg headers in order to signal to a media player that the file should
be repeated indefinitely after being played fully?
Sorry if these questions are clear from reading the code. I'm on mobile,
but I'll read through the changes later.
|
@Wallacoloo Exporting as a loop means that the full song is rendered but only till the end of the song. The intention of this feature is to be able to loop the exported file seamlessly. This means that for example reverb tails that you normally want to have included in your rendering will not be rendered. |
@michaelgregorius gotcha. In GUIs, I recall seeing this option presented as a drop-down menu labeled "loop mode" with options "wrap remainder" (which takes any nonzero output after the end of the song and wraps it around back to the start by adding it into the output at the beginning of the song), "truncate remainder" (I.e. your implementation) and "render remaining". Given that those are 3 mutually-exclusive options, I, personally, think it makes more sense to implement the CLI option as "--loop-mode=X", even if we only implement the truncate and render modes for now. What are your thoughts on that? |
@Wallacoloo I assume that implementing the wrapping option that you have proposed would need quite some effort. I don't have that much time (and also my own sideprojects) and therefore would like to propose to merge the changes so far and open a separate issue for your proposal. 😃 I have also tried to provide a command line option for the "Export between loop markers" option but unfortunately doing so in a non-GUI context makes the application crash with the following stack:
The problem is that |
From what I read, his proposition was to make the command line option configurable now by taking a parameter, so that when we do add this wrap-around feature, we'll have less changes to the CLI. |
Sorry, I somehow missed that part. :) So the only option for now would be something like |
.IP "\fB\-h, --help | ||
Show usage information and exit. | ||
.SH SEE ALSO | ||
.BR http://lmms.io/ | ||
.BR https://github.com/LMMS/lmms | ||
.BR http://lmms.sf.net/ | ||
.BR http://lmms.sf.net/wiki/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to keep http://lmms.sf.net
around even though it redirects to https://lmms.io
, which is also listed?
@michaelgregorius the proposal would be for However, It does seem like there isn't much use of this So yeah, I think you can pretty much disregard most of what I said then. The code looks good. Thanks for separating out the help/version printing into their own functions! I left an inline comment in the only place that I had a suggestion. |
@Wallacoloo the sf links will be remove by @Umcaruje's PR per #2131 (comment), #2131 (comment) |
@tresf oops. Sorry for not reading through this thread all the way :/ |
I have pushed another commit that changes the long option from Concerning the options for the loop mode: do I understand correctly that |
@michael sounds good to me.
|
void printHelp() | ||
{ | ||
printf( "LMMS %s\n" | ||
"Copyright (c) 2004-2014 LMMS developers.\n\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/2014/2015/
The second year of the copyright is now always calculated dynamically so there will be no more need to adjust it manually in the future. |
@michaelgregorius @Wallacoloo is there a reason we can't rebase, squash and commit this? |
@tresf This looks fine - green light from me. |
@michaelgregorius once this is squashed into a single commit and rebased against master, we'll merge this in. Thanks for the hard work. :) |
Adds a new command line option to render a song as a loop ("-l", "-- loop-mode"). Also cleaned up the code which parses the command line options by pulling out methods that print the version and the help. Updated man page: Added the new option to command line render a loop. Updated the data of the man page and the URLs. Added information about option to bypass root user check on startup Calculate the copyright year dynamically The command line options for help and version info both print the copyright as "2004-2014". Until now the value for the second year had to be adjusted manually. With this patch they are computed dynamically so that the current year will always be used.
d8bcc28
to
02f9447
Compare
@tresf Done! 😃 |
Travis is happy... merging. 👍 |
Fixes issue #2129 ("can't export as loop with CLI")
Adds a new command line option to render a song as a loop ("-l", "--
loop").
Also cleaned up the code which parses the command line options by
pulling out methods that print the version and the help.