Aller au contenu

Photo

Music volume changable via scripting?


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
3RavensMore

3RavensMore
  • Members
  • 703 messages

Like the topic says, is there a way to change the music volume via scripting?  To be clear, I mean the music tracks, not the ambient sounds.



#2
Kato -

Kato -
  • Members
  • 392 messages

I don't think it's feasible with vanilla libraries, although near every other sound function is there(changing/starting/stopping tracks, ambient volume day/night etc). Maybe with nwnx2...

 

 

Kato 



#3
henesua

henesua
  • Members
  • 3 879 messages

this would be huge!



#4
CaveGnome

CaveGnome
  • Members
  • 292 messages
if you dont need too numerous sound volume levels, there is a workaround. use a sound editor, load your music and reduce or increase the global output level, now save as many soundtracks as you need sound levels. in game just playing one file or another you are now able to change volume. a good sound editor that can do the trick: Audacity.
  • Proleric et Kato - aiment ceci

#5
3RavensMore

3RavensMore
  • Members
  • 703 messages

Audacity is a must have editor, but I was looking for someway to do it in game. 



#6
Fester Pot

Fester Pot
  • Members
  • 1 394 messages

The only way for music, is to rip them to .wav format, and include them as ambient sounds placed in the area. Then, use SoundObjectSetVolume to define its level of volume.

 

// Set the volume of oSound.
// - oSound
// - nVolume: 0-127
void SoundObjectSetVolume(object oSound, int nVolume)

This way will require a .hak download or an ambient download to dump to /ambient.

Either way, it's a download. There are no in-game script commands to adjust music level.

 

FP!


  • Squatting Monk, CaveGnome et 3RavensMore aiment ceci

#7
3RavensMore

3RavensMore
  • Members
  • 703 messages

Oy, I can't believe I didn't think of that.

 

Thanks FP.