mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.27k stars 1.24k forks source link

feature request: chip tune support #11119

Closed ghost closed 9 months ago

ghost commented 1 year ago

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 commented 1 year ago

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

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 commented 1 year ago

Hi

Here are several reasons zxtune should be used:

Thx for reading

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

ghost commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

ZXTune developer is here.

Some points:

daschuer commented 1 year ago

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 commented 1 year ago

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

daschuer commented 1 year ago

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

artkiver commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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: https://github.com/macports/macports-ports/pull/17284

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

daschuer commented 1 year ago

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 commented 1 year ago

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

ghost commented 9 months ago

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

daschuer commented 9 months ago

I think we can close this bug in favour of https://github.com/mixxxdj/mixxx/issues/9862 Because since https://github.com/mixxxdj/mixxx/pull/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.

ghost commented 9 months ago

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

daschuer commented 9 months ago

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

ghost commented 9 months ago

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

Ah ok! :)