- From: Grant Galitz <grantgalitz@gmail.com>
- Date: Sun, 22 May 2011 13:54:39 -0400
- To: public-audio@w3.org
- Message-ID: <BANLkTinw0esBG7X8AD5RaDw9QaEGMJ6H+Q@mail.gmail.com>
---------- Forwarded message ---------- From: Grant Galitz <grantgalitz@gmail.com> Date: 2011/5/22 Subject: Re: generating sound with createJavaScriptNode in an emulator To: Antonio José Villena Godoy <_@antoniovillena.es> Just create a function or lib of your own that does the sample generation and then uses my lib to output them. I made the library as a base library that other libraries can use and extend. For instance, I purposefully left out a mixer capability, so that you have control over the mixing rather than me. If you look inside my gameboy emu, you'll see I do additive mixing and have audio do things like x frequency at y volume stay for z amount of time (with freq. and volume sweeps, etc.). I purposefully let the developer have control on his/her audio completely so that I do not restrict the capabilities here, and so I don't have library bloat. 2011/5/22 Antonio José Villena Godoy <_@antoniovillena.es> > > Hello Grant > > I have read your code. It's a good library, I would like use in my > emulator, now I am trying to understand how it works. My idea is extend your > library to support 1-bit samples. That is, instead of write samples like: > [0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0] > You can write a RLE (or code the length of pulses): > [3, 5, 4] > I think that would be quicker that resampling. > > Regards > > El 22/05/11 1:11, Grant Galitz escribió: > > Antonio: Have you tried using my XAudioJS library for your audio output, >> since it also does the mozilla audio data api and not just web audio. >> Also, you are welcome to help commit changes to it, since I feel like >> we're always re-inventing the wheel here. >> >> github: https://github.com/grantgalitz/XAudioJS >> >> fyi, I just updated the readme to document some of the API, so people >> won't have to look at the source to see how it exactly works. It does >> things like resampling your audio to the hardware's sample rate for you >> so you don't need to muck around with that. Simply put, it does an audio >> buffer ring for web audio if you're wondering. >> > > > -- > , _ _ __ ___ _ _ > /_\ _ _| |_ ___ _ _ (_)___ \ \ / (_) | |___ _ _ __ _ > / _ \| ' \ _/ _ \ ' \| / _ \ \ V /| | | / -_) ' \/ _` | > /_/ \_\_||_\__\___/_||_|_\___/ \_/ |_|_|_\___|_||_\__,_| >
Received on Sunday, 22 May 2011 17:55:07 UTC