[solved, but...] Mp3 playback/sampling issues (Linux)

Hi,

I purchased Renoise last year and set it up on my desktop pc. Everything worked fine (Linux Mint, Renoise with and without Jack).

Today I’m using a laptop (still Linux Mint, Intel HDA sound inside :rolleyes:/>/>, i5, 16GB Ram) and all in all I’m quite satisfied except for one thing:

Most of my mp3 files sound awful when I try to load them into the sample editor. Listening to the preview or playing it in the sample editor result in stuttering-like sound. It does not affect all files, but sadly most of them.

What I tried so far:

  • configure the Realtime Threads possibilities according to the Linux FAQ (audio group, modifications in limits.conf)
  • changing RT configurations for Jack (realtime disabled/enabled)
  • changing latency (currently 8ms; further modifications lead to non-working other Jack-related apps - I checked various Application)
  • using Renoise with Alsa only
  • changing sample rate and Periods/Buffer configuration in both, Alsa (Renoise preferences) and Jack (QjackCTL preferences)

Currently Jack is configured to Frames/Period: 128, Sample Rate: 48000, Periods/Buffer: 3, Real Time.

I tested one example file I used in a previous project on my old PC. Converting the file to ogg (44100 Hz) worked flawlessly. Resampling the original mp3 (44100 Hz) file to a 48000 Hz mp3 worked too. To be honest, I don’t know what that means to my system configuration…

I also do not want to resample all my files and hope there’re other solutions.

Am I missing something in my configuration?

Mp3-files are decoded by using a native decoder library, since embedding an Mp3 decoder costs quite a lot of money for each downloaded copy of Renoise for the devteam.
So i can point out to try and see what mp3 decoder is used by your system and attempt to replace it for a better alternative.

Ofcourse, working with mp3 files means you are working with incredibly destructed audio, but i suspect you don’t mind the degraded sound-quality… (or perhaps some audio sources are not available in better quality?)

To summarize:

  • This problem is not related to the latency configurations of Jack/Renoise
  • Since playing mp3 files in general isn’t a problem there’s also no problem with my soundcard

So the issue exists because of the mp3 decoder that is installed on my system that Renoise wants to use? I started my old PC earlier to check if there are any differences with the installed libraries, but it seems to be the same. I also have installed libmpg123 properly, mp3 import in other applications like audacity works.

I’m aware of this issue. My statement above

was probably a bit exaggerated, but I can imagine there are situations once in a while where I want make use of mp3 files (as there were in the past).

It was more a coincidence I picked this file in the disk browser and then started to check other files (like the one I used in an older project).

I have no idea what can be the cause of it.
Just wondering:

If you save the samples as wav after decoding then reload them, do they then work fine?

Hi,

As you already know since you posted it, Renoise (on Linux) uses libmpg123 to load MP3 files. But, Renoise doesn’t actually store or playback MP3 files. Instead it converts them to WAV or FLAC. (Ie. whatever you have set in Files -> Song/Instrument Export). Renoise also supports OGG, but this is sort of an undocumented hack. (To make demo files smaller.)

You can test this out by saving a song you think sounds bad, renaming it from .XRNS to .ZIP, unzipping, then looking in the ./SampleData/* directory. The issue will not be with MP3, but with the converted file.

Can you post an example of an MP3 file that sounds bad? It will be easier to test.

Regards,

No, they don’t. Still the stutter effect.

Sure, please find attached a test file. I cut the file because of the attachment restrictions and verified the effect still occurs.

3876 test.mp3

[quote=“Dwayne, post:6, topic:38089”]
Sure, please find attached a test file. I cut the file because of the attachment restrictions and verified the effect still occurs.

3876 test.mp3

Ok, I can confirm importing this file is fucked up (Ubuntu 12.10, 64-bit). Results are all choppy for no discernible reason.

Hopefully someone from the dev team is reading this thread.

This is a bug with Renoise IMHO.

Cheers.

-rw-r–r-- 1 user users 240375 Feb 12 02:12 test.mp3
test.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v1, 32 kbps, 44.1 kHz, Stereo

weird… here it sounds fine, except the quality is like it was sampled from an old dusty vinyl record. This seems to be the case whether the program uses mpg123/mpg321 or not.

mplayer says it’s 60 seconds long, but plays about 10 seconds, then says it reached end of file. If i fast-forward past 10 seconds, it plays for another few seconds (sounds the same as the beginning) then exits with end of file.

Most other media players say it’s 10 seconds long, and play the first 10 seconds without problem. (240kb would be about a minute at 32 kbits/sec)

Some programs see the ID3 tag “The Temptations - What Else”, others don’t.

Renoise imports ~= 10 seconds, and it sounds the same as in other software, ie. ok, except for the vinyl-record crackling/popping. I tested the linux version, and the windows version in wine.

What encoding/conversion program did you use to create the file?

I get spaces of silence in the imported file. Like, DJ fade cuts or something.

Attachment 3877 not found.

The original is not like this.

Weird… here it looks like this (notice only 10 seconds are read from the file)

So, the vinyl record popping effect wasn’t the “stuttering” mentioned above, but rather those “gaps” that are visible in your screenshot. Looks to me like something’s up with the mp3 file, which makes certain programs behave strangely with it. If he has a bunch of them that cause the same problem(s) then i’d guess the encoder/converter he used is at fault.

I wouldn’t consider this a bug in renoise, unless it crashes or becomes unusable after trying to load such a file.

/* EDIT */ looking closer at your screenshot, it looks like there’s a quick ramp-up/ramp-down at each gap in the audio. How does this sound exactly? I’ll test it on the laptop once i get all that junk up and running. (xubuntu/slackware)

Right, exactly. This is the part that isn’t normal. Sounds like a scratch DJ riding the fader.

I used ffmpeg to cut the file to 10 sec. Seems ffmpeg messed up the meta. The file is only 10 seconds long. That was necessary, because of the forum attachment restrictions.

What I find interesting is that Conner_BW experienced the same issues with this file and I didn’t unless I changed from my old PC to the Laptop… :(

I think I have to check the libraries and sound configurations on my old PC again. Since the decoding is more a processor than a soundcard issue I probably can exclude hardware-only issues.

I’m going to guess 64bit version of something versus 32bit version of something else.

My Linux box is 64bit across the board.

All 32bit here.

(for the time being)

oh well… :wacko:

I solved the problem. How? I have sadly no idea. It started two hours ago with an library install/deinstall session.

  • Because of your comments regarding the 64/32 libraries I looked through my libraries hoping to find something suspicious.
  • I realised Wine1.4 installed the libmpg123-0i:386 next to ibmpg123-0 and removed library by library to check if there’s a difference with no result.
  • Then I deinstalled any audio/mpeg related library and installed them again one by one with repeating checks to see if Renoise behaves as expected.
  • Interestingly at some point Renoise started playing the test file perfectly.

Here I am (with Wine1.5 set up simply because I remembered I used it already on my old system), checking the synaptic history again and again realising nothing changed in the end. :angry:

On the one hand I’m happy everything works as expected. On the other hand I’m sorry I can’t provide you a formular for success. :(