AKNodeOutputPlot increase speed? - ios

I am using AudioKit for an iOS app. Right now everything is working well for me. However I am having trouble customizing the AKNodeOutputPlot animation. When using AKNodeOutputPlot how do you increase its speed? Basically it takes x seconds to fill its view. How can I get it do it in x/2 seconds with a view of the same size?

Sounds like you're using a rolling plot, in which case do:
plot.setRollingHistoryLength(<#T##historyLength: Int32##Int32#>)

Related

How to control display speed in manim?

I found in manim there are two kinds of way to display animation, one way is to useself.play()and by adding run_time = Xin kwargs, the speed of animation can be set and the animation will finish in X seconds.
But I found another way to display by first adding an object with updater using self.add() and wait it to display using self.wait().
How to control the speed if use self.add() and self.wait()?
There is a demo to show the case
BTW, I'm using manimgl instead of community version in order to achieve real time rendering.

How to add a continuous moving background in my flutter app?

I’ve been developing an iOS app using Swift 4 but recently (today) decided to switch to Flutter/dart after hearing about its capabilities.
In my iOS app, I have a moving background of waves (actual waves when you think of an ocean).
The width of the the wave .png is 1606 units and I animated it in a way where it will translate from right to left 265 units in 1 second, then it repeats itself. This way, the waves are moving continuously when in reality, it’s only a fraction of the entire png repeating itself.
I needed this same background to apply to all ViewControllers (screens) in the app and I did this by sending the last known x value right before the transition through a segue (transition between viewcontrollers, I believe it’s a “route” for dart?) and used this value as the initial position of the waves in the next ViewController. When I swipe up or down, to move to different view controllers, the waves would also move accordingly.
For some reason, the animations were a bit choppy but I’d say 80% of the time, it was perfectly smooth. I need it to be 100% for when I release my app tho.
How would I go about accomplishing this type of animation in Dart?
For animations, Flare seems very promising and I’m kind of steering towards using that to accomplish my goal but I’d like to hear any advice on how I should approach this.
The animation performance depends on how it's implemented. Without a minimal repro, it'll be challenging to figure out the issue. Though other options that you may consider to animate the background is by using AnimatedPositioned widget. Using this should help manipulate the position of widgets displayed on screen.
Another one is by using Adobe After Effects animations and rendering it with lottie plugin on your app.

Form Slide Transition Not Smooth

I used to test my apps using an iPhone 5S - now I switched to a iPhone SE.
Now I am asking myself why the default form slide transitions still stutter on such a fast device - the animation should always appear smooth if the calculated locations are correct relative to the timeline.
Looking into CommonTransitions I saw that there is a CommonTransitions.TYPE_FAST_SLIDE and wondered if this was the key to smooth transitions, is it?
In Theme Constants in the Codename One Designer under FormTransitionOut however there is no option fastSlide - why is that?
I've wondered the same, although I have only a cheap device to test on.
This may only add fuel to the fire, but have you tried Display.setFramerate(int rate). The docs say the default is an (attempted) rate of 10 (redraws per second).
Maybe it would look smoother with 20?

Scaling (zooming) CameraNode lags overtime

Im using Swift 3.0 and I'm attempting to use the SKCameraNode class as a camera for my game.
I move it around, rotate, and zoom in and out a lot. For some reason, it goes in and out of having these rough patches (about 30 seconds) where it's super etchy, as if it were only being updated a tenth of the usual time. Note that NOTHING else in the game is lagging except camera movement.
However this is only extremely noticeable when I'm trying to zoom in and out.
The occurrence usually happens after a burst of moving it around a lot, but not always. Sometimes it happens the second the app is started, and other times never.
Here is my code, which is running in didFinishUpdate:
camera.run(SkAction.scale(to: size, duration time))
time is usually 0.0, but sometimes not, so I would like to try to keep this as an SKAction if possible. However, I assume the problem resides in using this SKAction. (I'm like 99% sure the problem isn't that I'm accidentally not passing 0.0 for time)
So what should I do to either fix or work my way around this problem? Is this just a limitation of a Swift?
EDIT: I have now also tried using it in other update functions. I also tested to see the run time of didFinishUpdate (To see if it was lag), but it remained consistent. Also, this happens when i try to rotate the camera as well.
ANOTHER EDIT: I've also tried setting gamePhysics speed to 0.9999 which was suggested in another post with a lag problem
Thanks!

iPhone - Blinking Animation - Screen Refresh Rate Limits

From what I've researched online, the iPhone screen refresh rate is 60Hz (not sure if this applies to iPhone 6 as well) - meaning, it can refresh an image up to 60 times a second.
However, I have a project in which I need a very fast blinking animation - to animate a view back-and-forth (from visible to invisible), more than 60 times a second. I thought about using CADisplayLink, so I'll get called every time the screen refreshes, but unfortunately, as stated above, this is not fast enough (gets called 60 times a second only).
Is there something I'm missing here, or is there a way to achieve a higher blinking rate? Do iOS games achieve better rates than this?
Thanks
There's no way to achieve a faster display rate than the screen refresh itself, mainly because the screen can't refresh as fast, so people won't see it anyway.
Hence all iOS games are effectively vsynced at 60 fps.
That said, depending on what you're doing, you might not be getting 60 fps. Have you profiled your app to determine the fps it's running?
If it's not doing 50+, there's probably some optimization that you can do to get it as close to 60 as possible.

Resources