Open xobs opened 7 years ago
It looks like the Chibitronics modulator uses lamejs for MP3 encoding. lamejs is licensed under LGPL, which does not work for us. I will look into finding an alternative.
I would be curious to know what you find.
I wrote it such that the LGPL library isn't linked in at compile time, and is instead only loaded at runtime. Even so, I can see why it might not work for you.
I'm not an expert or a lawyer, but it looks like the act of encoding data to MP3 is still patented and we need a patent license. So, no matter what license the encoding library uses, the act of encoding itself is still not allowed unless we obtain a patent license and pay royalty.
We will ask our legal team for guidance.
Meanwhile, we can implement downloading the .wav file for IE and ask users to play it from their desktop
@xobs I have opened a small PR on the modulator repo, to make it easier for MakeCode to get the WAV data and create a downloadable .wav file that the user can play locally. This would be for the IE workaround until we get a response from the legal team about MP3 encoding.
Thanks. I merged that and bumped the version to 1.0.4, since it's a non-breaking API change.
Did the changes make it to 1.0.4? My installed chibitronics-ltc-modulate
indicates version 1.0.4, but it seems the changes weren't merged
You can look at the "about" dialog -
No, I meant the new chibitronics-ltc-modulate@1.0.4, not pxt-core or pxt-chibitronics
It looks like the PR https://github.com/chibitronics/ltc-npm-modulate/pull/1 wasn't merged, so the changes are not in the 1.0.4 release of the modulator
Workaround is now live; IE downloads a playable .wav file.
We're still waiting to hear back from CELA on MP3 encoding
Quick update: our CELA contact came back from vacation last week and is looking into this
@guillaumejenkins update on this?
All of the patents on MP3 should have expired by now, and we have users who use IE11. What's the status of this issue?
We have received confirmation from legal that we are free to encode to mp3. The only thing remaining now is finding a library with a friendly license. Unfortunately, everything we've found so far is GPL, or pretends it's MIT while bundling the lame library (which is GPL).
Do you know any true MIT, Apache2 or similarly licensed web library that can generate mp3 audio?
I don't know of any other JS-compatible liberally-licensed implementations.
Does the fact that it does runtime linking to the code by injecting an iframe help things at all?
Can we check with legal if we can get around the GPL restriction by dynamically linking it from a public CDN. That way no source is stored in our repo, and it's dynamically added via JS on IE11.
I sent an email to legal. Will update with their response.
It might be possible, awaiting further clarifications
Thanks for the explanation. This is an unusual usage scenario – dynamic loading of the LGPL-licensed library from a third party CDN to generate MP3 sounds on the customer’s machine when they visit our website. I am not sure that this is even cloud usage because the OSS is called dynamically at runtime by the user. I don’t think this usage requires an OSS registration and would be acceptable. If we ever decide to move the library to a Microsoft server then it would be considered cloud usage and would require registration.
Based on their response, it looks like we might have the green light. However, since we would be loading 3rd party code from a 3rd party CDN, we should compute the SHA of the library and check it at runtime after downloading.
Ok, new guidance: we must go through the OSS registration. The lamejs
library from https://github.com/zhuker/lamejs is a no-go, because of the GPL nature of the codec it uses. Linking at runtime is not ok for GPL, it's only acceptable for LGPL. We have to find an alternative and go through the OSS registration process.
After doing some research, all JS solutions currently use the lame library (which still uses the GPL codec, MPG123). Until we find a non-lame solution, CELA will not agree.
The audio modulator defaults to .wav, because it is low-power and cross-platform.
However, IE11 does not support .wav, and instead must use MP3.
If you specify audioFormat='mp3' on IE11, the audio modulator will gain IE11 compatibility.