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

Is that a bug with the durations in noteOn? #38

Open
ProgrammingLife opened this issue Feb 5, 2018 · 1 comment
Open

Is that a bug with the durations in noteOn? #38

ProgrammingLife opened this issue Feb 5, 2018 · 1 comment

Comments

@ProgrammingLife
Copy link

ProgrammingLife commented Feb 5, 2018

let pianoTrack = new midi.Track()
pianoTrack.setTempo( 120 )
pianoTrack.instrument( 0, 0 )

pianoTrack
	.noteOn( 0, 'c4', 0 )
	.noteOn( 0, 'e4', 256 )
	.noteOn( 0, 'g4', 512 )

	.noteOff( 0, 'c4', 512 )
	.noteOff( 0, 'e4', 512 )
	.noteOff( 0, 'g4', 512 )

It sounds wrong. Each new note should sounds in the same interval:

.noteOn( 0, 'c4', 0 )
.noteOn( 0, 'e4', 256 )
.noteOn( 0, 'g4', 512 )

Because here we have: 0, +256, +256. Intervals of delay should be equal but it's not. Is that a bug?

@ProgrammingLife
Copy link
Author

ProgrammingLife commented Feb 6, 2018

Ok, I got it. It's just an offset from the last note.

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