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

Adding velocity or time parameter to .addNote() does nothing. #4

Closed
jwktje opened this issue Sep 1, 2015 · 3 comments
Closed

Adding velocity or time parameter to .addNote() does nothing. #4

jwktje opened this issue Sep 1, 2015 · 3 comments
Assignees

Comments

@jwktje
Copy link

jwktje commented Sep 1, 2015

When calling this function the last two parameters are ignored:
track.addNote(0, 50, 32, 0, 32, 127);

The readme says these parameters are able to be given.
The jsmidgen code seems to suggest these parameters are not used.

Can you help me figure out what's going wrong?

@dingram
Copy link
Owner

dingram commented Sep 2, 2015

You're partially correct 😃

The function call you've given as an example has six arguments, whereas the README says that addNote() accepts up to five arguments. As you noted, the code itself doesn't actually accept a velocity argument for addNote().

I'll fix addNote() to accept a velocity argument as the docs say it should. What other argument were you expecting?

@dingram dingram self-assigned this Sep 2, 2015
@jwktje
Copy link
Author

jwktje commented Sep 3, 2015

Oops, yeah. I just typed out that example quickly. The second to last "32" should be ignored. I meant:
track.addNote(0, 50, 32, 0, 127);
Meaning:
Channel = 0
Note/Pitch = 50
Duration = 32 ticks
Time = 0
Velocity = 127

I would love to have the option for a velocity parameter. It seems that it just takes the default velocity set in the code. Is there a way to override this default without changing it the jsmidgen code?

Just wanna also mention, I'm loving this module you've written.
I'm including this module inside a Meteor app and I'm building a crazy insane art installation with it.
It honestly wouldn't be possible without your code, so thanks for making my hobby project a reality

@dingram
Copy link
Owner

dingram commented Sep 7, 2015

Thanks! I've fixed the code, and I'll be looking to release a new version to the NPM repository soon.

@dingram dingram closed this as completed Sep 7, 2015
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