andy-fillebrown / audiocarver-blender-addon

4 stars 2 forks source link

Readme? #1

Open ghost opened 8 years ago

ghost commented 8 years ago

Is it possible you could make some sort of documentation/short tutorial for this?

andy-fillebrown commented 8 years ago

Ya, I'll put something together eventually if I can find the time. The process is pretty convoluted and the code isn't written to be portable, but it's possible to get it working with a bit of hacking.

akb168 commented 8 years ago

HiddenKn,

I was able to take Andy's blender rig and merge his python code with code I had developed on my own to be able to create video in Blender. So it is possible but for my case, I had been playing around with Blender scripting and python coding for a while. So for the video I created using Andy's rig and adapted Python code, I still had to tweak the python code in Blender to get what I wanted. I also used direct MIDI import rather than using audiocarver (I already had developed code in Blender with some open source MIDI python I merged in). So I can say (as an musician, engineer and programmer) Andy's python code and blender rig were understandable by me.

Here are some links to videos that uses my Python code merged with Andy's:

https://www.youtube.com/watch?v=-z6TzOCqhKA https://www.youtube.com/watch?v=Jk4-_qYWsuw

Cheers,

Alan

andy-fillebrown commented 8 years ago

That's awesome, Alan! What did you use for parsing the MIDI file?

akb168 commented 8 years ago

Hey Andy,

Apologies for not responding sooner. I've had my head down doing a lot of work and personal things.

For building the parser, I did this a long time ago where I found an open source MIDI python parser that had the ability to parse MIDI on input and also write MIDI on output. The file is Midi.py.

Here is an excerpt with the header and the date (was on the Web and did not have a copyright or license clause).

''' Created on 19.03.2011

@author: kaiwegner ''' From that, I cleaned it up a lot, added comments and merged it with some python work I was doing in Blender to do my own animation (looks like the way I did it, you hit some of the same issues as far as time to create when doing lots of objects).

My original work was doing one base object per note (taking a cube, sizing scaling it, adding material) and one flash object per note, and then also having pyhon code to set key frames per note, size the flash, etc.

With that my code is a bit of a "mish mash" as I've pretty much always used it to put everything into one python file, not taken the time to break it up into multiple files, subroutines, etc.

Having said, that you may find some things, useful and/or interesting, so it looks like with GitHub here, I can attach a file, so I'll attach the python I used to create my latest Bach piece as I also did modifications for tracks, rotation changes, etc. In the .zip file, I've also attached the original Midi.py code.

If you'd like, you are also welcome to contact me directly, my email is abartky@cox.net

Cheers,

Alan

P.S. Feel free to use my work as you feel free (including re-use, posting to Git-Hub), etc. Attribution would be appreciated :-) In particular, I believe I did an OK job of enhancing, cleaning up and commenting the MIDI python code.

MidiFileReadMergedPythonBartkyFillebrownExample.zip

andy-fillebrown commented 8 years ago

Thanks so much, Alan! I did a quick once over of your code and it looks like it will be very useful to me. I had found a different MIDI parser than the one you use, but it didn't calculate the timings the same way that ProTools and Reaper do, so I couldn't use it. Everything was out of sync.

I will be glad to credit you if I use your code. Thanks, too, for commenting everything so clearly =)

Cheers, ~ Andy Fillebrown

akb168 commented 8 years ago

Andy,

Glad you find it useful. I actually coded the mapping of MIDI time to absolute time in seconds and sub-seconds (real numbers mapped to note on and note off for each note), so if you have any questions feel free to drop me an email.

I’m working on a new piece where I’d like to try coming up with a new method of visualizing the music, so we’ll see how that goes.

One thing I did pick up from your work that I didn’t try before is using the compositor (very clever by the way how you did the flash by using the X position and when there is a match in the range, cause that note to glow). I did some tutorials on YouTube but would still like to learn more. If you have any links or suggestions on where to learn more about using the compositor, it would be appreciated.

Cheers,

Alan

P.S. I’ve been programming computers since I was 13 years old (46 years now) and I was taught very early the importance of commenting (I was taught to comment on punched cards by my first teacher/mentor), so I’m glad you found the code easy enough to follow :)

From: Andy [mailto:notifications@github.com] Sent: Monday, April 04, 2016 6:04 AM To: andy-fillebrown/audiocarver-blender-addon audiocarver-blender-addon@noreply.github.com Cc: Alan K. Bartky abartky@cox.net Subject: Re: [andy-fillebrown/audiocarver-blender-addon] Readme? (#1)

Thanks so much, Alan! I did a quick once over of your code and it looks like it will be very useful to me. I had found a different MIDI parser than the one you use, but it didn't calculate the timings the same way that ProTools and Reaper do, so I couldn't use it. Everything was out of sync.

I will be glad to credit you if I use your code. Thanks, too, for commenting everything so clearly =)

Cheers, ~ Andy Fillebrown

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/andy-fillebrown/audiocarver-blender-addon/issues/1#issuecomment-205287790 https://github.com/notifications/beacon/AQtawbfwuVx1lSlz7soyCyM0eaOvC2RKks5p0QwsgaJpZM4HhNp9.gif