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

Feature: WebAudio Support #31

Closed
Technohacker opened this issue Jul 13, 2017 · 10 comments
Closed

Feature: WebAudio Support #31

Technohacker opened this issue Jul 13, 2017 · 10 comments

Comments

@Technohacker
Copy link

Hello :)
First of all, excellent library :D

Bringing this JS library to the browser stage will be really nice (browser live coding/jamming sessions anyone?). And since the WebAudio API has support for MIDI, it would be a good fit.

I could try implementing this and making a PR but just wanted opinions :)
Cheers!

@Partysun
Copy link

@Technohacker , Do you plan to make the connection between midi devices and this library or make a real time sound generation?

@walmik
Copy link
Collaborator

walmik commented Jul 18, 2017

Another way to look at it is to use Scribbletune in conjunction with another lib that already has the web audio api abstracted away nicely.. for eg. Tone.js which is a pretty robust library already https://github.com/Tonejs/Tone.js

I had tried bringing Scribbletune to the browser with browserify and it worked great! Since Typed Arrays can be used in the browser, I think this should be doable.

The additional work would involve making the midi method in Scribbletune to export binary data (not fix it to a MIDI file) and feed that to something like Tone.js

@walmik
Copy link
Collaborator

walmik commented Jul 18, 2017

I hope its fairly obvious, what @Technohacker has (knowingly or unknowingly) suggested via this thread is the not-so-distant future of music production... where everything is in the browser with real time collaborations from scripters and musicians! Some folks are already doing it.. for instance take a look at Soundation They dont use neither Scribbletune nor Tone.js but they ve put together something pretty impressive! I m sure folks from Ableton, Properllerhead, Cubase etc have already begun experimenting with this thought albeit in stealth mode coz there s no real news about it... If we can create a free open source alternative before them, we can give them a run for their money! :D

@Technohacker
Copy link
Author

@walmik @Partysun Yes, I meant music production in the browser. Nice to see progress :D

@hrgui
Copy link

hrgui commented Jul 19, 2017

@walmik how about using MIDI.js?

https://github.com/mudcube/MIDI.js

@walmik
Copy link
Collaborator

walmik commented Jul 19, 2017

Absolutely! I love MIDI.js!

Scribbletune is just a declarative way to make the music part easier (scales, chords, patterns etc). Abstractions to web MIDI & Audio APIs are certainly the bigger & indispensable part of the rails.

@walmik
Copy link
Collaborator

walmik commented Jul 19, 2017

I think we ve established that Scribbletune doesnt need to have direct support for Web Audio. An abstraction of the Web Audio API should be used in conjunction. Same applies for hooking up MIDI devices to the browser. Thanks for your ideas & comments @Technohacker @Partysun @hrgui Closing this issue now :)

@walmik walmik closed this as completed Jul 19, 2017
@hrgui
Copy link

hrgui commented Jul 20, 2017

for an example of how scribbletunes can be possibly used with Web Audio API, here's an example (keep in mind its very rough):
https://github.com/hrgui/midi-test-playground/blob/master/index.js

also since scribbletunes does have a dependency on fs, in order to use it in webpack i had to do something:
https://github.com/hrgui/midi-test-playground/blob/master/webpack.config.js#L10

@Technohacker
Copy link
Author

@walmik Good to hear :)

@MaximeMaillet
Copy link

MaximeMaillet commented Jul 20, 2017

timidity for translate .mid to .ogg + EventSource + nodemon and you can set your files with preview in real time.

https://github.com/MaximeMaillet/musicnodejs

Just for play :)

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

5 participants