Skip to main content

Topic: foo_cuesheetcreator (Read 34350 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Revision17
  • [*]
foo_cuesheetcreator
foo_cuesheetcreator 0.1

NOTE: This isn't for general use (although semi-functional; use Components->Cue Sheet Creator to create a cuesheet of the current play list in the file c:\output.cue).  This is so I can get help with an issue on the foobar development forum.

EDIT: 0.1 removed, use 0.2
  • Last Edit: 06 September, 2004, 02:25:59 PM by Revision17

  • Revision17
  • [*]
foo_cuesheetcreator
Reply #1
Here's something that can actually be used (as opposed to 0.1).  It creates a cuesheet of your current playlist.  I made it to be used in conjuction with mkaenc to create matroska audio files from multi file lossless cd rips (so you don't have to re-rip, don't use it for this purpose until mkvtoolnix 0.9.5 is out).

It supports ANSI and UTF-8 (which hopefully works properly).  It is to be used with the diskwriter in single file output mode.  I don't use C++ too often (this is my first attempt at a foobar2000 plugin as well), I did it quickly, and I didn't plan this well; so the code is pretty^h^h^h^h^h^h extremely messy.  If I get around to this, I'll clean it up while I'm fixing bugs.

Some notes:
  • It uses the first item in the playlist for the global information
  • Converts the "ARTIST" tag to "PREFORMER"
  • Drops the "TRACKNUMBER" tag
  • Uses wavfile.wav for the input file.  Edit this with the text editor of your choice.
I have tested this very little.  I'll be playing around with it more in the next few days, and if I find bugs in it, I'll probably fix them.  If you find a bug or want to comment on it, post here, email me (brian.peyton_NOSPAM_@gmail.com), or send me a message via jabber (revision17_NOSPAM_@jabber.org).

EDIT: Removed 0.2.  Use 0.2.1, if you really want the old version, email me.
  • Last Edit: 23 November, 2004, 05:57:06 PM by Revision17

  • Revision17
  • [*]
foo_cuesheetcreator
Reply #2
It's been awhile since I've worked on this.  Here's 0.2.1, it fixes TITLE not being the first thing for each track.  I really need to do a rewrite of this plugin once the semester is over.  Feel free to contact me to report bugs or suggest things with the links I posted above.

Things to do:
Add a REM before every line that isn't a "core" tag.  I could do this easily now, but I'd rather just leave it to give me more modivation to do that rewrite.
  • Last Edit: 23 November, 2004, 05:59:34 PM by Revision17

  • JEN
  • [*][*][*][*][*]
  • Banned
foo_cuesheetcreator
Reply #3
The zip file is corrupt !!!
  • Last Edit: 30 January, 2005, 12:49:50 PM by JEN

  • ssamadhi97
  • [*][*][*][*][*]
  • Developer (Donating)
foo_cuesheetcreator
Reply #4
no, it isn't.
A riddle is a short sword attached to the next 2000 years.

  • JEN
  • [*][*][*][*][*]
  • Banned
foo_cuesheetcreator
Reply #5
Yeah, I just tried it again and it worked ??? 

Anyway, I tried using this plugin to create a cuesheet of the current playlist.  I managed to create a cuesheet, but cant use the cuesheet with foobar?

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
foo_cuesheetcreator
Reply #6
I can't believe I never saw this before!

I created this thread regarding foo_cue_ex asking whether it could do what foo_cuesheetcreator does.

I've just noticed that this is still in development.  I have actually had a play with it and adapted it so I can use it now (attached) - however, I am no C++ programmer so please, please do continue with this and simply consider this post a feature request.

The changes I just made:
  • Now correctly uses frames (1/75th of a second) and not 1/60th of a second [major requirement]
  • Moved to Playlist menu from Components with title "Export to cuesheet (<format>)" [makes sense to me]
  • Each menu item has its own status description [minor]
  • Removed non-TITLE/PERFORMER entries [invalid cuesheet otherwise]
  • Amended menu to menu_item_main_cuesheetcreator (not tutorial1) [minor]
I see now that you intend to use REM commands for non-TITLE/PERFORMER entries.  That's great, but I have just removed them for now as I'm only interested in artist and album info and need a valid cuesheet.

One additional feature request: when you go to save can it please add ".cue" automatically to the filename if not already present?

I don't mind if you totally ignore most of my implementations - but please do ensure that you change the INDEX calculations to uses frames and not 1/60th of a second.

Comparision:

0.2.1
Code: [Select]
TITLE "Aha Shake Heartbreak"
PERFORMER "Kings Of Leon"
FILE "wavfile.wav" WAVE
  TRACK 01 AUDIO
   TITLE    "Slow Night, So Long"
   ALBUM    "Aha Shake Heartbreak"
   "Slow Night, So Long"
   PERFORMER    "Kings Of Leon"
   INDEX 01 00:00:00
  TRACK 02 AUDIO
   TITLE    "King Of The Rodeo"
   ALBUM    "Aha Shake Heartbreak"
   "King Of The Rodeo"
   PERFORMER    "Kings Of Leon"
   INDEX 01 03:54:07
  TRACK 03 AUDIO
   TITLE    "Taper Jean Girl"
   ALBUM    "Aha Shake Heartbreak"
   "Taper Jean Girl"
   PERFORMER    "Kings Of Leon"
   INDEX 01 06:19:36
  TRACK 04 AUDIO
   TITLE    "Pistol Of Fire"
   ALBUM    "Aha Shake Heartbreak"
   "Pistol Of Fire"
   PERFORMER    "Kings Of Leon"
   INDEX 01 09:25:10
  TRACK 05 AUDIO
   TITLE    "Milk"
   ALBUM    "Aha Shake Heartbreak"
   "Milk"
   PERFORMER    "Kings Of Leon"
   INDEX 01 11:45:52
  TRACK 06 AUDIO
   TITLE    "The Bucket"
   ALBUM    "Aha Shake Heartbreak"
   "The Bucket"
   PERFORMER    "Kings Of Leon"
   INDEX 01 15:46:08
  TRACK 07 AUDIO
   TITLE    "Soft"
   ALBUM    "Aha Shake Heartbreak"
   "Soft"
   PERFORMER    "Kings Of Leon"
   INDEX 01 18:41:43
  TRACK 08 AUDIO
   TITLE    "Razz"
   ALBUM    "Aha Shake Heartbreak"
   "Razz"
   PERFORMER    "Kings Of Leon"
   INDEX 01 21:41:02
  TRACK 09 AUDIO
   TITLE    "Day Old Blues"
   ALBUM    "Aha Shake Heartbreak"
   "Day Old Blues"
   PERFORMER    "Kings Of Leon"
   INDEX 01 23:56:52
  TRACK 10 AUDIO
   TITLE    "Four Kicks"
   ALBUM    "Aha Shake Heartbreak"
   "Four Kicks"
   PERFORMER    "Kings Of Leon"
   INDEX 01 27:29:53
  TRACK 11 AUDIO
   TITLE    "Velvet Snow"
   ALBUM    "Aha Shake Heartbreak"
   "Velvet Snow"
   PERFORMER    "Kings Of Leon"
   INDEX 01 29:39:20
  TRACK 12 AUDIO
   TITLE    "Rememo"
   ALBUM    "Aha Shake Heartbreak"
   "Rememo"
   PERFORMER    "Kings Of Leon"
   INDEX 01 31:50:20
  TRACK 13 AUDIO
   TITLE    "Where Nobody Knows"
   ALBUM    "Aha Shake Heartbreak"
   "Where Nobody Knows"
   PERFORMER    "Kings Of Leon"
   INDEX 01 35:12:51

0.3.0
Code: [Select]
TITLE "Aha Shake Heartbreak"
PERFORMER "Kings Of Leon"
FILE "wavfile.wav" WAVE
  TRACK 01 AUDIO
   TITLE "Slow Night, So Long"
   PERFORMER "Kings Of Leon"
   INDEX 01 00:00:00
  TRACK 02 AUDIO
   TITLE "King Of The Rodeo"
   PERFORMER "Kings Of Leon"
   INDEX 01 03:54:09
  TRACK 03 AUDIO
   TITLE "Taper Jean Girl"
   PERFORMER "Kings Of Leon"
   INDEX 01 06:19:45
  TRACK 04 AUDIO
   TITLE "Pistol Of Fire"
   PERFORMER "Kings Of Leon"
   INDEX 01 09:25:13
  TRACK 05 AUDIO
   TITLE "Milk"
   PERFORMER "Kings Of Leon"
   INDEX 01 11:45:65
  TRACK 06 AUDIO
   TITLE "The Bucket"
   PERFORMER "Kings Of Leon"
   INDEX 01 15:46:10
  TRACK 07 AUDIO
   TITLE "Soft"
   PERFORMER "Kings Of Leon"
   INDEX 01 18:41:54
  TRACK 08 AUDIO
   TITLE "Razz"
   PERFORMER "Kings Of Leon"
   INDEX 01 21:41:03
  TRACK 09 AUDIO
   TITLE "Day Old Blues"
   PERFORMER "Kings Of Leon"
   INDEX 01 23:56:66
  TRACK 10 AUDIO
   TITLE "Four Kicks"
   PERFORMER "Kings Of Leon"
   INDEX 01 27:29:67
  TRACK 11 AUDIO
   TITLE "Velvet Snow"
   PERFORMER "Kings Of Leon"
   INDEX 01 29:39:25
  TRACK 12 AUDIO
   TITLE "Rememo"
   PERFORMER "Kings Of Leon"
   INDEX 01 31:50:25
  TRACK 13 AUDIO
   TITLE "Where Nobody Knows"
   PERFORMER "Kings Of Leon"
   INDEX 01 35:12:64

Original
Code: [Select]
PERFORMER "Kings Of Leon"
TITLE "Aha Shake Heartbreak"
FILE "CDImage.wav" WAVE
  TRACK 01 AUDIO
   TITLE "Slow Night, So Long"
   PERFORMER "Kings Of Leon"
   INDEX 01 00:00:00
  TRACK 02 AUDIO
   TITLE "King Of The Rodeo"
   PERFORMER "Kings Of Leon"
   INDEX 01 03:54:09
  TRACK 03 AUDIO
   TITLE "Taper Jean Girl"
   PERFORMER "Kings Of Leon"
   INDEX 01 06:19:45
  TRACK 04 AUDIO
   TITLE "Pistol Of Fire"
   PERFORMER "Kings Of Leon"
   INDEX 01 09:25:13
  TRACK 05 AUDIO
   TITLE "Milk"
   PERFORMER "Kings Of Leon"
   INDEX 01 11:45:65
  TRACK 06 AUDIO
   TITLE "The Bucket"
   PERFORMER "Kings Of Leon"
   INDEX 01 15:46:10
  TRACK 07 AUDIO
   TITLE "Soft"
   PERFORMER "Kings Of Leon"
   INDEX 00 18:41:37
   INDEX 01 18:41:54
  TRACK 08 AUDIO
   TITLE "Razz"
   PERFORMER "Kings Of Leon"
   INDEX 00 21:40:64
   INDEX 01 21:41:03
  TRACK 09 AUDIO
   TITLE "Day Old Blues"
   PERFORMER "Kings Of Leon"
   INDEX 01 23:56:66
  TRACK 10 AUDIO
   TITLE "Four Kicks"
   PERFORMER "Kings Of Leon"
   INDEX 00 27:29:55
   INDEX 01 27:29:67
  TRACK 11 AUDIO
   TITLE "Velvet Snow"
   PERFORMER "Kings Of Leon"
   INDEX 00 29:38:35
   INDEX 01 29:39:25
  TRACK 12 AUDIO
   TITLE "Rememo"
   PERFORMER "Kings Of Leon"
   INDEX 00 31:49:38
   INDEX 01 31:50:25
  TRACK 13 AUDIO
   TITLE "Where Nobody Knows"
   PERFORMER "Kings Of Leon"
   INDEX 00 35:09:53
   INDEX 01 35:12:64

Edit: I just added the default extension bit myself using lpstrDefExt  (version 0.3.1).

Edit: link to 0.3.1 removed.  See later posts for latest version.
  • Last Edit: 04 July, 2005, 06:45:38 AM by Synthetic Soul
I'm on a horse.

  • drbeachboy
  • [*][*][*][*][*]
foo_cuesheetcreator
Reply #7
Would someone please explain to me why I would need this? I'm not sure I understand the concept of this plugin. Maybe an example would be in order? Also, what are the steps involved in using the plugin? I created and named the cuesheet which is really cool, but I don't understand how the wav file gets created or where it will reside once it is created. Neil, maybe you could address this, as you seem to understand the basic concept of "cuesheetcreator"? Thanks!
Surf's Up!
"Columnated Ruins Domino"

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
foo_cuesheetcreator
Reply #8
I would use this if I wanted to convert track files into an image file with cuesheet.
  • Load the track files in foobar
  • Use "Convert > Run conversion, single file output" to create the image file
  • Use foo_cuesheetcreator to create the cuesheet for the playlist
  • Open the cuesheet in Notepad and edit the filename in the FILE command to match that of your image
This is the reason I wrote CueMake.  But CueMake will only work with WAVE files as the source tracks.  Having a foobar component means that you can convert to image + cue from separate tracks for any lossless format, or even lossy if you don't mind the quality loss.

I would use this to convert track APE files into one APE file with cuesheet.

I guess another option would be to create a compilation image... maybe.

Edit: the best solution would obviously be to get diskwriter (or whatever it's now called) to give you the option of creating an accompanying cuesheet when you use "Run conversion, single file output".  Maybe I'll suggest this on the 0.9 feature request thread.  If diskwriter did it then you wouldn't need to edit the cuesheet manually, as it would use the filename you specified, and there'd simply be fewer manual steps.
  • Last Edit: 24 June, 2005, 09:53:14 AM by Synthetic Soul
I'm on a horse.

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
foo_cuesheetcreator
Reply #9
I've also just thought of one more option for foo_cuesheetcreator.  The name of the wave file could be taken from the name of the playlist.  That would give users an easier way to edit the filename without having to open the cuesheet post-creation in Notepad.

Also,  foo_cuesheetcreator would probably work best as a playlist context menu.  So you would select all the files that you require (not necessarily the whole playlist), right-click, and choose "Create cuesheet...".  It could implement itself in the playlist menu to create a cuesheet for the whole playlist, and in the playlist context menu to allow you to run it for only a few tracks (or all tracks if you want).

I think this degree of flexibility would be superb.

Also.... instead of two menu options, have one, and then have two filter items in the save dialogue: "Cuesheet (UTF-8)" and "Cuesheet (ASCII)".  If it could remember your last choice all the better - if not it should probably default to ANSII (as UTF-8 cuesheets are non-standard I believe).
I'm on a horse.

  • drbeachboy
  • [*][*][*][*][*]
foo_cuesheetcreator
Reply #10
Thank you Neil! I appreciate your explanation and the steps involved in it's use. I'm not too sure that I would have much use for the plugin, but I do have a few albums sitting as individual FLAC tracks that I can now easily convert to single file FLAC with a cuesheet tag. So, thanks for the tip. 

Regards,
Dirk
Surf's Up!
"Columnated Ruins Domino"

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
foo_cuesheetcreator
Reply #11
OK, I discovered that 0.3.1 was still lacking, so I've had another play.
  • Reduced to one menu item ("Create cuesheet...").  You can select whether you want ANSII or UTF-8 at the Save dialogue.  Whether UTF-8 works or not I have no idea (I haven't touched the original code)
  • Added context menu item.  This still only saves the whole playlist *
  • The album artist (top-level PERFORMER) is still derived from track 1.  However, if track 1 has an "album artist" tag that is now used over its "artist" tag
  • Now uses better methods to extract/test meta data.  This solves a case-sensitivty issue that I have encountered with all previous versions.  A tag can be "album", "ALBUM" or "Album" now and it will get picked up, as I'm using the SDK methods. (the main reason for this release)
* I did battle for a few hours with getting it to work with just selected tracks.  I could create a cuesheet for both the full playlist (main menu item) and only selected tracks (context menu item)... but foobar would crash soon after.  I just don't understand enough about pointers, handles, etc.  I have saved this code but reverted to a previous version for this release.

Things I would still like to see:
  • The ability to create a cuesheet from selected tracks only from the context menu
  • Intelligent meta data handling.  The code could currently write out all track meta data (excluding artist and album info, which is already written as TITLE/PERFORMER commands) as REM statements for each track (I've just commented it out).  However, I think the meta data needs to be analysed, and any values which are the same for all tracks (e.g.: DATE, GENRE) should be written as global (top-level) REM statements.  I'm not actually sure any others should be written.
  • The FILE reference should either be calculated from the cuesheet name, or the playlist name.  I'm thinking the cuesheet name is more sensible now. So, if the user saves the cuesheet as "myfile.cue" the FILE reference should be "myfile.wav".
  • The album artist (top-level PERFORMER) should be more intelligently calculated. The check should be:
    • If all tracks have the same "album artist" use that, else
    • If all tracks have the same "artist" use that, else
    • Set the album artist to "Various Artists"
NB: I feel concerned that my work may stop Revision17 from continuing to develop this component.  I would be very sorry if that were the case.  I've no interest in setting myself up as the primary developer of foo_cuesheetcreator (it wouldn't be fair to the users).  However, version 0.2.1 simply didn't work as it should (inaccurate timings), so I have amended it.  I only thought it was right to share as I see many people have downloaded it.  I was hoping Revision17 may post after my initial post so I could discuss.  I think I've done all the work I can now - it's up to a decent C++ programmer to complete the work.  I'm hoping at least that the work I've done will save some time for Revision17, leaving him/her to do the clever stuff.

Edit: OK, UTF-8 wasn't working (=<0.3.2), but I believe it is now (0.3.3).

Edit: 0.3.4. Minor update.  Some millisecond values were returning a wrong frame value (only spotted on one cuesheet).  Fixed.
  • Last Edit: 04 July, 2005, 06:40:49 AM by Synthetic Soul
I'm on a horse.

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
foo_cuesheetcreator
Reply #12
Quote
the best solution would obviously be to get diskwriter (or whatever it's now called) to give you the option of creating an accompanying cuesheet when you use "Run conversion, single file output".  Maybe I'll suggest this on the 0.9 feature request thread.  If diskwriter did it then you wouldn't need to edit the cuesheet manually, as it would use the filename you specified, and there'd simply be fewer manual steps. [{POST_SNAPBACK}][/a]

Working on foo_cuesheetcreator gave me the confidence to decide to undertake this myself.

I give you [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=35275]Diskwriter with cuesheet generation for single file output[/url].

More importantly though, the fact that Peter has suggested that this facility may be available in 0.9. 


Edit: Also, while working on Diskwriter, one cuesheet highlighted a minor error in foo_cuesheetcreator.  This has been fixed in 0.3.4 above.
  • Last Edit: 04 July, 2005, 06:42:19 AM by Synthetic Soul
I'm on a horse.

  • vries085
  • [*]
foo_cuesheetcreator
Reply #13
First lets start to say it's a plugin that's great.
I want cue-sheets for all my albums, and was thinking of writing something myself.

The only strange thing I noticed was if I select an album from the album list and with a rightclick select the create cue-sheet option it however creates not a cue-sheet of the selected album, but of the current playlist.

But still, a good piece of work

Fred

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
foo_cuesheetcreator
Reply #14
Yes, sorry, the context menu implementation is not complete - it is really just another way of accessing the item from the Playlist menu.

If the option is chosen from the context menu it doesn't use the dataset available - it simply calls the function that uses the active playlist to create a dataset.

NB: If you want to create a cuesheet for all your albums I assume your albums are in separate track files.  The cuesheet created will assume only one source file - so I'm not sure if it is really what you need.

To create a cuesheet referencing separate track files take a look at my post here - but use the correct code below.

Code: [Select]
FILE "%_path%" $if($stricmp(%__codec%,MP3),MP3,$if($stricmp(%__codec%,AIFF),AIFF,WAVE))$char(10)
   TRACK $num(%_playlist_number%,2) AUDIO$char(10)
$if(%title%,    TITLE "%title%"$char(10),)
$if(%artist%,    PERFORMER "%artist%"$char(10),)
   INDEX 01 00:00:00
  • Last Edit: 24 July, 2005, 07:55:04 AM by Synthetic Soul
I'm on a horse.

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
foo_cuesheetcreator
Reply #15
I should have posted this here before.

I discovered out of chance that this component has been updated for 0.9, by Haru Ayana.

Haru, if you see this, thank you.  My only request would be to maybe put the context menu item in "Utils".  I think components should try to slot into submenus where possible, and "Utils" already contains "Save as playlist...", a very similar action.  Using "Utils" > "Save as cuesheet..." may be most apt.  Your call obviously.

Anyway, I just thought this would be the best place to report this.

See my post in another relevant thread for some additional benefits of this component.  NB: Current version is 0.4.4.
I'm on a horse.

  • ayana
  • [*]
foo_cuesheetcreator
Reply #16
Updated to 0.4.5.
Supported output of pregap(INDEX 00), when if tracks contain that info.

Haru, if you see this, thank you.  My only request would be to maybe put the context menu item in "Utils".  I think components should try to slot into submenus where possible, and "Utils" already contains "Save as playlist...", a very similar action.  Using "Utils" > "Save as cuesheet..." may be most apt.  Your call obviously.

Thanks, I did it so. Please change it from "Preferences > Display > Context Menu" in the case of update from a older version.

  • ElFishi
  • [*]
foo_cuesheetcreator
Reply #17
I'm not sure if it is to be considered a hijack if I post a feature request here:

I'm looking for a way to
(a) split my CD-image single-files w/ cue-sheets into multiple files (one for each song) and at the same time
(b) create a cue-sheet that references to the just created multiple files.

The purpose I hope is clear: I (nowadays) prefer to have my music in single files, but I want to preserve the possibility to go back and burn a CD from my archive with correct gaps, but without having to take the extra step to generate a single image file first.

I get along to do (a) with foobar, but for part (b) I couldn't find a way.
I was pointed to tool called CUE Splitter (http://www.enfis.it/details.php?id=42) that does this, but I rather had it done in foobar.

So maybe there is a way to evolve foo_cuesheet_creator to do this?

Regards
  • Last Edit: 17 July, 2006, 01:14:56 PM by ElFishi

  • grounder
  • [*]
foo_cuesheetcreator
Reply #18

foo_cuesheetcreator
Reply #19
Is unicode supported?

  • NetRanger
  • [*][*]
foo_cuesheetcreator
Reply #20
Have the development of this plugin totally stopped or?