Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: How to shorten the length of a song with cue file or else?  (Read 1138 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to shorten the length of a song with cue file or else?

How can I ensure that a certain song is only played up to a certain length of time, e.g. Play only 3 minutes and 30 seconds, then the next piece should go on as normal.

Re: How to shorten the length of a song with cue file or else?

Reply #1
A CUE file can only define the start position of a file or track. There's no command to end.
korth

Re: How to shorten the length of a song with cue file or else?

Reply #2
You could try assembling Monkey's Audio APL files. They allow you to specify an arbitrary source file, and the sample counts to start and end at. You'll need something that can handle such files, though.

Re: How to shorten the length of a song with cue file or else?

Reply #3
How can I ensure that a certain song is only played up to a certain length of time, e.g. Play only 3 minutes and 30 seconds, then the next piece should go on as normal.
You are posting this in "General audio". Are you looking for something player-specific? For foobar2000, there has been foo_preview which hasn't been updated in ages, but apparently still is available at https://skipyrich.com/w/index.php/Main_Page - and foo_seek: http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Seek_(foo_seek)

High Voltage socket-nose-avatar

Re: How to shorten the length of a song with cue file or else?

Reply #4
Quote
A CUE file can only define the start position of a file or track. There's no command to end.
So the only position to be set in a cue file is the starting point? No other position possible / available?

Quote
You'll need something that can handle such files, though.
So a music player can not read / handle such?

Quote
Are you looking for something player-specific?
The best would be something player-independently.

Thank you for the links, so foo_seek does not seem to be available anymore.

It appears the best would be to just copy the audio file and edit it by cutting off the last part that shouldn't be played.


Re: How to shorten the length of a song with cue file or else?

Reply #6
Thank you for the link. Unfortunately I do not use MusicBee.

Re: How to shorten the length of a song with cue file or else?

Reply #7
Quote
A CUE file can only define the start position of a file or track. There's no command to end.
So the only position to be set in a cue file is the starting point? No other position possible / available?
There can be sub-indexes within a track but the issue would be finding a player that will read them. Most software players will only read INDEX 01.

https://web.archive.org/web/20160123204637/http://www.digitalx.org/cue-sheet/syntax/#indx
Quote
INDEX
Description:

This command is used to specify indexes (or subindexes) within a track.
Syntax:

INDEX [number] [mm:ss:ff]
Parameters:

number – Index number (0-99)

mm:ss:ff – Starting time in minutes, seconds, and frames (75 frames/second).
Note:

All times are relative to the beginning of the current file.
Example:

INDEX 01 00:00:00
INDEX 05 02:34:50
Rules:

All index numbers must be between 0 and 99 inclusive. The first index must be 0 or 1 with all other indexes being sequential to the first one. The first index of a file must start at 00:00:00.

INDEX 0 Specifies the starting time of the track “pregap”.

INDEX 1 Specifies the starting time of the track data. This is the only index that is stored in the disc’s table-of-contents.

INDEX > 1 Specifies a subindex within a track.

Additional reference (see  Appendix A): https://web.archive.org/web/20070614044112/http://www.goldenhawk.com/download/cdrwin.pdf
korth

Re: How to shorten the length of a song with cue file or else?

Reply #8
Thank you for the links and descriptions.

Yes, indeed, so no (useful) way to use a cue therefor. So I guess just removing the unwanted part from the copy of the track would not be more effort than using a cue (if a cue had been suitable).

Many thanks again.

Re: How to shorten the length of a song with cue file or else?

Reply #9
Thank you for the links, so foo_seek does not seem to be available anymore.

Seems like one link came out broken because of a right parenthesis.
Wiki page http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Seek_%28foo_seek%29 ,
gives you thread https://hydrogenaud.io/index.php/topic,88654.0.html
and download link  https://hydrogenaud.io/index.php?action=dlattach;topic=88654.0;attach=7874

Big edit:

Yes, indeed, so no (useful) way to use a cue therefor.

Depends. You might need to do some scripting, but the following should be possible if someone can help you with a "drag files and drop them on a .bat file" thing (I don't know that).
What you need is a folder with a Create210secCuesheets.bat file (210 sec = 3m30s) that does the following:
* Takes a lot of filenames as input, and for each <FILENAME>
* In the folder, create <FILENAME>.CUE as a cuesheet that references the file with Track 1: Title <FILENAME> (so you don't have to retrieve metadata) and start at at 00:00, and Track 2: Title THISISNOTTOBEPLAYEDATALL starting at 210:00
Then you select all .CUE into your media player, sort by track number so that the #1 come up first, and those are the ones you want to play.
If you use foobar2000 - and you might make a portable install for the very purpose of doing this sort of playback - then instead of selecting all track 1, you can use https://foobar.hyv.fi/?view=foo_skip and have it omit every THISISNOTTOBEPLAYEDATALL.
Then in place of one .cue per file, you might even make one single cuesheet where odd track numbers are named <FILENAME> and even track numbers are THISISNOTTOBEPLAYEDATALL

Second edit:
This fits the situation where you for each listening session want to generate one playlist (which you might want to shuffle afterwards, but at least a playlist) of at most 3:30 from each file. Then you might generate a playlist and for each file convert 3:30 to a separate directory to be thrown away later, but cuesheet generation is faster than audio encoding and takes less space.
If you don't use cuesheets for anything else, you can actually for each folder have a cuesheet matching the file name and as above, and then you can have one media player that only sees media files and not .cue - and one media player that sees only cuesheets.
High Voltage socket-nose-avatar

Re: How to shorten the length of a song with cue file or else?

Reply #10
Ah, yes, there it is, sorry. Many thanks!

Re: How to shorten the length of a song with cue file or else?

Reply #11
Many thanks for the (big) edits! Yes, I use a portable foobar. It sounds good, but somehow looks quite complicated. Regrettably I do not have any idea of scripting / coding.

I have many of the normal cue sheets for just playing the tracks like usual. Yes, faster processing and less space would be an advantage of course by using cue sheets.

Re: How to shorten the length of a song with cue file or else?

Reply #12
Sounds overly complicated but the Big Edit includes multiple suggestions. If I read it correctly this is one example that could be used with the foo_skip suggestion.
Code: [Select]
FILE "08 SomeTitle.flac" WAVE
  TRACK 01 AUDIO
    PERFORMER "SomeArtist"
    TITLE "SomeTitle"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "THISISNOTTOBEPLAYEDATALL"
    INDEX 01 03:30:00

Edit: I'm not familiar with the foo_skip component so I can't help with that.
korth

Re: How to shorten the length of a song with cue file or else?

Reply #13
Thank you very much for that. I will try it with foo_skip.

Re: How to shorten the length of a song with cue file or else?

Reply #14
Excuse me if I missed some important data in the thread, but it sounds like you can use foo_skip directly without any complicated steps. Just add a tag field called "SKIP" with value "3:30-" and foobar2000 will treat the track as if its length was 3:30.

Re: How to shorten the length of a song with cue file or else?

Reply #15
My, foo_skip is better than I knew.

OP: Scrap all that about "player-independent" and realize you don't need anything but fb2k (and a heckovalutta components).
High Voltage socket-nose-avatar

Re: How to shorten the length of a song with cue file or else?

Reply #16
Quote
Edit: I'm not familiar with the foo_skip component so I can't help with that.
Thank you anyway, I just will try it.

Quote
Excuse me if I missed some important data in the thread, but it sounds like you can use foo_skip directly without any complicated steps. Just add a tag field called "SKIP" with value "3:30-" and foobar2000 will treat the track as if its length was 3:30.
Yes, indeed, it should work, thank you, will try it:

Quote
The component also offers functionality to skip only parts of a track. To utilize the partial skipping set a tag field SKIP with timecodes that you want skipped. For example SKIP=0:00:00-0:01:25 (or simply SKIP=-0:01:25) to skip the first 85 seconds.

Quote
OP: Scrap all that about "player-independent" and realize you don't need anything but fb2k (and a heckovalutta components).
Sorry, foobar and what?

Re: How to shorten the length of a song with cue file or else?

Reply #17
Sorry, foobar and what?

A hell of a lot of components.

foobar2000 plays music out of the box, but you are among those who want to do more.
High Voltage socket-nose-avatar

Re: How to shorten the length of a song with cue file or else?

Reply #18
Yes yes, that is right unfortunately. Starting a track at some position was so easy (without hell-components) but stopping playing it....

 
SimplePortal 1.0.0 RC1 © 2008-2021