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

Using jQuery events allow a song to be played from an array #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lbadger
Copy link

@lbadger lbadger commented Oct 29, 2020

First parameter is the note or key and the second is the length

$.song(['t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','y:200','p:200','y:200','p:200','y:200','p:200','y:200','p:200','e:200','p:200','e:200','p:200','e:200','p:200','e:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','t:200','p:200','y:200','p:200','y:200','p:200','y:200','p:200','y:200','p:200','e:200','p:200','e:200','p:200','e:200','p:200','e:200','p:200',' :500'
]);
$.song(['5:500','5:500','6:500','8:500','8:500','6:500','5:500','3:500','1:500','1:500','3:500','5:500','5:500','3:500','3:500','5:500','5:500','6:500','8:500','8:500','6:500','5:500','3:500','1:500','1:500','3:500','5:500','3:500','1:500','1:500','3:500','3:500','5:500','1:500','3:500','5:500','6:500','5:500','1:500','3:500','5:500','6:500','5:500','3:500','1:500','3:500','1:500']);

Here is an example!
https://youtu.be/zXBV3eu4Z-A

Copy link
Owner

@Externalizable Externalizable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +258 to +262
setTimeout(() => {
var e = jQuery.Event("keyup");
e.key = key;
$(document).trigger(e);
}, delay);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange indentions here

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

Successfully merging this pull request may close these issues.

None yet

2 participants