creating an oscillating number in UE, to BPM

what are a couple different methods to create an oscillating number within UE. Oscillating to the time of BPM?

for BPM =120 (variable)
Beat = 60 / BPM = 0.5 seconds
Bar = 60 * 4 / BPM = 4 seconds

how would i call a sine or cos function to do so? I’d like to multiply this by the size or color of an object, so it pulses with the beat.

(any ideas for other variables i could modulated with BPM, besides size and color?)

It all depends:

  • if you want to change just color, you can make material that uses sin function to animate color. Get sine, change its period. USe result to drive linear interpolation node (LERP) between two colors.
  • if you want actual static mesh to bounce, you can do same but in actor and its blueprint, then move static mesh component inside its local space.
  • you can also make morph targets for mesh, animate that so mesh changes shape
  • you can also make niagara emmiter and change your particles there
  • you can also use interpto node, set goal and let value slowly extrapolate to goal
1 Like

thank you! that’s a good start

while on this topic, any other suggestions for visuals to be triggered from midi drums?

Oh you want it for sound visualization.

There are spectrum analyzer plugins or subsystems. You can make that realtime.

However for visualizing sound i would suggest using materials. You can change colors, textures, deform meshes, rotate them or move, all in materials. It will be faster and much more optimized than doing that in blueprints.

eventually I’d like it for music video kind of visuals, live feedback system when you hit midi.

for now, a music game to sync with bpm.