Jump to content
mrittman

Sound Track - Start Time

Recommended Posts


This uses a python node

 

kill.zip

 

and I used trial and error...

  • Like 1

Share this post


Link to post
Share on other sites
  • Topic Author
  • Hey, couple of python questions...

     

    Is it possible to display the name of the currently playing sound track in the viewport?

     

    Is it possible to create an input port on that Xpresso node and have an input field to set the name of the object? Just trying to make it easier to select the specific sound track without having to go into the Xpresso editor/python node.

     

    Thanks!

    Matt

    Share this post


    Link to post
    Share on other sites

    I'm not sure how to swap tracks the way you suggested. Is it essential to use timeline sound ? The regular sound node is easier to program ie start time, swap tracks. AFAIK it doesn't render, but there's ways around that - eg record 'what you hear' in real time and add it in post. See snip

     

    soundnode.png.2839f7f84c23231e83377de482bc4ad5.png

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 1 hour ago, jed said:

    I'm not sure how to swap tracks the way you suggested. Is it essential to use timeline sound ? The regular sound node is easier to program ie start time, swap tracks. AFAIK it doesn't render, but there's ways around that - eg record 'what you hear' in real time and add it in post. See snip

     

    soundnode.png.2839f7f84c23231e83377de482bc4ad5.png

    I'm having trouble creating the same xpresso setup you've got :/

     

    This was as far as I could get, and I don't even know if it's right haha. I think I should use timeline sound, because it helps to be able to scrub the timeline and hear it play back. Doesn't the sound node just play a sound when it gets to a specific frame (ie. no scrubbing)?

    xpresso.png

    Share this post


    Link to post
    Share on other sites

    Yes, no scrubbing.

     

    When it comes to triggered sounds, I've had some success using Audacity to record in real time. If the track length doesn't exactly match, AE has time stretch.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 1 hour ago, jed said:

    Yes, no scrubbing.

     

    When it comes to triggered sounds, I've had some success using Audacity to record in real time. If the track length doesn't exactly match, AE has time stretch.

    Do you know if there's a way with your xpresso node setup to output the name of the currently playing track (wherever the playhead is)? Example attached.

    track.png

    python code.png

    Share this post


    Link to post
    Share on other sites
    46 minutes ago, mrittman said:

    Do you know if there's a way with your xpresso node setup to output the name of the currently playing track

    No, sorry. If you look at the MAXON page on special tracks here , you'll understand my quip earlier about my trial and error method. I find the SDK v hard going, so I usually try 'drag and drop' a data field into the Python window. This often results in usable code, with a bit of editing. It worked for the start time field, but when I tried with the sound file, it mysteriously said my music.wav file was called '10.0'....

     

    You could ask at CG Talk or the C4D Plugin Cafe - the latter has some very tech types, but they also speak in Klingon code-speak.

     

    https://forums.cgsociety.org/c/software/MAXON-cinema-4d

    https://plugincafe.MAXON.net/

     

    code joke

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • I simplified it a bit so that the python xpresso node references the object name it's attached to. It's working great now! I really just wish the Start Time was built into the Sound Effector, and I wouldn't have had to mess with all this hah!

    python.png

    xpresso.png

    user data.png

    Share this post


    Link to post
    Share on other sites

    I tried dragging 'use sound' into the python window and it seems that value is accessible. If you load several tracks, you could select which one to play, and maybe output the corresponding filename eg from a list of strings.

     

    sn = doc.SearchObject('soundnull')
    sn2 = doc.SearchObject('soundnull.1')
    
    t = sn.GetFirstCTrack() 
    t2 = sn2.GetFirstCTrack()
        
    t[c4d.CID_SOUND_ONOFF] = 0 # 1 = play
    t2[c4d.CID_SOUND_ONOFF] = 1

    edit - something like this dropbox

    • Like 1

    Share this post


    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


    • Recently Browsing   0 members

      No registered users viewing this page.

    YOUTUBE CHANNEL:

    ABOUT US:

    C4D Cafe is the largest CINEMA 4D community. We provide facilities for discussion, showcasing and learning our favorite software :) Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, get your own private messenger, post status updates, manage your profile and much more. If you need to find solution to your problem or otherwise ask for help, Cafe is the right place.
    ×
    ×
    • Create New...