Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

What do you think of adding MIDI music to Liberal Crime Squad?

Yes, let's do this, retro MIDI music would go perfectly with this game's retro look plus it would be great for modding and hardly add anything to the game's disk space and be easy to disable and work on all platforms.
- 43 (81.1%)
No, because I don't want music added, period, even if there is an easy option to disable it and even if the file size for music files is incredibly tiny and even if it's cross-platform and even if modders can customize it with their own music.
- 2 (3.8%)
No, because I'm an audiophile and don't like the MIDI format, I prefer stuff like hi-fi lossless 5.1 surround sound, even if that means huge music files, it's either that or no music at all, and anyone who listens to MIDI music has bad taste.
- 3 (5.7%)
Maybe, I don't care, whatever, I have no opinion on this, leave me alone, I don't like having to answer these stupid polls and I could care less what you do with the game.
- 4 (7.5%)
Other, my opinion on this is different from any of the ones above, stop trying to pigeonhole me, I have a very unique, insightful viewpont on this which your poll failed to anticipate (leave details about your "Other" vote in a comment).
- 1 (1.9%)

Total Members Voted: 52


Pages: 1 2 [3]

Author Topic: Idea: add MIDI music to LCS  (Read 8636 times)

a1s

  • Bay Watcher
  • Torchlight Venturer
    • View Profile
Re: Idea: add MIDI music to LCS
« Reply #30 on: September 03, 2014, 10:50:00 am »

The game is a character graphics console game because that was easier to make. Graphics quality was sacrificed to save time for gameplay and other features.
That is actually not true. LCS is deliberately evocative of the 70s (when groups like the SLA and Weathermen were active). It is furthermore explicitly based on a game from the era called Oubliette. One way to look at it is: if there was some left leaning programmer back in the day, who wanted to make a topical, yet humorous game about current politics, LCS v.1.0 might have been the game she would have made.
Logged
I tried to play chess but two of my opponents were playing competitive checkers as a third person walked in with Game of Thrones in hand confused cause they thought this was the book club.

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Idea: add MIDI music to LCS
« Reply #31 on: September 08, 2014, 01:43:58 pm »

MIDI sounds bad, and is a bad choice for an audio format. In exchange it has very few advantages. It would be better to use something like OGG, because that opens up a wide selection of permissively-licensed, better-sounding music, and MIDIs can be converted to a different format if there's simply nothing else to use.

The game is a character graphics console game because that was easier to make. Graphics quality was sacrificed to save time for gameplay and other features. MIDI audio is probably no easier to implement than better-sounding alternatives like OGG, so there is no corresponding advantage.

I don't think think bad graphics go better with bad music. Bad graphics and good music can coexist, and ought to.

As I also announced in another thread, the game now supports and also has high-quality Ogg Vorbis music as well as MIDI music. The Ogg Vorbis files for all 34 songs total 56.7 megabytes (59,485,596 bytes). They are optional to include with the game, as are the MIDI files. Both are now stored in subdirectories of the /art directory. You need 3 additional .DLL files to play Ogg Vorbis as detailed in the README file. The game executable itself, when compiled with SDL2 and SDL2_mixer, automatically detects whether or not you have the Ogg Vorbis libraries necessary for Ogg playback, and whether or not Ogg Vorbis and/or MIDI music is present. If Ogg Vorbis music is present and the required libraries to play it back are present, it is used. If those conditions are not met, but MIDI music is present, it is used. If neither music is present, or if the game is compiled without the SDL2 and SDL2_mixer dependencies (i.e. if you #define DONT_INCLUDE_SDL in common.h or define it in your compiler settings or CFLAGS or CPPFLAGS or configure.ac script or whatever) well then there isn't any music and it works pretty much identically to older versions that have no music (occasionally calling dummy functions for music playback that don't do anything when it's compiled in this mode).

So, you can compile, build, and package the game 3 different ways: 1) with Ogg Vorbis music, 2) with MIDI music, 3) without any music. And if you compile and build it without any music you won't need any .DLL files besides PDCurses.dll (or on UNIX-based systems, the ncurses or xcurses library dependency). If it is compiled and built with music, the total .DLL files you need if just playing back MIDI is 3 (the 2 additional ones being for SDL2 and SDL2_mixer), and the total .DLL files you need if playing back Ogg Vorbis is 6 (the 3 additional ones besides the ones needed for MIDI being for libogg, libvorbis, and libvorbisfile).

Oh yeah, and the sound quality of the 34 Ogg Vorbis files is great, and the filesize is as reasonable as I could get it (Ogg Vorbis does quite great at low bitrates). And it's all Liberally licensed, with license information for all the files in the art directory in licenses.txt. That file must be packaged with every distribution of the game for legal reasons, many of the licenses require a documentation file to be bundled with software using files under those licenses, that includes both license information and attribution to the copyright holders. A lot of it is public domain recordings and those are documented too. I put a lot of time and effort into it.

So now when you compile, build, and bundle/package the game you have a couple different options you didn't have before. And it is fully moddable. You can mod the game to use your own Ogg Vorbis or MIDI files. I am not including other formats besides those 2 for various reasons explained in the thread about Ogg Vorbis music, it's a bit complicated, I could get into a long discussion about audio codecs and their support in cross-platform libraries suitable for using in a game like this but suffice it to say, Ogg Vorbis is the format to use for the time being. In the future, Ogg Opus rather than Ogg Vorbis will someday be the format to use once the cross-platform libraries have good support for it but it isn't anywhere near that yet, trying to use Ogg Opus right now with the current state of cross-platform audio libraries would turn the Liberal Crime Squad code into a stinking mess of poo that would be unmaintainable, and thus be A Bad Thing™. Here is a stinking pile of poo emoji: 💩 Hmm, that might or might not display properly, depending on your browser, fonts, and operating system. OK, I will use an image of the emoji just to be sure people can see it in better detail, I'll use the Google Android version because it's the most disgusting looking version:



That's what the code would look like if I included nasty hacks to support Ogg Opus right now.

But yeah I'd just note that Ogg is a container format and set of standards and doesn't refer to any specific codec. The game specifically supports the widely-used, popular Ogg Vorbis audio format but not the newer, not-widely-supported Ogg Opus audio format. And Ogg Theora is a video codec not an audio codec. So saying Ogg is a little ambiguous although usually the meaning is obvious from context; from the context I can tell you mean Ogg Vorbis audio.

And the game now fully supports both Ogg Vorbis and MIDI audio and has full selections of 34 of each of them for all 34 situations in the game that call for different music. And the same song is used for both the Ogg Vorbis and MIDI versions of each song, although in a few cases there are some notable differences in how the Ogg Vorbis versions are performed when compared to the MIDIs (most notably Ogg Vorbis versions sometimes include actual voices of people singing words, impossible to do in MIDI).
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

Zekka

  • Bay Watcher
    • View Profile
Re: Idea: add MIDI music to LCS
« Reply #32 on: November 16, 2014, 10:19:49 pm »

The soundtrack is great and I love the lack of transitions, endless restarting, and choice of recognizable songs with specific associations.

This is not sarcasm, I think it's hilarious and really accentuates the roteness and rapid state-switching of the game. I didn't expect this to work as well as it did at all.
Logged

Yannanth

  • Guest
.
« Reply #33 on: November 18, 2014, 01:15:55 pm »

.
« Last Edit: November 21, 2016, 04:20:26 pm by Yannanth »
Logged

Duuvian

  • Bay Watcher
  • Internet ≠ Real Life
    • View Profile
Re: Idea: add MIDI music to LCS
« Reply #34 on: November 26, 2014, 09:09:01 pm »

The song I made is getting close to complete. I'm still running into issues with the .midi format though. It sounds good in the FL studio but I'm having trouble keeping that quality when I try various methods of recording it to .ogg. The program I initially used to post the earlier version worked well but the 30 day trial ended and it costs $25 which is too much for something I will likely only be using for this project. That program though was able to accurately convert a .midi file to an .ogg without changing the sound I hear in FL studio. If I can't find another converter that works with accuracy I will shamefully try borrowing a computer to do another 30 day trial in. Once I figure out which I will upload a .ogg or .mp3 version for everyone to hear.

I tried a conversion website but it requires you to pick a soundfont, whereas the program I mentioned likely used the same one built into my computer as FL studio. In other words, online converter sites that work the same as the one I tried use different sounds than what I hear while making the project. That usually makes the song sound bad.

This is somewhat worrying because the same effect might take place in the .midi version when LCS is on someone else's computer. There are a LOT of notes and instruments so it will sound bad on some if not all soundfonts it wasn't built on. If the .midi version garners complaint (which would be reasonable if it sounds bad with a person's soundfont), I would suggest if my song is added only using the .ogg version in the large audio LCS install as it at least will sound on all computers the way I hear it on mine. Hopefully though the .midi version won't sound bad on other computers after all.
« Last Edit: November 26, 2014, 09:29:33 pm by Duuvian »
Logged
FINISHED original composition:
https://app.box.com/s/jq526ppvri67astrc23bwvgrkxaicedj

Sort of finished and awaiting remix due to loss of most recent song file before addition of drums:
https://www.box.com/s/s3oba05kh8mfi3sorjm0 <-zguit

FinetalPies

  • Bay Watcher
  • Even on the battlefield.
    • View Profile
Re: Idea: add MIDI music to LCS
« Reply #35 on: November 27, 2014, 09:27:33 am »

Have you checked Open Source Alternatives for a free equivalent of whatever program you were using?
Logged

Yannanth

  • Guest
.
« Reply #36 on: December 08, 2014, 08:59:37 pm »

.
« Last Edit: November 21, 2016, 04:16:38 pm by Yannanth »
Logged

FinetalPies

  • Bay Watcher
  • Even on the battlefield.
    • View Profile
Re: Idea: add MIDI music to LCS
« Reply #37 on: December 09, 2014, 07:52:53 am »

I was just lightly committing to being helpful. But then you were super helpful, nice.
Logged

Duuvian

  • Bay Watcher
  • Internet ≠ Real Life
    • View Profile
Re: Idea: add MIDI music to LCS
« Reply #38 on: December 26, 2014, 12:09:02 am »

I found a way within FL studio to record midi that I originally thought didn't work simply because my audio player won't work at the same time as FL studio, I have to close FL studio first I found. That meant the perfectly fine .ogg sounded like it was blank when it was playing.

I'm about to edit once I finish uploading to  box, wanted to release on Christmas but I got home late.

EDIT: Re-recording in .mp3 instead of .ogg as box cannot preview .ogg

A song which started in normal format and which was converted to .midi format. It was truly annoying to work on, as the original song had about 20 instruments and midi can only handlle 15 plus one drums channel I didn't use. It maybe possible to have more than one instrument per channel with something called banks but I'll have to hope there is a youtube video explaining it as I haven't figured it out yet. At first the channels that had shared instruments would choose one of the instruments to play both the instruments as, which at first seemed random. I sort of fixed this by changing some instruments to be the same and putting them on the same midi channel. However sometimes they just stop working and fixing them usually breaks the others so it's sort of like musical chairs of some instruments working while other note patterns are being played by the wrong instruments or not at all.

Despite that though I managed to record this before my instruments went crazy again a moment ago.

https://app.box.com/s/9w988utn1ps0am3wx80a

I'll keep working on it as there are parts that still sound rough or need some work and at one point just previous to recording I added notes that now in retrospect could use companions. I think though that if people think it could be added as a song it's close enough now, though it may have minor modifications over time as I continue working on it at my leisure.

I also made a bonus song, much simpler than the first. It originally was a new pattern I made for the first song in this post, but I couldn't find a place to fit it in. I liked how it sounded after so I stuck it on the end after a pretty easy 10 minutes of work making it. I later made a second pattern that took longer to make and split it off into a new song. Instead of too many instruments as in the first song, this one only uses a single guitar and so was easier to work on with my lack of experience in midi format.

https://app.box.com/s/byvwfqix4xracqr3zgpm
« Last Edit: December 26, 2014, 01:38:28 am by Duuvian »
Logged
FINISHED original composition:
https://app.box.com/s/jq526ppvri67astrc23bwvgrkxaicedj

Sort of finished and awaiting remix due to loss of most recent song file before addition of drums:
https://www.box.com/s/s3oba05kh8mfi3sorjm0 <-zguit
Pages: 1 2 [3]