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

Iterating over events in musical time #177

Open
mward19 opened this issue Feb 4, 2025 · 0 comments
Open

Iterating over events in musical time #177

mward19 opened this issue Feb 4, 2025 · 0 comments

Comments

@mward19
Copy link

mward19 commented Feb 4, 2025

I can't figure out how to "iterate in musical time over the music tree".

After reading the documentation on ly.music, I cannot seem to decode what is meant by the phrase "Using the Music.events() method and the events module, it is possible to iterate in musical time over the music tree, e.g. to convert music to another format.". This is precisely what I want to do.

At first, I assume that Music.events refers to ly.music.Music.events(). Well, ly.music.Music.events() just calls ly.music.event.Events.traverse(), which itself seems to call ly.music.Music.events. This seems to be recursive. Why does ly.music.Music.events() take as parameters e, time, and scaling? What do they mean? Is e an ly.music.event.Events object? Because if so, I can't figure out what it's doing besides returning a number. It doesn't seem to be able to record anything about what it's traversing.

I would love to use this library to avoid reinventing the wheel, but I can't seem to figure out how it works from the documentation.

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

1 participant