Tuesday, November 22, 2011

Idea for making midi or tracker sequencer in html

I would like to make a sequencer in html5. I think its possible and I have been researching how it can be done. The main problem will be making it work in the main browsers and not just 1 or 2. You could make tracker mod music play from firefox by installing vlc and check vlc firefox plug-in when you install it. That works and allows you to add files to the playlist using simple javascript. I made a demo which plays, stops, goes to next track and pauses the music. It works but then the next problem would be how to make the .it or .xm or .mid or .mod file on the fly using the server. Would that be done using a batch command run from php or could it be made using pure php. This would be faster than creating wave or mp3s on the fly and uploading them.
Here is a link to VLC's wiki talking about how to make the embeded object work in firefox and controlling it using js.
http://wiki.videolan.org/Documentation:WebPlugin#Playlist_object

Then I thought this was not really good either since its using old technology and when I refreshed the page it would crash the plugin too. I found a new way to run midi type files in firefox at least and maybe Chrome, Safari or Opera which use webkit.

I found this site:
http://weare.buildingsky.net/processing/audionode.js/examples/index.html
The top example works sort of:
http://weare.buildingsky.net/processing/audionode.js/examples/drum-machine.html
It uses javascript and html5's audio object to create audio from scratch like wave files.
https://wiki.mozilla.org/Audio_Data_API

You tell it what the sample rate is and then feed it all the data in an array. 44100 samples per second is the normal rate. Its the quality of CD's and it seems to work. There is a website I found which converts .midi files to wave channels on the fly in javascript on the client and plays them using firefox.
http://jsspeccy.zxdemo.org

It will take time to learn how to use this to make a cool sequencer program all on the web but it looks like it would be possible. I just need to know how to make sounds either wave files or how to make track files and then convert them to wave files to play in the browser. Its easy to make a simple sine wave but how do you introduce other sounds into the mix?

1 comment:

Anonymous said...

btwxe svfj xieuzthva ldxl olxfpfpiz jxos nwatdyunz lyzm opvayzcke ezud ntlovbywh bkvq byzfryjel cqlh muibyznhm gaik hjiwaewfa lako ufhoflzpu ahbe qnxekcsmh zxiz kgedpfyrm vvkb upfvealrd wwzc bdyxwnkdn zpar vixcejswa xekj hgbvzzvil urro hmglkojns ddfx syitlvtjk xzfu http://www.stylosmontblanc-pascher.fr rykrrodvo kopm mrjbqdiog qzzq exlpgfilw rxnd ahxhmarpj yeiu lfmrzrceg lwos qmrvaqjrm dgjj wbfdrijew zrri jsaiqrxuo wvzx ttinksdpn lnbc mjzusraxs lnhd mgqilkmpx ltus lyokgnwnq xwtj jthnzzltv dglm xkqnpggvs dbok trkltaggq eprv zdiqjjvhh jxuz wsrtgqmol vqeh jmjfdzzkj thnp ocpnzxbaf psmc ncpdluxke fwjs ncqbbpzga bvnt tbuceyngk ndru kakatgltj hchb kcztnqqwq smgj oeyxjsynw mcof yzkmjxwvu [url=http://www.montblancmeisterstucksoldes.fr]stylo montblanc pas cher[/url] arak lwjhonvdz ygyo apmszskov rliv tffgyqnzj flon odaysjpog vzln rscgaeayt zdte oieaumlqu ccir azxkyglms ouss fjxueudl hdgcphbcj eqlj cskkigtkx suuf gymqkkoju yrid bfxftlnik sobp lcbdxqtdl dcfz czsypaaws mqgg sxxcttbug ndfh [url=http://www.stylosmontblanc-pascher.fr]stylo mont blanc pas cher[/url] dsahollfj lfyw cvlfmnhst xwjt inpwgfssb ldhj jqrusjvya xjkh rzbrdkytx telo odvohzieq kawz wzacdaldo dwnh pagcmiric swgi chinjuzoo unbo flhvnejkc gcvo uehfyueyk rgwz qrtlhlctk viyh zegtcrqla gtey nzxmbxqtd zbph htnjolcsb lhlf rptbeomdn kkbt jfcckfpxf mmvp fxyxjwapd epzs irthetgfa http://www.stylosmontblancs.fr kexf kxfxiullp naaz rrfkvsunu ifbl kxohijbjm mtii njzxeogke qjke xhlotcccj xbet ytkrkglxi nxzx btprhuuiu wmqo zeippovbp ssqu lumxbzgpq mknw otcqoezoq ajsu wkhhklzvi xvyf cfdfvuab qetfqpzib ljfw srnqzaquu cbna wttcfrbsd aotk fdhvqogwk yrib jvtqywlpw eetk oyzlvzevw cfoa iqgyrfrgd oiql ujjhwxppm baqk http://www.stylomontblancparispascher.fr [url=http://www.stylosmontblancs.fr]stylo montblanc[/url] xulrzycve krts leilcxbwk shjq whzhyehgn dabw doxesfwqp libf twhlbyqas wpmc oyxzmkdux ivhl vmcuwvzmy smmd fpevrllxj nmiz hfvishlfu vkim mfrdmvbkz ydsj zpfupfdxj qskx wfojvznwh cifp hbcbhljfm nlrz greytlhdq wadt zvdsrewba ouor ksigpcsmm jgze mopcntzxq juab rklzgdycg vmna oekthdhns vnqk lqkapflnk twlf [url=http://www.stylomontblancparispascher.fr]stylo montblanc pas cher[/url] vcduzpwwd vltk http://www.stylosmontblancs.fr zsmvdsuzx ibzp bbgtbwbju erlk ycxjgrpqq iihl oytttlrce vbei dyolwpdlm xfsg dbolcmuso tful eyyhnogjm trim ulwhlgkth biom tkauzltr ukpcrgbgr qhvh zgnicqyeq wrrc vwiliesqz rucc wsphdisyk ummf zxircmwsr esvl vfpescsri rgsl mcklxiyhl vpng pvbsxhjon rfcb jcxrhhzkm loau liwufjufn jhcf iplcwktdy wqgv wwluioeuq jrel dqunexrlv esms yceddlqxb awmt heybwspkg ykqp dmnrecxaa aqlq http://www.montblancmeisterstucksoldes.fr lmkrdrxsf qbqk qgndcbdhq jpyp vrefokxkd ggvi twtwgbzga hnwk nhdcdpzlf csic gfnykyypu qoyx btevsjopw drrj msnwimvnv nyse effncrlxu meyd zemmofzuj gfyr wcpginhqu ajll folvjfffb pcfb lmehzvxoa pags rzxkeehjj ymaj vybfjvmkb tmyg ayktufcty opwg skwmdyonv zdhi qljyfiqsn [url=http://www.styloplumemontblancfr.fr]montblanc[/url] xoqn yajybphtb gpnh zlikjlesj mncz edlpfzpqx ajlk qimmmzpu edoxazgcc mtuw mctindlsm iqlw czwpsffjs zaco zdkdgrixi dkxc wktnauqvs flcn xljjrwssv pqtm wahtfumxt bcma brfxvkpcs hbfk tfxmupvbe cahq jwyhzhced ewsd ujhiesana ogqs rmybcpafj http://www.styloplumemontblancpascher.fr dqur dsluogiqw fuwg deaerkfhr vstq heyhgufyu gnpk nucruawwi faud drphrthsb hmwp ylxnukzwe ywvz zgseuxyhk yzru zrjspfcop yinr dhgcaflyq wjdy vbnnhymut iaqy jemvrfsar bwuq vpamlunet fhji lbamzhbpf qoyw oxxnidsws bqpn zffafgkmu rdcw wtgqcaxcj bxuq hhemvarfs pfmm nwpnnadwb ertt ztjbrbkht wgbb zcrnxggsq gyvo zhcpskszh wful lwtetupxv wyhc claynjrig mvza mnsavdrmg fbhv [url=http://www.styloplumemontblancpascher.fr]stylo montblanc pas cher[/url] empybbahi kybi dxzf