Having trouble setting parameter in script

Im trying to set the volume of a sound effect to a parameter that changes depending on how fast one of my objects is moving (the puck specifically.) I have the parameter range within FMOD set to 0-1, however I did try changing this but it didnt work out.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FMOD.Studio;
using FMODUnity;

public class FMODParamHandler : MonoBehaviour
//object references
public Rigidbody2D puckRb;

//reference to FMODEventsHolder instance
private FMODEventsHolder eventsHolder;

//event references
public EventReference puck_HitPaddle;
public EventReference puck_BounceWall;

//event instances
private EventInstance puckHitPaddleInstance;
private EventInstance puckBounceWallInstance;

public float puckVelocityParameter;

void Start()
    //Initialize the reference to FMODEventsHolder
    eventsHolder = FMODEventsHolder.instance;

    //Initialize EventInstances
    puckHitPaddleInstance = FMODUnity.RuntimeManager.CreateInstance(eventsHolder.puck_HitPaddle);
    puckHitPaddleInstance = FMODUnity.RuntimeManager.CreateInstance(eventsHolder.puck_BounceWall);

void Update()
    //puckVelocity set
    Vector2 puckVelocity = puckRb.velocity;
    float puckSpeed = puckVelocity.magnitude;

    puckVelocityParameter = puckSpeed;

    puckHitPaddleInstance.setParameterByName("puckVelocity", puckSpeed);
    puckBounceWallInstance.setParameterByName("puckVelocity", puckSpeed);


Apologies for the delayed response.

Just to clarify, what exactly is the issue - what are you expecting to happen, and what isn’t happening? Are you events failing to play at all (there doesn’t appear to be an eventInstance.start() call in your snippet), or is it that their behavior doesn’t reflect the parameter value you’re setting?