Jump to content

[1.6.1] Soundtrack Editor 4.6 (2019-01-28)


pizzaoverhead

Recommended Posts

3 hours ago, SchrottBot said:

Brendan, I really appreciate your commitment, and would like to hint you to this: Visual Studio Community

It might be helpful. =)

 

Cheers

SchrottBot

Wow, thanks! Thanks for feeding my bizarre obsession with someone else's mod! I was trying to find obstacles to let me give up, go live a normal life, touch a boob. But you just couldn't let me escape, SchrottBot. The enabling has begun... Goodbye, day-star. I will remember you as my flesh-sticks meld with Lord Keyboard.

Edited by Brendan_
extra comedy?
Link to comment
Share on other sites

I've put together documentation on how playlists work (or don't). I have zero problem if Pizza wants to put it in the STED ReadMe. There's no getting around tab-spacing ugliness though.

FORMAT:
Structure of a playlist entry. Multiple playlists appear one after the other in '/Kerbal Space Program/Playlists/playlists.cfg'. Playlists earlier in the file are played before later ones that otherwise match prerequisite conditions.

playlist
{
    name = [text]		 // ASCII characters accepted. curly braces {} ignored
    enabled = [boolean]		 // Plays if 'True' and playWhen matches (line absent equals 'True')
    loop = [boolean]		 // Repeat all tracks at least once. (line absent equals 'True')
    shuffle = [boolean]		 // Randomize track list. (line absent equals 'False')
    preloadTime = [float]	 // Load 'x' seconds before playing. (line absent equals '0')
    pauseOnGamePause = [boolean] // Halt music if game paused. Doesn't work. (line absent equals 'True')
    disableAfterPlay = [boolean] // Once all tracks played, disable playlist. (line absent equals 'False')
    playNext = [text]		 // After all tracks play once, named playlist plays next. (will enable target playlist if is disabled)
    playBefore = [text]		 // Playlist that this playlist should be played before. (none use, but works)
    playAfter = [text]		 // Playlist that this playlist should be played after. (none use, but works)
    tracks		// One to seemingly any number of tracks per playlist.
    {
        track = [text]			// name with spaces-dashes_underscores and all without.filetype
    }
    playWhen		// Set of prerequisite conditions which must all match current conditions, usually.
    {
        inAtmosphere = [boolean]	// Playlist applies to "Either" if line missing
        timeOfDay = Name1 | Name2	// only "SpaceCentre" scene uses
        maxVelocitySurface = [float]	// (broken)
        minVelocitySurface = [float]	// (broken)
        maxVelocityOrbital = [float]	// (can stop but not start playlist)
        minVelocityOrbital = [float]	// (can prevent playlist starting)
        maxAltitude = [float]		// (can stop but not start playlist)
        minAltitude = [float]		// (can prevent playlist starting)
        scene = Name1 | Name2		// Names in scene list separated | by | pipes. REQUIRED or plays in all scenes.
        situation = NAME / number	// Single names in list or number codes for combinations
        cameraMode = Name1 | Name2	// Names in list separated | by | pipes.
        bodyName = [text]		// Arbitrary text. Only works on match with list of celestial bodies.
    }
}


TIMES OF DAY:
Names in the following list, separated | by | pipes. 
This applies only to the SpaceCenter scene and describes day/night specifically at the KSC on Kerbin.

[ NightAM | TwilightAM | DayAM | DayPM | TwilightPM | NightPM ]


SCENES:
Names in the following list used by this mod, separated | by | pipes.

[ MainMenu | Loading | LoadingBuffer | Settings | Credits | SpaceCentre | VAB | SPH | TrackingStation | Flight | PSystem | AstronautComplex | KSPedia | MissionControl | RnDComplex | AdminFacility ]

Only certain prerequisite conditions are checked in each scene to select a playlist.
Note, playlists have no "playWhen" conditions for "Paused: " though mod reports pause status.

	Loading
	LoadingBuffer
	// mod does not load until after KSP loading completes; cannot use
	
	MainMenu		(F12 console "MAINMENU")
	* Scene: MainMenu
	Settings
	* Scene: Settings
	Credits
	* Scene: Credits

	SpaceCentre 		(F12 console "SPACECENTER")
	* Scene: SpaceCentre
	* Paused:  [boolean]
	* Time of Day: [list]
	Administration Building
	* Scene: AdminFacility
	Astronaut Complex
	* Scene: AstronautComplex
	Mission Control
	* Scene: MissionControl
	Research and Development
	* Scene: RnDComplex

	Spaceplane Hangar	(F12 console "EDITOR")
	* Scene: VAB
	Vehicle Assembly Building
	* Scene: VAB

	Tracking Station	(F12 console "TRACKSTATION")
	* Scene: TrackingStation

	Flight			(F12 console "FLIGHT")
	* Scene: Flight
	* Camera mode: Flight, Map, External, IVA, Internal
	* Paused: [boolean]
	* Situation: [list]
	* Orbital velocity: [float] 
	* Surface Velocity: [float]
	* Altitude: [float]
	* In Atmosphere: [boolean]
	* Nearest vessel: [named]

	PSystem
	* ???

	KSPedia
	* ???


SITUATIONS:
Name, or sum of number codes for multiple situations.

(  1)	LANDED		-- ground contact and not PRELAUNCH
(  2)	SPLASHED	-- water contact without ground contact (underwater ground contact is LANDED)
(  4)	PRELAUNCH	-- only at Runway or Launchpad before moving. (Will be Kerbin InAtmosphere ~69m)
(  8)	FLYING		-- no ground or water contact and in atmosphere
( 16)	SUB_ORBITAL	-- not in atmosphere and no periapsis
( 32)	ORBITING	-- have periapsis above top of atmosphere and not in atmosphere
( 64)	ESCAPING	-- no apoapsis, only periapsis, and not in atmosphere
(128)	DOCKED 		-- docked with another craft


CAMERA MODES:
Names in the following list, separated | by | pipes.

[ Flight | Map | External | IVA | Internal ]


BODY NAMES: 
Names used for celestial bodies in KSP solar system separated | by | pipes. (likely works with planet replacer mods)

[ Sun | Moho | Eve | Gilly | Kerbin | Mun | Minmus | Duna | Ike | Dres | Jool | Laythe | Vall | Tylo | Bop | Pol | Eeloo ]
  


BUGS & WARNINGS:
 * Another vessel (even debris) must exist somewhere in the FLIGHT Scene for any playlist to play.
 * If there is no valid playlist for a Scene, there will be no music.
 * On any change of situation or pause status or slight breeze, tracks will reload.
 * FLIGHT Scene crashes if both minAltitude and maxAltitude set
 * FLIGHT Scene crashes if any two playlists both specify any Altitude conditions, even if playlist otherwise mutually exclusive
 * FLIGHT Scene crashes if a minVelocitySurface is defined in any playlist with any scene
 * FLIGHT Scene crashes if a maxVelocitySurface is defined in any playlist with any scene once speed reached
 * If a playlist has max and minAltitude set it will not automatically start. Can also lead crash FLIGHT Scene.
 * Administration Building / AdminFacility scene has music playing independent of this mod. Playlists for it create double music.
 * SPH scene registers as VAB scene, not SPH
 * SPH and VAB ambient background noise (not the music) will not be heard while this mod is installed.

 

Edited by Brendan_
Updated documentation
Link to comment
Share on other sites

20 hours ago, Brendan_ said:

Wow, thanks! Thanks for feeding my bizarre obsession with someone else's mod! I was trying to find obstacles to let me give up, go live a normal life, touch a boob. But you just couldn't let me escape, SchrottBot. The enabling has begun... Goodbye, day-star. I will remember you as my flesh-sticks meld with Lord Keyboard.

Well than I'll take the blame for that. =) It's never wrong to learn something new. Just a little advice, as you pointed out, the mod belongs to @pizzaoverhead and is licenced under GPL, so that is a legal frameworks you surely want to respect. I'd advise to take a short look at that beforehand. Aside from that, it is a question of style and good manors, to contact the creator of the mod and kindly ask if he's alright with what you'd like to do. As far as I can see, pizzaoverhead has neither abandoned the mod, nor is he absent from the forum.  

Link to comment
Share on other sites

Task 1: compile working mod from the code as-is

Obstacle 1: what even do I...? so many dependencies -- what do I need?

 

Having never built code before, I'm not even sure what to Google here. Here on my Lubuntu 16.04 machine, I have the Linux edition of 'Visual Studio Code' running and have loaded this so-called "solution file". But it's giving me.. problems.

The type or namespace name 'UnityEngine' could not be found (are you missing a using directive or an assembly reference?) [SoundtrackEditor](5,7)
The type or namespace name 'AudioClip' could not be found (are you missing a using directive or an assembly reference?) [SoundtrackEditor](19,23)
The type or namespace name 'WWW' could not be found (are you missing a using directive or an assembly reference?) [SoundtrackEditor](89,17)

Etcetera.

Does anyone have maybe a listing of what all you need to install in order to develop a KSP mod? Unfortunately, my phone is my internet.. so... trying not to break the data-bank. Many thanks if someone knowledgeable, like @SchrottBot or I've seen @Avera9eJoe has been active (at least in obsessively DJing playlist like I have).

Really though...

1ee.jpg

Link to comment
Share on other sites

I've made some progress, but still confused.

I did find my way to the forum's guide to getting started modding:

But getting past Step 1 requires knowing how to add a reference, which I'm unsure of after searching. Instructions about right-clicking a project node didn't pan out because there was nothing about references in that menu, or any menu. There's also not a project.json in Pizza's repo. But there is this...

https://github.com/pizzaoverhead/SoundtrackEditor/blob/master/SoundtrackEditor/SoundtrackEditor.csproj

Hopeful, but now I'm stuck at what he has listed for paths to, I assume, the references @Diazo describes in the guide. SoundtrackEditor.csproj lists things like

    <Reference Include="Assembly-UnityScript">
      <HintPath>..\..\Squad binaries\x64\Assembly-UnityScript.dll</HintPath>
      <Private>False</Private>
    </Reference>

I don't have any directories named "Squad binaries" or "x64". And I worry that changing these paths, if I commit the code like a good git, will cause problems. What should I even Google to find answers about how to not path wrong and good doing the all of?

Link to comment
Share on other sites

First : editing .csproj by hand... this should be done in IDE via project options (albeit .csproj is written in human-readable XML, i'd consider using IDE).

I've googled a little how to edit assembly references in VS Code, but that IDE is horrible. In my opinion, its oversimplified to the point of being unable to normally manage projects written in other IDEs by other people.

If you are willing to consider other IDEs, try MonoDevelop (reported as buggy long time ago, may have improved by now) or Jetbrains Rider  (hefty size and load times, but that's my opinion) or Anjuta  (no idea about .NET/Mono support or supported C# version, also it's a gnome UI application, i don't know much about linux KDE/Gnome stuff ).

There is also Xamarin Studio CE but i didn't find linux version (though there are news it may become available).

My preference is Xamarin on my win7 machine.

OR you could try adding wine to your linux and put one of IDEs for windows inside of that. There must be guides on how to do that, wine is pretty popular.

And one last note : since you are just starting out coding, i suggest you stick with whatever IDE you choose, at least until you learn more.

When i was starting i chose SharpDevelop and it helped me at first. After a while i ran into a problem that it did not support C# version 6 (some specific stuff) so i switched to Visual Studio Community Edition. Later i switched again to Xamarin Studio Community Edition and i'm happy with it for now.

Link to comment
Share on other sites

@fatcargo I'll probably go with MonoDevelop then. Really, the first goal is to compile a working copy from source, so I stuck close to what @pizzaoverhead used. But I'm not spending money just to hack at a mod. So, if MS's free IDE isn't up to the task (and no, I was never trying to edit this by hand, mon ami), then I'll gladly try the FOSS option. Hopefully using a different tool than Pizza won't lead to issues once I have something worth making a pull request on GitHub about.

 

That said, I did find the referenced DLLs in my KSP install. Maybe this will help someone else, because I'm guessing the paths Pizza uses -- "..\..\Squad binaries\x64\" -- were from an earlier version? In STED's readme it lists KSP v1.2.2 and leftover paths to "C:\Games\..." tell me he's running Windows. I'm running KSP v1.3.0 on Lubuntu 16.04. Here, the path (under Steam's "common" directory) is "/Kerbal Space Program/KSP_Data/Managed". There are more DLLs in there, but STED uses these:

  • Assembly-CSharp.dll
  • Assembly-CSharp-firstpass.dll
  • Assembly-UnityScript.dll
  • Assembly-UnityScript-firstpass.dll
  • KSPAssets.dll
  • UnityEngine.dll
  • UnityEngine.Networking.dll
  • UnityEngine.UI.dll
  • UnityScript.Lang.dll

 

Another wrinkle in dependencies is that Pizza uses some program called "pdb2mdb.exe" in the build process somehow. I don't know what it is, of course, so I don't know if this will be a problem or if I even have to use it. But this is at the end of Pizza's .csproj file:

<PostBuildEvent>"C:\dev\KSP\pdb2mdb\pdb2mdb.exe" "$(TargetPath)"
xcopy /y "$(TargetPath)" "C:\Games\Kerbal Space Program\GameData\$(ProjectName)\Plugins\"
xcopy /y "$(TargetDir)$(TargetName).pdb" "C:\Games\Kerbal Space Program\GameData\$(ProjectName)\Plugins\"
xcopy /y "$(TargetDir)$(TargetName).dll.mdb" "C:\Games\Kerbal Space Program\GameData\$(ProjectName)\Plugins\"
taskkill /IM tail.exe /F 2&gt;&amp;1 | exit /B 0</PostBuildEvent>

Ideas?

Edited by Brendan_
Pathing stuff for the search queries
Link to comment
Share on other sites

Ok here we go ...

    <Reference Include="Assembly-UnityScript">
      <HintPath>..\..\Squad binaries\x64\Assembly-UnityScript.dll</HintPath>
      <Private>False</Private>
    </Reference>

This shows that a assembly is referenced under the name "Assembly-UnityScript", that is what you will see in IDE in project references. Second line tells IDE where to find a DLL (equivalent to .so in linux -  a "shared object").

That being said, for KSP 1.3.0 referencing these assemblies should cover the entire KSP API

Assembly-CSharp.dll
Assembly-CSharp-firstpass.dll
KSPAssets.dll
UnityEngine.dll
UnityEngine.UI.dll

These are found in your_ksp_root\KSP_x64_Data\Managed\.

Now for the windows paths : i may be wrong but it should not be a problem, as long as it references a relative path (my .csproj has for example ..\..\..\..\ KSP\KSP_x64_Data\Managed\Assembly-CSharp.dll in one of references). This is where i can't help anymore - i don't have a linux to try it. This should be done in IDE anyway.

Try to look at project items and then expand the tree structure under "References". There should be all assemblies it needs. If this project is imported from other machines, then most likely the references will be invalid (and marked as such). Best way is to remove them and add again, but now with proper paths from your machine.

As for "pdb2mdb.exe"  : this is a small program used on windows IDEs to generate debug information file. I started using debugging in KSP 1.2.2 when i advanced a bit in coding and it proved useful. It is a bit involved and you should not bother yourself with it right now. If i remember this right, MonoDevelop does not need this as it natively generates .mdb files (if you select debug configuration for compiling). As it stands now, you can delete the entire PostBuildEvent XML tag. It calls "pdb2mdb.exe"  for conversion and copies compiled DLL into KSP's GameData. That means you will need to manually copy newly compiled DLL into GameData, a minor annoyance.

 

Link to comment
Share on other sites

15 hours ago, Brendan_ said:

@fatcargo I'll probably go with MonoDevelop then. Really, the first goal is to compile a working copy from source, so I stuck close to what @pizzaoverhead used. But I'm not spending money just to hack at a mod. So, if MS's free IDE isn't up to the task (and no, I was never trying to edit this by hand, mon ami), then I'll gladly try the FOSS option. Hopefully using a different tool than Pizza won't lead to issues once I have something worth making a pull request on GitHub about.

 

That said, I did find the referenced DLLs in my KSP install. Maybe this will help someone else, because I'm guessing the paths Pizza uses -- "..\..\Squad binaries\x64\" -- were from an earlier version? In STED's readme it lists KSP v1.2.2 and leftover paths to "C:\Games\..." tell me he's running Windows. I'm running KSP v1.3.0 on Lubuntu 16.04. Here, the path (under Steam's "common" directory) is "/Kerbal Space Program/KSP_Data/Managed". There are more DLLs in there, but STED uses these:

  • Assembly-CSharp.dll
  • Assembly-CSharp-firstpass.dll
  • Assembly-UnityScript.dll
  • Assembly-UnityScript-firstpass.dll
  • KSPAssets.dll
  • UnityEngine.dll
  • UnityEngine.Networking.dll
  • UnityEngine.UI.dll
  • UnityScript.Lang.dll

 

Another wrinkle in dependencies is that Pizza uses some program called "pdb2mdb.exe" in the build process somehow. I don't know what it is, of course, so I don't know if this will be a problem or if I even have to use it. But this is at the end of Pizza's .csproj file:


<PostBuildEvent>"C:\dev\KSP\pdb2mdb\pdb2mdb.exe" "$(TargetPath)"
xcopy /y "$(TargetPath)" "C:\Games\Kerbal Space Program\GameData\$(ProjectName)\Plugins\"
xcopy /y "$(TargetDir)$(TargetName).pdb" "C:\Games\Kerbal Space Program\GameData\$(ProjectName)\Plugins\"
xcopy /y "$(TargetDir)$(TargetName).dll.mdb" "C:\Games\Kerbal Space Program\GameData\$(ProjectName)\Plugins\"
taskkill /IM tail.exe /F 2&gt;&amp;1 | exit /B 0</PostBuildEvent>

Ideas?

You're most of the way there already, though beware that it sounds like you're coming down with a serious case of modder-itis. The prognosis is that you risk never playing KSP again! :P

Thanks for your detailed investigation into this. It sounds like you've caught a lot of problems already!  I've been planning to get back to this, but found myself short of time/motivation lately.

MonoDevelop is probably the best route to get you compiling, though Soundtrack Editor isn't exactly an easy first project due to some of its dependencies being unmanaged code. The KSP wiki has some details on getting started that could help. In particular, the last section on this page shows how to add references: https://wiki.kerbalspaceprogram.com/wiki/Setting_up_MonoDevelop
You don't need to worry about (or use) the post-build event: it copies files over for easier testing, and pdb2mdb is used to set up debugging a mod while KSP is running. Here's the MonoDevelop way to copy the files over, using bash instead.
Once you get a build working, you should just be able to drop it in over the existing files.

Link to comment
Share on other sites

On 21/08/2017 at 2:37 AM, Brendan_ said:

Even more needless testing reveals another flaw.

Normally, in the SPH and the VAB there is a "room tone" background ambience that gets lost with this mod. These tracks are named KSP_SPHAmbience and KSP_VABAmbience and sound like construction work happening in a big hangar. I found the names by feeding an invalid playlists.cfg and the in-game UI shows a list of I guess default playlists.

I'm not quite sure how this mod operates, but looking at KSP's debug console logs, it appears that "[STED]" or SoundTrack EDitor inserts the playlists when it detects a Scene Change from [HighLogic] or [UIMasterController] ShowUI messages, including "Game Paused!" Not that I can think of a better way to intercept KSP's default sounds, but this does line up with finding that pausing will start up a playlist whose conditions have become true sometime after launch.

 

I also found a probably useless "feature" in that changing from one scene whose playlist includes "pauseOnGamePause = False" to another scene with a playlist that has no valid tracks listed (either no tracks or file not found), then the previous playlist keeps playing. This is appealing only because in normal KSP, opening the Pause menu (like at the Space Center scene) doesn't make the track start over from the beginning, and in the Main Menu, the music keeps playing when you enter Settings AND when you exit. This trick only got me halfway to normal behavior.

 

One wishlist item for @pizzaoverhead is detecting Situations like FlyingHigh or InSpaceLow which experiments detect, though I don't know how they do it...

Soundtrack Editor currently only supports one "speaker" (AudioSource) playing music at a time, (plus a temporary second one for the sound board player), so it isn't able to play both the construction music and the ambience at the same time.

The mod operates by creating its own speaker, disabling and unloading the KSP speaker and music system, and doing everything itself. This means lots of code for event and situation tracking, which has proven to be bug-prone. Biomes are one of the situations I hope to track in future. :) I have code to identify biomes from Collision FX, but it needs to be hooked up properly for STED, and support modded biomes etc.

Link to comment
Share on other sites

Pizza! Glad to have your eyes on this.

I've installed MonoDevelop and, for any other newbies, I'll go through my experiences. Non-newbs, skip to the end.

After cloning the Git repository locally, opening the .sln solution file was simple. Updating the references took some figuring out. MonoDevelop has a tree view of the project, and under "References" there were the DLL names with red error symbols by them. The instructions Pizza linked to on the KSP wiki assume starting a project from scratch. The instructions worked (though Linux file location instructions were left out), and it was ctrl+clicking to select each of the DLLs I named in the list above. The only other thing was making sure the box was checked beside each reference DLL before hitting the "OK" button.

Also, @pizzaoverhead, it's still showing error symbols in my reference list for "System.Core", "System.Data.DataSetExtensions", and "System.Xml.Linq" and there are DLLs in KSP_Data/Managed named "System.Core.dll" and "System.Xml.dll". Maybe some vestigial references are in code to DLLs that aren't needed?

So... how to build? I wasn't sure, and I didn't know what to expect, but I just went to the Build menu and hit "Build SoundtrackEditor" -- the moment I've all been waiting for, and maybe a few other people too.

...

One error:

/usr/lib/mono/4.5/Microsoft.Common.targets: Error: Command '"C:/dev/KSP/pdb2mdb/pdb2mdb.exe" "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.pdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.dll.mdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
taskkill /IM tail.exe /F 2>&1 | exit /B 0' exited with code: 2. (SoundtrackEditor)

But where was the compiled file? There was button called "Build Output". Okay, I was looking for the output of this build process, so...

Building: SoundtrackEditor (Debug)

Build started 9/3/2017 8:02:30 PM.
__________________________________________________
Project "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/SoundtrackEditor.csproj" (Build target(s)):
	
	Target PrepareForBuild:
		Configuration: Debug Platform: AnyCPU
	
	Target GenerateSatelliteAssemblies:
	No input files were specified for target GenerateSatelliteAssemblies, skipping.
	
	Target CoreCompile:
	Skipping target "CoreCompile" because its outputs are up-to-date.
	
	Target PostBuildEvent:
		Executing: "C:/dev/KSP/pdb2mdb/pdb2mdb.exe" "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.pdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.dll.mdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
taskkill /IM tail.exe /F 2>&1 | exit /B 0
		/tmp/tmp24809047.tmp: 1: /tmp/tmp24809047.tmp: C:/dev/KSP/pdb2mdb/pdb2mdb.exe: not found
		/tmp/tmp24809047.tmp: 2: /tmp/tmp24809047.tmp: xcopy: not found
		/tmp/tmp24809047.tmp: 3: /tmp/tmp24809047.tmp: xcopy: not found
		/tmp/tmp24809047.tmp: 4: /tmp/tmp24809047.tmp: xcopy: not found
		/tmp/tmp24809047.tmp: 5: exit: Illegal number: /B
/usr/lib/mono/4.5/Microsoft.Common.targets: error : Command '"C:/dev/KSP/pdb2mdb/pdb2mdb.exe" "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.pdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.dll.mdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
taskkill /IM tail.exe /F 2>&1 | exit /B 0' exited with code: 2.
	Task "Exec" execution -- FAILED
	Done building target "PostBuildEvent" in project "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/SoundtrackEditor.csproj".-- FAILED
	
Done building project "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/SoundtrackEditor.csproj".-- FAILED

Build FAILED.
Errors:

/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/SoundtrackEditor.csproj (Build) ->
/usr/lib/mono/4.5/Microsoft.Common.targets (PostBuildEvent target) ->

	/usr/lib/mono/4.5/Microsoft.Common.targets: error : Command '"C:/dev/KSP/pdb2mdb/pdb2mdb.exe" "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug//SoundtrackEditor.dll" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.pdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
xcopy /y "/home/schpoorky/Downloads/KSP/SoundtrackEditor-master/SoundtrackEditor/bin/Debug/SoundtrackEditor.dll.mdb" "C:/Games/Kerbal Space Program/GameData//Plugins/"
taskkill /IM tail.exe /F 2>&1 | exit /B 0' exited with code: 2.

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:00.4798210

---------------------- Done ----------------------

Build: 1 error, 0 warnings

Well, that wasn't it either, but never hurts to have logs.

I did a file search on my machine for "SoundtrackEditor.dll".

74f472ec0062731382ac850f320ff576b8a71771

For any other newbies, it put them in "/SoundtrackEditor-master/SoundtrackEditor/obj/Debug". They're also in "/SoundtrackEditor-master/SoundtrackEditor/bin/Debug" but for reasons I don't understand, it not only has them in two different places but into /bin/Debug it also copies all the reference DLLs that it got from the KSP install.

Anyway... I copypasta'd 'SoundtrackEditor.dll' and 'SoundtrackEditor.pdb' from there to "/Kerbal Space Program/GameData/SoundtrackEditor/Plugins" and... IT WORKED! It actually works!

Automating putting it in GameData comes next. I'm just glad to be in business here!

 

 

However, there are oddities.

  1. File sizes differ
  2. I'm not sure about the .NET version
Built file sizes at a glance
  SoundtrackEditor.dll SoundtrackEditor.pdb
Pizza's 84.5 KiB 107.5 KiB
Brendan's 88.0 KiB  26.1 KiB

Though my pdb didn't take a trip through "pdb2mdb.exe" but still... that's a lot smaller!

I also vaguely know that KSP uses some slightly older version of Unity and thus an older .NET but I would like some guidance on which. I found instructions for Mono and .NET 3.5 but I don't know if 3.5 is what I need to target. Yes, this thing seems to work, but why tempt the kraken?

Edited by Brendan_
Moar
Link to comment
Share on other sites

Hey guys, I have some interest in Soundtrack Editor, so I was following this topic.

I also want to get going on making my own .dll's for KSP and all this discussion here is fantastic.  Really appreciate it all.

Link to comment
Share on other sites

7 hours ago, pizzaoverhead said:

Soundtrack Editor currently only supports one "speaker" (AudioSource) playing music at a time, (plus a temporary second one for the sound board player), so it isn't able to play both the construction music and the ambience at the same time.

The mod operates by creating its own speaker, disabling and unloading the KSP speaker and music system, and doing everything itself. This means lots of code for event and situation tracking, which has proven to be bug-prone. Biomes are one of the situations I hope to track in future. :) I have code to identify biomes from Collision FX, but it needs to be hooked up properly for STED, and support modded biomes etc.

Now that I'm a potential contributor, maybe we should plan some workflow. I'll follow the well-documented GitHub workflow and that handy BASH script you linked to locally, but how would you like to handle branches? I notice that your 'dev' branch is like version 3.something while master is ahead of it at 4.3 but it makes sense to separate 'master' from in-development of course.

Most of all, with two people doing things, would you like to atomize changes into feature branches (i.e. "hide-incomplete-hooks" branch vs. "add-biome-support" branch)? I think that makes more sense than the alternative of us each throwing things at 'dev' or organizing changes into your dev and my dev branches. Ideally (though I'm not holding my breath) it should be easy for other masochists to join in and make pull requests.

 

Also, what features should be prioritized? And would you rather discussion about them happen on the forums or on GitHub? To my mind, GitHub makes more sense, but community feedback is important too.

 

 

1 hour ago, Jacke said:

Hey guys, I have some interest in Soundtrack Editor, so I was following this topic.

I also want to get going on making my own .dll's for KSP and all this discussion here is fantastic.  Really appreciate it all.

If my pedantic whining and meme-pollution has made development easier for you, I am glad.

Edited by Brendan_
Gotta add Jacke!
Link to comment
Share on other sites

I ...released software? How did this -- what?!

 

"All By Myself" hotfix

@schpoorkyschpoorky released this just now

Fixes the least difficult bug for players: needing another vessel (or debris) to exist somewhere (anywhere) in the Flight scene in order for any playlists to play any at all ever.

Drop these into "/GameData/SoundtrackEditor/Plugins" (or "\GameData\SoundtrackEditor\Plugins" if on Windows, I think).

 

As for the code, technically I added lines, but really I just hid functions!

Edited by Brendan_
Link to comment
Share on other sites

I haven't played KSP in probably 9 months, but I stumbled across this mod somehow today and I can see that the ability to create area/event specific playlists has been added.

This is fantastic!

As a freelance composer for indie games and the local film industry, I can finally finish my "KSP OST" project I've been toying with for a few years. Hoping to install this mod this weekend, test it out, and see if I can get to work on doing the proper OST that KSP deserves.

Link to comment
Share on other sites

 

On 9/14/2017 at 0:07 PM, -ctn- said:

I haven't played KSP in probably 9 months, but I stumbled across this mod somehow today and I can see that the ability to create area/event specific playlists has been added.

Well, the most specific the 'area' parameters get are a named celestial body at specific altitudes, but even that is bugged to the point of being unusable.

Future plans @pizzaoverhead has get down to specifying biomes and "world's first" type events, but there are a number of easily encountered Crash-To-Desktop bugs with velocity and altitude parameters that need fixing before adding new functionality.

Parade dousing aside, I would love to hear your ideas and maybe a link to some of your catalog!

Link to comment
Share on other sites

So i downloaded it to add to my KSP 1.3 fully loaded save with mods. I can confirm that it works but it's buggy. 

I'm doing the best to set up great sound tracks for different situations, I read above not to mess with numerical values as that might crash ksp. My first real hang-up is not being able to get it to play a pre-launch sequence(I've got the apollo 13 soundtrack). I've got all the parameters correct but it seems to not take. 

My second question is if this mod conflicts with chatterer in any way? Seems like maybe pre-launch gets cut short from the chattering. 

I think the idea for this mod is amazing, being able to customize your listening pleasures is right up there with any visual mods for this game. Please keep this going and/or offer the code up for those who might be willing (Linux,rover, ect). 

Link to comment
Share on other sites

  • 2 weeks later...
On 9/21/2017 at 12:40 PM, justspace103 said:

does this mod work in 1.3?

 

Um, sort of, as Jengaleng confirms.

On 9/21/2017 at 4:40 PM, Jengaleng said:

So i downloaded it to add to my KSP 1.3 fully loaded save with mods. I can confirm that it works but it's buggy. 

I'm doing the best to set up great sound tracks for different situations, I read above not to mess with numerical values as that might crash ksp. My first real hang-up is not being able to get it to play a pre-launch sequence(I've got the apollo 13 soundtrack). I've got all the parameters correct but it seems to not take. 

My second question is if this mod conflicts with chatterer in any way? Seems like maybe pre-launch gets cut short from the chattering. 

I think the idea for this mod is amazing, being able to customize your listening pleasures is right up there with any visual mods for this game. Please keep this going and/or offer the code up for those who might be willing (Linux,rover, ect). 

I'm hoping @pizzaoverhead continues work on it, as my greatest accomplishments so far in contributing are:

  1. Compiling from source
  2. Hiding code that doesn't work

I'm still baby-school on actual programming anything, but I'm trying!

The code (for anyone who knows C#) is up on GitHub. I've also contributed a mess of KSP SoundtrackEditor bugs, which I've spent entirely too much time testing and confirming for someone to not do something with them.

 

As for your music not playing at Prelaunch, @Jengaleng, this is most likely the "need one other vessel/debris to exist in the FLIGHT scene for anything to play" bug. Try launching something -- anything -- else, roll it off the LaunchPad or Runway, and launching whatever you actually want to fly. If that makes the music start (which it should) then try my one real accomplishment here, the "All By Myself" hotfix.

If it doesn't fix it, emm... just paste your playlist{} here

as code

and I'll try to figure it out.

Edited by Brendan_
Link to comment
Share on other sites

  • 2 weeks later...

@Brendan_ Thank you very much, Brendan! Its great to hear that people still appreciate this wonderful mod. I do too, but I have encountered issues that are well known.

Anyways, I am going to release my own music set and two playlists: the one to use only with my music set, and another one to use mine+Aver9geJoe superset.
I have already used this superset in few of my videos.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...