Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Creating Sound Track

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 251 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 22/02/2007 at 10:52, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R10 
      Platform:      Mac OSX  ; 
      Language(s) :

      ---------
      Hello all.
      how do I attach a sound track to an object?

      I looked at BaseSound and I should be able to load it, but have no idea on how to do the attachment.

      thanks

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 22/02/2007 at 11:05, xxxxxxxx wrote:

        You'll need to create a sound track for the object for starters:

        BaseObject* obj; // object to receive track
        BaseDocument* doc; // document that contains obj

             // Check for Sound track, create if none  
             DescID               descID =     DescLevel(ID_ANIM_SOUND,ID_ANIM_SOUND,0);  
             CTrack*               track =          obj->FindCTrack(descID);  
             if (!track)  
             {  
                  track =          CTrack::Alloc(obj, descID);  
                  if (!track)     return FALSE; // Alloc Error  
                  obj->InsertTrackSorted(track);  
                  doc->AddUndo(UNDO_NEW, track);  
             }
        

        Then you'll have to look at the resource:modules:newman:res:description:ctsound.res file for information to set the start time and sound file on the track. These will probably require SetParameter().

        This method has not been tested, so there are no guarantees that it will work.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 22/02/2007 at 14:10, xxxxxxxx wrote:

          Thanks Robert most of the code worked create track, and SetParameter().

          trackRef->SetParameter ( DescID(CID_SOUND_NAME), GeData(fname.GetString()), 0);

          CID_SOUND_NAME takes a string as parameter, but does not get evaluated after been set.

          there should be a function to set the filename or make it evaluate the sound path.

          Maxon engeneers HELP please!!!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post