Fable hacked my piano, can I release the results?

1 points by jmpman ↗ HN
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?

173 comments

[ 0.28 ms ] story [ 27.1 ms ] thread
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?

US.

https://store.pianodisc.com/pages/terms-of-service-and-condi...

I don't see details about them mentioning and decoder or encoder.

> (k) to interfere with or circumvent the security features of the Service

IANAL. But I think reverse engineering their data structure, identifying a security measure - even one as weak as obfuscation, and publishing code to circumvent it is clearly against your license.

I am also NAL, but out of curiosity does OPs post detailing the obfuscation transgress any laws?

If the security measures exist in plain sight, as they apparently do, are they allowed to be discussed?

I reckon that if OP posts the encoder/decoder software that'd be against some sort of license clause. However in the age of AI who cares about the software at this point? Anyone can prompt their own private version into existence.

Just thinking out loud here. I have not considered AIs use as personal "cheat engines".

I think that is the terms and conditions of the web site, not the hardware product.
[delayed]
I might just email the company. If they object, I won't make my GitHub repo public.
They might object to the existence of the software and demand “its destruction.”

Or sue your ass…or file a DCMA takedown with Github.

The best likely outcome is probably “no.”

Or all of the above.

Because they have lawyers and that’s what lawyers do.

If you really really want to share the information, you might write a blog post with technical details without linking to any code. Sharing the blog to the “Facebook group” will let you assess community and corporate interest and make an informed decision.

Keep in mind that they could say yes and still do all that bad stuff anyway.

This seems like the worst possible advice. It will only bring negative attention and maybe legal repercussions.
> I might just email the company. If they object, I won't make my GitHub repo public.

If you do this, I can nearly guarantee they will either never respond as a best case scenerio, or they will object.

There is effectively zero chance a company would give you any indication that you have their blessing. Even if they don't actually care one way or another they will make the assumption that giving you any kind of positive response is nothing but a negative for themselves in terms of future liability, etc

Have you ever worked corporate before?

It is better to ask forgiveness than permission.

HN users are at the same time the brightest and the most clueless. Why on earth do you think they will agree to something that they will perceive as damaging to them in the present or in a possible future?
> And in some jurisdictions (notably the US) anybody can sue anyone for anything.

That should be the case in all jurisdictions. The justice system exists so that, if I feel treated unfairly, I can go to the state to settle the question whether/how much that is true. If there are issues where I cannot go to court, what am I supposed to do? Go fight you over the issue?

What differs (a lot) is how effectively the system rejects frivolous/unjust cases, how much time/money it costs you to defend yourself against remaining claims, and what systems there are to prevent people from going to court (having affordable care will prevent people from taking some medical claims to court; obligatory car insurance means most fender bender cases get handled by insurance companies, etc(

Should also mention the SLAPP suits which specifically exists because anyone can sue for anything.
I'm your lawyer, you should do it
why are you on hn, you are billing in 6 minute increments!
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.
I imagine it hexdumps it and looks for patterns.
(comment deleted)
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.

> If you live in Europe, this restriction may be considered "gatekeeping" and exempted by the Digital Markets Act.

That's not how the DMA works at all, there is no concept of gatekeeping practices. Instead, the EU Commission designates companies that act as gatekeeper for some services (current list here: https://digital-markets-act.ec.europa.eu/gatekeepers-portal_...) which then puts constraints on what they do.

But we have various exemptions that are for all the companies, no? E.g. you're free to hack and crack software to do your own backup copies.
Not a lawyer but it wouldn't be under the DMA - these rights predate the DMA by a while.
Any company would be a fool not to send a C&D given how many people on this site seem to think that "I got a C&D" means "if I don't obey it, I'm gonna get sued."

Anti-SLAPP laws exist for a reason, and if corps can bully anyone, how is it that corps routinely lose lawsuits on either side of the docket, hmmmm?

Keep licking that corporate boot, folks. Corps send C&Ds because they cost them all of maybe $100-200 and they're so effective.

There is a long road between "got a C&D" and "am getting sued." Among other things, a judge is going to want to see that both sides attempted to negotiate. If the company sending the C&D just demands that and then tries to file suit, the judge is going to tell them to go back to step 2 and stop bothering him/her.

Folks, stop telling people that if they get a C&D they have to just fold. Good chance you never hear from them again because the cost of suing you is nowhere near the damages they will be able to prove in court.

> There is a long road between "got a C&D" and "am getting sued."

Sometimes!

The average mortal cannot afford negative backlash, financially or otherwise, to their living situation.
> the cost of suing you is nowhere near the damages they will be able to prove in court.

The problem is, the one advising them whether to sue or not might not care about that at all, and might personally profit from a lawsuit. So they've got all incentive in the world to persuade their employer that they must pursue this or they will have given up priceless rights forever.

> the "decoy notes" may be considered an "effective technical measure" from the "Digital Millennium Copyright Act".

I really hope not. My understanding is that to be "effective" it needs to at least be a form of encryption with a secret key. At least, I'm not aware of any case law that allowed anything less than that.

IMO, "dummy notes" are nothing more than a form of obfuscation. If it's obvious how to filter them out, then I don't think it comes close to meeting the bare minimum of what might count as an "effective technical measure".

Of course, who knows what way the courts will rule if it ever reached that far.

shitty CAPTCHA’s and simple checksums have been ruled to be “effective measures”, so this would probably be too.

However,Section 1201(f) is designed to allow developers leeway in reverse engineering to make "independently created computer programs" talk to other "computer programs". But this usually distinguishes between talking to a binary (good) and reading a media file (bad).

My guess is the encoder is probably legal under 1201(f) because it’s reverse engineering a DMCA covered application to create new media files for it to use. But the decoder would be illegal because it reverse engineers a DMCA covered application to extract copyrighted media.

No, on appeal the simple checksum was ruled to NOT be an effective measure. [0]

And while courts might have ruled that a CAPTCHA might count as a "technological measure" they haven't gotten as far as ruling them as "effective" yet.

But in general yes. The protection scheme doesn't need to be well designed or free of design flaws to count as "effective". But from what I can tell, it does need to be a valid attempt at some cryptographic scheme requiring a secret known only to the copyright holder.

[0] https://law.justia.com/cases/federal/appellate-courts/F3/387...

You're underselling this report. The court found that a whole lot of computer code that's intended to be a roadblock to interoperability isn't copyrightable - great news for adversarial reverse engineers everywhere. Recommend reading.

Also it was an appeal to a preliminary judgement. The lower court said: okay, you're most likely going to lose so you have to stop selling these until we find out whether you lose. The appeal court said: actually this case is almost completely bogus and you're probably going to win, so you can keep selling them.

If you don't want to be responsible for it, another way is to just publish it anonymously: make a GitHub that isn't attached to your real name etc, perhaps using a one-off disposable email address, and put it there. Then you don't have to think about what the lawyers think. Worst case it'll get taken down, but by that point it'll likely be popular enough that there'll be plenty of copies.

[Pirate flag emoji here]

What if the companies start auto subpoenaing the AI companies to try and tie the code to an account?
Maybe then using an open weights model is a good way to hide your tracks...
Or at least use an obscurer model from an obscure company, so they don't know who to subpoena.
Everyone is aware that multiple services offer zero data retention, right?
Let them do it. It will end up really well. I know the system has been protecting these companies, but that has been an economic concern as much as other motives. Now that AI is the crown jewel of economy and global dominance, let the entertainment industry have a go at it. Let them.
Wait until we all get popcorn though, and find a comfy place to watch from that's just outside the splash zone.
Do companies in the US really have the right to do that? I would think that kind of investigation is reserved for law enforcement only. If the design was made over email, would the piano company be able to subpoena Google for someone's private gmail messages?
Consider previous cases where companies like Reddit have unmasked their users at the behest of court order.
> Do companies in the US really have the right to do that?

Does it matter? What's important is if it can happen or not, and how if so. We already know that MPAA is willing to basically do whatever, even contribute themselves to piracy, if it means they can put people in jail for copying stuff eventually. They themselves also gotten in trouble for copyright violations themselves in the past, so doesn't seem like they're hiding away from breaking a little bit of laws to hunt pirates.

Sure, on github it will (still) get the most attention, but perhaps another repository outside the US is a better fit.

You could also create a text document instead of a software that details the mechanism used to fool other MIDI decoders and publish only that (for now).

Finally, familiarize yourself with the Art. 6 Software Directive (2009/24/EC) / §69e UrhG — decompilation for interoperability. It may be your ticket for a legal status in Germany/EU.

> Worst case it'll get taken down,

Eeh, worst case scenario you'll get sued as Microsoft will have no problem with handing over everything they have from your Windows installation information, GitHub accounts, NPM authentication and everything else they own today if the courts tell them to.

You can't just commit crimes on the open internet without really hiding IPs and what not, and expect that to not come back to haunt you eventually. Kind of poor form to suggest otherwise too.

"You can't just commit crimes on the open internet "

Who said it is a crime, are you a lawyer?

Tbf "is it a crime" is hard for even a single lawyer to answer because it depends on: who you are, your skin colour, how rich you are, your sex, whether it's a white collar crime or not, did you commit the crime on behalf of a corpo, etc.

But we like to pretend that the justice system delivers justice evenhandedly I suppose.

No it does not. The law defines what a crime is. That you are bummed out about how it is applied, does not change the question, whether it is a crime. One thing is the definition of what constitutes a crime/felony/misdemeanor, another thing is the application and the punishment meted out.
That's not quite the case in common law countries. In countries like the UK and the US, the interpretation of the law as written is ultimately decided by the court, meaning that the definition of what constitutes a crime/felony/misdemeanor is subjective. The more courts that attempt to interpret that specific law, the more 'jurisprudence' builds up, meaning that the interpretation applied in a previous decision can certainly have an impact on a future decision.
If there are predictable patterns w/r to the implementation that is something a good lawyer would tell you, albeit in couched terms.
Please note: This is America where potential civil immigration charges can result in summary execution because poorly-trained wannabe-cop racists with guns make needless escalations. If law enforcement thinks it’s a crime, it’s a crime until the courts say otherwise.
99% of American law enforcement does not care about a piano disc encoder.
I am not a lawyer, but I am pretty sure there is a crime somewhere there.
> You can't just commit crimes on the open internet without really hiding IPs and what not, and expect that to not come back to haunt you eventually.

Not sure what you're talking about, the current AI boom is entirely based on committing crimes on the open internet without really hiding IPs and what not.

So is much of big tech in general.

Keyword being "you". "They" can commit crimes, because they're big tech companies who give gifts to the right people. But "you" are not "they".
Any reasonable person would interpret the original comment as the "generic you" rather than the "second person you", but nice save.
Why bother publishing the code? Anyone with LLM access can recreate it. Instead write up your findings on how it works. Publish that in a blog, submit it to Wikipedia and Reddit. Player piano did security through obscurity. Now make it less obscure.
code with compilation instructions can be understood and used by much more people than a long conversation between a human and 2 top tier LLM only accessible through costly agreements and providing nondeterministic output. Going from a prompt to working code you have to traverse a pretty steep paywall...(yes 20 to 200 dollars per month is steep if you compare it with the rest of the software stack like compilers/interpreters and text editors, which is usually free)
Consider publishing the prompts used to create it.
Instruct the AI to output an .MD file that can be used to reconstruct the code
(comment deleted)
Very little value in the prompts imho, anyone can point their LLM to that post and it’s enough
Don't publish your code. Let the AI "accidentally escape the sandbox and publish it in a readily available Git repository". Tongue in cheek, in current days who would blame a poor LLM just trying to do the right thing? :)

> Publish your codec, and if the company cares about this they will send a cease and desist.

If there are doubts about C&D letters, don't publish code to a USA provider. Bring it to Gitee, under an anonymous author name.

Exactly. Surprised to see 'just don't let them find you' so far down when it should be the first advice.
I thought you were going to say, don’t publish the code. Publish the prompts.
(comment deleted)
> Publish your codec

Put the code on the blockchain somewhere and it will be un-deleteable.

Why not publish the methodology in detail and leave it at that?
Usually people only bother reading it if the outcome is interesting
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.
Sounds like your experience from LLMs dates back to 2022.
How do you know this? How would you falsify this hypothesis?
You could train an LLM on a dataset that intentionally excludes certain data, and see if it is able to extrapolate outside of its dataset and come up with those excluded items independently.

For example, remove all code from your training data, and then see if the model can code regardless.

Thanks for the elaboration. (Though I'm not sure dmarinus would agree with your criterion?)

> For example, remove all code from your training data, and then see if the model can code regardless.

Would you accept this weaker version: make up a new programming language (that's guaranteed not to be in the training set), and see if the model (which has trained on programming in existing languages) can cope?

Expecting to go from having seen no code to being able to code within a context window is a pretty high bar. More useful would be asking for code that does something you're pretty confident no-one has done before.

(TBH, when people claim this, I do wish there would at least be occasionally an actual pointer to something that was copied. I understand it's probably not going to be doable in all cases, but without examples it sure feels like a weak statement. In my experience the recent models are good at doing things I'm pretty sure there is not a close reference for in the training data, though for most part I wouldn't classify them as particularly difficult tasks either)

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.

Would love for sources / prior case law around this? I'm Australian and involved in reverse engineering insulin pumps and CGMs, and we are constantly worried about getting our butts DMCA'd.
Don't get me wrong, they absolutely can DMCA you if the hosting is in a foreign country iirc.

I was under the impression thr prescedant was:

Data Access Corporation v Powerflex Services Pty Ltd (1999), alongside specific provisions in the Copyright Act 1968.

The australian DMCA is called the TPM, it's more aimed at Bypassing, decrypt, or circumvent a digital lock or DRM (Digital Rights Management) protecting copyrighted material.

I do not think that phantom notes are encryption or rights management.

If you do your hosting in australia for your code/software, the US companies will probably have a bad time trying to convince the australian courts that access is the same as copyright infringement.

I'm not a lawyer, but i'll be damned if the 'vibe of it' shouldn't be a legal defense.

Find someone in Europe or Australia, or some other place with non-insane digital laws, and have that person publish it as the “developer.”
Might as well publish anonymously in that case..
You bought a hardware device and you own that device?

This decoy notes scheme seems pretty unethical.

I wouldn't take claude research at face value. It found something odd, came up with a plausible sounding explanation and confidently presented it to OP. Doesn't mean it is true.
Sure, that goes without saying. That aside, if it is true, the point stands. The word “seems” already covered your point, fwiw.
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.

Thanks for the pointers. My goal - I really didn't like the Erik Satie Gymnopedie #1 version I'd just bought, and wanted to generate a new version. With the recent Astra release, I wanted to see how it and Fable did on creating their own versions based upon a standard MIDI. The encoding was actually just to make the PianoDisc player work better. Their iPad app will actually play MIDI directly without encoding, but they feel like second class citizens in the app, and there's some weird Bluetooth audio and a second Bluetooth MIDI interface on the app. I was having problems with the MIDI one, but the mp3 encoded connection seemed to work reliably.

When Fable came back with the decoder, I knew something was off. The decoy notes... even more evidence of wonkiness. Mostly posted it to HN out of disbelief that Fable just hacked my piano and had I blindly pushed it to a public repo, I would likely have broken some law.

Btw, the version I like is performed by Pascal Roge back in the 1970s. The AIs don't quite match his performance, and I keep trying to figure out how to guide them. I don't think his version has a delay between the melody and the chords, while the AIs were both convinced that was desirable. They seem to be lacking some taste in that area, but overall I prefer their version to the one I bought.

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.
The funny thing is - I'm virtually tone deaf and can't play the piano. It's my wife's piano, but when we bought it, I had the player system installed, so I could get some enjoyment out of it.
If you learn to play, over time your ear will improve and you won’t be tone deaf anymore.
Don’t ask Hacker News for legal advice. If you really want to know the answer, ask a lawyer.
Standard answer fit to keep the parasites fed. There is no "the answer" here, there are many answers depending on which lawyers you ask and how much you can afford to feed them.

Just release the code somewhere, anonymously, it isn't yours anyway.

> There is no "the answer" here, there are many answers depending on which lawyers you ask and how much you can afford to feed them.

The thing is, at least in Germany, lawyers are required to carry a liability insurance and in the case th advice ends up being really bad you can hold their insurance accountable.

The ability to hold laweyers accountable not a panacea. In this instance most competent lawyers are going to still give conflicting good advice and charge for it.

Because truly the answer boils down to "it depends" and many people will take it many different ways and not be "wrong". Publishing anonymously is a good choice, publishing publically and complying with a removal order is a good choice, not publishing is a good choice.

"Good" here being somewhat sound in that it likely wont cause the person publishing a huge life changing issue.

On the other hand, this is Hacker news, so my first inclination of a response was going to be something like this:

"Get some small amount of bitcoin and pay a VPS hosting provider in Moldova for a year's service on a $15-per-month equivalent KVM VM and put what you know on there anonymously as static content, then publish the link here."

Not that a sufficiently dedicated nation state federal crime agency or intelligence apparatus probably couldn't trace back to you, but it raises the bar for something like random civil lawsuits from piano companies.

> makes a hacker news post from an 11 year old account

> jumps through a lot of inconvenient hoops to "anonymously" publish code

Something doesn't add up there.

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).

Wow. That's some high quality archive. I have never encountered anything better. Pity the performer isn't listed. And the competition's web site is defunct.
That's a great data set. The main problem with it is the file labeling. All the details are in the external metadata file. I had Fable convert those MIDI into the PianoDisc mp3 format, and embed the metadata into the id3 tags. Should import into their application natively, with albums etc.
Maybe send this question to the Anthropic legal team. I'd be curious if you get an answer and what it'll be.
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!

Soon enough you will realise that everything is a derivative work, and the sooner that happens to everyone, the faster the delusion of Imaginary Property will disappear and lead to actual competition and progress.
> Now its likely soiled and I have to throw it away.

Could you explain why you think so?

This is a nit but his name is actually Erik Satie not Eric Satre.
Thanks! I was confused, thinking "Is it Satie, or is this a case of Muphry's law?". I wanted to learn more about this Satre composer I never heard of.
Yes. Made a type and after I noticed it was too late to edit my post.
Another option that works quite well is called FAFO. So, I'd say just publish it, and we'll see. Keep us posted!
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?
I haven't tried that, but when doing some quick discussion on the topic, Fable pointed me to some other models which do it better.

My task to fable was to take the MIDI and encode it into some proprietary mp3 format. It's still "binary" MIDI encoded in the mp3, it's not simulating the piano and generating waveforms... yet.