Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAV / Non-loop cue point #106

Closed
Zeugma440 opened this issue Aug 3, 2021 Discussed in #105 · 9 comments
Closed

WAV / Non-loop cue point #106

Zeugma440 opened this issue Aug 3, 2021 Discussed in #105 · 9 comments
Labels

Comments

@Zeugma440
Copy link
Owner

Discussed in #105

Originally posted by maximeferrieu August 3, 2021
Is there a way to detect one-shot embed markers (cue-points) and not only loop regions?
They don't seem to appear in the Track.AdditionalFields

Thanks for your anwser!

@maximeferrieu
Copy link

Do you think this would be possible to also retrieve the name of those markers/regions?

@Zeugma440
Copy link
Owner Author

Well yes. Hopefully you've said that because these names are contained in a different data structure.

@Zeugma440
Copy link
Owner Author

@maximeferrieu Could you provide me with a sample to test with ?

@maximeferrieu
Copy link

maximeferrieu commented Aug 3, 2021

@Zeugma440 Sure, here is a silent .wav with markers and regions, with different names

@Zeugma440
Copy link
Owner Author

Zeugma440 commented Aug 4, 2021

@maximeferrieu thanks for the sample. Almost there, but I have a question for you.

Right now, all the info is detected and put into AdditionalFields. However, the data structure I'm providing to you is very close to the one used within the WAV file. It looks like this :

{[cue.CuePoints[0].CuePointId, 1]}
{[cue.CuePoints[0].Position, 88200]}
{[cue.CuePoints[0].DataChunkId, data]}
{[cue.CuePoints[0].ChunkStart, 0]}
{[cue.CuePoints[0].BlockStart, 0]}
{[cue.CuePoints[0].SampleOffset, 88200]}
{[cue.CuePoints[1].CuePointId, 2]}
{[cue.CuePoints[1].Position, 176400]}
{[cue.CuePoints[1].DataChunkId, data]}
{[cue.CuePoints[1].ChunkStart, 0]}
{[cue.CuePoints[1].BlockStart, 0]}
{[cue.CuePoints[1].SampleOffset, 176400]}
...
{[info.Labels[0].Type, labl]}
{[info.Labels[0].CuePointId, 1]}
{[info.Labels[0].Text, MARKEURRRR 1]}
{[info.Labels[1].Type, labl]}
{[info.Labels[1].CuePointId, 2]}
{[info.Labels[1].Text, REGGGIOOONN 1]}

=> To get the label of a given cuePoint, you have to manually match CuePoints to Labels using the value of CuePointId as a pivot.

If I wanted to implement something more intuitive for you, it would require to use dedicated objects instead of simply putting strings into AdditionalFields, which will require much more time.

Is what is displayed above good enough for you, or are you unfomfortable enough to need something more straightforward ?

@maximeferrieu
Copy link

maximeferrieu commented Aug 4, 2021

@Zeugma440 Well this is already super nice, and I think I can easily sort all of those infos in my project, so for that, thank you very much 🙏
Maybe at some point, it would be nice to just call something like track.CuePoints or track.Regions and have everything sitting nicely in an array, but as you said, this will require a lot more work. If you have the time and envy, you are more than welcome but for now, this will do the job just nicely.

Again, thank you very much!

@Zeugma440
Copy link
Owner Author

Thanks for your understanding. I still have some minor stuff to improve on the unit tests, which shouldn't take much time.
Expect a new version of the library to be released before saturday.

By the way, I just realized you're a video game music composer ! :-O
Being myself a huge fan of game, movie and anime soundtracks, I'm super glad I could help you personally ^^

@Zeugma440
Copy link
Owner Author

Fixed in today's v3.23

@maximeferrieu
Copy link

Hey @Zeugma440 thank you very much for your work, i'll test it soon.
yes i'm doing music for games, and this library helps me to create much more complex music sync/triggering systems in Unity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants