soundwaves and py Carrara

2»

Comments

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    I was doing some Google scans through the internet about PyCarrara, and ran across this thread, and thought it was very interesting.

    Wendi, I also am interested in finding ways to drive animations (actually, anything that is animate-able in Carrara) with audio and video. So I'd like to know if this (below) is where you want to go with your audio-driven animations.

    I should say that, before jumping on the Carrara bandwagon, I had spent several years working with POV-Ray. While this software was atrocious in some respects, it had some very powerful features that I still cannot find anywhere. Because renders and animations are done in POV-Ray by using a programming language (it's own) versus building scenes using interactive modelers, driving objects and lights (even cameras) with audio and video was easy. The problem I had was getting the audio information into numerical format for POV-Ray to read.

    I wrote a program that basically did the upfront analysis. It would take a .WAV file as an input, and would then process the information, spitting out audio information that coincided with the frame rate of the video I wanted to produce.

    To illustrate, here is a sample of what I produced. In this video, lights (color and location) as well as the speed of rotation of the kaleidoscope, were driven by the audio.

    http://www.youtube.com/watch?v=Tf8p2BWSJBY

    I then went an extra step by having POV-Ray also detect audio "events." In essence, I could pre-define levels (intensity) that, when the audio (a certain frequency, left or right channel) exceeded that level, it sparked an event. The event was attached to doing something visually.

    A sample of this:

    http://www.youtube.com/watch?v=aVSik0_qF1I

    Now, I want to do things in Carrara using such techniques. And here is what I have found so far:

    1. PyCarrara works using 2 methods. One is through injecting new Tweekers and Modifiers. The other (and the one I believe has more potential) uses a pre-animation (non-dynamic) technique of programming keyframes of (as far as I can tell) anything in the scene that is animate-able, simply by referencing the name of the object and the attribute to animate.
    2. PyCarrara's use of MIDI files can be replaced with analysis of WAV or even MP3 files. f1oat3d uses a separate module for MIDI file reading. There are several Python scripts that do analysis of WAV and MP3. I still need to study these more, but it might not be difficult to swap them. These scripts (as I suspect) do provide channel/frequency/intensity values.
    3. f1loat3d has already done a spectral analysis sample using PyCarrara, which you can see here, though I have not seen the source code for this example:
    http://www.youtube.com/watch?v=3DK-Ee7rB1Q

    Over the next several weeks, I am hoping to have more information about this, but I believe it is possible to create a Python script that is simple to modify that will allow non-programmers to easily use audio files to manipulate objects and lights. Once I have something actually meaningful to share on this topic, I will post a new thread, and provide some samples of what I have discovered.

  • bighbigh Posts: 8,147
    edited October 2013

    I was doing some Google scans through the internet about PyCarrara, and ran across this thread, and thought it was very interesting.

    Wendi, I also am interested in finding ways to drive animations (actually, anything that is animate-able in Carrara) with audio and video. So I'd like to know if this (below) is where you want to go with your audio-driven animations.

    I should say that, before jumping on the Carrara bandwagon, I had spent several years working with POV-Ray. While this software was atrocious in some respects, it had some very powerful features that I still cannot find anywhere. Because renders and animations are done in POV-Ray by using a programming language (it's own) versus building scenes using interactive modelers, driving objects and lights (even cameras) with audio and video was easy. The problem I had was getting the audio information into numerical format for POV-Ray to read.

    I wrote a program that basically did the upfront analysis. It would take a .WAV file as an input, and would then process the information, spitting out audio information that coincided with the frame rate of the video I wanted to produce.

    To illustrate, here is a sample of what I produced. In this video, lights (color and location) as well as the speed of rotation of the kaleidoscope, were driven by the audio.

    http://www.youtube.com/watch?v=Tf8p2BWSJBY

    I then went an extra step by having POV-Ray also detect audio "events." In essence, I could pre-define levels (intensity) that, when the audio (a certain frequency, left or right channel) exceeded that level, it sparked an event. The event was attached to doing something visually.

    A sample of this:

    http://www.youtube.com/watch?v=aVSik0_qF1I

    Now, I want to do things in Carrara using such techniques. And here is what I have found so far:

    1. PyCarrara works using 2 methods. One is through injecting new Tweekers and Modifiers. The other (and the one I believe has more potential) uses a pre-animation (non-dynamic) technique of programming keyframes of (as far as I can tell) anything in the scene that is animate-able, simply by referencing the name of the object and the attribute to animate.
    2. PyCarrara's use of MIDI files can be replaced with analysis of WAV or even MP3 files. f1oat3d uses a separate module for MIDI file reading. There are several Python scripts that do analysis of WAV and MP3. I still need to study these more, but it might not be difficult to swap them. These scripts (as I suspect) do provide channel/frequency/intensity values.
    3. f1loat3d has already done a spectral analysis sample using PyCarrara, which you can see here, though I have not seen the source code for this example:
    http://www.youtube.com/watch?v=3DK-Ee7rB1Q

    Over the next several weeks, I am hoping to have more information about this, but I believe it is possible to create a Python script that is simple to modify that will allow non-programmers to easily use audio files to manipulate objects and lights. Once I have something actually meaningful to share on this topic, I will post a new thread, and provide some samples of what I have discovered.

    edit to change date - I wrote a program to do pretty much the same in 1984 or 85 - they are fun to do .

    Post edited by bigh on
  • DartanbeckDartanbeck Posts: 21,624
    edited December 1969


    To illustrate, here is a sample of what I produced. In this video, lights (color and location) as well as the speed of rotation of the kaleidoscope, were driven by the audio.

    http://www.youtube.com/watch?v=Tf8p2BWSJBY

    I then went an extra step by having POV-Ray also detect audio "events." In essence, I could pre-define levels (intensity) that, when the audio (a certain frequency, left or right channel) exceeded that level, it sparked an event. The event was attached to doing something visually.

    A sample of this:

    http://www.youtube.com/watch?v=aVSik0_qF1IAbsolutely amazing, mesmerizing, and fun! Great job!

    Now, I want to do things in Carrara using such techniques. And here is what I have found so far:

    1. PyCarrara works using 2 methods. One is through injecting new Tweekers and Modifiers. The other (and the one I believe has more potential) uses a pre-animation (non-dynamic) technique of programming keyframes of (as far as I can tell) anything in the scene that is animate-able, simply by referencing the name of the object and the attribute to animate.
    2. PyCarrara's use of MIDI files can be replaced with analysis of WAV or even MP3 files. f1oat3d uses a separate module for MIDI file reading. There are several Python scripts that do analysis of WAV and MP3. I still need to study these more, but it might not be difficult to swap them. These scripts (as I suspect) do provide channel/frequency/intensity values.
    3. f1loat3d has already done a spectral analysis sample using PyCarrara, which you can see here, though I have not seen the source code for this example:
    http://www.youtube.com/watch?v=3DK-Ee7rB1Q

    Over the next several weeks, I am hoping to have more information about this, but I believe it is possible to create a Python script that is simple to modify that will allow non-programmers to easily use audio files to manipulate objects and lights. Once I have something actually meaningful to share on this topic, I will post a new thread, and provide some samples of what I have discovered.

    Try contacting Fredric Ribble (author of Py Carrara), he is most helpful ;)
    I'm sure you can do it.
  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Try contacting Fredric Ribble (author of Py Carrara), he is most helpful ;)
    I'm sure you can do it.

    Thanks, Dart! I have been meaning to contact Frédéric Rible, but have not found an email for him. Any idea how I can contact him?

    BTW, the past 3-4 days, I have been sinking my teeth into PyCarrara, developing some Python scripts for tweeners and conducting a number of studies to test how the PyTweener works.

    It really is an amazing capability.

    For anyone interested, I plan to post a summary of my studies, along with a short YouTube video showing what I did, and provide information about how to access the scripts and demos I am building.

    FD

  • KerynaKeryna Posts: 101
    edited December 1969

    Hi FractalDimensia (and Fenric)

    We would love to hear more about how PyCarrara works and especially how to use it with our own scenes. Fenrics examples are super and amazing, but those with less "programming" experience need a tad more help to get from playing with the demo scenes, to using the pymodifies and tweeners on our own objects and music etc.

    Meanwhile I'll keep reading the very generous (in sharing code, examples, and steps etc) manual and trying to follow the instructions until my brain maybe somehow wakes up to what I should be doing...

Sign In or Register to comment.