Jump to content

Could Sound._playbackRate have a setter??


JCPalmer
 Share

Recommended Posts

I am building a demo page for my Animation System.  It was a way to give it some more exercise, show off its features, & get more Blender experience.  Also, lets me see where things could be improved prior to release to avoid changing later, possibly needing to break compatibility.

I am up to 15 seconds of animation in the demo & have not even started any skeleton pose interpolation.  As I am adding things, I got tired of waiting for 15 secs to go by.  Fortunately, I have centralized time line control for pause / resume.  I put in a speed multiplier, so I can just add a line like:

QI.TimelineControl.SPEED = 10;

Now everything happens in 1.5 seconds, without changing all my timings.  Its a little trickier to turn it back to 1 when I get to the part I care about.  You need to put the reset in a function that also gets put on a queue where it is wanted.  After done development, just rip out  2 lines.

QI is also very well synchronized with audio.  The MotionEvent class ( & therefore all sub classes) takes a sound in the constructor.  An instance of a MotionEvent does not immediately start.  You put it on a mesh's / camera's / or light's queue.  Once the event is next to run, the event starts the sound.  I wanted to play the sound at the same speed as the scene.  However, _playbackRate is currently only specified in the sound constructor.  I could just reference / manually set it myself, but since it is private in typescript, thought I would put it out there that I intend to do it much later.

Link to comment
Share on other sites

@davrous, thanks.  I do not know what I was looking at when I started this.  There is not a "setter" per say, but there is a function which sets it.  As you know, it can even change the speed of a sound after it started playing.

I have also been slowing down the animations you can pick from in a dropdown in Blender to display a Mesh  (called a 'GrandEntrance').  They happen really fast, so it is hard QA them at normal speed.  These have a sound which is really wild played @ 0.1 playbackRate.

Link to comment
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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...