Difference between revisions of "IC Python API:Audio Driven"

From Reallusion Wiki!
Jump to: navigation, search
m (APIs Used)
m
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{TOC}}
 
{{TOC}}
{{Parent|IC_Python_API:RL_Python_Samples|RL Python Samples}}
+
{{Parent|IC_Python_API#Python_of_the_Month|Python of the Month}}
  
 
== Demo Video ==
 
== Demo Video ==
  
 
+
{{#evt:
 +
service=youtube
 +
|id=https://www.youtube.com/watch?v=XGtIEzj8NrI
 +
}}
  
 
== Description ==
 
== Description ==
  
This script lets the user pick an audio file in wave format and apply an interpretation of it in movement to a selection of props.
+
This script lets the user pick an audio file in wave format and apply an interpretation of it in movement to a selection of props.
  
 +
[[File:Ic_python_api_audio_driven_01.png]]
  
 
== Course Prerequisites ==
 
== Course Prerequisites ==
Line 25: Line 29:
  
 
*Deal with audio files and data.
 
*Deal with audio files and data.
 +
*Drive complex prop animations.
 
*Create complex and responsive user interface elements.
 
*Create complex and responsive user interface elements.
  
Line 34: Line 39:
 
* Audio Driven Extensions Python script.
 
* Audio Driven Extensions Python script.
  
You can download this plugin from the [https://marketplace.reallusion.com/smooth-camera-follow Reallusion Marketplace].   
+
You can download this plugin from the [https://marketplace.reallusion.com/audio-driven Reallusion Marketplace].   
To acquire and view the source code, please visit [https://github.com/reallusion/iClone/tree/master/SmoothCameraFollow Reallusion GitHub].
+
To acquire and view the source code, please visit [https://github.com/reallusion/iClone/tree/master/AudioDriven Reallusion GitHub].
  
== Steps to Take ==
+
== Usage Instructions ==
  
 +
# Clone or download the Reallusion/iClone GitHub.
 +
# Copy '''AudioDriven''' folder into the iClone install directory > '''...\Bin64\OpenPlugin'''. 
 +
# Load the script into the project from the menu: '''Plugins > Python Samples > Audio Driven'''.
 +
# Load an audio file in .wav format.
 +
# Select a prop in the scene.
 +
# Adjust the animation parameters and click the '''Apply''' button when finished.
  
 
== Code Flow ==
 
== Code Flow ==
  
 +
Given an audio file, the script will create an audio spectrum data with the help of the '''scipy''' module.  Then a collection of clones will be made according to the parameters inside the user interface such as '''Clones''', '''Spacing''', '''Alignment''', '''Transition Color''', '''Ramp & Fade''', and various transformational elements.  The clones will then be animated according to the audio spectrum multiplied by the transform strength.
 +
 +
[[File:Ic_python_api_audio_driven_02.png]]
  
 
== APIs Used ==
 
== APIs Used ==

Latest revision as of 19:38, 18 October 2020

Main article: Python of the Month.

Demo Video

Description

This script lets the user pick an audio file in wave format and apply an interpretation of it in movement to a selection of props.

Ic python api audio driven 01.png

Course Prerequisites

Make sure to install Numpy and Scipy Python modules by following the instructions here.

You should familiarize yourself with the following fundamental articles before you proceed:

Learn How to

  • Deal with audio files and data.
  • Drive complex prop animations.
  • Create complex and responsive user interface elements.

Required Files

  • iClone scene with one or more props.
  • An audio file in wave (*.wav) format.
  • Audio Driven Python script.
  • Audio Driven Extensions Python script.

You can download this plugin from the Reallusion Marketplace. To acquire and view the source code, please visit Reallusion GitHub.

Usage Instructions

  1. Clone or download the Reallusion/iClone GitHub.
  2. Copy AudioDriven folder into the iClone install directory > ...\Bin64\OpenPlugin.
  3. Load the script into the project from the menu: Plugins > Python Samples > Audio Driven.
  4. Load an audio file in .wav format.
  5. Select a prop in the scene.
  6. Adjust the animation parameters and click the Apply button when finished.

Code Flow

Given an audio file, the script will create an audio spectrum data with the help of the scipy module. Then a collection of clones will be made according to the parameters inside the user interface such as Clones, Spacing, Alignment, Transition Color, Ramp & Fade, and various transformational elements. The clones will then be animated according to the audio spectrum multiplied by the transform strength.

Ic python api audio driven 02.png

APIs Used

You can research the following references for the APIs deployed in this code.

main.py

AD_Extensions.py