Here you will find documentation on all the descriptions that Cinema 4D currently has. You can list them Alphabetically, by Type or Plugin . The sample Python and C++ code is automatically generated and in some cases may not be 100% correct. If something doesn't work then please refer to the official Cinema 4D SDK documentation for more information.

IDs and information for Oesounddepreciated

Oesounddepreciated

Attributes

  • ENGLISH NAME : Sound
  • NAME : Oesounddepreciated
  • INCLUDE : Obaseeffector
  • PATH : mograph/description/oesounddepreciated.res
  • PLUGIN : mograph
  • MAXON online help (may not exist): OESOUNDDEPRECIATED

Elements

ID UI Name Type Parameters Cycle
MGSOUNDEFFECTOR_FILE SoundFile FILENAME ANIM
MGSOUNDEFFECTOR_START StartOffset BASETIME  
MGSOUNDEFFECTOR_MGMODE ApplyMode LONG  
MGSOUNDEFFECTOR_MGMODE_ALL All
MGSOUNDEFFECTOR_MGMODE_STEP Step
MGSOUNDEFFECTOR_FALLOFF Falloff REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
FIT_H
MGSOUNDEFFECTOR_MODE SampleMode LONG  
MGSOUNDEFFECTOR_MODE_PEAK Peak
MGSOUNDEFFECTOR_MODE_AVE Average
MGSOUNDEFFECTOR_MODE_COMP Switch
MGSOUNDEFFECTOR_CLAMP ClampOutput BOOL  
MGSOUNDEFFECTOR_LOWERLIMIT LowerCutoff REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
MGSOUNDEFFECTOR_MULTIPLIER Compression REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
MGSOUNDEFFECTOR_GRAPH FrequencyGraph BITMAPBUTTON FIT_H
MGSOUNDEFFECTOR_FILTERSHAPE FilterShape SPLINE FIT_H
MGSOUNDEFFECTOR_COLORGRADIENT FrequencyColor GRADIENT
COLOR
ICC_BASEDOCUMENT
MGSOUNDEFFECTOR_FREQ Frequency REAL
MIN 0.01
MAXSLIDER 10000
MGSOUNDEFFECTOR_BANDWIDTH Bandwidth REAL
MIN 0.01
MAXSLIDER 10000
MGSOUNDEFFECTOR_LCHANNEL LeftChannel BOOL  
MGSOUNDEFFECTOR_RCHANNEL RightChannel BOOL  
MGSOUNDEFFECTOR_FILTER UseFilter BOOL  
MGSOUNDEFFECTOR_PLAY Play BUTTON  
MGSOUNDEFFECTOR_SCRUB ScrubSound BOOL  

Example Code

The following code does not use the correct values when setting the data. You should check directly in C4D for the correct values that you should use in place of the ones that are shown. This code is just to show you how to access the values for getting and setting the parameters.

Python

import c4d
from c4d import gui
def main():
    obj = c4d.BaseObject(c4d.Oesounddepreciated)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.MGSOUNDEFFECTOR_FILE] = "c:\\SomeFile.txt"
    obj[c4d.MGSOUNDEFFECTOR_MGMODE] = c4d.MGSOUNDEFFECTOR_MGMODE_ALL
    obj[c4d.MGSOUNDEFFECTOR_FALLOFF] = 0.1
    obj[c4d.MGSOUNDEFFECTOR_MODE] = c4d.MGSOUNDEFFECTOR_MODE_PEAK
    obj[c4d.MGSOUNDEFFECTOR_CLAMP] = True
    obj[c4d.MGSOUNDEFFECTOR_LOWERLIMIT] = 0.1
    obj[c4d.MGSOUNDEFFECTOR_MULTIPLIER] = 0.1
    obj[c4d.MGSOUNDEFFECTOR_FREQ] = 0.1
    obj[c4d.MGSOUNDEFFECTOR_BANDWIDTH] = 0.1
    obj[c4d.MGSOUNDEFFECTOR_LCHANNEL] = True
    obj[c4d.MGSOUNDEFFECTOR_RCHANNEL] = True
    obj[c4d.MGSOUNDEFFECTOR_FILTER] = True
    obj[c4d.MGSOUNDEFFECTOR_SCRUB] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetFileName(c4d.MGSOUNDEFFECTOR_FILE,"c:\\SomeFile.txt")
    bc.SetInt32(c4d.MGSOUNDEFFECTOR_MGMODE,c4d.MGSOUNDEFFECTOR_MGMODE_ALL)
    bc.SetFloat(c4d.MGSOUNDEFFECTOR_FALLOFF,0.1)
    bc.SetInt32(c4d.MGSOUNDEFFECTOR_MODE,c4d.MGSOUNDEFFECTOR_MODE_PEAK)
    bc.SetBool(c4d.MGSOUNDEFFECTOR_CLAMP,True)
    bc.SetFloat(c4d.MGSOUNDEFFECTOR_LOWERLIMIT,0.1)
    bc.SetFloat(c4d.MGSOUNDEFFECTOR_MULTIPLIER,0.1)
    bc.SetFloat(c4d.MGSOUNDEFFECTOR_FREQ,0.1)
    bc.SetFloat(c4d.MGSOUNDEFFECTOR_BANDWIDTH,0.1)
    bc.SetBool(c4d.MGSOUNDEFFECTOR_LCHANNEL,True)
    bc.SetBool(c4d.MGSOUNDEFFECTOR_RCHANNEL,True)
    bc.SetBool(c4d.MGSOUNDEFFECTOR_FILTER,True)
    bc.SetBool(c4d.MGSOUNDEFFECTOR_SCRUB,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../mograph/description/oesounddepreciated.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oesounddepreciated);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDO_NEW,pObject);
    pDoc->EndUndo();
    EventAdd(EVENT_FORCEREDRAW);
    
    //You can set parameters two different ways. 

    //First way              
    //Some objects do not store all their data in the container. You need to use GetParameter()/SetParameter() instead. 

    DESCFLAGS_SET flags = DESCFLAGS_SET_PARAM_SET;
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_FILE),GeData(Filename("c:\\SomeFile.txt"),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_MGMODE),GeData(MGSOUNDEFFECTOR_MGMODE_ALL),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_FALLOFF),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_MODE),GeData(MGSOUNDEFFECTOR_MODE_PEAK),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_CLAMP),GeData(true),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_LOWERLIMIT),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_MULTIPLIER),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_FREQ),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_BANDWIDTH),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_LCHANNEL),GeData(true),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_RCHANNEL),GeData(true),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_FILTER),GeData(true),flags);
    pObject->SetParameter(DescID(MGSOUNDEFFECTOR_SCRUB),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetFileName(MGSOUNDEFFECTOR_FILE,"c:\\SomeFile.txt");
    bc->SetInt32(MGSOUNDEFFECTOR_MGMODE,MGSOUNDEFFECTOR_MGMODE_ALL);
    bc->SetFloat(MGSOUNDEFFECTOR_FALLOFF,0.1);
    bc->SetInt32(MGSOUNDEFFECTOR_MODE,MGSOUNDEFFECTOR_MODE_PEAK);
    bc->SetBool(MGSOUNDEFFECTOR_CLAMP,true);
    bc->SetFloat(MGSOUNDEFFECTOR_LOWERLIMIT,0.1);
    bc->SetFloat(MGSOUNDEFFECTOR_MULTIPLIER,0.1);
    bc->SetFloat(MGSOUNDEFFECTOR_FREQ,0.1);
    bc->SetFloat(MGSOUNDEFFECTOR_BANDWIDTH,0.1);
    bc->SetBool(MGSOUNDEFFECTOR_LCHANNEL,true);
    bc->SetBool(MGSOUNDEFFECTOR_RCHANNEL,true);
    bc->SetBool(MGSOUNDEFFECTOR_FILTER,true);
    bc->SetBool(MGSOUNDEFFECTOR_SCRUB,true);
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

This node has buttons. Buttons can manually be executed by calling the following code

Python

c4d.CallButton(obj,c4d.MGSOUNDEFFECTOR_GRAPH)
c4d.CallButton(obj,c4d.MGSOUNDEFFECTOR_PLAY)

C++

DescriptionCommand dc;
dc.id = DescID(MGSOUNDEFFECTOR_GRAPH);             
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(MGSOUNDEFFECTOR_PLAY); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);

Gradients

This node has gradients. Gradients can manually be edited by calling the following code

Python


C++

           
#include "customgui_gradient.h"
MGSOUNDEFFECTOR_COLORGRADIENT
GeData data; pObject->GetParameter(DescID(MGSOUNDEFFECTOR_COLORGRADIENT),data,DESCFLAGS_GET_PARAM_GET)); Gradient *pGradient = (Gradient*)data.GetCustomDataType(CUSTOMDATATYPE_GRADIENT); if(pGradient) { //must be set before any knot is set pGradient->SetData(GRADIENT_MODE, GeData(GRADIENTMODE_ALPHA)); GradientKnot k1, k2; k1.col = Vector(0.0, 0.0, 1.0); k1.pos = 0.0; k2.col = 1.0; k2.pos = 1.0; pGradient->InsertKnot(k1); pGradient->InsertKnot(k2); } pObject->SetParameter(DescID(MGSOUNDEFFECTOR_COLORGRADIENT),data,DESCFLAGS_SET_PARAM_SET));