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

How is note duration encoded #8

Open
dorienh opened this issue Nov 12, 2018 · 2 comments
Open

How is note duration encoded #8

dorienh opened this issue Nov 12, 2018 · 2 comments

Comments

@dorienh
Copy link

dorienh commented Nov 12, 2018

I noticed that you only save pitch in the input encoding, but the generated output has notes of different duration. How is this decided?

@brannondorsey
Copy link
Owner

Hi Dorien,

This approach quantizes time into coarse timestep intervals and outputs either one note playing class or all notes off for each time step. In this way, duration isn't actually encoded in the output, but rather, the duration a note is played for can be derived from the output. If a note is predicted to be on for four timestamps in a row, rather than outputing four note on events, this implementation will output one note on event, and then leave the note playing for three more timesteps before resting the note. To see how this works technically, see this function.

Here is a gif that might help in understanding this encoding, as well as a blog post I wrote. Its been a while since I've read this code, but let me know if you have anymore questions.

@cristianmtr
Copy link

So there's no difference between a long note 2 bars and two notes of the same pitch of 1 bar each?

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

3 participants