I’ve just got into baking sounds to F-curves and creating drivers. So I want to model a set of piano keys, and then have them move like they’re being played. So I have also created a sound file of all 88 notes, played one at a time. The problem is that I don’t know if it’s possible to bake a sound F-curve for each of the 88 keys. I have tried baking the sound using high and low pass limits, but it just doesn’t isolate the notes. 440Hz should be middle C on a piano, but it doesn’t bake that way. I’m thinking maybe this just isn’t possible with Blender. Any ideas are welcome.
Find my “Clockophone” project either search the WIP or it’s referenced on my website from my signature. Here you will find how to animate a piano - it’s far too complicated to explain again, but you cannot do it with Bake to F-curve…
Your work is incredible!
As for what I would like to do, perhaps I didn’t explain it well. I want to be able to animate each individual piano key for the correct note in the music. I noticed on your Clock project (the one with the train) that as it rides along the “piano” looking track, the whole track animates in time to the song, in groups of keys, but that’s not quite what I want to do. I am trying to figure out a way to scan or somehow enter sheet music and somehow have Blender able to identify the notes by the image of the sheet music itself. Then I could play that note (from a library of sounds?) and then be able to play any song for which I have the sheet music. Ultimately, to have each note then “play” the corresponding key on my piano model. Quite an undertaking I know, and just my be too much for Blender. But then the fun is in the challenge!
Yes - I read and understood what you wanted! The “Hector” project is all done with “Bake To F-curve” and therefore not what you want to do…
You need to look at this WIP: https://blenderartists.org/forum/showthread.php?378659-The-Patent-quot-Clockophone-quot-Erkinator-amp-Honey/page2 posts #26 to #29 explain how to read a MIDI file in Blender to drive a music animation. The script only runs in Blender 2.49, unless the writer has updated it yet…
Post #29 has a video of a piano playing “The Entertainer” all the way through - with one or two errors as this was my first attempt at it, but you should see how it works.
So the workflow is: create the MIDI file in a Music Sequencer programme - I use Reason from Propellerheads in Sweden. Or you can download a MIDI from the web. Export your song as an mp3 file - you need this later on.
Add an empty for each note played in Blender 2.49 - run the script detailed in post #26 of the Clockophone WIP for each note played to get the animations of the empties - I chose to rotate them so the piano keys rotate about their hinge point.
Open and Save the blend file from 2.49 in 2.78a, or whatever version you are running - parent the keys to the empties for the notes you have played. Run animation, render, etc. You need to add the played music track - I use mp3 format - to the VSE and select “AV-Sync” from the right-side pull-down that probably says “No Sync” by default, or your music track and animation will be out of time.
OR: you have to work out the timings for each note played at whatever frame rate you use and then keyframe each note individually yourself - this is a long a tedious method and one which I would not recommend for the sake of your sanity!
There are other videos in that WIP showing a robot playing drums - post #51 is the best drums one, & guitars, etc - all done the same way, using the same Blender 2.49 script.
PS. Thanks for the compliment on my work.