Archived

This topic is now archived and is closed to further replies.

StephanS

DSD Spoiler sound problem

Recommended Posts

Help AVSIM continue to serve you!
Please donate today!

Hello Niclas Try (A:AIRSPEED INDICATED,knot) 150 > (A:SPOILERS HANDLE POSITION,percent) 60 > & if{ 1 (>L:Wiper_xml_Spoiler,enum) } els{ 0 } I think the first part of the handle movment arms the spoiler so using 60 % should be past that.

Share this post


Link to post
Share on other sites

Hello and thanks alot for your help :D,.. now it works as I want itCheers :-beerchugNiclas

Share this post


Link to post
Share on other sites

>> Hello Niclas> > Try> (A:AIRSPEED INDICATED,knot) 150 > (A:SPOILERS HANDLE>POSITION,percent) 60 > & if{ 1 (>L:Wiper_xml_Spoiler,enum)>} els{ 0 }>> I think the first part of the handle movment arms the>spoiler so using 60 % should be past that.>I changed the code a little so the spoilersound is looped:(A:AIRSPEED INDICATED,knot) 150 > (A:SPOILERS HANDLE POSITION,percent) 60 > & if{ 2 (>L:Wiper_xml_Spoiler,enum) } els{ 0 (>L:Wiper_xml_Spoiler,enum) }

Share this post


Link to post
Share on other sites

This is my first post here on AVSIM and i would say hello to all you simmers.Hi Niclas,I`m also on my way in realising a separate gear and spoiler-wind-sound as feelthere did it in their addons.I`m really new to xml-programming and in the DSD-XML-SOUND-Story, so I have no idea in realising the wind sounds.But I`m happy to see a solution that works as you wrote. All threads i found in ohter forums had only questions, but no answer.This here looks very simple - great . Thank you !!I will try it this week, beacause i have`nt the DSD_XML_SOUND.GAU function on my FS. Maybe i`m doing something wrong with the DSD_XML_SOUND.INI but that`s another story...In addition, my target is to provide the spoiler-wind and gear down wind-sounds with dynamic volume. This means, when you extract thespoilers for example to 50% then the volume of the sound is about 70%, 60% spoiler means 75% volume, and so on...Read, that there is a volume-parameter for each sound, which can be set as a variable in the xml.(A:AIRSPEED INDICATED,knot) 150 > (A:SPOILERS HANDLE POSITION,percent) 60 > & if{ 2 (>L:DSD_XML_SOUND_ID00,enum) } els{ 0 (>L:DSD_XML_SOUND_ID00,enum) }(A:SPOILERS HANDLE POSITION,percent) 50 > (A:SPOILERS HANDLE POSITION,percent) 60 < & if{ 70 (>L:DSD_XML_SOUND_ID00_VOLUME,enum) }(A:SPOILERS HANDLE POSITION,percent) 60 > (A:SPOILERS HANDLE POSITION,percent) 70 < & if{ 75 (>L:DSD_XML_SOUND_ID00_VOLUME,enum) }(A:SPOILERS HANDLE POSITION,percent) 70 > (A:SPOILERS HANDLE POSITION,percent) 80 80 (>L:DSD_XML_SOUND_ID00_VOLUME,enum) }(A:SPOILERS HANDLE POSITION,percent) 80 > (A:SPOILERS HANDLE POSITION,percent) 90 < & if{ 90 (>L:DSD_XML_SOUND_ID00_VOLUME,enum) }(A:SPOILERS HANDLE POSITION,percent) 90 > (A:SPOILERS HANDLE POSITION,percent) 100 < & if{ 100 (>L:DSD_XML_SOUND_ID00_VOLUME,enum) }(Maybe it`ll be a better way to use the "SPOILER LEFT POSITION,percent" instead of the "SPOILERS HANDLE POSITION,percent" when setting the volume, to simulate the delaybetween the handle and the deflaction-movement of the model).What do you think ? Is this the way it should work, or is there a more graceful way to realise it ?Thank you...

Share this post


Link to post
Share on other sites

Hello ? Try(A:AIRSPEED INDICATED,knot) 150 > (A:SPOILERS HANDLE POSITION,percent) 60 > & if{ 2 (>L:DSD_XML_SOUND_ID00,enum) } els{ 0 (>L:DSD_XML_SOUND_ID00,enum) }(A:SPOILERS HANDLE POSITION,percent) s0 50 59 l0 rng if{ 70 } 60 69 l0 rng if{ 75 } 70 79 l0 rng if{ 80 } 80 89 l0 rng if{ 90 } 90 100 l0 rng if{ 100 }(>L:DSD_XML_SOUND_ID00_VOLUME,enum)

Share this post


Link to post
Share on other sites

Wow,thanks for your quick reply. Seems i have a lot to learn. I will give it a try tonight :)

Share this post


Link to post
Share on other sites

Hi PVE,the solution you posted here did not work for me. I have to find out why, but when I insert the lines above the sound does not play anymore.Maybe something with my DSD-XML-config is still wrong. The volume-parameter was added to the ini-file and i also tried to add the command for setting the volume-value for the soundvariable in addition...(A:AIRSPEED INDICATED,knot) 150 > (A:SPOILERS HANDLE POSITION,percent) 60 > & if{ 2 (>L:DSD_XML_SOUND_ID00,enum) } els{ 0 (>L:DSD_XML_SOUND_ID00,enum) }(A:SPOILERS HANDLE POSITION,percent) s0 50 59 l0 rng if{ 70 } 60 69 l0 rng if{ 75 } 70 79 l0 rng if{ 80 } 80 89 l0 rng if{ 90 } 90 100 l0 rng if{ 100 }(>L:DSD_XML_VOLUME,enum) 3 (>L:DSD_XML_SOUND_ID00,enum)BTW: my solution from above also did not work (the sound plays, but doesn`t change the volume). I will provide, if i find out the problem.Cheers...

Share this post


Link to post
Share on other sites

Hi,(L:DSD_XML_SOUND_ID00,enum) will always be 3Is that your intention?Jan

Share this post


Link to post
Share on other sites

Hi Jan,yes: the documentation of the dsd-xml-sound says, that a value of1 = plays the sound2 = loops the sound (set in the conditional IF above)3 = sets the volume of the desired soundfile (DSD_XML_SOUND_ID00 in that case) to the value of the Volume-Variable (DSD_XML_VOLUME).My DSD-XML.INI contains:[LVars]Lvar00=dsd_xml_sound_id00VolumeVar=DSD_XML_VOLUME[sounds]Sound00=./Sound/dsd/spoilerwind.wavI thougt, that the soundfile DSD_XML_SOUND_ID00 will loop and also the volume for it will be set every processing-interval of the gauge according to the volume-parameter.

Share this post


Link to post
Share on other sites

Hi,May be i am wrong, will have a look in my files later(at work!),but it looks like (L:DSD_XML_SOUND_ID00,enum) will never be 0, 1 or 2, so you will here no sound.Try without that command.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi,Found some code from under the dust:I activated the sound somewhere in a click area, arm spoiler or something, and then the position of the spoiler determines the volume.Tested:(>K:SPOILERS_ARM_TOGGLE) 2 (>L:spoiler sound,number) 75 (>L:dsd_xml_sound_volume,number)(A:SPOILERS HANDLE POSITION,percent) 60 > if{ 3 (>L:spoiler sound,number) } (A:SPOILERS HANDLE POSITION,percent) s0 50 59 l0 rng if{ 80 } 60 69 l0 rng if{ 85 } 70 79 l0 rng if{ 90 } 80 89 l0 rng if{ 95 } 90 100 l0 rng if{ 100 } (>L:dsd_xml_sound_volume,number) And it worked...Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Sorry folks,thought in the wrong direction. You are definetly right.Without setting the sound to this specific sound-variable it works.Thank you Jan and pve :-) May be, i have to set the volume to a specific soundfile at another point in my gauge, because I`m planning to add a wind-sonud for the undercarriage as well.Maybe setting the volume to the sound itself should only occur, when the SPOILER HANDLE POSITION changes. Then i will increase the update frequency of the gauge and this should work. I will give it a try and come back here...

Share this post


Link to post
Share on other sites

>Hi,>>Found some code from under the dust:>>I activated the sound somewhere in a click area, arm spoiler>or something, and then the position of the spoiler determines>the volume.>>Tested:>>>(>K:SPOILERS_ARM_TOGGLE) >2 (>L:spoiler sound,number) >75 (>L:dsd_xml_sound_volume,number)>>>>>(A:SPOILERS HANDLE POSITION,percent) 60 > >if{ 3 (>L:spoiler sound,number) } >(A:SPOILERS HANDLE POSITION,percent) s0 >50 59 l0 rng if{ 80 } >60 69 l0 rng if{ 85 } >70 79 l0 rng if{ 90 } >80 89 l0 rng if{ 95 } >90 100 l0 rng if{ 100 } >(>L:dsd_xml_sound_volume,number) >>>And it worked...>>>Jan>>"Beatus ille qui procul negotiis..."Hi Jan,i will try it. Thanks !

Share this post


Link to post
Share on other sites

Sorry people,i can`t get it to work. I have searched other Threads to find something that helps, but without success. So here is the question of the questions : Is it possible to change the volume while the sound is playing, or is it just possible to change the volume for the netxt time the sound is played ?(A:SPOILERS HANDLE POSITION, percent) 30 > (A:SPOILERS HANDLE POSITION, percent) 39 80 (>L:dsd_xml_sound_volume, number) }(A:SPOILERS HANDLE POSITION, percent) 40 > (A:SPOILERS HANDLE POSITION, percent) 49 < & if{ 85 (>L:dsd_xml_sound_volume, number) }(A:SPOILERS HANDLE POSITION, percent) 50 > (A:SPOILERS HANDLE POSITION, percent) 59 < & if{ 90 (>L:dsd_xml_sound_volume, number) }(A:SPOILERS HANDLE POSITION, percent) 60 > (A:SPOILERS HANDLE POSITION, percent) 69 < & if{ 92 (>L:dsd_xml_sound_volume, number) }(A:SPOILERS HANDLE POSITION, percent) 70 > (A:SPOILERS HANDLE POSITION, percent) 79 < & if{ 95 (>L:dsd_xml_sound_volume, number) }(A:SPOILERS HANDLE POSITION, percent) 80 > (A:SPOILERS HANDLE POSITION, percent) 89 < & if{ 97 (>L:dsd_xml_sound_volume, number) }(A:SPOILERS HANDLE POSITION, percent) 90 > (A:SPOILERS HANDLE POSITION, percent) 100 < & if{ 100 (>L:dsd_xml_sound_volume, number) }and then set a "3" to the Sound control variable like3 (>L:DSD_XML_SOUND_ID01, number)In this manner i can`t hear the sound any more, even if these commands are followed by the conditional "play"command:...(A:SIM ON GROUND,bool) 0 == (A:SPOILERS HANDLE POSITION, percent) 31 > & if{ 2 (>L:DSD_XML_SOUND_ID01, enum) } els{ 0 (>L:DSD_XML_SOUND_ID01, enum) }...Whithout setting the sound-control variable to 3 it works, but only when i trigger the sound variable in the "if" condition with a "1" and not a "2" for looping the sound. The trigger is then the update rate of the gauge, but the volume changes only with the new begin of the wav-file played. This is all dissatisfactory.Have i misunderstood the volume-changing in DSD_XML ? Is it possible to change the volume while playing the sound and take the effectdirectly to the looped sound ? Or is it the intention of the DSD_XML_SOUND to change the volume for each new wav-cycle only ? I use thedsd_xml_sound3.gau - Version 3.7.0.0Thank you by the way for your gentle support and Douglas Dawson for this gauge !

Share this post


Link to post
Share on other sites