Jump to content

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


pizzaoverhead

Recommended Posts

Can I spam my soundcloud profile? I am young guys that compose music just for hobby but if you ear somethings interesting I will glad to donate my pieces :)

Good tracks Yannick!. I love Destiny don't wait, over all. I wish use it in someone of my incoming (non-comecial) KSP videos. Could it be? (of course expliciting you as the composer and music artist)

What type of rights have that song?

Link to comment
Share on other sites

Do you have a suggestion for where to install libmpg for those of us that don't have a KSP_Data folder (OS-X?)? Or is this mod now Windows-only? Thanks.

(Edit: If there's on good idea as to where libmpg123 should go, would you be willing to add a "Disable MP3/MPG" option to settings.cfg? The plugin only has issues when it tries to enter the MP3Import() code in LoadMp3s()s. After that it just disappears... no segfault, no other log messages, just unloads or disappears or gets eaten by Unity.)

Sorry if I'm late to the show, but I just discovered this mod, AND I have a Mac, AND I have the developer tools installed. Plus, I appear to have copious free time. I can't actually code worth beans, but I can run a compiler.

It appears to me that if you're using an external library it must first be compiled against the Mac. For MPG123, that's pretty much already done here:

http://sourceforge.net/projects/mosx-mpg123/

It's probably also a good idea to see what others have done when using external libraries cross-platform. The example that springs to mind is GitCraft:

http://kerbalspaceprogram.com/gitcraft/

And I should note that the author there is simply placing the Mac OS X version of his library under the main KSP directory. There is no "special" location for it, so it's up to you.

Now I may need a fair bit of hand-holding but I can make my Mac available to compile code for you.

Meanwhile, I'm working on audio mastering of Gustav Holst's "The Planets" with an eye to creating a bright, shiny Creative Commons licensed version in Ogg Vorbis format. Anyone interested?

Link to comment
Share on other sites

It appears to me that if you're using an external library it must first be compiled against the Mac.

This is so obvious that it gives me a headache that it didn't occur to me.

To prevent making changes to the SoundtrackEditor plugin, this could be tested by taking the built library from that other OS-X version of mpg123 and renaming it to match the Windows version.... Otherwise the DllImport statements in mpgimport.cs will need to be updated to reference the OS-X lib.

I'm pretty much at the point where I know I no longer know what I'm talking about, so take that with a grain of salt. I'd offer to compile the OS-X mp3 lib, but I've failed so far to get a simple serial port library to build in X-Code/gcc/llvm, so... see previous sentence.

I'll just go hide in that corner over there for a while.

Link to comment
Share on other sites

This is so obvious that it gives me a headache that it didn't occur to me.

To prevent making changes to the SoundtrackEditor plugin, this could be tested by taking the built library from that other OS-X version of mpg123 and renaming it to match the Windows version.... Otherwise the DllImport statements in mpgimport.cs will need to be updated to reference the OS-X lib.

Well, no, it's nothing quite as simple as that. The Mac library will have its own format, and likely have a .dynlib extension, and there is some work integrating this into the main codebase. Being cross-platform isn't a cakewalk. So, there'll have to be changes to the code, mostly additions, due to the Mac version of the library being in a different format, and likely in a different location. Let's see what pizzaoverhead has to say about it first.

Link to comment
Share on other sites

Well, no, it's nothing quite as simple as that.

Sadly you're right. I did manage to build mpg123 and libmpg123.0.dylib for OS-X using the mpg123 source (and also mpg123 using that patch, but both worked when used outside of KSP). I tweaked the STED source to specify the new dylib library, but DllImport failed to load the library. The API seems to be the same across all versions, but I really only had a couple minutes to look at it and I'm not overly familiar with exactly what C# and/or Unity are looking for....

Link to comment
Share on other sites

Sadly you're right. I did manage to build mpg123 and libmpg123.0.dylib for OS-X using the mpg123 source (and also mpg123 using that patch, but both worked when used outside of KSP). I tweaked the STED source to specify the new dylib library, but DllImport failed to load the library. The API seems to be the same across all versions, but I really only had a couple minutes to look at it and I'm not overly familiar with exactly what C# and/or Unity are looking for....

You're at least part-way there. It's really a matter of getting pizzaoverhead to notice that yes, we have a working dynamic library for Mac OS X, and all we really need is to hook it into the existing code, and alas, I'm not familiar enough with C# or Unity either. We're at a point where we need the mod's developer. :)

Meanwhile, I've got some work done on the .Ogg files for Holst's "The Planets." I have Mars, Mercury, and Jupiter done, and doing the audio bounces for Neptune. Oop! Neptune's done! That's four out of seven in one night.

Awesome mod. I'm spending more time creating music than playing the game at the moment.

Link to comment
Share on other sites

Sorry if I'm late to the show, but I just discovered this mod, AND I have a Mac, AND I have the developer tools installed. Plus, I appear to have copious free time. I can't actually code worth beans, but I can run a compiler.

It appears to me that if you're using an external library it must first be compiled against the Mac. For MPG123, that's pretty much already done here:

http://sourceforge.net/projects/mosx-mpg123/

It's probably also a good idea to see what others have done when using external libraries cross-platform. The example that springs to mind is GitCraft:

http://kerbalspaceprogram.com/gitcraft/

And I should note that the author there is simply placing the Mac OS X version of his library under the main KSP directory. There is no "special" location for it, so it's up to you.

Now I may need a fair bit of hand-holding but I can make my Mac available to compile code for you.

Meanwhile, I'm working on audio mastering of Gustav Holst's "The Planets" with an eye to creating a bright, shiny Creative Commons licensed version in Ogg Vorbis format. Anyone interested?

Excellent! That's great to hear. Are you able to build the MOSX MPG123 library? I'm not sure how the Mac search path for libraries works, but there is some detail on it here. It works for GitCraft in the root, so that would be the place to start testing, but I'd prefer it to be in the same location as the DLL. I'll be looking forward to hearing what you make of "The Planets".

Sadly you're right. I did manage to build mpg123 and libmpg123.0.dylib for OS-X using the mpg123 source (and also mpg123 using that patch, but both worked when used outside of KSP). I tweaked the STED source to specify the new dylib library, but DllImport failed to load the library. The API seems to be the same across all versions, but I really only had a couple minutes to look at it and I'm not overly familiar with exactly what C# and/or Unity are looking for....

STED doesn't use the file extension, so if that is a valid way of loading the Mac library it should work without changes. However, the filename should be "libmpg123_0.dylib", not "libmpg123.0.dylib". I've heard there are issues with that character in cross-platform library names.

Link to comment
Share on other sites

Excellent! That's great to hear. Are you able to build the MOSX MPG123 library? I'm not sure how the Mac search path for libraries works, but there is some detail on it here. It works for GitCraft in the root, so that would be the place to start testing, but I'd prefer it to be in the same location as the DLL. I'll be looking forward to hearing what you make of "The Planets".
Quote Originally Posted by Cydonian Monk

Sadly you're right. I did manage to build mpg123 and libmpg123.0.dylib for OS-X using the mpg123 source (and also mpg123 using that patch, but both worked when used outside of KSP). I tweaked the STED source to specify the new dylib library, but DllImport failed to load the library. The API seems to be the same across all versions, but I really only had a couple minutes to look at it and I'm not overly familiar with exactly what C# and/or Unity are looking for....

STED doesn't use the file extension, so if that is a valid way of loading the Mac library it should work without changes. However, the filename should be "libmpg123_0.dylib", not "libmpg123.0.dylib". I've heard there are issues with that character in cross-platform library names.

Ah... Tired last night, and didn't catch that last bit, and you're right, those two dots are a sticking point, the first one needs to be an underscore. I've yet to compile the library myself, as I'm working on the audio mastering for "The Planets." The work is mostly done. Just "Saturn" and "Venus" left to do, and maybe go back and see if I can't clean up the transients on "Jupiter." This music is very dynamic, with lots of loud and soft passages, and Jupiter is easily the most dynamic of the suite. So tonight, after music practice it's me and the compiler.

Link to comment
Share on other sites

First of all, thank you again for this, pizzaoverhead. But...

potentially be able to use less memory than a stock install.

Do it as priority, please, immo is the most important feature to reach exit with this mod. I love this mod, a lot (¡a lot!), but I can't use it in my main install... too easy get a RAM crash with mods and a few songs... :(

Link to comment
Share on other sites

As I understand it, excess dots are not an issue, but they do prevent DllImport from appending a ".dll" to the end of the filename in Windows. Which means you would then need to specify the full filename. Regardless, I tried both the normal versioning and the Windows underscore/dash with no luck. The stack trace indicates "missing file" at DllImport (specifically at mpg123_init), so I think it's just down to finding and/or specifying the right path.

The MOSX patch is pretty useless to us, as it only makes changes to the mpg123 binary, not the libmpg123 library. It does build, however, but it uses an older version of mpg123 to do so. Also, the issue it claimed to patch worked (for me) without the patch....

GitCraft doesn't seem to be doing anything obviously different. Sure, the library structure is different (they use a 3rd-party stub assembly as a dependency, and that stub dynamically loads the git libraries depending on platform), but procedurally it appears to be the same. (I only gave the C#/git library a cursory reading, though, so there may have been some P/Invoke things I overlooked.)

I'm about 99% sure this would be easier in Linux.... and it would probably work right off. Might test that tomorrow night if I find the time.

Link to comment
Share on other sites

Ah... Tired last night, and didn't catch that last bit, and you're right, those two dots are a sticking point, the first one needs to be an underscore. I've yet to compile the library myself, as I'm working on the audio mastering for "The Planets." The work is mostly done. Just "Saturn" and "Venus" left to do, and maybe go back and see if I can't clean up the transients on "Jupiter." This music is very dynamic, with lots of loud and soft passages, and Jupiter is easily the most dynamic of the suite. So tonight, after music practice it's me and the compiler.

I'll be looking forward to hearing it!

First of all, thank you again for this, pizzaoverhead. But...
potentially be able to use less memory than a stock install.

Do it as priority, please, immo is the most important feature to reach exit with this mod. I love this mod, a lot (¡a lot!), but I can't use it in my main install... too easy get a RAM crash with mods and a few songs... :(

Memory usage and cross-platform compatibility are the two main issues I'm working on for the next release. The memory issue will require replacing KSP's music playing module, so it'll take a while. I have improved the loading times when you aren't using all tracks however.

As I understand it, excess dots are not an issue, but they do prevent DllImport from appending a ".dll" to the end of the filename in Windows. Which means you would then need to specify the full filename. Regardless, I tried both the normal versioning and the Windows underscore/dash with no luck. The stack trace indicates "missing file" at DllImport (specifically at mpg123_init), so I think it's just down to finding and/or specifying the right path.

The MOSX patch is pretty useless to us, as it only makes changes to the mpg123 binary, not the libmpg123 library. It does build, however, but it uses an older version of mpg123 to do so. Also, the issue it claimed to patch worked (for me) without the patch....

GitCraft doesn't seem to be doing anything obviously different. Sure, the library structure is different (they use a 3rd-party stub assembly as a dependency, and that stub dynamically loads the git libraries depending on platform), but procedurally it appears to be the same. (I only gave the C#/git library a cursory reading, though, so there may have been some P/Invoke things I overlooked.)

I'm about 99% sure this would be easier in Linux.... and it would probably work right off. Might test that tomorrow night if I find the time.

I've had a look at the GitCraft code, and it is using the libgit2sharp library, which deals with cross-compatibility and paths the hard way. It tests what OS it's running on and modifies the path if necessary. I'll have to handle that in the plugin. Are you able to build the libmpg123 library under OS X? I have been planning on setting up a Linux install for working on this at some point, I'll have to make that a priority. Thanks again for the help.

Link to comment
Share on other sites

Are you able to build the libmpg123 library under OS X?

Yep! Mpg123 is fairly well maintained, and their pre-build .configure script took care of everything. Make ran without issues, though the compiled library was hidden under a . folder in the src folder. (Had I bothered to run 'make install' it probably would've copied it somewhere friendlier like /usr/lib....)

Link to comment
Share on other sites

Yep! Mpg123 is fairly well maintained, and their pre-build .configure script took care of everything. Make ran without issues, though the compiled library was hidden under a . folder in the src folder. (Had I bothered to run 'make install' it probably would've copied it somewhere friendlier like /usr/lib....)

That's good. I have some cross-compatibility code in the works. I'm hoping I'll have some time to get a test version to you this week.

There's a way to active random mode?

Random as in shuffling the songs? It orders them the same way the stock game does at the moment. I'll be rewriting it to add new features like that later though.

Could you perhaps add a mirror of your download on Spaceport?

There were SpacePort downloads, but they refused to update, so now there are MediaFire downloads. Are they not working for you?

Link to comment
Share on other sites

So here is my playlist, all of the songs that I added came from Kevin MacLeod. I spent hours listening to every music he had and think what I picked fits the theme of KSP. I also reported an issue I had with MP3's, it seems it was my fault for not removing part of a mod I had installed.

Thanx for the mod.

SpacePlaylist

{

track = KSP_SpaceAmbience01

track = KSP_SpaceAmbience02

track = KSP_SpaceAmbience03

track = KSP_SpaceAmbience04

track = Arcadia

track = Bathed in the Light

track = Dreamy Flashback

track = Frost Waltz

track = Frost Waltz (Alternate)

track = Frozen Star

track = Impact Lento

track = Wizardtorium

track = KSP_MainTheme

track = SoundtrackEditor/Music/Space/Darkest Child

track = SoundtrackEditor/Music/Space/Dragon and Toast

track = SoundtrackEditor/Music/Space/Fairytale Waltz

track = SoundtrackEditor/Music/Space/Martian Cowboy

track = SoundtrackEditor/Music/Space/Mysterioso March

track = SoundtrackEditor/Music/Space/Numinous Shine

track = SoundtrackEditor/Music/Space/On the Shore

track = SoundtrackEditor/Music/Space/Peaceful Desolation

track = SoundtrackEditor/Music/Space/The Other Side of the Door

track = SoundtrackEditor/Music/Space/Earth Prelude

track = SoundtrackEditor/Music/Space/Echoes of Time

track = SoundtrackEditor/Music/Space/Lost Frontier

track = SoundtrackEditor/Music/Space/Procession of the King

track = SoundtrackEditor/Music/Space/Rumination

track = SoundtrackEditor/Music/Space/Silver Blue Light

track = SoundtrackEditor/Music/Space/The Parting

track = SoundtrackEditor/Music/Space/Virtutes Instrumenti

}

ConstructionPlaylist

{

track = KSP_Construction01

track = KSP_Construction02

track = KSP_Construction03

track = KSP - VAB_SPH_SneakyAdventure

track = Groove Grove

track = Brittle Rille

track = SoundtrackEditor/Music/Construction/Investigations

track = SoundtrackEditor/Music/Construction/Air Prelude

track = SoundtrackEditor/Music/Construction/Chipper Doodle v2

track = SoundtrackEditor/Music/Construction/Cipher2

track = SoundtrackEditor/Music/Construction/Dark Fog

track = SoundtrackEditor/Music/Construction/Digya

track = SoundtrackEditor/Music/Construction/Electrodoodle

track = SoundtrackEditor/Music/Construction/Fluffing a Duck

track = SoundtrackEditor/Music/Construction/Gonna Start v2

track = SoundtrackEditor/Music/Construction/Happy Bee - Surf

track = SoundtrackEditor/Music/Construction/Hidden Agenda

track = SoundtrackEditor/Music/Construction/How it Begins

track = SoundtrackEditor/Music/Construction/Monkeys Spinning Monkeys

track = SoundtrackEditor/Music/Construction/Moon Lounge Omicron Prime

track = SoundtrackEditor/Music/Construction/Our Story Begins

track = SoundtrackEditor/Music/Construction/Pamgaea

track = SoundtrackEditor/Music/Construction/Savannah Sketch

track = SoundtrackEditor/Music/Construction/Scheming Weasel slower

track = SoundtrackEditor/Music/Construction/Sneaky Snitch

track = SoundtrackEditor/Music/Construction/Stormfront

track = SoundtrackEditor/Music/Construction/Super Friendly

track = SoundtrackEditor/Music/Construction/The Complex

track = SoundtrackEditor/Music/Construction/Umbrella Pants

track = SoundtrackEditor/Music/Construction/Wallpaper

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...