0 Members and 1 Guest are viewing this topic.
Adding one radio station is fairly simple***
NASA Third Rock radio.webr -> http://rfcmedia2.streamguys1.com/thirdrock.mp3
BEGIN_OrbiterSound ;----------------------------------------------------------------- ; Preliminary Note: all music, sounds and settings below are ; TEMPORARY just for this scenario. ; The "Radio/Radar/MP3" MFD will show : ; "WARNING: Sound controlled by scenario, click any MFD button ; to cancel this control and return to normal." ;----------------------------------------------------------------- ;----------------------------------------------------------------- ; IMPORTANT: ; This should come first before any other sound command ! ; Its your addon's music and sound folder for this scenario located ; in "Sound\_CustomScenarioSound\" (for this example: "Sound\_CustomScenarioSound\MikeFalcon9Addon") ; Of course if you use only "mute" command, this is not mandatory. SCENARIOSOUNDFOLDER MikeFalcon9Addon ;----------------------------------------------------------------- ; Mute the normal music, if you use a ADDTOPLAYLIST ; command below, the normal music is already muted and replaced ; by your playlist. MUTEMUSIC 1 ;----------------------------------------------------------------- ; Mute the VHF radio (radio chatter) MUTEVHFRADIO 1 ;----------------------------------------------------------------- ; Play a sound/ music ; T:# = time in second since start of simulation ; V:# = volume from 0 to 255 ; View:# INTERNAL or EXTERNAL or BOTH ; last parameter is the name of the sound ; Note: only one sound can play at the same time with this command PLAYSOUND T:3 V:255 View:EXTERNAL Complete_Launch_Sound.mp3 ;----------------------------------------------------------------- ; Those commands below will temporary overwite the user's playlist and setting ; This new playlist will play in sequence from simulation start one song after another. ; V:# = volume from 0 to 255 ; View:# INTERNAL or EXTERNAL or BOTH ADDTOPLAYLIST V:255 View:BOTH hard_rock.mp3 ADDTOPLAYLIST V:255 View:BOTH On_Phobos.ogg ADDTOPLAYLIST V:255 View:BOTH Christmas_song.mp3 ;----------------------------------------------------------------- ; Engage Main engine, so your sound is synchronised in case of launch sound effect ; T:# = time in second since start of simulation ; POWER:#% = engine power MAINENGINEPOWER T:25 POWER:100% ;----------------------------------------------------------------- ; Engage Hover engine, so your sound is synchronised in case of launch sound effect ; T:# = time in second since start of simulation ; POWER:#% = engine power HOVERENGINEPOWER T:25 POWER:100%END
NEWS - Sound and Music controlled by scenarioThis will be useful for add-ons authors.By adding a "BEGIN_OrbiterSound" section in any scenario, you'll be able to command sound and music in a particular scenario.This is great if you want a full recording of real launch sound, or if you want to play your own musicor sound, or if you just want to mute the music and the VHF chatter.Those commands are temporary, just for this scenario. The user can cancel this control withthe "Radio/Radar/Mp3" MFD at any time.Comment from addon author welcome, let me know what you think !See below a summary of all commands:Code: [Select]BEGIN_OrbiterSound ;----------------------------------------------------------------- ; Preliminary Note: all music, sounds and settings below are ; TEMPORARY just for this scenario. ; The "Radio/Radar/MP3" MFD will show : ; "WARNING: Sound controlled by scenario, click any MFD button ; to cancel this control and return to normal." ;----------------------------------------------------------------- ;----------------------------------------------------------------- ; IMPORTANT: ; This should come first before any other sound command ! ; Its your addon's music and sound folder for this scenario located ; in "Sound\_CustomScenarioSound\" (for this example: "Sound\_CustomScenarioSound\MikeFalcon9Addon") ; Of course if you use only "mute" command, this is not mandatory. SCENARIOSOUNDFOLDER MikeFalcon9Addon ;----------------------------------------------------------------- ; Mute the normal music, if you use a ADDTOPLAYLIST ; command below, the normal music is already muted and replaced ; by your playlist. MUTEMUSIC 1 ;----------------------------------------------------------------- ; Mute the VHF radio (radio chatter) MUTEVHFRADIO 1 ;----------------------------------------------------------------- ; Play a sound/ music ; T:# = time in second since start of simulation ; V:# = volume from 0 to 255 ; View:# INTERNAL or EXTERNAL or BOTH ; last parameter is the name of the sound ; Note: only one sound can play at the same time with this command PLAYSOUND T:3 V:255 View:EXTERNAL Complete_Launch_Sound.mp3 ;----------------------------------------------------------------- ; Those commands below will temporary overwite the user's playlist and setting ; This new playlist will play in sequence from simulation start one song after another. ; V:# = volume from 0 to 255 ; View:# INTERNAL or EXTERNAL or BOTH ADDTOPLAYLIST V:255 View:BOTH hard_rock.mp3 ADDTOPLAYLIST V:255 View:BOTH On_Phobos.ogg ADDTOPLAYLIST V:255 View:BOTH Christmas_song.mp3 ;----------------------------------------------------------------- ; Engage Main engine, so your sound is synchronised in case of launch sound effect ; T:# = time in second since start of simulation ; POWER:#% = engine power MAINENGINEPOWER T:25 POWER:100% ;----------------------------------------------------------------- ; Engage Hover engine, so your sound is synchronised in case of launch sound effect ; T:# = time in second since start of simulation ; POWER:#% = engine power HOVERENGINEPOWER T:25 POWER:100%END
Let me know if you need help. I'm 8 years older and wiser than I was last time!
BEGIN_OrbiterSound ;********************************************************************** ; Start of command sequence, see help for commands after this sequence. MUTEMUSIC SCENARIOSOUNDFOLDER OrbiterSoundDemo PLAYSOUND_ONE T:0 V:255 View:COCKPIT Name:playsoundOneCockpit.ogg PLAYSOUND_TWO T:3 V:255 View:EXTERNAL Name:playsoundTwoExternal.ogg HOVERENGINEPOWER T:5 Power:1% Vessel:PB-01 SENDMFDKEY T:7 Mfd:LEFT Key:OAPI_OAPI_KEY_L HOVERENGINEPOWER T:12.5 Power:90% Vessel:PB-01 SETAUTOPILOT T:12.5 Status:ON Type:HLEVEL Vessel:PB-01 MAINENGINEPOWER T:20 Power:10% Vessel:PB-01 MAINENGINEPOWER T:28 Power:60% Vessel:PB-01 SETAUTOPILOT T:30 Status:ON Type:HOLDALT Vessel:PB-01 HOVERENGINEPOWER T:30 Power:100% Vessel:PB-01 MAINENGINEPOWER T:35 Power:100% Vessel:PB-01 ; End of command sequence. ;********************************************************************** ;----------------------------------------------------------------- ; Preliminary note: ; ----------------- ; All music, sounds and settings below are TEMPORARY just for this scenario. ; The "Radio/Radar/MP3" MFD will inform the user of this control ; by scenario and allow him to regain control (for the music and radio chatter only). ; ; Note: ; -Timed commands are sorted by time, no need to write them in exact sequence. ; -Time command ("T:") can be float (for example "T:5.5" is 5500 milliseconds) ; -If something don't work, check for error in OrbiterSound_log.txt ; -All your sounds must be in your "Sound\_CustomScenarioSound\***" directory. ;----------------------------------------------------------------- ;----------------------------------------------------------------- ; IMPORTANT: ; --------- ; This should come first before any other sound command ! ; Its your addon's music and sound folder located ; in "Sound\_CustomScenarioSound\" (for this example: "Sound\_CustomScenarioSound\OrbiterSoundDemo") ; Of course if you don't use sound command, this is not mandatory. ;SCENARIOSOUNDFOLDER OrbiterSoundDemo ;----------------------------------------------------------------- ; Mute the music. If you use ADDTOPLAYLIST below this command ; is ignored. The user's music is already replaced by your playlist. ;MUTEMUSIC ;----------------------------------------------------------------- ; Mute the VHF radio (radio chatter) ;MUTEVHFRADIO ;----------------------------------------------------------------- ; Play Timed sound One ; ; Note: ; -Two playsound stream can play in same time, see PLAYSOUND_TWO. ; This allow you to play for example a complete launch sound in exterior view and another for interior. ; -You can have up to 40 commands "PLAYSOUND_*", so you can also comment a replay flight or anything you can imagine. ; -External Sound volume is NOT controlled by distance and pressure. ; -Only mp3 or ogg format will play with this command. ; -Time < 3 seconds is not recommended as Orbiter take time to load everything. ; ; T:# = time in second since start of simulation ; V:# = volume from 0 to 255 ; View:# COCKPIT or EXTERNAL or BOTH ; Name:# filename of the sound (mp3 or ogg) ;PLAYSOUND_ONE T:3 V:255 View:COCKPIT Name:playsoundOneCockpit.ogg ;----------------------------------------------------------------- ; Play Timed sound Two (Same as above but for sound TWO) ; T:# = time in second since start of simulation ; V:# = volume from 0 to 255 ; View:# COCKPIT or EXTERNAL or BOTH ; Name:# filename of the sound (mp3 or ogg) ;PLAYSOUND_TWO T:3 V:255 View:COCKPIT Name:playsoundTwoExternal.ogg ;----------------------------------------------------------------- ; Add music to the playlist. ; Those commands below will temporary overwite the user's playlist and setting ; This new playlist will play in sequence from simulation start one song after another. ; Your songs must be in your scenario's folder. ; V:# = volume from 0 to 255 ; View:# COCKPIT or EXTERNAL or BOTH ; Name:# filename of the sound (mp3 or ogg) ;ADDTOPLAYLIST V:255 View:COCKPIT Name:RockInsideTheClock.mp3 ;ADDTOPLAYLIST V:255 View:BOTH Name:CrimsonTideMutiny.mp3 ;----------------------------------------------------------------- ; Engage Main engine, so your sound is synchronised in case of launch sound effect ; T:# = time in second since start of simulation (<3 is not recommended as Orbiter take time to display everything) ; Power:#% = engine power ; Vessel:# = Name of the vessel ;MAINENGINEPOWER T:35 Power:100% Vessel:GL-02 ;----------------------------------------------------------------- ; Engage Hover engine, so your sound is synchronised in case of launch sound effect ; T:# = time in second since start of simulation ; Power:#% = engine power ; Vessel:# = Name of the vessel ;HOVERENGINEPOWER T:25 POWER:100% VESSEL:GL-02 ;----------------------------------------------------------------- ; Engage Orbiter Autopilot ; T:# = time in second since start of simulation ; Status:# = ON or OFF ; Type:# = KILLROT, HLEVEL, PROGRADE, RETROGRADE, NORMAL, ANTINORMAL or HOLDALT ; Vessel:# = Name of the vessel ;SETAUTOPILOT T:10 Status:ON Type:HLEVEL Vessel:PB-01 ;----------------------------------------------------------------- ; Send a keypress to a MFD ; ; T:# = time in second since start of simulation ; Mfd:# = LEFT or RIGHT or MFD_USER1 to MFD_USER9 ; Key:# = A key identifier as defined in ; Orbitersdk\doc\API_Reference.pdf (page 227 or search for "OAPI_KEY_1") ;SENDMFDKEY T:31 Mfd:LEFT Key:OAPI_OAPI_KEY_L ;SENDMFDKEY T:54 Mfd:MFD_USER4 Key:OAPI_OAPI_KEY_NEND