Forced-Alignment-and-Vowel-Extraction / alignedTextGrid

aligned-textgrid links textgrid sequences together
https://forced-alignment-and-vowel-extraction.github.io/alignedTextGrid/
GNU General Public License v3.0
6 stars 1 forks source link

[Feature Request]: Time Shifting #172

Open JoFrhwld opened 7 months ago

JoFrhwld commented 7 months ago

What feature would you like added?

There should be some kind of safe time shifting capacity for tiergroups, and textgrids (maybe tiers). A method like this should shift all start and end times by 1 second.

tg.shift(1.0)

I think the lowest, safe, place to implement the method would be the tiergroup, since below that, shifting just a tier without shifting its superset or subset tier would mess up the timing & containment relations between them.

Tiers and Sequences already have .starts and .ends properties, so adding setters for these might be a useful first step.

What would the use case be for this feature?

Ultimately, "horizontal" textgrid or tier concatenation could utilize this.

Would you like to help add this feature?

Yes, and I will submit a pull request soon.

Code of Conduct