Welcome Guest

Pages: 1 2
Replacing a pattern with integers starting from 1
SnowdogPostJune 12, 2023, 03:57
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

Here's an easy one. 😀

As is so often the case, I feel that I should be able to duplicate & edit one of the existing actions to do what I need (in this case the roman numerals one) but alas, I can't see how to do it by looking at the action.

Simply put, I've added a "00" into each of the titles & I want to replace these with integers padded, in this instance, to two digits.

Ordinarily, I'd just copy the track numbers in, but this time it spans across two discs, as you can see from the track numbering in the screenshot, so it would start again from 01 for disc two. I'd have to change the two album titles to be the same, renumber the tracks, copy them across & then change the album titles back afterwards which, as solutions go, seems like a bit of a blunt instrument.

In this instance I've added zeroes to be replaced but I'm wondering whether a better solution might be to actually tweak the roman numerals action to add integers after a pattern which, in this case, would be "Friedman-comma-space"

Image

2MR2PostJune 12, 2023, 07:53
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicReplacing a pattern with integers starting from 1

The easiest way is to not do any of it manually. I must be missing something in the explanation. The track numbers seem to be correct so the disc numbers are irrelevant.

Is the correct solution:

insert the track number padded to 2 digits after a pattern? Should there always be a : after the insert?

2MR2PostJune 12, 2023, 11:51
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicReplacing a pattern with integers starting from 1

I've written an action which should handle any of these cases. It will replace the pattern (00s) you put in or append the track numbers after a pattern. It will use the existing track numbers or will calculate them per disc. You can also specify the track padding to take place.

The action can be run standalone or from the Multi Field Editor or from the Title field's function button. The action currently only works on Title.

The configuration panel is always displayed ... previous settings are retained. There is per row help and help for the action.

Download:

https://2manyrobots.com/actions/Insert-Track-Numbers-in-Title.zip

SnowdogPostJune 14, 2023, 03:27
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

I haven't read the above thoroughly but, on your first point, the track numbers are correct but they reset to 01 on the second disc, whereas the two discs together form one single piece of music. So the numbering should be 01 & upwards across all the selected tracks to the end. I'm not sure if what you've done covers that but I'll give it a go. Thanks!

SnowdogPostJune 14, 2023, 03:47
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

Okay, the track numbering action is awesome but there is one problem...

As I mentioned in my previous reply (I think) the numbering should not be allied to the CD track numbering. The numbering is sequential from 01 to the end of the piece, regardless of how many discs it goes across or if it is one of several pieces on the disc. It should just number the selected track from 01 upwards. 🙂

As you can see on the first screenshot below, the numbers currently reset to 01 on the second disc.

The second screenshot is from the Bach333 booklet & you can see how the CD track numbering (the first set of numbers on the left) continues through the two cantatas, whereas each of the cantatas start from 01 (the second set of numbers), regardless of where they fall on the disc.

So basically I just need it to number the tracks from 01 upwards regardless of the given track numbers.

Sorry I didn't explain that properly in the first place.

2MR2PostJune 14, 2023, 08:34
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicReplacing a pattern with integers starting from 1

Ahhh... I get it. So the action I sent either trusts the track numbers or calculates them based on Disc. The second method does not work.

It might be easier to use Actions>Renumber Tracks>From...

Select the discs that are 'joined' and enter from 1.

If this doesn't work for you I could try matching the Work name but as you're not using a standard format I'd need to know the somewhat fixed Title layout before the action is run.

SnowdogPostJune 14, 2023, 08:50
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

Well, I don't actually need to renumber the tracks (in the tracks column). I need to add a number into the title that represents the movement number of the piece itself. So if the piece of music has, say, 50 movements, and 25 of them are on Disc 1 & 25 are on Disc 2, the track numbers will go 01-25 for each disc, but the movement numbers in the titles will go from 01-50 across both discs.

In the screenshot above:
The 00 in the title of Disc 140, Track 38 will be 38.
The 00 in the Title of Disc 141, Track 01 will be 39, etc.

It's the same as the roman numerals one you wrote for me, I think, except with integers. It just adds a number into the title of the tracks that are selected, starting from 01.

Essentially, it has nothing to do with the track or disc numbering at all, just the number of titles selected.

I don't think it's any more complicated than that. (He says!)

The one you sent earlier had a great set of options (especially being able to replace or follow a pattern. That gives me an enormous amount of flexibility). It's just that, as you say, it's getting its source info from the track & disc numbers which are basically irrelevant.

Does that make more sense?

2MR2PostJune 14, 2023, 10:02
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicReplacing a pattern with integers starting from 1

As far as I can tell the Roman Numeral action does not attempt to delimit classical components...it just inserts Roman numerals.
.... there's a lot of your actions on file here.

The issue here is the Titles are nowhere close to any standard format so I can't trust the decomposition action statement to give me something to latch onto as 'being the same'.

I have a potentially easy solution which will involve you running clumps of tracks and running the same action for each slice.

I've put a newer version of the action at the same link. There are now three means of formatting the 'number' to be inserted. From the track number; calculated from the track number within disc ... and a new one called From 1.

Using these three modes you can select slices of the box set and do them one at a time using the different track options.

SnowdogPostJune 14, 2023, 10:04
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicReplacing a pattern with integers starting from 1

I think I might be a bit rubbish at explaining things. 😆

2MR2PostJune 14, 2023, 10:09
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicReplacing a pattern with integers starting from 1

Simply put, I've added a "00" into each of the titles & I want to replace these with integers padded, in this instance, to two digits.

Ordinarily, I'd just copy the track numbers in, but this time it spans across two discs, as you can see from the track numbering in the screenshot, so it would start again from 01 for disc two. I'd have to change the two album titles to be the same, renumber the tracks, copy them across & then change the album titles back afterwards which, as solutions go, seems like a bit of a blunt instrument.

Select just the files that span the two discs. Run the action with the number being determined as 'From 1'. The inserted numbers will be 1-n ignoring the track and disc numbers.

Pages: 1 2
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.026 seconds.