Can You Legally Publish a Decoder for PianoDisc’s Obfuscated MP3/MIDI Format?

TL;DR – Legal risk depends on jurisdiction, but publishing the decoder could violate anti‑circumvention provisions in the United States and may be permissible in regions with stronger interoperability exemptions.


What the user built

  • The author bought a self‑playing piano from PianoDisc Protigy and purchased a digital album (Erik Satie’s Gymnopédie No 1) that is delivered as an MP3 where the right audio channel encodes MIDI using a 2004.5 Hz square‑wave carrier, while the left channel carries accompaniment audio.
  • Using the LLMs Astra and Fable, the author reverse‑engineered the format, discovered a set of decoy notes that obfuscate the MIDI stream, and generated:
    1. A Python encoder that adds the decoy notes and embeds the MIDI into the MP3.
    2. A decoder that strips the decoy notes and extracts a clean MIDI file.
  • The question posed on Hacker News: “Am I allowed to publish the decoder? The encoder?”

Key legal concepts

Concept Relevance to the PianoDisc case
Copyright The underlying musical compositions (e.g., Satie) are public‑domain, but the specific arrangement and the binary format are likely protected as a copyrighted work.
DMCA anti‑circumvention (US) Adding, removing, or bypassing the decoy‑note scheme may be considered “circumventing a technological measure” that controls access to a copyrighted work, which is prohibited under 17 U.S.C. §1201.
Effective technical measure Commenter Giefo6ah notes that the decoy notes could be treated as an “effective technical measure” under the DMCA, making distribution of a tool that defeats it potentially illegal in the United States.
EU Digital Markets Act / Interoperability exemption In Europe, the Digital Markets Act provides a limited exemption for reverse‑engineering aimed at achieving interoperability. This could protect the decoder if the author’s purpose is to make his own files play on the piano.
Australian reverse‑engineering law Australia explicitly permits reverse‑engineering for interoperability, suggesting the decoder would be lawful there.
Terms of Service (ToS) If PianoDisc’s purchase agreement includes a clause prohibiting reverse‑engineering or redistribution of any derived tools, violating that clause could expose the author to breach‑of‑contract claims.
Patent considerations No patents were mentioned, but if the encoding scheme is patented, publishing an implementation could infringe the patent.

Community perspectives distilled

  • Publish at your own risk – Several commenters (e.g., Giefo6ah, NegativeLatency, dbgrman) advise publishing the codec openly, noting that the company would have to send a cease‑and‑desist if they care, and that open‑source projects like ffmpeg have handled similar cases.
  • Legal uncertaintybrudgers, Redster, and altairprime stress that the legal outcome is a “crapshoot” and recommend consulting a lawyer, especially to interpret jurisdiction‑specific statutes and any ToS you agreed to.
  • Focus on methodologyNordStreamYacht and layer8 suggest publishing a detailed description of the decoy‑note scheme without releasing the actual code, which may sidestep anti‑circumvention claims while still providing useful knowledge.
  • Ethical concernsnatch and philosopherNoob point out that the obfuscation appears unethical and that distributing a decoder could be seen as facilitating piracy if users pair it with copyrighted files.
  • Practical precedents – Commenter severak_cz links to an existing open‑source tool (mid2pianocd) that already implements the same format, indicating that the knowledge is already public and that the barrier may be largely symbolic.

Practical steps if you decide to publish

  1. Determine your jurisdiction – Identify whether you are primarily subject to US, EU, Australian, or another legal regime.
  2. Review PianoDisc’s license – Look for any anti‑reverse‑engineering clauses; if they exist, publishing may breach contract.
  3. Consider an interoperability defense – In the EU and Australia, frame the decoder as a tool to achieve interoperability with a legally purchased device.
  4. Avoid distributing copyrighted music – Release only the encoder/decoder, not the original MP3 files or any copyrighted MIDI arrangements.
  5. Add a disclaimer – State that the code is provided “as‑is” and that users assume any legal risk.
  6. Publish methodology separately – A technical write‑up of the decoy‑note algorithm can be shared without providing executable code, reducing exposure to anti‑circumvention claims.
  7. Consult legal counsel – Especially if you plan commercial distribution or expect a strong reaction from PianoDisc.

Bottom line

  • In the United States, publishing a decoder that removes PianoDisc’s obfuscation likely violates the DMCA’s anti‑circumvention provisions and could expose you to legal action.
  • In the European Union and Australia, the interoperability exemptions make it more defensible to release the decoder, provided your intent is to enable users to play their own legally obtained music.
  • Regardless of jurisdiction, you should verify the purchase agreement, avoid bundling copyrighted content, and consider publishing the technical description rather than the full implementation to mitigate risk.

This analysis is based solely on the Hacker News discussion and publicly available legal frameworks; it does not constitute legal advice.

Sources

Related