PDA

View Full Version : MIDI control for animation



MarkAH
11-04-2018, 07:20 AM
I've just recently ventured into Python scripting for LW.
Have the LW Python Docs, in html format, which are providing the info needed.
It's all arranged in a curious way, with info classes seperate from command classes.
That's OK though, after getting used to it.

I once modeled a grand piano. Not a very new idea, but it's completely rigged in a scene named 'Player Piano'.
The lids, all the keys, all the dampers and the pedals have bones.

So what I wrote with Python is a 'script' that reads MIDI files, and converts the MIDI events into keyframes for the keys and pedals.
The dampers are controlled by the keys, and the sustain pedal.
Might take it further and make the sostenuto pedal work too. Couldn't be all that hard to do.

It was a lot of fun and works great. I will probably post it all somewhere.
Have my own website which is not set up just now.
It did have drupal all set up and then I took it all down.
So I might start over with a new drupal and put up my LW stuff. Free of course.
But just now I'm having too much fun with Python.

Is there a free stuff thread here somewhere?

In the mean time maybe I would put up the model, scene, images, and script for the Player Piano.
People will have to get there own MIDI files though, and the best type to use is 0.
Those are single track.
With multi track MIDI files notes for multiple instruments could create keyframes on top of each other's notes and mess it all up.

stevecullum
11-26-2018, 02:35 PM
I've just recently ventured into Python scripting for LW.
Have the LW Python Docs, in html format, which are providing the info needed.
It's all arranged in a curious way, with info classes seperate from command classes.
That's OK though, after getting used to it.

I once modeled a grand piano. Not a very new idea, but it's completely rigged in a scene named 'Player Piano'.
The lids, all the keys, all the dampers and the pedals have bones.

So what I wrote with Python is a 'script' that reads MIDI files, and converts the MIDI events into keyframes for the keys and pedals.
The dampers are controlled by the keys, and the sustain pedal.
Might take it further and make the sostenuto pedal work too. Couldn't be all that hard to do.

It was a lot of fun and works great. I will probably post it all somewhere.
Have my own website which is not set up just now.
It did have drupal all set up and then I took it all down.
So I might start over with a new drupal and put up my LW stuff. Free of course.
But just now I'm having too much fun with Python.

Is there a free stuff thread here somewhere?

In the mean time maybe I would put up the model, scene, images, and script for the Player Piano.
People will have to get there own MIDI files though, and the best type to use is 0.
Those are single track.
With multi track MIDI files notes for multiple instruments could create keyframes on top of each other's notes and mess it all up.

Hey that sounds pretty cool actually. I am also just venturing into Python, but I started in Modeler as I thought that would be easier. Turns out its seen as 'an advanced topic' according to the Python scripting course at Liberty3D - Doh! But I'm stubmbling my way through. Would be great to try out your plugin though...I've got Logic Pro, which is pretty good at turning out midi files ;)

toeknee
11-28-2018, 09:18 AM
That sound awesome Mark. I look forward to seeing it.

erikals
03-09-2019, 03:07 AM
darn cool :) hope to see this in the near future.  https://i.imgur.com/tJGL61i.png