axeldelafosse / stemgen

🎛 Stemgen is a Stem file generator. Convert any track into a Stem and have fun with Traktor.
https://stemgen.dev
MIT License
207 stars 39 forks source link

[Feature Request] traktor4 metadata #14

Closed kartguru closed 1 year ago

kartguru commented 1 year ago

In the metadata extract you can see a traktor4 tag is extracted and written to the metadata.txt file. I found a page outlining it's contents here - Decoding the traktor4 field.

Can you see any complications in having the converted stems file using the original traktor4 tags? If not, are you able to copy the source traktor4 tags to the newly created stems file? Thanks for considering @axeldelafosse

axeldelafosse commented 1 year ago

Hey @kartguru,

That's a good request! I already tried to share the TRAKTOR4 tag between regular and stem files without any luck. I'm not sure I understand why Traktor isn't happy but it seems to ignore the tag and re-create it, as if it was corrupted. You can run your own experiments with a tag editor like mp3tag if you want.

Keeping this request open. I'd love to chat with someone from the Native Instruments team to learn more about this.

stathius commented 1 year ago

@kartguru Thanks for the link, I was under the impression that the TRAKTOR4 internal format was proprietary and undisclosed. @axeldelafosse What type was your source file for the TRAKTOR4 tag? I was trying to compare how traktor stores TRAKTOR4 in mp3 vs m4a.

axeldelafosse commented 1 year ago

Hey @stathius! It is proprietary but it has been reverse engineered. We can decode it but we can't encode it.

I don't remember exactly, I think I tried on multiple formats (most likely lossless: WAVE, AIFF and FLAC) and then on stem files (ALAC stored in stem.m4a like this script generates). Please share your findings here!

axeldelafosse commented 1 year ago

A good workaround for this would be to let Traktor write the TRAKTOR4 tag by using the collection.nml file:

Should be pretty easy to do with https://github.com/wolkenarchitekt/traktor-nml-utils but I haven't tested it and I'm not confident about the behavior of Traktor re: writing and/or updating the tag.

stathius commented 1 year ago

@axeldelafosse I have tried this and it works fine, the collection.nml metadata seem to have precedent over the tags in the file.

axeldelafosse commented 1 year ago

Sweet! I'm closing this issue then. We can follow up on another issue or pull request if someone want to share this script here :)