New Release XRSound 1.0 and Updated XR Vessels Released

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him


Hi all,

It's Tuesday! (Well, at least it still is on the USA's east coast, albeit barely.) XR Sound and the newly updated XR vessels have been released! Special thanks to all the Orbiter-Forum members who helped to beta-test XR Sound and the new XR vessels.

XR Vessel Release Highlights

  • XR vessels now use XRSound, and therefore no longer need to bundle their sound files with each vessel anymore: all sounds are included with the XRSound download.
  • Removed UMMu support since UMMu crashes in Orbiter 2016. Mmu support will be restored when the new designed-for-Orbiter-2016 oMMU ships. oMMU will be in alpha testing with the XR vessels in the coming weeks.
  • Resolved braking performance issues in Orbiter 2016.

XRSound Summary

In addition to providing a C++ API for vessels to use, XRSound also provides over 450 available, fully configurable, default sounds and voice callouts for all Orbiter vessels and add-on authors to use via the XRSound.dll Orbiter module. In addition to the global XRSound.cfg file that configures default sounds for all vessels, you can also edit or create Orbiter vessel-class-specific config files, such as the included XRSound-DeltaGlider.cfg, etc., that assigns default sounds to vessel-specific animations and landing gear without requiring recompiling the vessel or doing any coding.

Here is a demo video of XRSound with Orbiter 2016's default "Welcome to Orbiter 2016" scenario (this is using XRSound with its default settings -- no customization):


Special thanks to Loru for creating the XRSound logo and a brand-new ambient music track that by default plays in external views in space (details below). :tiphat:

XRSound Features

  • Automatically adds default sounds for any Orbiter vessel that defines thrusters -- not just XR vessels! You can also manually assign sounds to any vessel class via its XRSound-<vessel class>.cfg file; e.g., XRSound-DeltaGlider.cfg.
  • Each sound or group of sounds is fully configurable via XRSound.cfg and optional Orbiter vessel class-specific config files, or via the XRSound SDK (included).
  • Includes 450+ sound files, including all XR voice callouts by actress Sally Beaumont and 141 ATC callouts from STS-114 and STS-121 featuring CAPCOM Julie Payette. (These default ATC callouts are a combination of all three STS sound packs currently on my Web site.)
  • Add-on authors are free to use any of the sounds in their own vessels (just please don't redistribute the files).
  • Includes new Solar Serenity ambient music track created by and licensed from Grzegorz Lorens ("Loru" here on Orbiter-Forum) that plays in external views in space by default. This is configurable like any other sound. (For a lossless version of Loru's Solar Serenity, take a look here.)
  • All default sounds are fully configurable, including:
    • Air conditioning
    • Audio greeting voice callout on simulation start
    • Fully configurable music support that can play files from a folder
    • Wind effects while landed in an atmosphere
    • Main engine sound
    • Hover engine sound
    • Retro engine sound
    • RCS sounds
    • Switch on / Switch off clicks for RCS and AF Ctrl changes
    • RCS mode change voice callouts ("Rotation", "Translation", "Off")
    • AF Ctrl mode voice callouts ("Off", "Pitch", "On")
    • Crash sound
    • Hard landing sound
    • Tire chirp on touchdown for vessels that define landing gear animation ID via their XRSound-<class name>.cfg file. [You can set `LogVesselAnimations = 1` in XRSound.cfg to log the animation IDs for all vessels as you activate each animation.]
    • Tires rolling sound; volume varies by ship velocity
    • One additional custom engine sound per vessel (e.g., the SCRAM engines in the stock DeltaGlider-S). Configurable via a given vessel class's XRSound-<vessel class>.cfg file.
    • Wheel brakes sound
    • Takeoff and landing voice callouts ("100 knots", "Wheels up" / "Liftoff", "You are cleared to land", "Warning: gear is up", "Touchdown", "Wheel stop", etc.)
    • Wind sound and plasma sound in flight; volume varies by dynamic pressure
    • Autopilot on / off sound tones
    • Ambient sounds configurable by pointing to a folder in XRSound.cfg; twelve ambient sounds are included by default, but there is no limit to the number of ambient sounds supported. Minimum and maximum playback interval is configurable.
    • Altitude voice callouts
    • Docking distance voice callouts
    • Docking and undocking voice callouts and sounds
    • Docking radar sounds whose beep interval varies by the distance to the docking port
    • Mach voice callouts ("Mach 1", "Mach 2", "Mach 27 Plus", "Subsonic", etc.)
    • ATC sounds played at random at configurable intervals from a specific folder. Like all other sounds and groups, the folder can be changed at runtime via an SDK call, and may be configured via XRSound.cfg or XRSound-<vessel class>.cfg otherwise.
  • Users can add sound events to any existing Orbiter vessel's animations simply by editing that vessel's class's XRSound-<classname>.cfg file. Includes .cfg files for each of the default Orbiter vessels.
  • Includes C++ SDK for add-on authors to use in their own vessels (the new XR vessel versions use it).
  • Users can replace or disable any or all of the default sounds via the XRSound SDK or XRSound.cfg.
  • XRSound.lib is statically linked; no need to bundle Visual Studio redistribution files with an add-on in order to use XRSound, and add-ons that link with XRSound.lib can still run without XRSound.dll installed.
  • No limit to the number of sound slots that vessels may use.
  • No limit to the number of vessels in the simulation.
  • No limit to the number of ATC radio chatter files for a given "frequency" (i.e., folder): you just configure the ATC folder in your XRSound.cfg, and any sound files in that folder are played at random for ATC chatter.
  • Parameters for minimum and maximum times between ATC chatter playback are configurable via XRSound.cfg.
  • Uses irrKlang Pro sound engine internally, which supports the following sound file formats:
    • RIFF WAVE (*.wav)
    • Ogg Vorbis (*.ogg)
    • MPEG-1 Audio Layer 3 (*.mp3) [via ikpMP3.dll plugin, included]
    • Free Lossless Audio Codec (*.flac) [via ikpFlac.dll plugin, included]
    • Amiga Modules (*.mod)
    • Impulse Tracker (*.it)
    • Scream Tracker 3 (*.s3d)
    • Fast Tracker 2 (*.xm)
    • Additional sound formats may be supported by dropping irrKlang plugin DLLs into $ORBITER_ROOT.
  • Refer to the comments in $ORBITER_ROOT\XRSound\XRSound*.cfg files for full details about configuring XRSound.
  • Refer to the comments in XRSound.h (used with static library XRSound.lib or XRSoundD.lib) in $ORBITER_ROOT\Orbitersdk\XRSound for more information about the XRSound API.


Here's a simple XRSound SDK example:


Code:
#include "XRSound.h"
 
// could use #define for IDs instead since sound IDs are just signed integers, but an enum is cleaner
enum MySounds
{
    SystemReset    // value 0
};
 
class MyVessel : public VESSEL4
{
    ...
    XRSound *m_pXRSound;
    bool bResettingTheSystem;
};
 
void MyVessel::clbkPostCreation()
{
    m_pXRSound = XRSound::CreateInstance(this);   // create sound engine instance for this vessel
 
    // load a custom sound for this vessel
    m_pXRSound->LoadWav(SystemReset, "XRSound\Default\System Reset.wav", XRSound::Radio);  // returns false if file not found
 
    // disable the default "100 knots" voice callout
    m_pXRSound->SetDefaultSoundEnabled(XRSound::OneHundredKnots, false);   
 
    // replace the default docking voice callout with a custom one that resides in $ORBITER_ROOT\MySoundsFolder
    m_pXRSound->LoadWav(XRSound::DockingCallout, "MySoundsFolder\My custom docking callout.mp3", XRSound::Radio);
}
 
void MyVessel:::clbkPreStep(double simt, double simdt, double mjd)
{
    if (m_bResettingTheSystem)
    {
        // play our custom sound: don't loop it, and use max volume
        m_pXRSound->PlayWav(SystemReset, false, 1.0);   // returns false if play fails
        m_bResettingTheSystem = false;      // so we don't keep looping it (although calling PlayWav if a sound is [I]already[/I] playing can only change its volume or loop settings: it will not stop and restart it.
    }
}
 
MyVessel::~MyVessel()
{
    // as with any other allocated member variables, always remember to clean up the XRSound engine instance in your destructor! :)
    delete m_pXRSound;
}
Of course, you can also load a new sound into the same sound slot at any time; if a sound is already playing in that slot, it will automatically be stopped when LoadWav replaces it:

Code:
if (m_pXRSound->LoadWav(SystemReset, "My new message.ogg", XRSound::Radio))   // does sound file exist?
    m_pXRSound->PlayWav(SystemReset);    // play the sound using defaults of loop = false and max volume

One important thing to note regarding performance is that LoadWav is lightweight and does not actually load the sound data into memory: it simply 1) verifies that the file exists and is readable, and 2) saves the file path and playback type in the master sound map in memory for this vessel. Sound data is only loaded when it is played, and it automatically released when no longer needed: this is all managed by the underlying irrKlang Pro sound engine.

Refer to $ORBITER_ROOT\Orbitersdk\XRSound\XRSound.h for more information about the SDK.

Also, if you have some old vessels that require OrbiterSound to play their custom sound effects, Face is developing an OrbiterSound-to-XRSound bridge DLL that transparently forwards OrbiterSound calls to XRSound so they can be played -- it is currently in beta testing.

As always, you can download XRSound and the latest XR vessels on my Web site, and you may browse the XRSound User Manual as well.

Happy Orbiting! :tiphat:

P.S. if you are an XRSound beta tester, nothing has changed in these builds since the latest beta versions, so you do not need to re-download them. However, if you want to download the latest XR Sound User Manual, binaries, and XRSound.h, you can get it here. That download includes everything except the sounds themselves.

@Woo482 and @Xyon: I pushed the official 1.00 XRSound source up to my server so you can both download it to back it up. Link and password are unchanged from the betas.

P.P.S. As part of something we set up during the XRSound beta tests, Woo482 and Xyon will always keep copies of the latest version of the XRSound source code and project files in case I am hit by a PSB (Programmer-Seeking Bus), in which case they would release the source code to the community as open-source so that XRSound could (i.e., will) continue to be maintained in perpetuity for new Orbiter versions. But for now, I'm being extra careful when crossing the street... :ninja:
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
Also, if you have some old vessels that require OrbiterSound to play their custom sound effects, Face is developing an OrbiterSound-to-XRSound bridge DLL that transparently forwards OrbiterSound calls to XRSound so they can be played -- it is currently in beta testing.

Thanks for the release! :cheers:

The above mentioned DLL has been updated with the new XRSound binaries. Download link remains here. As usual, just rename /modules/plugin/OrbiterSound.dll and drop it in there.
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
Thanks Doug!
An excellent and at last very welcomed news for Orbiter world!
Do you plan to add a front-end GUI, à la OrbiterSound?

Oh! BTW, XR Fleet ITA manual translation is up, usual link.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
Thanks Doug!
An excellent and at last very welcomed news for Orbiter world!

Do you plan to add a front-end GUI, à la OrbiterSound?

No, but nothing is stopping someone in the community from creating one -- it's just a matter of having it update XRSound.cfg.
 

AssemblyLanguage

Donator
Donator
Joined
Jun 10, 2012
Messages
112
Reaction score
1
Points
0
Thanks for all the work that went into this.

Very minor issue: With Atlantis, switching off the RCS says "On". Switching on the RCS says "Off/Rotation". I tried RCSOff = XRSound\Default\On.wav and RCSOn = XRSound\Default\Off.wav with no effect.

Thanks again.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
Thanks for all the work that went into this.

Very minor issue: With Atlantis, switching off the RCS says "On". Switching on the RCS says "Off/Rotation". I tried RCSOff = XRSound\Default\On.wav and RCSOn = XRSound\Default\Off.wav with no effect.

Thanks again.

From investigating this, this is, unfortunately, an Orbiter 2016 core bug where it is incorrectly togging the AF Ctrl mode on/off along with the RCS mode whenever you press the RCS toggle mode shortcut key (CTRL-NUMPAD-/). XRSound sees that both modes are changing in the same frame, and so it (correctly) plays both callouts.

Until if and when that Orbiter core bug is fixed, you can prevent the duplicate callouts from occurring by disabling the AF Ctrl mode callouts for Atlantis by editing your $ORBITER_ROOT\XRSound\XRSound-Atlantis.cfg and adding the following lines anywhere in the [SOUND_FILES] section (e.g., below the Liftoff = none line):

Code:
# WORKAROUND FOR ORBITER CORE BUG:
# Need to disable the AF Ctrl mode callouts for Atlantis because the 
# Orbiter core has a bug where it incorrectly toggles both RCS modes and 
# AF Ctrl modes on/off when pressing the CTRL-NUMPAD-/ shortcut.
AFPitch = none
AFOn = none
AFOff = none

The above workaround will be included in the next XRSound patch release, but that is not scheduled yet.
 

Wuwuk

Member
Joined
Feb 24, 2018
Messages
31
Reaction score
4
Points
8
Thank You dbeachy1, now, finally, I can play the orbiter with full effect :hail:
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
Maybe you could implement a "delayed" callout?
So it just "collects" the triggers for some time (100ms maybe?!) to then output only the "settled" state? The delay should be as short as possible, but 50ms to 100ms should not make much of a noticeable delay.
Think of it like "contact-bounce" prevention ;)
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
Maybe you could implement a "delayed" callout?
So it just "collects" the triggers for some time (100ms maybe?!) to then output only the "settled" state? The delay should be as short as possible, but 50ms to 100ms should not make much of a noticeable delay.
Think of it like "contact-bounce" prevention ;)

Can you be more specific? 100 ms is 1/10th of a second -- what callouts are you getting within 1/10th second of each other? In general, all callouts of the same type already have a minimum delay between then (e.g., 1 second, 2 seconds, etc.) What exactly is the problem you are seeing?
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
What I thought of was not repeated sounds, but the "incorrectly togging the AF Ctrl mode on/off" you were talking about.
Maybe you could detect those as being false with a kind of "low pass filter"...

But anyway: that was just a quick idea I posted and if it doesn't make sense please ignore it :tiphat:
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
Unfortunately, it's not an issue of "detecting something too fast", it's an issue of the Orbiter core actually switching AF Ctrl modes from the same keypress that switches RCS mode: the AF Ctrl mode stays switched.
 

camelopardis

Donator
Donator
Joined
Mar 18, 2009
Messages
19
Reaction score
0
Points
1
Unfortunately, it's not an issue of "detecting something too fast", it's an issue of the Orbiter core actually switching AF Ctrl modes from the same keypress that switches RCS mode: the AF Ctrl mode stays switched.

Perhaps you could store bool variables in the frame where the switchings occur, and detect –in the next frame– that it happened and play the sound that you decide.

It is somewhat what kuddel was saying, I think. But not in a time span but in the next frame.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
The root issue is that the Orbiter core is switching the mode for AF Ctrl when it should not. How would the code decide "which sound to play"? The AF Ctrl callout? The RCS callout? Which is "more important"? Because both modes are changing. Adding vessel-specific hacks in the code would not solve anything IMO.

This is an Orbiter core bug, and until it's fixed, disabling the AF Ctrl mode callouts via the Atlantis config file will have to do. IMO the best course of action would be to report this bug in the Orbiter Project so that it can be fixed for the next Orbiter patch.
 

camelopardis

Donator
Donator
Joined
Mar 18, 2009
Messages
19
Reaction score
0
Points
1
The root issue is that the Orbiter core is switching the mode for AF Ctrl when it should not. How would the code decide "which sound to play"? The AF Ctrl callout? The RCS callout? Which is "more important"? Because both modes are changing. Adding vessel-specific hacks in the code would not solve anything IMO.

This is an Orbiter core bug, and until it's fixed, disabling the AF Ctrl mode callouts via the Atlantis config file will have to do. IMO the best course of action would be to report this bug in the Orbiter Project so that it can be fixed for the next Orbiter patch.

I mean that you could detect that both modes have been switched in the same frame, so you could priorize the RCS callout in that case.

I agree the bug should be reported.
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
I get what you're asking, what I mean is I very much don't want to put vessel-specific hacks like that into the code, sorry. :)
 

BEEP

Addon Developer
Addon Developer
Joined
Apr 5, 2008
Messages
153
Reaction score
15
Points
18
Can't run it on Windows XP :-(.

Gives a now familiar error "Can't find entry point in InitializeCriticalSectionEx in KERNEL32.dll".
 

dbeachy1

O-F Administrator
Administrator
Orbiter Contributor
Addon Developer
Donator
Beta Tester
Joined
Jan 14, 2008
Messages
9,214
Reaction score
1,560
Points
203
Location
VA
Website
alteaaerospace.com
Preferred Pronouns
he/him
XRSound makes some system calls that are only present in Windows Vista or newer (as stated at the top of the XRSound download page); it will not run on Windows XP (sorry).
 

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
10,842
Reaction score
2,105
Points
203
Location
between the planets
Can't run it on Windows XP :-(.

It could probably be made to run with some dll wrapping...
I used to do that a lot back on windows 2000, as I skipped all following OSes right up to windows 7. Anybody holding on to an outdated system should either be well familiar with the practice, should start learning it, or upgrade their system... :shifty:
 

LeePalmer

Member
Joined
Apr 7, 2013
Messages
40
Reaction score
0
Points
6
DLL wrapping since 2000!

Please explain! Beg Beg.
Keep it simple please.
 
Top