buddhi1980 / mandelbulber2

Official repository for Mandelbulber v2
GNU General Public License v3.0
893 stars 116 forks source link

Evaluate more conditional modes for Anim by Sound #222

Open mclarekin opened 7 years ago

mclarekin commented 7 years ago

These are some basic examples of conditional filters. Based on triggers, and the option of using minimum duration for the event. The triggers are happening a few seconds (or beats ) apart, maybe from a crash cymbal or drum.

Based on the format animVal = paraVal + or - soundVal

This is what I think existing conditional "binary filter"
// enable default formula only when triggered.

animVal = paraVal  + ((paraVal  * multFactor + addFactor) * animSound);

or can be written animVal = paraVal + a constant * animSound

The following modes use the animSound only for triggering an event and monitoring the duration.

Conditional filters are designed mainly for when using single instrument tracks as triggers to create the animation, (the complete music track is used later when converting to video).

_Note. The term "constant" that is used in the functions below, can be replaced with any part or parts of the generic sound value equation (with an increase in calculation time)

Generic equation (made of three optional parts): soundvalue = (paraVal multFactor animSound) + (addition factor * animSound) + constant;;

Simple conditional examples:

// a) constant change at each trigger and constant throughout event animVal = paraVal + constant;

// b) flat constant (when paraValue is changing over time, this creates a constant animVal for the duration of event
temp = paraVal at trigger frame animVal = temp + constant; (i.e a forced stationary event)

// c) bi-directions change at each trigger ( i.e.alternate, with each second trigger) count triggered events (that happen when trigger if trigger_count is even
animVal = paraVal + constant; else
animVall = paraVal - constant;

// cumlative change at each trigger ( i.e. rotate in 6 degrees steps at each trigger) aux.constant += constant; animVal = paraVal + aux.constant;

// option  using counting triggers  (ie for raising and lowering a shape)
    when number of triggers gets to "8"
        then    animVal = paraVal  - aux.constant + constant;
         reset trigger_count
mclarekin commented 7 years ago

A mode that allows sound (0 silent, to 1 maximum) to have a logarithmic scale. This may work better with some types of parameters.

mclarekin commented 7 years ago

Investigate in Sound Pitch mode a conditional amplitude filter,

example pitch = 0 when amp < a number. The general idea is removing pitch animation that cannot be heard.

ghost commented 7 years ago

@buddhi1980 This is very high value!

mclarekin commented 7 years ago

I got sidetracked onto formula stuff that I had to implement before I again forgot about it.

I have to finish off my formulas, then I want to do some English things with Kryzstofs latest user manual wording (unless Rob wants to do it ).

Then I can do this which will take very little time to implement for testing. It is all very simple conditional statements.

On Thu, Mar 30, 2017 at 2:01 PM, mancoast notifications@github.com wrote:

@buddhi1980 https://github.com/buddhi1980 This is very high value!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/buddhi1980/mandelbulber2/issues/222#issuecomment-290271042, or mute the thread https://github.com/notifications/unsubscribe-auth/AMLZHF9hppqaFUUrYeVQnY2iWSiIEmLmks5rqv7xgaJpZM4LxSsn .

ghost commented 7 years ago

Good plan! We need more filters for autonomous generation of the audio offsets. I will find some reference code from other music visualizers.

ghost commented 7 years ago

@danilobellini Do you have any suggestions or sample code from your DSP library that we can implement in C++?

mclarekin commented 5 years ago

The problem with audio_animation using melody line pitch, is the overtones.

solution:

a) choreographing the melody line animation using some sort of software that only generates fundamental notes b) some clever filter that removes overtones based on frequency cluster and/or amplitude (assuming fundamentals are always louder than overtones)

mclarekin commented 5 years ago

not perfect fundamental notes, but i can see the correct steps in the scale soundPitch

mclarekin commented 5 years ago

vibraphone is the best pitch instrument i have tested vibraphone