Hello and welcome to another episode in the Godot Basics tutorial series Godot Tutorials is not affiliated with or sponsored by Godot Game Engine. In this episode, we will be taking a look at various audio formats. Now in audio format is a file format for storing digital audio data. There are many, many different types of audio formats. Now it is the dream of everyone to have the highest quality for your audio while also maintaining the lowest file size possible.
But with current technology, this is just not possible yet. And so that means there will be tradeoffs.
Let's take a look at the lossless uncompressed file format. The lossless uncompressed file format is audio at its purest form. Basically, audio data is preserved so that the audio is the same as the original source. Basically, you can expect the highest audio quality when using the lossless uncompressed file format. Now, since audio data is as close as possible to the source, this means that file sizes are huge.
The wav file and the AIFF file are lossless uncompressed file formats. If you use one of these to file formats, you can expect your users to experience audio at its highest quality. The next type of audio file format is the lossless compress. Unlike the lossless uncompressed file formats, the lossless compress will add a little bit of compression. However, it will try its best to not discard any of the audio data in your file.
These files include the flack or file a see WMA lossless, which is the Windows version, and ALAC, which is the Apple version of lossless compression. The following files will be smaller than the WHV file because it does add some compression. However, you can still expect the audio to be of high quality because the compression again does not discard any of the audio data. The next audio file format is called lossy compression.
Unlike Lossless, which tries its best to compress while maintaining the integrity of the data, a lossy compression adds compression, where some audio data is in fact discarded now because lossy compression discards audio data. This means that audio is at a lower quality when compared to a lossless audio file format. Lossy audio compression file formats include the hoggy file, the MP3, AAC and WMA.
A next audio file format is a mini file. MIDI is an acronym and it is short for musical instrument, digital interface and better terms. A modifier is an encapsulation of instructions telling connected instruments what note to play, how to plant, how fast the tempo is and so forth. MIDI files are actually very powerful when it comes to creating music. It is so powerful that it is the standard when working with music. One thing to note is that many files are small in size and despite being small in size, you have complete control of your music.
One way to think of a Mittie file is that it's the digital form of sheet music. You can write your notes, you can tell the user what instrument it needs to play at what speed it should be playing it, how loud or how soft, how fast or how slow. But despite all of that, just like sheet music, it does not come with an instrument. And it is for that reason that many files are small. They do not contain instrument data. And so if you were to play a file, theoretically, nothing would play.
You would need to connect the metal file into a device or set it up to some type of instrument data on your end. There are two types of MIDI files. There is the general mide file and the standard MIDI file and the standard MIDI file comes with a few variations. Type 0 type one. Not particularly important, but just something to keep in mind if you want to work with Mittie files. The most common MIDI file type is Type 0 when it comes to standard MIDI files. The last audio file format I want to introduce to you is the Opus audio format.
Opus is a Lossy audio coding format developed by the XIPH.ORG Foundation. It's an audio file format built specifically for voices. So if you are dealing with character dialogue, you may want to look into the Opus audio file format. The cool thing about the Opus file format is that because it was built specifically for voices, it's capable of keeping its file size low and the audio quality high. As a matter of fact, the Opus audio file.
When dealing with voices has a higher quality than an MP3 and is able to maintain a file size smaller than an MP3, an MP3 again is a Lossy audio file format. Now that we went over quite a few audio file formats. What should you use? And the reality is there is no correct answer. It depends on your go. On top of what your goal is, there are other questions you need to ask yourself, such as the following. What game engine are you using? How much music does your game need? Will you be looping music? Is your game dependent on the highest quality possible for your music and so forth? And that's because not all game engines support the same audio file formats.
Since we are dealing with Godot, what audio file format should you use in Godot? And again, my answer to that would be it depends on what you want. However, a user that goes by the name Holly mentioned in a comment in a previous episode that the most common way people deal with music and Godot is that they use OGG files for music and WAV files for sound effects. Well, that's all I have for you in this episode. Thank you so much for joining me. Thank you for clicking the like button and thank you for clicking the subscribe button.
If you have any questions or comments, please feel free to leave them in the comments section down below and I look forward to seeing you in the next episode. Have an amazing day.