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

✨ real music #16

Merged
merged 5 commits into from
May 7, 2017
Merged

✨ real music #16

merged 5 commits into from
May 7, 2017

Conversation

guillaumecrespel
Copy link
Member

Add library to play real music => https://github.com/keithwhor/audiosynth

rythmbox Playing by character and not by instrument, because, the instrument changed by the character.

@@ -0,0 +1,350 @@
var Synth, AudioSynth, AudioSynthInstrument;
Copy link
Member

Choose a reason for hiding this comment

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

Do you search for this lib on npm ?

Copy link
Member Author

Choose a reason for hiding this comment

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

this lib is not present on npm, and i don't find equivalent

Copy link
Member

Choose a reason for hiding this comment

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

We should fork it (https://github.com/keithwhor/audiosynth) and publish it.
So we can import it trough webpack

Copy link
Member Author

Choose a reason for hiding this comment

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

Just for that ? it's one file, and i think, we don't maintain this lib ?

392, // G
587, // D
const notes = [
'C', // E
Copy link
Member

Choose a reason for hiding this comment

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

Delete commentaries

'bass',
'ocarina',
'harp',
const characters = [
Copy link
Member

Choose a reason for hiding this comment

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

We should pass this from props to avoid duplication

next: (note) => {
const { type = 'sine', frequency, time = 200 } = note
next: (music) => {
const { instrument, note, time = 2 } = music
Copy link
Member

Choose a reason for hiding this comment

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

We should delete default value as we argue before

Copy link
Member

@fabienjuif fabienjuif left a comment

Choose a reason for hiding this comment

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

Nice, some minors commentaries

@fabienjuif fabienjuif mentioned this pull request May 7, 2017
.flatten()
.map(music => Object.assign({}, music, { stop: true }))

const music$ = xs.merge(musicStart$, musicStop$)

const vdom$ = music$
.startWith({ stop: true })
.startWith({ stop: true }).debug()
Copy link
Member

Choose a reason for hiding this comment

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

debug

)
export default ({ DOM$, props$ }) => {
const ranges$ = props$
.map(characters => characters.map(c => isolate(Range, c.name)({
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to map in two instructions, I find it easier to read and explain

osc.connect(context.destination)
osc.start()
osc.stop(context.currentTime + (time / 1000))
// eslint-disable-next-line no-undef
Copy link
Member

Choose a reason for hiding this comment

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

We cand delete the eslint-disable, I forgot it

'ocarina',
'harp',
]
const notes = ['A', 'B', 'C', 'D', 'E', 'F', 'G']
Copy link
Member

Choose a reason for hiding this comment

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

Merge the other PR then move this into the config file ?

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.

None yet

2 participants