Is it possible to use the UISlider in a different way then just for audio volume adjustment? I am thinking of creating a button so that when you press it you hear a sound. Now, if the user changes the slider to value 0.3 a different sound can be played, same thing with if the slider value is 0.6. Or does anyone have any other idea how to make something happen like that. The slider would just indicate the level of intensity the sound is played (each different value has a different audio file).
I'd appreciate any advice.
Or would a Stepper be a better way to go?
Related
so I'm making Emotes for my game and I need it so if the player moves at all it cancels the Animation and the Sound, does anyone know how to do this?
Here is my code in ThirdPersonCharacter for the emote:
I also need it so once the B key is pressed you can't press it again until you move. Without this you can spam the key and the sound goes crazy.
Thanks everyone!
P.S. The emote and sound loops, the sound is playing a cue
This can be done easily friend , you need to attach an audio component to your actor so that you have a reference to play it and stop it when your player starts to move or is standing idle, I recommend binding a function to where your player moves to stop the sound . The audio component has a stop function . You can also create a function to choose which sound should the audio component plays.
Now as for your second problem of sound going crazy a do once with delay node back to complete should do the trick , nonetheless there is also an input delay node which I forgot , YAAAAAAY time to learn new nodes!
I hope it helps . Keep on working :).
The issue here is that you're using the animations directly from the asset when, in fact, this is a perfect opportunity to use a Montage and blend the emote into the character.
If you detect movement input you can then cancel the whole thing. To stop the sound, you'll need to save a reference to the spawned SpawnSound2D in a variable. From there, a simple Stop node will do the trick. I'd probably leave the Montage running until it finishes to avoid unnatural character animations but if you truly need to stop the animation as well, use a Stop Anim Montage node
Be careful, though, sudden disruption of player feedback can feel clunky.
I would like to make a a software setup that would let the user switch between two webcam feeds (or more but let's consider two). I would like a fade in/out effect while switching. My main problem is that I don't know how to start.
There seems to be some ffmpeg tool that could do the job (like libavfilter) but I don't get how I could setup it.
What should I consider to use if I want to access frame image to make the transition myself? Is there some simpler way?
I know that this question looks really poorly written, but I'm as lost as I look.
OK, I'm designing a website for a musician who will want their tracks to be played via soundcloud (so that he can update them).
For his site I have the clients name written in the center of the page in big red writing. What I want to do is have each letter change from red to black (and back again) in time with the pulse of whatever track is being played. Not sure where to start with this project other than knowing I will probably need to use HTML5 canvas element and SoundManager2.
Thanks for your ideas and help.
You can use soundManagers eqData or peakData in combination with whileplaying to calculate the pulse effect:
http://www.schillmania.com/projects/soundmanager2/doc/#smsound-peakdata
As you say you could do the pulse effect using canvas or go with a simple CSS text shadow.
I have a custom UISlider and use the currentPlaybackTime to change values of an MPMoviePlayerController object.
The problem is when i scrub at a fast rate using the slider, it doesn't respond as fast as i would like..
Is there any better way to have a fast interactive scrubber for ipad? targeting from OS 3.2
Well there are two issues, only one you can control directly.
Multimedia-content is commonly compressed using some kind of delta-compression, hence quick and exact seeking is not a trivial task to cope with. As that is common and since you can not directly change that, you will have to live with it.
the only way to increase responsiveness for seeking on the content-side (when encoding) is reducing the gop-size - that is, less p-frames between the i-frames.
when using a slider or a similar control, you could, instead of directly connecting the current playback position with it, handle any manual changes in an indirect fashion. You could run a timer based job that, whenever the slider/scrubber has been moved, tries to adjust the playback position towards that new value. Once the player is seeking, prevent the scrubber from getting feedback from the current playback location but allow it once the player is in playing state again. That way the user does not directly experience the clunky seek feedback.
I'm writing a video annotation application with Qt4 in which users need to be able to seek to various points in a video, putting markers on various objects and then setting keypoints for those markers so that they stay on the objects in the video as they move around. QGraphicsItemAnimation seems like a great place to start for these markers, however they need to be able to appear and disappear at specific times, which I can't figure out how to do with the QGraphicsItemAnimation. I could set the scale at 0 to make the objects disappear, but that seems like a pretty hacky solution, and I'm guessing that the paint engine would still waste cpu cycles trying to draw those invisible objects. Does anyone have a better solution than this? I'm using Qt 4.5.3 right now, but I'm willing to upgrade to 4.6 if it makes things easier. Thanks!!
It seems like the functionality you want of showing/hiding QGraphicsItem objects is beyond the scope of the simple "tweening" that the animation class performs. It is only for one object at a time, and any appearance or disappearance you have to write yourself.
You still might get some mileage out of QGraphicsItemAnimation (although the fact that it uses its own timer instead of being locked to the frame clock of your video is a little dodgy).
Neglecting "seeking" for a moment, there is a QTimeLine::finished() signal. If you let the end of an annotation's active animation timeline represent the point where you want it to disappear, you can trigger QGraphicsItem::hide() at that point. When it comes time to turn it back on, you would construct a new QGraphicsItemAnimation (based on the next run of keyframe data for that object) and call QGraphicsItem::show().
Note that one of the headlining features of Qt 4.6 is the QtAnimation framework, which is more sophisticated but also rather complex. I've not used it yet, but looking over the examples it seems like you might be able to "animate" a visibility or opacity property.