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

Starting new audio lib #1248

Merged
merged 11 commits into from
Nov 23, 2015
Merged

Conversation

alexjsmac
Copy link
Contributor

Not ready to merge but feel free to try it out.

@CelticMinstrel
Copy link
Contributor

This seems like a good step. I assume you plan a lot more new blocks.

@alexjsmac
Copy link
Contributor Author

Awesome 👍 and indeed I do

@dethe
Copy link
Member

dethe commented Nov 10, 2015

I want to play with this but am not sure where to begin. Can you post a Gist (or add example or more) which exercises the new blocks to give a starting point and reference?

@alexjsmac
Copy link
Contributor Author

@dethe For sure I'll do that right now

@dethe
Copy link
Member

dethe commented Nov 11, 2015

👍

@alexjsmac
Copy link
Contributor Author

As of tonight we now have chords, check out gist ea53332c53d85fbb7a7d for a quick example

@dethe
Copy link
Member

dethe commented Nov 12, 2015

Sweet! Sounds great.

@CelticMinstrel
Copy link
Contributor

I don't know how to use that hash to find the gist. Isn't there a way to actually link to it rather than posting the hash?

Also, I don't see anything in the diff that suggests chords. Did you not commit that yet, or did I miss it?

@alexjsmac
Copy link
Contributor Author

You can load a gist with that hash. The chord was made with several note blocks that execute at once so you wouldn't see a reference to chords just in the code.

@CelticMinstrel
Copy link
Contributor

Oh, you mean it's meant to be used in the Waterbear interface itself? I was trying to view it on GitHub.

Maybe I'll check it out at some point, then.

@alexjsmac
Copy link
Contributor Author

One option for composing a bit of music is using Music Macro Language (https://en.wikipedia.org/wiki/Music_Macro_Language). Pretty easy syntax to pick up.

@CelticMinstrel
Copy link
Contributor

The MML block doesn't seem intuitive to me (who will know what MML is?). Also, Wikipedia seems to be unclear on whether MML can make chords.

@alexjsmac
Copy link
Contributor Author

Yeah it definitely involves a learning curve but it's just one option. Simple enough to learn the basics quickly. I am having trouble getting notes to play one after the other without it.

@dethe
Copy link
Member

dethe commented Nov 16, 2015

If we have to go the way of embedding a mini-language I would prefer to go with something more well-known like ABC (https://en.wikipedia.org/wiki/ABC_notation), but ultimately we should hide the details behind blocks, at least until we add support for quick expression blocks ( #192 ).

@CelticMinstrel
Copy link
Contributor

I think you misunderstood me. It's not the choice of MML that I'm complaining about, it's the interface of the block that doesn't do a good job explaining what you're supposed to put there.

@alexjsmac
Copy link
Contributor Author

Okay this is ready to be merged now, except that I haven't figured out how to get the new audio icons to fit right/appear at all in the wb-value's and wb-expression's. Maybe someone could shed some light on that?

@alexjsmac
Copy link
Contributor Author

Here's a gist to show how to write melodies out: 6cbf5a2509ceb1ffd81b

@CelticMinstrel
Copy link
Contributor

Okay, so the note blocks and such write to some sort of "temporary buffer" which is used by the play block?

Regarding the conflicts to be resolved, I've already merged them in my local copy, so I could push them as soon as @dethe gives the okay. Unless he'd rather do it himself.

By the way, how do you do chords with this? The previous gist on that appears to be out-of-date.

@dethe
Copy link
Member

dethe commented Nov 21, 2015

@amaclean199 Whenever there are known issues (like the icons) in a PR, go ahead and file an issue for them (if there is more than one known issue, file one each) and reference the new issue(s) in the PR.

// canvas/stage stuff
var _canvas, _ctx;
var song = "o4 l4 V12 ";
Copy link
Member

Choose a reason for hiding this comment

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

Is song needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah just need to set it up with those parameters specifying the octave, default volume, and volume before notes begin being added.

@dethe
Copy link
Member

dethe commented Nov 21, 2015

@CelticMinstrel: I've been letting the assignee push the final merge, but could you push your changes that resolve the merge conflict into this PR branch?

@CelticMinstrel
Copy link
Contributor

Sorry, that would require me to have write access to @amaclean199 's copy of the Waterbear repo, so I can't do it. That said... I didn't actually get any conflicts when I merged (not sure why github says there are some), so it shouldn't be too hard for him to do it himself.

@dethe
Copy link
Member

dethe commented Nov 21, 2015

@CelticMinstrel You can make a pull request targeting @amaclean199 's repo and branch, or he can just merge in from master, either way is OK with me.

@alexjsmac
Copy link
Contributor Author

@dethe both keyboard.js and ndict.js were requirements for the keyboard block and were provided by Timbre so I just dropped them in lib. Does that affect how we consider the comments you made on them?

@alexjsmac
Copy link
Contributor Author

By the way, how do you do chords with this? The previous gist on that appears to be out-of-date.

I have repurposed those not blocks for melodies. I was thinking I would make a chord block.

@alexjsmac
Copy link
Contributor Author

So do you want me to merge even with the audio icon issue still open ( #1288 )?

@CelticMinstrel
Copy link
Contributor

A chord block might be fine, though I wonder how you'd do it. Logically, a chord is simply a set of notes just like a melody is a set of notes.

And then, what about counterpoint? It's not uncommon to want to play two different melodies simultaneously.

alexjsmac added a commit that referenced this pull request Nov 23, 2015
@alexjsmac alexjsmac merged commit f380680 into waterbearlang:master Nov 23, 2015
@alexjsmac
Copy link
Contributor Author

Fixes issue #825

@alexjsmac
Copy link
Contributor Author

Fixes issue #1189 too

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

Successfully merging this pull request may close these issues.

3 participants