setDirectivity.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. return {
  2. tag = 'sourceEffects',
  3. summary = 'Set the directivity of the Source.',
  4. description = [[
  5. Sets the directivity settings for the Source.
  6. The directivity is controlled by two parameters: the weight and the power.
  7. The weight is a number between 0 and 1 controlling the general "shape" of the sound emitted.
  8. 0.0 results in a completely omnidirectional sound that can be heard from all directions. 1.0
  9. results in a full dipole shape that can be heard only from the front and back. 0.5 results in a
  10. cardioid shape that can only be heard from one direction. Numbers in between will smoothly
  11. transition between these.
  12. The power is a number that controls how "focused" or sharp the shape is. Lower power values can
  13. be heard from a wider set of angles. It is an exponent, so it can get arbitrarily large. Note
  14. that a power of zero will still result in an omnidirectional source, regardless of the weight.
  15. ]],
  16. arguments = {
  17. weight = {
  18. type = 'number',
  19. description = 'The dipole weight. 0.0 is omnidirectional, 1.0 is a dipole, 0.5 is cardioid.'
  20. },
  21. power = {
  22. type = 'number',
  23. description = 'The dipole power, controlling how focused the directivity shape is.'
  24. }
  25. },
  26. returns = {},
  27. variants = {
  28. {
  29. arguments = { 'weight', 'power' },
  30. returns = {}
  31. }
  32. }
  33. }