Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Best audio codec for chiptune (Read 10655 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Best audio codec for chiptune

What is the best (lossy) codec for encoding chiptune music? I am a heavy chiptune listener. I listen to music on my phone. Chiptune music commonly employs square waves, and other "non-natural" waves. Some computers (like the Amiga) have non-interpolated output which adds a "static-y" feeling to the sound, which is commonly lost when encoding to lossy format.

My phone supports Vorbis, MP3, AAC, AAC+, eAAC+, WMA, M4A, and RealAudio. Which codec is the best for retaining the tinny and crisp nature of chiptune music? Also, what quality setting would you recommend?

Thanks
-Kyle

[post #2:]

For bitrate-based quality settings, what bitrate do you recommend for mono audio and stereo chiptunes?

[post #3:]

By "best" I mean "best quality to size ratio".

Best audio codec for chiptune

Reply #1
Tell us more about your phone and about the format of the chiptunes you intend to listen to.

Most chiptunes are natively in formats like MOD or SID that are hundreds of times more compact than any decent-sounding encoding of them into standard lossy formats would be. The bitrates are on the order of 0.2 kbps rather than the 48-160kbps required for standard lossy format encodings. If your phone can run an application that plays these formats (e.g. xmp), that's definitely preferable to converting them into any of the formats you mention.

Otherwise... well, I've tested both Opus and Vorbis on several tracks of PPPPPP and they both sound fine to my ears down to rather low bitrates. But I'm not as sensitive to artifacts as many others here.

Best audio codec for chiptune

Reply #2
With chiptunes, there are two problems.
One is the non-filtered and/or aliased sounds, which you mention, which can be audible only on some settings.
The other is the quick changing sounds (like arpeggios, some type of drums, and short hihats). Due to pre-echo (which is that the sound starts softly ahead of time), it might sound less natural.

As for the first problem, MP3 should be fine, with a relatively high setting, like LAME -V 3, or an --abr 200. Settings like standard 128kbps CBR might suffer a bit, but that really depends on what you can hear. (I assume you'll be listening with headphones, so it could be easier to hear higher frequencies).

As for the second problem, this time MP3 is not that good, because of the size of the short blocks. (LC-)AAC*  at a setting at or above 128kbps would be a better solution because its short blocks are better suited to reduce pre-echo. I don't think you would get a good result with either WMA or RealAudio for this scenario (I assume original realaudio codec. Later versions were using other codecs inside).


* which should be the same as M4A. I guess the phone makes the distinction because it can support aac with adts header, or inside an MP4 container, which is then called M4A.


Edit: One vote for jensend suggestion of using a player for the formats. I have a couple mod players in my Android phone, including MODo and xmp.

 

Best audio codec for chiptune

Reply #3
There is nothing special about the audio dynamics inherent to chiptunes that would make any lossy format better than another. If your device has software to emulate the production of such audio formats, such as xmp as suggested by jensend, that can run the native instruction files (e.g., .sid, .sap, or .nsf), then that process would be "lossless" dependent upon the accuracy of the emulation software.

The "non-interpolated output" and "'static-y' feeling" that you claim is "commonly lost" is likewise a symptom of whatever emulator or process is used to convert the instructions to PCM data (which could then be compressed by a lossy or lossless codec).

The same process for determining your threshold of transparency applies for chiptunes as applies for other "traditional" music, i.e., double-blind ABX testing. You may find that the point of perceptual transparency differs, but that does not mean one codec is better than another.

Best audio codec for chiptune

Reply #4
AAC or Vorbis probably have a slight edge over MP3 if you care about compression.  I'd just try whatever is most convenient and see for yourself.

Best audio codec for chiptune

Reply #5
I have a Nokia N95, Symbian OS 9.2, series 60 feature pack 1. Scenetone can play module files and SID, but sadly, it is not very accurate. So far, XMPlay (Windows) plays them well. I have decided to use Vorbis. Good choice?

Best audio codec for chiptune

Reply #6
I can well imagine the likes of foobar2000 plugins doing things too 'properly' and cleanly to generate the alias frequencies you're probably after. You might need to capture the output of a decoder that provides the lo-fi quality you're after.

I'd have thought if you have a player that fails to oversample and filter and causes the aliased, static type of sound you desire, you could simply play that and record playback (i.e. internal analog loopback) on your soundcard (on Windows 7 or similar, select it from Recording Devices - most soundcards have it). Aside from negligible added noise, it should preserve the rough sound you like and then any transparent codec should preserve the sound of the added audible alias frequencies when you encode it.
Dynamic – the artist formerly known as DickD

Best audio codec for chiptune

Reply #7
I've got an album by Bit Shifter (chiptunes artist) that's in Vorbis around 130 kb/s, that I've listened to many times over the years, and it sounds perfect to me. So, I'd say Vorbis is a good choice.

It was actually my preferred lossy format for *all* music for years. I would still love to use it for the fact that it's open source, but now I've switched to AAC because it's supported by ever-so-slightly more players.

Of course, nowadays I go straight to FLAC if at all possible. Lossy compression is only for if disk space is a top priority. And I've amassed so much disk space that it usually isn't.

Best audio codec for chiptune

Reply #8
Because classic 8bit chiptune music (NES, C64, Atari) is full of harmonics i would give HE-AAC a try. SBR achieves very good quality if high frequency content has many similarities with the low frequency content (which is the case with chiptune music). Also the high frequency reproduction tools of SBR (adding sinusoidal signal and white noise in different bands) is exactly the same things that most of these audio hardwares were using for audio synthesis so estimation will be close to the original. Because these tunes are often mono you can go as low as 28kbps and maybe even lower if you are okay with noticable lowpassing.

Other tracker music are more close to natrual music than chiptunes so i would use AAC-LC for these to stay in family.  VBR 128kbps should sound good enough but it's up to you to experiment with the settings and choose what's okay for you.

Best audio codec for chiptune

Reply #9
Are you using Android? Rockbox plays pretty much any chiptune format you could possibly have. I know you asked about lossy encoding, but I think it's an option worth looking into and avoiding the encoding step altogether