Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: chip tune support #11119

Closed
ghost opened this issue Dec 7, 2022 · 22 comments
Closed

feature request: chip tune support #11119

ghost opened this issue Dec 7, 2022 · 22 comments

Comments

@ghost
Copy link

ghost commented Dec 7, 2022

Hi

I would like to request support for chip tune music.
The open source zxtune can be used for this (cross platform):

https://github.com/vitamin-caig/zxtune

@daschuer
Copy link
Member

Chip tunes = playing files natively form ZX Spectrum, Amiga, Amstrad, Atari, C64, Sam Coupe and more
https://zxtune.bitbucket.io/info/features/

Mixxx has already some chip tunes support via libmodplug:
https://github.com/mixxxdj/mixxx/blob/main/src/sources/soundsourcemodplug.cpp

  • mod
  • okt
  • s3m
  • stm
  • xm
  • it

It looks like we can hack something up, based on the zxtune123 command line tool.
https://github.com/vitamin-caig/zxtune/tree/develop/apps/zxtune123
Or they are willing to provide a library for us or contribute to libmodplug to release us from some maintenance.

But I have not yet understand your use case. Which particular format do you like to play?
What is the benefit compared to convert your chip tunes collection into *.wav?

@ghost
Copy link

ghost commented Dec 23, 2022

Hi

Here are several reasons zxtune should be used:

  • libmodplug is old, not updated as much as zxtune
  • libmodplug sounds worse then zxtune for many formats
  • zxtune is updated all the time
  • zxtune supports more formats
  • converting my chiptunes to wav will result in a huge disk space waste since I have 10000+ files and they are tiny compared to wav. Therefore for chiptune lovers, zxtune integration into mixxx would be great

Thx for reading

I was the author of this request! I have a new account

@ghost
Copy link

ghost commented Dec 23, 2022

I use mixxx for example to make chiptune mixes. Adding zxtune would be a dream. Just look at the amount of formats supported and the excellent sound quality of zxtune!

I don't know if there is a library of zxtune you can just use in mixxx?
Maybe you can ask the developer?

@daschuer
Copy link
Member

This sounds reasonable. The issue is that it will be probably hard to find a contributor to implement it.
Can you do it? I am happy to give support in general, but I have no experience and nor interest in Chiptunes in particular. So you need to build a team to make it Possible. I suggest to create a topic in the Zulip development channel https://mixxx.zulipchat.com/#narrow/stream/109171-development or any other probably better forum and invite the Chiptunes community, to discuss the needs for the proposed project.

Can we rephrase this bug? It should describe the particular problems with libmodplug you like to have solved.
Like soundquality of ... is bad
or add support for ...
This way it can be an open discussion.

@ghost
Copy link

ghost commented Dec 23, 2022

I'm not a developer but I asked zxtune developer. If he makes a library, is it then not just adding this in mixxx (just like FLAC, ... libraries are used in mixxx)?
And when updated, you just replace it by the update?

Sorry I'm just a computer user, not developer :(

@ghost
Copy link

ghost commented Dec 23, 2022

The supported formats of zxtune are so many, that libmodplug doesn't even have to be compared to it.

See here for comparison with other libraries and zxtune:

https://zxtune.bitbucket.io/info/comparison/

And all formats:

https://zxtune.bitbucket.io/info/features/

The output is also perfect for mixxx, all platforms:

Playback

ALSA
DirectSound
OSS
SDL
WaveOut
AYLPT
PulseAudio

I have no knowledge about programming and about the Zulip channel. If possible, can you start a discussion there with the above information? I'm an autistic woman and not really skilled to do this kind of social things.

If added to Mixxx, it will turn Mixxx into the number 1 DJ software for chiptune parties! :)
I have been to some and now there is not really a mixing program they use there, so they try to use a combination of several tools if they use chiptune files on a PC. Otherwise real devices like a game boy, etc are used.
It could be a fantastic thing for the chiptune community because all of Mixxx's features can be used on the music.
This is currently not possible (except for the very few libmodplug supported formats).

Thank you

@daschuer
Copy link
Member

If he makes a library, is it then not just adding this in mixxx (just like FLAC, ... libraries are used in mixxx)?

Yes, we need a portion of glue code that can be complex or not, depending on the external library.

@vitamin-caig
Copy link

ZXTune developer is here.

Some points:

  • zxtune uses thirdparty libraries in order to support some particular formats
  • libmodplug is used to play variety of tracker (not chiptune) formats - IDK why this library is called outdated and worse than zxtune
  • the best way to integrate zxtune is to write plugin in particular app's infrastructure (e.g. there're plugins for foobar/xmplay/bzrplayer/etc) using its interfaces (NOT via outdated libzxtune with C-style interfaces).
  • I can consult whoever will make this for mixxxdj

@daschuer
Copy link
Member

Thank your for the clarifications. Some years ago we had such a proprietary plug-in interface in Mixxx, but we have removed it because no one was really using it. Since Mixxx is open-source, it turns out to be more straight forward to use the internal interface for implementing new so called sound sources.
https://github.com/mixxxdj/mixxx/blob/main/src/sources/soundsource.h

The alternative would be to make an ffmpeg plugIn. Mixxx has already ffmpeg support.

With libmodplug we had the issue that it was not possible to do exact seeks, which is required to beat match after seeks using precalculated beat maps. We solved that by decoding the whole file when loading it and use the decode samples for seeks.

Apart from these technical deps, I am afraid this issue will stall, because there is no contributor with coding skills that has an vested interest for this feature. Do you know one?

@ghost
Copy link

ghost commented Dec 24, 2022

Why don't you do it? You seem to know everything that's needed.

@daschuer
Copy link
Member

I have no intrinsic motivation. We have a lot of open PRs an Issues I like to see more urgent.

@artkiver
Copy link

artkiver commented Jan 3, 2023

I have some motivation. Alas, in attempting to explore Mixxx's professed ability to support tracker formats thanks to libmodplug as being part of FFmpeg, I have noticed that it doesn't seem to consider .MOD files loadable?

Worse: when I attempt to build Mixxx (on an Apple Silicon/M1/aarch64 running macOS Ventura) following https://github.com/mixxxdj/mixxx/wiki/Compiling%20on%20macOS (last updated in 2021, and we are now in 2023) it doesn't even complete the build processed:

""ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[851/865] Building CXX object CMakeFil...est.dir/src/test/soundproxy_test.cpp.o
ninja: build stopped: subcommand failed.""

Attempting to for example, declare "-DCMAKE_APPLE_SILICON_PROCESSOR=ON" seems to go OK, but it fails in the build.

Also, when running source $mixxxdir/tools/macos_buildenv.sh setup I see:

"Exported environment variables:
MIXXX_VCPKG_ROOT=/Users/grey/src/githubclones/mixxx/buildenv/mixxx-deps-2.4-x64-osx-min1012-245123a
CMAKE_GENERATOR=Ninja"

Indicating to me, that Mixxx's macos_buildenv.sh script is still presumably defaulting to Intel? That does seem consistent with the website not offering non-Intel builds, and thus even old versions of Mixxx require Rosetta 2 to be installed.

I've tried discussing things on Zulip, but honestly: that UI is deeply confusing and the types of responses I have received have been less than helpful, if not outright misinformation. I long for something similar like an informal IRC discourse channel.

Nonetheless, if I cannot get Mixxx to build on a current system, it doesn't seem as if I will be able to make meaningful contributions and improvements to the project.

I will keep making an effort, but I get the sense that macOS is not a high priority platform for current Mixxx developers, even after I had previously offered to donate an M1 Apple Silicon system.

I have successfully run Mixxx on a Linux system that is aarch64 based, so I know it's not simply a matter of being unable to support another arm64 device.

@daschuer
Copy link
Member

daschuer commented Jan 3, 2023

I have just noticed that we do not ship MOD support for all targets:

Target 2.3 main
macOS x64
Windows
Linux (Ubuntu)

For the 2.3 branch libmodplug is missing in the environment. But I see no reason why it is disabled for the main branch.
I will create a PR to fix that.

Mixxx has a native libmodplug SoundSource. The libmodplug support via ffmpeg does not suit for Mixxx, because it does not provide sample accurate seeks, which is required for looping and cue points.

We do not yet officially support building on macOS aarch64. But it is possible.
I have a private branch here:
https://github.com/daschuer/mixxx/tree/vcpkg_update_direct_arm64

I've tried discussing things on Zulip, but honestly: that UI is deeply confusing and the types of responses I have received have been less than helpful, if not outright misinformation.

Oh, I am sorry to hear that. I think we have advanced since than. In the meanwhile we have some active macOS contributors at Zulip.

@JoergAtGithub
Copy link
Member

Just for reference: There is also https://openmpt.org/ which is already an official FFMPEG plugin: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/libopenmpt.c

@artkiver
Copy link

Just for reference: There is also https://openmpt.org/ which is already an official FFMPEG plugin: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/libopenmpt.c

True, it seems as if someone recently submitted a MacPort Portfile of libopenmpt/openmpt123 for review as well: macports/macports-ports#17284

(though that has not yet been merged, testing it locally went OK).

@daschuer
Copy link
Member

We use vcpkg for the macOS environment.
I have just started a new build with libopenmpt support enabled. https://github.com/daschuer/vcpkg/actions/runs/393668489

@daschuer
Copy link
Member

Here you can find now packages with libopenmpt and a libopenmpt enabled ffmpeg:
https://github.com/daschuer/vcpkg/actions/runs/3949418187

@ghost
Copy link

ghost commented Oct 12, 2023

Is there any progress here or will the existing libmodplug just stay as it is right now?

@daschuer
Copy link
Member

I think we can close this bug in favour of #9862
Because since #11182 we have Chiptunes on all our builds.

If you have a specific issue with a specific file or such, please open a new bug.

@daschuer daschuer added this to the 2.4.0 milestone Oct 12, 2023
@ghost
Copy link

ghost commented Oct 12, 2023

OK
To be sure: Mixxx now uses libopenmpt on all platforms?

@daschuer
Copy link
Member

Mixxx uses libmodplug on all platforms. The request for switch to libopenmpt is still open.

@ghost
Copy link

ghost commented Oct 12, 2023

Mixxx uses libmodplug on all platforms. The request for switch to libopenmpt is still open.

Ah ok! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants