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

CUE: Marker & Region #4

Closed
X-Raym opened this issue Jun 5, 2018 · 4 comments
Closed

CUE: Marker & Region #4

X-Raym opened this issue Jun 5, 2018 · 4 comments

Comments

@X-Raym
Copy link

X-Raym commented Jun 5, 2018

Hi,

In REAPER, is seems that there is two type of elements marked by CUE points, markers, and regions.

It seems that wavefile is only able to get marker and region start, not region end.

Screenshot

PS: note that pointes are simply named with an index, contrary to what I can see in REAPER. But this is surely another issue.

Thanks again for this library !

@rochars
Copy link
Owner

rochars commented Jun 6, 2018

Regions will be supported in version 6.11.

As for the name of the points, do you mean the text associated with each point? If so, they are stored apart from the points, on "labl" chunks inside the "LIST" chunk, one for each point. the "dwName" property of each point is a unique index used to link the point with its label (among other things).

Cheers! :D

@X-Raym
Copy link
Author

X-Raym commented Jun 6, 2018

@rochars Good for region support ! :)

And thanks for the LIST infos !

Here is for eg a code snippet to get a list of all markers names:

for( let id in wav.LIST) {
	for( let sub_id in wav.LIST[id].subChunks) {
		console.log( wav.LIST[id].subChunks[sub_id].value )
	}
}

(of course, other types of array loops could have been used).

Surely, a function like UpdateMarkerName( dwName, str ) could be written with the .find array method.

Cheers !

@X-Raym X-Raym closed this as completed Jun 6, 2018
@rochars
Copy link
Owner

rochars commented Jun 11, 2018

Regions are now supported.

You can update a cue point label with WaveFile.updateLabel(dwName, label). It goes like this:
wav.updateLabel(2, "new marker text");

Cheers!

@X-Raym
Copy link
Author

X-Raym commented Jun 11, 2018

@rochars nice, thanks !

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

No branches or pull requests

2 participants