A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Sound Effector and FFTs
Posted: 01 March 2019 07:50 PM   [ Ignore ]  
Total Posts:  10
Joined  2019-02-26

Hello,

Is it possible to make Cinema 4D’s Sound Effector output Audio spectra through Fast Fourier Transforms(FFTs) instead of Waveforms? Can it be done? Mathematically it is quite straightforward, but I’m wondering if it can be done in C4D, while keeping all the functionality of the Sound Effector.

All the best,
António

Profile
 
 
Posted: 02 March 2019 01:45 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi António,

Roughly said: Isn’t that what we can see in the interface already, the “histogram of frequency”?

If it were a waveform, it would not be sorted by Hz (Hertz; horizontally), it would show a (hence the name) a wave. A waveform is defined by time (x) and amplitude (y).
What you ask for is typically presented by frequency (x) and amplitude (y). Frequencies sorted from left (low) to the right (right) for example.
Please have a look at the Wikipedia image:
https://en.wikipedia.org/wiki/Fast_Fourier_transform#/media/File:FFT_of_Cosine_Summation_Function.png

If you take a Sine tone that holds its amplitude over a particular time, that will show the results to the effect you are after.

I have recorded two Sine tones and placed it into the Sound Field (Sound Effector would work the same.)
Scene file
https://www.amazon.com/clouddrive/share/gHdZfJDUNOXZtcWKVUZPM5uU5QPyyEUcn9qio8jMNjv
The sound wouldn’t hold up as scientifically clean, as I recorded it with an old Synthesizer.

In case I miss something, please use the suggestion form and share the ideas directly with MAXON. Please add a short description of what benefit this would have for you.
https://www.maxon.net/en-us/support/suggestions/

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 March 2019 03:10 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  10
Joined  2019-02-26

Hello Sassi,

Thank you for the detailed reply, but there’s somewhat of a misunderstanding due perhaps to my wording. My issue, my mistake was actually quite simple, I had in the Probe Properties menu of the Sound Effector the Sampling in Peak-mode rather than Step-mode which made it behave like a Waveform, that’s it.

As a corollary would you have any hints on how to best achieve animations of Audio spectra in Cinema 4D such as these?
Link: https://musiclab.chromeexperiments.com/spectrogram-service/?ln=nl_BE (You have to press one of the icons such as the harp or the bird to see it.)

All the best,
António

Profile
 
 
Posted: 02 March 2019 06:13 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

António,

Thanks for the illustration.

There are several ways to do that. Please have a look at example one, perhaps way to complex, but with many options to expand on it later
Scene file
https://www.amazon.com/clouddrive/share/F7KxuVSQiVtJZYo9tx8IXbpi13KEezhNiGIU1vevGzT

Another option would be to use a Plane with the point amount per row that equals the Clone count. With an easy setup of the P.Y of each point in the row aligned with the Clones, and the next frame defines the next row.
Which might be more straightforward and perhaps faster.
Scene file
https://www.amazon.com/clouddrive/share/5lUhNsqFO4JqOBwLh9zD5gLcYrKlJwwha08eY3zRo4J

Another way I have a look into it earlier, but I’m not convinced about its precision is the one below. It is, however, the easiest setup and has so the highest fun factor.
Scene file
https://www.amazon.com/clouddrive/share/Ppv8NuZgKVF6cjI5q9XCqQeX24zR5lIyVS2Au8tl16z
Of course, this option allows for so much more, in terms of information gathering, e.g., in the Maps tab of the Collision.


Enjoy

P.S.: Volume Object – could be another option.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 March 2019 03:54 PM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: Here is a much faster approach, well: two versions of it.

I think this is the fastest and most versatile of the versions I have tried so far. (Have an eye on the point index.)

Screen capture
https://www.amazon.com/clouddrive/share/PylRSLdxctB9EXWCOmlNLjQLfyjuDd8AOF72h11pr4n

Scene files (41+51)
https://www.amazon.com/clouddrive/share/W4STWCvWjJyQv5Hfrh5vcXS44DGfTGaT04m8t7pK8GC
The “…_51.c4d” can go on endlessly!

As a side note: I use a gradient and not a Vertex map, but see for yourself
https://www.amazon.com/clouddrive/share/6HIoHGuSDrhj42qCXEZYemMfrART4xi6FRCGbiXaVgC

I hope one of the versions is useful to you. I think I have to stop here, but sure, there are many ways to do that.


ENJOY

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 03 March 2019 05:39 PM   [ Ignore ]   [ # 5 ]  
Total Posts:  10
Joined  2019-02-26

Hello Sassi,

Thank you so much for these. They’re great, I am learning a lot from them.

What if I want to use a more precise, finely grained Spectrogram? Can I import it as an uncompressed, high-resolution bitmap, e.g. png file, and use it to achieve these sorts of animations with more detail?

All the best,
António

Profile
 
 
Posted: 04 March 2019 01:43 AM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, António, thanks for the kind feedback.

The number of clones, or points, will define the resolution. Typically if the sound is pleasant to the ears, the resolution is large, which means there is plenty to work with.

If you can produce images, the amount of details is then based on how much the surface can be locally moved (points)to get this effect. Besides this, there are some techniques that would just to simulate a detailed surface. Those methods would be Bump-Mapping or Normal Mapping. These two would certainly allow for a very fine detailing with outgoing extreme with polygons/points. However, those methods have their limitations, as they do not really produce any real change to the surface, it just looks that way.

Image files are based on several parameters, typically this is a resolution in pixels, as well as color depth or just bit depth per channel. With png you would be not well of with 8bit per channel, 16 bit per channel should be fine. However, with those, you would need to know how any color profile might distort your content, hence why I typically use OpenEXR, I’m not really into gamma based images for that. Music has no gamma, and to apply a gamma curve on that would only mean that the values are shifted to be stored into and then shifted back to get it out of the gamma space. Often I see sRGB in use, which is at best a delivery format, and never ever should it be used inside a production – if high quality is the target. But with no doubt, this shouldn’t be used on data storing images, like the one you have in mind, or others like alpha, normal, depth, etc. Hence, again, linear formats. This takes a lot of limitations out of the equation and puts pure quality into it, as 16 bit/channel or 32bit channel float.

You’re right, compression has no idea, that data is stored instead of pictures, that would be a big problem, except perhaps for anything that is lossless, like a run-length algorithm.

My best wishes for your project.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile