I have a self playing piano, using a system called PianoDisc Protigy. They have an online store which sells music for their system, from various modern artists along with classics such as Bach and Beethoven. Last night I saw they had released some music from Eric Satre, a 19th century French composer, which I bought. Curious if I could have just used AI to create these files, I began experimenting with Astra and Fable. Feeding the output of one into the other to critique. After an hour of LLM discussion of Rubato and fermata, solenoid response times and proper sustain pedal technique, they settled on their ultimate version of Gymnopedie No 1.
I then asked Fable to compare it to the open source version I'd downloaded from Mutopia, which it promptly ripped apart. No sustain, zero rubato, upside down balance.
Ok, what about the version I'd just bought?
The PianoDisc versions are mp3s encoded with the right channel carrying MIDI to be played on the piano, and the left channel containing any accompanying music to be played through attached speakers (who doesn't want the harmonica on Piano Man?)
I gave the mp3 to Fable, which promptly decoded the format, identifying the right channel carrying MIDI using a 2004.5 Hz square wave.
It then went on to analyze the nuance of pedal lift and melody relative to the chords.
Fable then asked if I wanted it to build an encoder to write my own MIDI files into the right channel of mp3s.
Sounds great, and I instructed it to write the encoder.
What it came back with was a python encoder PLUS a decoder.
In the verbose explanation, it mentioned decoy notes.
Curious, I asked it to explain the decoy notes.
Apparently PianoDisc adds obfuscation into their format which is handled properly by their decoder, but would leave naively extracted MIDI unplayable on other systems.
Fable created an encoder which adds those decoy notes, and a decoder which removes them.
Am I allowed to publish the decoder? The encoder?
You spent --- what I'd assume would be several k$ from prices found online --- to buy a self-playing piano, and are now asking if you can release the tools to have it play the music of your choosing? IMHO the fact that you even had to think about asking if you could do this is everything that's wrong with society today. IANAL but as long as you aren't releasing something that's copyrighted from the original code, or violating some patent, there shouldn't be anything to worry about.
"It's better to ask for forgiveness than permission", as the saying goes. ;-)
Don’t ask Hacker News for legal advice. If you really want to know the answer, ask a lawyer.
This whole writeup is basically the verbatim prompt recipe for anyone to just whip it up themselves.
Blocking the final result is no longer a real block, when all it requires is a vague prompt to replicate it.
We've entered a strange territory.
Aside: if you want a source of high quality Piano MIDI recordings, you should check out the MAESTRO dataset: https://magenta.withgoogle.com/datasets/maestro
> The dataset contains about 200 hours of paired audio and MIDI recordings from ten years of International Piano-e-Competition. The MIDI data includes key strike velocities and sustain/sostenuto/una corda pedal positions. Audio and MIDI files are aligned with ∼3 ms accuracy and sliced to individual musical pieces, which are annotated with composer, title, and year of performance. Uncompressed audio is of CD quality or higher (44.1–48 kHz 16-bit PCM stereo).
in most regions it is not illegal but asking so here would require readers to know exactly what laws apply where you are to answer that adequately from a legal perspective.
i can say, many people do it, some get in trouble because of local laws, others dont because their regions dont have such laws.
if you look at exploitdb and such site they have many exploits also for proprietary things. i would say if you dont outright leak firmware or such IP, an exploit itself is usually not strictly illegal.
its always best to contact a vendor if they are contactable, to both help them fix it and get permission for a post..that way, you can be relatively comfortable you are safe. get it in writing, email is ok.
edit: this is a gray are where the decoder might be considered leaking an algorithm btw. its perhaps not strictly an exploit but some characteristics will be shared around how its perceived to use something not as its intended.
Ideally someone random on github would post the same thing, so you don't have to. That would be a fortunate coincidence but I'm pretty sure these things happen.
You are free to interpret this comment as prohibition or as my blessing, but...
If it matters, ask your lawyer.
If it doesn't matter, it doesn't matter.
Or to put it another way, trademarks (you've mentioned two) and copyrights (it's a crapshoot) are complex. And in some jurisdictions (notably the US) anybody can sue anyone for anything.
Your risk aversion is yours, not someone else's. Your financial and legal wherewithal is likewise yours.
The nature of these tools is that your post and the device should suffice to replicate so in some sense you have already published the encoder and the decoder.
Gymnopedie No 1 was one of the pieces I learned as a primary school student as a mediocre and undedicated pianist. The reverse engineering is impressive and generally useful, but really learning that piece all the way through could be even more rewarding, then you can use 10 fingers and two feet to make it sound like YOUR ultimate version, not just your words. Perhaps Claude truly nailed it in your taste and you want to be able to reproduce it reliably without automation: record one phrase at a time and try to minimize the about of variance between yours and the MIDI. Maybe some visual feedback would help and be clever, but usually using your ear is the most productive.
Rather than publishing the decoder and/or encoder, it would be more interesting to publish how the decoy scheme works in detail. We want to understand how things work, not blindly use tools that we could build ourselves based on that understanding.
Your intentions can reasonably be interpreted by a court as attempting to avoid paying a commercial software licensing fee. Use of Fable is, in your specific instance, irrelevant to whatever the outcome would be; the finding of intent holds plausible regardless of what tools and/or contractors you used to pursue your intent. Seek legal counsel if you wish to publish. (I am not your lawyer, this is not legal advice.)
IANAL but... isn't this somewhat analogous to side-loading apps on iOS or Android? As in, Google/Apple make it awkward for you to provide your own files to run on your phone, but ultimately it's not impossible nor illegal.
Likewise, if you're able to upload your own custom MIDI (or other) files for your piano to play, then all you'd be doing is sharing a utility that creates mixed audio/MIDI MP3s, which may or may not be used to create files which can then be legitimately uploaded to a piano.
> The PianoDisc versions are mp3s encoded with the right channel carrying MIDI to be played on the piano, and the left channel containing any accompanying music to be played through attached speakers (who doesn't want the harmonica on Piano Man?)
What a cursed format!
I don't understand what the designers were thinking of... 2000 Hz square wave on right channel? Seriously? Nobody would hear something suspicious and nobody would literally see it on spectrum analyzer. Maybe it's holdover from analog days and it was on casette tape before.
Also somebody reverse engineered it before - https://www.kinura.net/mid2pianocd/
So Fable probably just igested it from documentation of this software or some very obscure forum thread somewhere.
Recently had a similar, but likely more severe problem: I noticed Sol decompiled some proprietary code to re-implement some functionality for an emulation I wanted to use internally.
Now its likely soiled and I have to throw it away. Doh! I asked it about legality and it went "its almost green" but when googling, reverse-enginnering like that seems very illegal.
The weird thing is in this case, it could have pretty easily gotten the needed info from using the code as a black box, and that is apparently legal!
This is a nit but his name is actually Erik Satie not Eric Satre.
> some music from Eric Satre, a 19th century French composer
> Gymnopedie No 1
Eric (or as he preferred, Erik) SATIE.
typo: did you mean Erik Satie?
Did you really need to ask a massive LLM and burn tokens on this?? A few minutes of googling has revealed a huge amount of this information just laying out in the open, and, a whole tool to author your own files that someone sells as independent software! (https://www.kinura.net/mid2pianocd/)
I'm sorry, I'm hung up on the idea that an LLM could look at a midi file and listen to something and write an improved version with better sustain. Did you feed it other midi files, or was this something it was able to accomplish by parsing raw audio of Piano Man?
Why not publish the methodology in detail and leave it at that?
IANAL, especially not an American one.
But if you're worried just pop it on anon GH.
Besides the fact that this sort of protection through obfuscation is dead now anyway. If you can ask an LLM to do it so can I, or anybody else. The only downside is duplication of work/wasted tokens but eh.
AI has already started commoditising software. Hopefully we see more OS' lean into the "safe" layer that runs everything and then temporary/custom interfaces dynamically created by AI on top.
From my understanding of laws in Germany, in Germany, you're allowed to do all of this if your goal is interoperability of systems.
If your goal is to not pay them money - which you strategically unwisely hinted at with this question - then that's not covered by that exemption, I think.
So from my understanding, adding new music and releasing the tooling for that should be fine, but IANAL.
Frankly, what is or isn't legal doesn't matter as much as your story, as you will be judged by that. It also helps if the story is actually genuine, but that is a somewhat optional requirement all things considered. At least the industry treats it as such.
__
FWIW, as these capabilities trickle down to everyone through LLMs, it is worth asking yourself whether it is worth the trouble of releasing it in the first place.
If anyone can replicate this within a reasonably short timespan, then maybe not.
___
With this stuff in particular, it's also worth considering the business model of the entity.
Does your work pose a relevant risk for their bottom line? If yes, then bad. If no, then shrug.
Is music sold their main revenue channel, or are they just also doing that because recurring revenue is nice to have?
How user-friendly would you want your work to end up as? Would it target the demographic that would otherwise just buy the music?
Truth is that this is all just an elaborate dance.
___
To close the "polish trains" gap in what I just wrote in the last section:
"Is their business model ethical? And is it considered that by the majority, common sense, and politicians?"
Personally I’d just do it
IANAL, but it might be relevant to others trying to answer what jurisdiction you are in. (US, EU, CN, JP, elsewhere?)
Also, when you bought from PianoDisc, did you agree to abide by a certain jurisdiction's laws in your use of PianoDisc? And did you explicitly agree to not share any sort of decoder/encoder in any ToS?
You can always publish the prompts.
So Fable can act by itself as audio to midi decoder now? No need for specialised models, it just listens like a person and plays it?
Have fable "accidentally" escape containment and publish it.
You bought a hardware device and you own that device?
This decoy notes scheme seems pretty unethical.
Maybe send this question to the Anthropic legal team. I'd be curious if you get an answer and what it'll be.
Find someone in Europe or Australia, or some other place with non-insane digital laws, and have that person publish it as the “developer.”
If I ever owned a self-playing piano, figuring out how I could play custom songs of my own creation would be my top priority. It’s awesome you’ve found some success. Jmpman, what your post is missing is motivation. Why are you doing this and what is your goal?
If you sell your decoder or encoder the company will, eventually, kick your butt. Getting money involved raises the stakes.
If you distribute a file that is sold by the company, even if it was transformed by a decoder, the company will, eventually, kick your butt. (A recording or sample of how it sounds post-transformation for demonstration purposes would be reasonable.)
If your software requires files that must be paid for in order to function, then it’s critical that you do not bundle those files with your decoder or encoder. That would be piracy.
How your software was made matters. Did you have access to non-public information about anything involved? It seems like the answer is no, so you might be fine. It sounds like you legally obtained a copy of the file, hardware that runs it, and figured out how they work.
What terms of service did you agree to? While not everything listed may hold up in court (which gets determined BY a court IN a court so don’t think that’s an easy win), the company is surely within their rights to ban you from their online service.
If you want some relevant legal advice, check out the GameCube Dolphin emulator and how the team stays legal. I love learning about how stuff works, so I’ve followed lots of console jailbreaking and reverse engineering news for years. There is a way to do this stuff legally. HN is focused more on finance than hacking. So talk to some hackers (who aren’t trying to break the law).
I saw you ask about contacting the company. If this was a blog, I’d love a followup about what they say and do, but alas I’ll probably never see it. (I guess the worst outcome is that they spend more money on making their proprietary stuff more locked down?) Regardless of what they say, their word is not the law. Know the law, know your rights, and know when it’s safe to stick your neck out and when it’s not. I am obviously not a lawyer.
Oh, and which US state you are in and what they are based in will be relevant.
You should just ask AI, since you used AI to make the encoder and write your HN post.
Another option that works quite well is called FAFO. So, I'd say just publish it, and we'll see. Keep us posted!
Erik Satie
yea - just publish it
You publish it as the organ-guy piano system for a virtual piano that you've lost the code for.
On a serious note: reverse engineering is legal in australia, even for DMCA violations.
[dead]
[dead]
[dead]
Should've asked Fable.
my experience with LLMs is that when you get answers to questions you didn't ask that it's repeating something that already exists. In other words, it probably regenerated a tool from which it was trained on.
If you live in the USA, the "decoy notes" may be considered an "effective technical measure" from the "Digital Millennium Copyright Act".
If you live in Europe, this restriction may be considered "gatekeeping" and exempted by the Digital Markets Act.
Don't bring attention to yourself by asking for permission. Publish your codec, and if the company cares about this they will send a cease and desist.
If you want the world to benefit from your code but you don't want to be responsible for it, try to adapt the codec to ffmpeg. The ffmpeg project is used to dealing with these matters, and will keep your codec working for eternity.