change_vol confusion

darb1 Member Posts: 22 Member

Hi, I was experimenting with change_vol and am a bit confused now.

I guess my problem is that I don´t know what my events volume is to begin with? Is this parameter dependent on the velocity the event was played with?


  • Reid115
    Reid115 Member Posts: 47 Member

    Velocity and volume are different things, although you could use velocity to modulate the volume. The change_vol() function is structured like change_vol(<ID-number>,<volume>,<relative-bit>), where the relative bit is either 0 (absolute change) or 1 (change relative to current volume). Volume is in millidecibels. So change_vol($EVENT_ID, -2000, 1) would lower the event volume by 2 decibels. I recommend reading the KSP reference manual where this is explained.

  • darb1
    darb1 Member Posts: 22 Member

    I just got confused how you change something in decibels relative to current volume. Like which one is it.

    If you play something and set the change to relative, then putting -2000 should have different effects depending on whether you play something at lets say -6dB vs. -12dB. So in this case, in what unit is the volume parameter? Then -2000 magically becomes -10% of -6 AND -12dB?

    As you can see in the ref manual they use EVENT_VELOCITY somehow to create a simple exciter, so I thought maybe one could use it to get useful information to work with.

    I think I got something twisted here.

  • medusa
    medusa Member Posts: 81 Helper
    edited August 2022

    change_vol just changes the volume in milli decibels, so -2000 is down 2 dB link

    if you need to get the current volume of an event, you can use get_event_par and EVENT_PAR_VOLUME

Back To Top