MMH - Split Side Long or Album Length FLACs to Song Files?

QuadraphonicQuad

Help Support QuadraphonicQuad:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I’ll release an MMH update tomorrow that will accept an existing CUE as input to split a FLAC into individual tagged files.

I’ll also try and complete code I started a long while back that will create a new CUE based on silence between songs in a large single album or side FLAC. This is not perfect but is pretty close depending on silence it finds within a song. But users will be able to remove incorrect (additional) songs from the cue and adjust times manually.

Basically, import a large FLAC, MMH will generate a CUE based on silence it finds. Play the CUE in Foobar. Edit the final cue times in MMH if required. Save the final CUE.
 
If Foobar already plays from a cue, ie. it loads the file as a set of tracks in the playlist window, there is no need to use MMH. Just select all those tracks names and right click to use the foobar 'Convert' function. 'Convert' them to WAV (or FLAC), making sure the 'split into separate tracks' option is checked (in the 'Destination' tab)
 
If Foobar already plays from a cue, ie. it loads the file as a set of tracks in the playlist window, there is no need to use MMH. Just select all those tracks names and right click to use the foobar 'Convert' function. 'Convert' them to WAV (or FLAC), making sure the 'split into separate tracks' option is checked (in the 'Destination' tab)
Yep. That's how I've done it.
 
I’ll release an MMH update tomorrow that will accept an existing CUE as input to split a FLAC into individual tagged files.

I’ll also try and complete code I started a long while back that will create a new CUE based on silence between songs in a large single album or side FLAC. This is not perfect but is pretty close depending on silence it finds within a song. But users will be able to remove incorrect (additional) songs from the cue and adjust times manually.

Basically, import a large FLAC, MMH will generate a CUE based on silence it finds. Play the CUE in Foobar. Edit the final cue times in MMH if required. Save the final CUE.
Cool Garry, I'll be happy to give this a go with some of my vinyl rips and try and suss out any issues. If the forum works together on this as a project, perhaps it can be fine tuned by you and develop another nifty tool in our bag of tools.

No it wont work in all cases, but if it's combined with some sort of cue info to populate the metadata (which is what happens in Foobar) then we'd really have something. I've populated some metadata using Foobar's discogs release page referencing but don't care for it too much as it throws in every little bit of info but the kitchen sink. I'd be fine with just the basic data i.e. Album, Artist, Date, Genre; and one I like to add, is the Label release numbers like this-
Toshiba Records ‎– TP-92010Z
Would there be any way for you to mine the discogs data and populate the split results?

I think it's great that we have Garry here constantly developing a custom app just for us folks on the forum, to improve our processing of files! (or Garry's just bored!-LOL) 🤠
 
New update now online:

Added these to the Join and Split Audio File tool:

To Split a large FLAC file from a CUE:
Load the CUE file using the new Add CUE command button at top of the dialog. MMH will load the CUE tracks into the grid enabling users to modify the CUE track start times. Use the Split button at bottom to split the CUE into individual files at the Start times listed in the grid.

Create a CUE from an existing large FLAC or WAV file:
MMH can attempt to create a CUE file from a large single FLAC or WAV file, typically from an LP conversion where all the tracks are in a single file.

MMH uses ffmpeg’s Silence Detection filter which is reasonably accurate but can (of course) detect a quiet or short silent piece within a song as a start/end silence. So, users should check these Silence results with a listening test at the start times returned.

There are two user preferences to help the silence detection filter for various input files. In the toolbar Preferences menu, there is:
• Silence Duration (s): This is a minimum time in seconds Silence is considered a track break time (default is 1.5 seconds)​
• Silence Noise Level (- db): This is the maximum noise level considered to be silence. Default is -40db.​

For the the default settings MMH will create a Track Start time for every 1.5 second duration of less than -40db sound level.

To load a single file into the dialog and get MMH to find the track start times with Silence, use the ‘Browse’ button at bottom for the Input File. After selecting the file, MMH immediately scans the entire file for Silence and loads the Start times into the grid:

JoinAndSplitAudio2.PNG


A recommended workflow would be to use ‘Save CUE’ to create a CUE file from the silence, then play the CUE in an application like Foobar to test the start times. In this example there are two that are incorrect (the album has 12 tracks). Click on an incorrect row and click; ‘Remove Selected’ button at top to remove the current row.

MMH creates a Start Time at the time midway between the Silence times found.

You can edit the Start Times in the grid at any time and then ‘Save CUE’ to test an updated CUE.

Ideally you want your CUE to have correct track names. Use the ‘Get Track Tags from Musicbrainz’ to find the release and track names online. Or use the ‘Paste Track Titles from Clipboard’ to copy all the tracks from a Discogs release page into the grid. See other sections in this documentation that provides examples of copy and pasting Discogs track lists into MMH and using MMH’s Track List editor.

MMH uses the grid contents to name the CUE entries.
 
New update now online:

Added these to the Join and Split Audio File tool:

To Split a large FLAC file from a CUE:
Load the CUE file using the new Add CUE command button at top of the dialog. MMH will load the CUE tracks into the grid enabling users to modify the CUE track start times. Use the Split button at bottom to split the CUE into individual files at the Start times listed in the grid.

Create a CUE from an existing large FLAC or WAV file:
MMH can attempt to create a CUE file from a large single FLAC or WAV file, typically from an LP conversion where all the tracks are in a single file.

MMH uses ffmpeg’s Silence Detection filter which is reasonably accurate but can (of course) detect a quiet or short silent piece within a song as a start/end silence. So, users should check these Silence results with a listening test at the start times returned.

There are two user preferences to help the silence detection filter for various input files. In the toolbar Preferences menu, there is:
• Silence Duration (s): This is a minimum time in seconds Silence is considered a track break time (default is 1.5 seconds)​
• Silence Noise Level (- db): This is the maximum noise level considered to be silence. Default is -40db.​

For the the default settings MMH will create a Track Start time for every 1.5 second duration of less than -40db sound level.

To load a single file into the dialog and get MMH to find the track start times with Silence, use the ‘Browse’ button at bottom for the Input File. After selecting the file, MMH immediately scans the entire file for Silence and loads the Start times into the grid:

JoinAndSplitAudio2.PNG


A recommended workflow would be to use ‘Save CUE’ to create a CUE file from the silence, then play the CUE in an application like Foobar to test the start times. In this example there are two that are incorrect (the album has 12 tracks). Click on an incorrect row and click; ‘Remove Selected’ button at top to remove the current row.

MMH creates a Start Time at the time midway between the Silence times found.

You can edit the Start Times in the grid at any time and then ‘Save CUE’ to test an updated CUE.

Ideally you want your CUE to have correct track names. Use the ‘Get Track Tags from Musicbrainz’ to find the release and track names online. Or use the ‘Paste Track Titles from Clipboard’ to copy all the tracks from a Discogs release page into the grid. See other sections in this documentation that provides examples of copy and pasting Discogs track lists into MMH and using MMH’s Track List editor.

MMH uses the grid contents to name the CUE entries.
I tested the new Split tool on a recent LP rip I did (Loggins & Messina - Sittin' In); here's some observations.

First here is my final cue sheet I created from auditioning in Audacity and creating it manually (There are only 4 songs on this side of the album.)


L&M CUE.jpg


Using the MMH tool with the initial Preferences for Silence level and Duration settings, this is what it came up with:
"You can see that the 1st 2nd, 3rd and 6th tracts are close enough to be utilized; tracts 4 & 5 are not correct as there are some very slight quiet passages of a flute at the beginning of the song Vahevella that threw it off. Also the end tract is unnecessary for cue split purposes, as it's the end of Side One faded into silence (however you can always just select that last one and hit "Remove Selected" to take it out, so no big deal.


MMH TEST L&M.jpg


After several tries at adjusting the Silence level and Duration settings I got one that worked out below (with settings of Duration 0.8 sec.) & (Silence Level at -44 db):

MMH TEST L&M-GOOD.jpg


I went ahead next and tried the MusicBrainz data fill feature which worked out nicely except for some reason didn't fill in the Genre line and I believe Vahevella is spelled incorrectly?:

musicbrainz data fill.jpg


MMH -MB CUE.jpg


Running the above cue file through Foobar2000 it errored out since the file name location reference is not correct; it should read:
FILE ".\Sittin' In - Side 1 - ALL WAV.wav" WAVE


Foobar2K cue errors.jpg


Once I made the corrected location it played fine and could then be converted/split.
*I did notice (see above) some symbol errors on "Danny's Song" that I traced back to a weird apostrophe in the MusicBranz transfer.


CORRECTED CUE TO FOOBAR2K.jpg
 
Thanks for testing and providing detailed feedback Pup.

I‘ll fix the file naming error (in CUE), MusicBrainz apostrophe character (Unicode) and check out missing genre this morning and upload a new MMH update.

I should add a ’Play’ option to MMH to enable a quick test listen from the track grid. This would allow easy change and test of start times. I’ll look into this over next couple of days. Although now I’m working on a MacOS version I need to find something that will support both Win and Mac.
 
This will be extremely helpful to those of us who have album rips with either no cue file or a cue file that is essentially useless because it indicates just one long track. The only way I've been able to separate these into the individual songs before has been to listen to the album, note the beginning time of each song, edit a template cue file in notepad, open that cue file in foobar, and convert the resulting tracks. It's tedious, which is probably why I haven't done it to more than a few of these rips. Thanks, Garry!
 
@J. PUPSTER

MMH 4.2.6 beta 1 installer below with fixes for correct media file name in CUE when created from a single flac/wav, adding genre and a new silence detection Preferences dialog (easier to use & data validation)

(link removed no longer valid)

It appears the strange apostrophe character showing up in Foobar is a foobar unicode issue, but if you can copy and paste the text and post it I can get MMH to replace the text with a ' character.
 
Last edited:
@J. PUPSTER
It appears the strange apostrophe character showing up in Foobar is a foobar unicode issue, but if you can copy and paste the text and post it I can get MMH to replace the text with a ' character.
Thanks Garry, I had replaced the apostrophe manually in the cue file and it was all good, so no big deal IMO; just thought it was something brought down from MusicBrainz.

But this is what MusicBrainz filled into the cue sheet-see attached file below (QQ doesn't allow .cue extensions apparently, so I just saved it as a txt file, don't know if that changes the Unicode or not?):
 

Attachments

  • Sittin' In - Side 1 - ALL WAV.txt
    588 bytes · Views: 70
Just tried version: 4.2.6 beta 1 and am confused as to its use. Didn't see where the split songs were showing up; can you double check the app and then give an example of correct usage to get a cue created and the long file split. Also would there be anyway to minimize the main MMH window to the taskbar, so I can see all of my desktop?
 
Thanks. I‘ll look at this shortly, after my morning heart starter coffee.

The quote issue is Musicbrainz has that data stored as Unicode, MMH displays it ok and saves as Unicode in the cue but Foobar is not displaying it correctIy. I wonder if changing the Foobar skin or font would change that?

I’ll copy the crazy text from your text file and get MMH to replace it when creating a cue.
 
@J. PUPSTER New beta version (same link as previous).

Fixes:
Issue introduced with previous beta caused MMH to fail to run silence detection (I changed the code last minute to use negative db in preferences (two -ve makes a +ve !! classic bug)
Splitting a single wav or flac directly after running silence detection now supported (Previously needed to load the saved cue)
Fixed another file naming bug on splitting
Add minimize button to Launcher dialog as requested

So to answer your question:
You can split from an existing CUE by using 'Add Cue' button, then 'Split'
You can split from a large FLAC or WAV without a cue by using 'Browse' at bottom to load a auto detect silence. Then 'Split' at any time to use the times in the grid. Although you should add the tracks details via a Musicbrainz tag lookup or manually prior to the split to get nice file names and tags.

Having typed this I just remembered I didn't add the single quote replacement. Will do that now and release in next MMH update/release.
 
ver. 4.6.2 beta 2

Went a little better this time, but some errors also, and thank you for putting in the minimize feature.

1: More logical steps to complete the split, chose my Preferences, used the bottom Browse to Input File box and hit the Split button. But for some reason I got a path error message below (not sure what that is) but once I said OK it seemed to work and gave me the subsequent window.

path error.jpg

split complete.jpg


2: Next, went ahead and opened up the MusicBrainz and imported the metadata and edited that; seemed to go OK but then when I checked the files the last song didn't convert properly (you can see it says zero file size?) I checked the cue file, and it seemed to be correct AFAICT.

track 4 error.jpg
 
@J. PUPSTER The error was caused by MMH attempting to create a file with an illegal character - fixed in official 4.2.6 release just published.
 
Back
Top