Skip to content
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

Add sustain=true|false argument to export music command #2522

Open
cxong opened this issue Apr 22, 2024 · 5 comments
Open

Add sustain=true|false argument to export music command #2522

cxong opened this issue Apr 22, 2024 · 5 comments
Labels
documentation editor: music enhancement Improvement of existing feature or adding something new

Comments

@cxong
Copy link

cxong commented Apr 22, 2024

Feature request: add a sustain boolean flag to the export music command, which is passed to the API music() sustain argument.

Current behaviour is that the sustain setting is taken from the editor:
https://github.com/nesbox/TIC-80/blob/main/src/studio/studio.c#L357

This is opaque as the sustain button is small and can be easily missed, and it is not obvious that the export function will use this setting. Therefore I suggest adding the sustain flag to the export music command, and when it is omitted it will fall back to existing behaviour, which is using the editor sustain setting.

Q: why not add all the other music() arguments?
A: the other arguments are: frame, row, loop, tempo, speed. For frame/row, there is a simple workaround: edit the output file. For loop, I can see the usefulness of specifying number of loops, but again there is a simple workaround: copy/paste the output. For tempo/speed, they are highly visible in the editor so I don't see the need to also add them to export music.

@cxong
Copy link
Author

cxong commented Apr 22, 2024

It would also be good if this info was added to the wiki https://github.com/nesbox/TIC-80/wiki/export although in its current structure I'm not sure what's the best way to add it. Perhaps if we format the page into a table and add a Notes column, we can add the sustain information there for the export music row.

@Skeptim
Copy link
Contributor

Skeptim commented Apr 22, 2024

I added this to the wiki https://github.com/nesbox/TIC-80/wiki/export#export-music
I preferred to add a section about it and a link to this section in the music parameter line, but feel free to change it if you want.

@Skeptim
Copy link
Contributor

Skeptim commented Apr 23, 2024

Mmh… what I wrote to the wiki is about the sustain setting, but if I understand well that's true for all other settings, right ?
I'll write something more general if you confirm.

@cxong
Copy link
Author

cxong commented Apr 23, 2024

the other settings are different; tempo and speed are saved as part of the music, but sustain is only from the editor, or the music() API call

@Skeptim
Copy link
Contributor

Skeptim commented Apr 24, 2024

Ok, thanks!

@aliceisjustplaying aliceisjustplaying added enhancement Improvement of existing feature or adding something new editor: music documentation labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation editor: music enhancement Improvement of existing feature or adding something new
Projects
None yet
Development

No branches or pull requests

3 participants