HTML5.MicIO icon indicating copy to clipboard operation
HTML5.MicIO copied to clipboard

HTML5 Audio Modem or Everything Old is New Again

Open andrew-kzoo opened this issue 11 years ago • 5 comments

I stumbled on this project through a :star: from @zeMirco...

I'm curious if it is possible to port http://www.whence.com/minimodem/ (http://github.com/kamalmostafa/minimodem) from C to JavaScript (or some subset of functionality) to allow communication between a browser and a device connected to the browser's host system's hardware audio port.

Do you have any thoughts on this @kamalmostafa?

andrew-kzoo avatar Mar 24 '14 19:03 andrew-kzoo

Wow! It appears @NeoCat implemented something four years ago: https://github.com/NeoCat/FSK-Serial-Generator-in-JavaScript

andrew-kzoo avatar Mar 24 '14 19:03 andrew-kzoo

Also @sixteenmillimeter implemented https://github.com/sixteenmillimeter/Javascript-FSK-Serial-Generator-for-Mobile-Safari

And @SimonWaldherr implemented https://github.com/SimonWaldherr/FSK-Encoder.js

Incredible and impressive work!

andrew-kzoo avatar Mar 24 '14 19:03 andrew-kzoo

I did notice the FSK modem output through the headphone jack to a micro-controller. Hence why I have yet to add the 'output' aspect to the MicIO library.

However parsing FSK modem signals with javascript is very difficult due to its async nature.

Once I get the microController to HTML5 bus to a stable level, I'll probably fork and merge one of the FSK libraries.

cobookman avatar Mar 25 '14 12:03 cobookman

@andrew-kzoo: Generating FSK is easy, but (as mentioned by @cobookman) decoding FSK is hard. This is why you'll find lots of implementations of FSK encoders, but no so many decoders. Minimodem's decoder relies on a Fourier transform library to prepare the audio data for spectrum analysis. This method enables some fancy functionality in minimodem, but it is probably not the easiest way to implement a basic FSK decoder. I have no plans to port minimodem to JavaScript.

kamalmostafa avatar Mar 25 '14 15:03 kamalmostafa

Thank you @cobookman and @kamalmostafa for your informative responses!

andrew-kzoo avatar Mar 25 '14 18:03 andrew-kzoo