Skip to content

Conversation

@RMRattray
Copy link
Contributor

@RMRattray RMRattray commented Jan 11, 2026

Resolves: #16496 in part; this forum discussion and this one more thoroughly; this one in part

This adds the option to, when exporting audio, export the "tail", the part of the audio after the time for the last note is allotted but the music still reverberates, and the head, the part before, and the overlay of the tail over the start of the head, as three separate files. Prior to the last commit, only the tail was separated.
The mechanism for this, including naming the new files, is done in the SoundTrackWriter object with multiple encoders, rather than any higher level of abstraction, to prevent multiple calls to generateAllAudio() or modifications to higher-level abstractions of players. Much of the code changes exist to transport the separateTail flag into the audio configuration and to the mechanism for noting whether multiple files are being created.

The decision to offer two files split at the seam resolves one primary user difficulty in identifying that seam (it isn't obvious that it's hardcoded to be three seconds); and is simpler than attempting to use the mixer - or add a mechanism to the SoundTrackWriter - to overlay sound. Simplified design from @MarcSabatella 's discussion, if they'd like to weigh in here as well.

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@cbjeukendrup cbjeukendrup added the needs design approval Feature/change requests that need a go/no-go from the design team before being worked on label Jan 14, 2026
@blackears
Copy link
Contributor

Thanks for your great work on this. Is there no way, though, to automatically merge the tail into the start of the main sound buffer? Otherwise it will be necessary to open both clips in a third application and combine them that way.

@MarcSabatella
Copy link
Contributor

The downside of merging it automatically would be, then you can never have a clean start. I'm imagining people would want to build audio with a clean start first, then a loop with the merged head & tail, and then end with a clean tail.

@RMRattray
Copy link
Contributor Author

Thanks for your great work on this. Is there no way, though, to automatically merge the tail into the start of the main sound buffer? Otherwise it will be necessary to open both clips in a third application and combine them that way.

My pleasure! I'm 99% sure this would be possible, using the mixer object. I'll aim to figure that out this weekend.
Design aim: three files, tentatively:

  • song-start.ogg
  • song-loop.ogg
  • song-end.ogg
    (I do wonder how clear "tail" is to the user, though it is the term used in the interface in the PR as-is)

@RMRattray RMRattray force-pushed the separate-audio-file-for-tail branch from d433d61 to 85ef828 Compare January 24, 2026 16:18
@RMRattray RMRattray force-pushed the separate-audio-file-for-tail branch from 85ef828 to a5d880e Compare January 24, 2026 16:24
@RMRattray RMRattray changed the title Separate audio file for tail Separate audio files for looping audio Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs design approval Feature/change requests that need a go/no-go from the design team before being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

It would be useful to have a looping option for export to MP3, OGG, etc,

4 participants