Hi!
How do I get the birth rate of particles to be derived by the amplitude or frequency of audio?
Thank you
Audio driven particle birth
2658 5 1- lunai
- Member
- 5 posts
- Joined: July 2016
- Offline
- Enivob
- Member
- 2538 posts
- Joined: June 2008
- Offline
You can fetch data from a CHOP network using the chop function.
I put together a short video on how to leverage the amplitude from a sound wave to drive position along path but you may be able to modify it to drive particle birth rate.
https://vimeo.com/117402380 [vimeo.com]
chop("../music/AMPLITUDE_OUT/kick")
I put together a short video on how to leverage the amplitude from a sound wave to drive position along path but you may be able to modify it to drive particle birth rate.
https://vimeo.com/117402380 [vimeo.com]
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- malexander
- Staff
- 5161 posts
- Joined: July 2005
- Offline
- lunai
- Member
- 5 posts
- Joined: July 2016
- Offline
- Enivob
- Member
- 2538 posts
- Joined: June 2008
- Offline
That is what the path inside the chop() function is for. The path specifies where the data is coming from (i.e. your chop network output). Where you paste the line of code indicates where the data is going to. Try pasting your chop() function in the Const. Birth Rate field.
To determine the path for your case, you have to have a CHOP network in your scene. When you start typing the word chop( and you get to the typing of the quote character ", Houdini will prompt you with a list of possible sources to form the bread-crumb trail to your data. Each time you type a new slash character / you will get a new list possible paths you can take at that time.
NOTE: The channel name will not automatically appear in a list, you have to know it and type it manually to complete the path. In my example path, the channel name happened to be kick. Houdini defaults to a name called chan0 for mono sources and a pair chan0, chan1 for a stereo image. So you can use the left channel of a song to control one parameter and the right channel to control another.
Typically audio will import in the range of -1 to 1. So I follow up a file import with a limit and envelope. This will change your audio amplitude range into the value of 0-1. Then you can just use a fit01 along with the chop() to remap the audio value into a usable range for whatever target field you like. (i.e. 0-360, 0-1000, etc…)
A thousand particles are emitted when the beat is loud, less as the amplitude drops off over time.
To determine the path for your case, you have to have a CHOP network in your scene. When you start typing the word chop( and you get to the typing of the quote character ", Houdini will prompt you with a list of possible sources to form the bread-crumb trail to your data. Each time you type a new slash character / you will get a new list possible paths you can take at that time.
NOTE: The channel name will not automatically appear in a list, you have to know it and type it manually to complete the path. In my example path, the channel name happened to be kick. Houdini defaults to a name called chan0 for mono sources and a pair chan0, chan1 for a stereo image. So you can use the left channel of a song to control one parameter and the right channel to control another.
Typically audio will import in the range of -1 to 1. So I follow up a file import with a limit and envelope. This will change your audio amplitude range into the value of 0-1. Then you can just use a fit01 along with the chop() to remap the audio value into a usable range for whatever target field you like. (i.e. 0-360, 0-1000, etc…)
A thousand particles are emitted when the beat is loud, less as the amplitude drops off over time.
fit01(chop("../../chopnet1/file1/chan0"),0,1000)
Edited by Enivob - July 5, 2016 15:04:48
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- lunai
- Member
- 5 posts
- Joined: July 2016
- Offline
-
- Quick Links