autogica / atgc

My side project, a game written in javascript. The "blog" is in the /issues
GNU General Public License v3.0
1 stars 0 forks source link

atgc-core-music: put some background music, maybe using Soundcloud? #14

Open jbilcke opened 9 years ago

jbilcke commented 9 years ago

It would be nice to have some background music. Ideally, we would produce, host or pay for our own stuff, but right now there is nothing so we have to use free resources.

So for starters I think we can just embed the Soundcloud player in the webpage.

I've read their conditions, since ATGC is free and non-commercial normally we are allowed to do it as long as we provide the Soundcloud logo, and author's name for each track etc..

However Soundcloud put a "god mode" reserve in their legal conditions, basically they can decide we shouldn't have access and cut the stream at anytime without reason. Maybe that's fair, so in this case, it is also fair that we use it until as they change their mind

https://developers.soundcloud.com/docs/api/html5-widget https://developers.soundcloud.com/docs/api/sdks#javascript

jbilcke commented 9 years ago

I think, it could be possible to create some dynamic music (eg. with the drums getting more quiet when the camera is far from the robots/factories/city centre etc..)

using some MIDI / JS libraries (and soundfonts)

it's quite messy, different generations of libs are present (some 4 years old, other using vendor-specific APIs etc..) but maybe there is something to try

https://github.com/skratchdot/timbre.soundfont.js/ https://github.com/gasman/jasmid https://github.com/mudcube/MIDI.js .com/gleitz/midi-js-soundfonts

at worse, we could play 4/5 mp3 tracks, and just reduce the volume on some (never stop them: I'm not sure browsers could handle the re-sync)

jbilcke commented 9 years ago

working on some soundtrack right now.. using only soundfonts. It is a bit dry for now (quite monophonic, no effects or filters at all) because I want to keep it minimal, to see if it can be converted as a simple MIDI + SF2 in the game

jbilcke commented 9 years ago

I made a list of experimental techno / alternative / ambient electronic tracks that are in the spirit of the game, for inspiration:

http://open.spotify.com/user/flngr/playlist/4dXdLZMWHvCnqBApiZAXMT