Git Product home page Git Product logo

msupcmplusplus's Introduction

msupcm++

A native libSox implementation of the msupcm tool

Usage

msupcm tracks.json

See included configs for tracks.json examples

CLI Usage

[TODO]

Building

Dependencies

After checking out the main repository, you will need to also check out all of the dependencies, which are linked as submodules.

cd <local repo directory>
git submodule update --init --recursive

Windows

After the dependencies have been checked out, simply open the msupcm++.sln file in Visual Studio (2019 or later) and build the solution.

Linux

First, start by installing all necessary build tools

sudo apt install build-essential autoconf libtool

and dependency system dev packages

sudo apt install libao-dev libasound-dev libmad0-dev libmp3lame-dev libopusfile-dev libpulse-dev libsndfile1-dev libsndio-dev

then simply run

make

from the top-level repo directory.

msupcmplusplus's People

Contributors

qwertymodo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

msupcmplusplus's Issues

Cross-platform port

Hi there,

I attempted to port this to Linux this morning, but it was non-trivial and after an hour I gave up. In theory all it should need is a few more #includes added, and removing functions that only exist in Microsoft's C library (_wremove). All of the dependencies are open source C libraries so on Linux you don't need to include those in the codebase, with the exception of the C++ json library being used here.

Thanks, I hope you decide to port this codebase in the future.

"pad_start" changes with "tempo" setting

It seems that when you have a "pad_start" within the same track as "tempo", the resulting padding doesn't honor the value you set for it. This should be a fixed value that doesn't change when the tempo is affected. To reproduce:

"sub_channels": [
    {
        "file": "music.mp3",
        "pad_start": 22050,
        "tempo": 0.88,
        "fade_in": 11025,
        "trim_start": 211388,
        "trim_end": 423326
    }
]

The short-term workaround is to move the padding to an outside layer and sub_track the remaining track, although undesirable for simplicity sake:

"sub_channels": [
    {
        "pad_start": 22050,
        "file": "music.mp3",
        "sub_tracks": [
            {
                "tempo": 0.88,
                "fade_in": 11025,
                "trim_start": 211388,
                "trim_end": 423326
            }
        ]
    }
]

No Linux build instructions and project in its current state won't build on Linux

It should be made clear that qwertymodo/sox needs to be downloaded to the /3rdparty/sox directory in order to build the project. Maybe revise README.md with this info?

Also, building on my machine (Fedora Linux 36) doesn't work because of this:

make -C 3rdparty/sox -s
Making all in lpc10
Making all in libgsm
Making all in src
make -C msupcm++ -s
In file included from sox_main.h:8,
                 from SoxWrapper.h:2,
                 from AudioBase.cpp:3:
/usr/include/c++/12/codecvt: In constructor ‘std::codecvt_utf8<char16_t, _Maxcode, _Mode>::codecvt_utf8(std::size_t)’:
../3rdparty/sox/src/util.h:196:19: error: expected unqualified-id before ‘(’ token
  196 | #define min(a, b) ((a) <= (b) ? (a) : (b))
      |                   ^
[And more of this]

Obviously, it doesn't make sense that a macro is messing up constructors or templates or any of the stuff included from the STL/etc, so there must be an error further up in the header or in one of the other listed files that the compiler didn't like. I looked in the file and changed a few things in an attempt to get it to compile, but no dice after 2 hours of research..

Tempos seem to not fully fill the output length

It seems that when tempo is used, the outputted sample length is correct, but the inserted audio doesn't span the entire length of the track, so there is a null section at the end of the track. An example of this occurring is below:

"sub_channels": [
    {
        "pad_start": 22050,
        "file": "music.mp3",
        "sub_tracks": [
            {
                "tempo": 0.88,
                "fade_in": 11025,
                "trim_start": 211388,
                "trim_end": 423326
            }
        ]
    }
]

This one is a bit of an issue and doesn't seem to have any good workaround, other then artificially change the tempo value by trial and error until it stops at the right point, and sub_channel everything and manually throwing in paddings.

problems with track titles

all the titles with apostrophes do not work and when changed to match the jsos file, they still do not work.

"file" doesn't trickle down to sub_channel children

The "file" attribute doesn't properly default to the parent for each sub_channel. The workaround is to redefine the "file" on each sub_channel separately, but probably is an undesired solution.

Also, when the "file" attribute isn't defined, the program exits and doesn't offer any information/errors within the "verbosity" details.

More issues with pad_start

pad_start applied to a top-level track seems to cause a song to start before the specified trim_start point instead of padding with silence. Also, when applied to the parent of a sub_track, it seems to just result in a silent track, the length of the pad, e.g.

    {
      "track_number": 60,
      "title": "Light World 2",
      "sub_tracks": [
        {
          "file": "Disc 3\\08. Song of the Ancients - Fate.mp3",
          "loop": 1012136,
          "trim_start": 1340951,
          "trim_end": 10944724,
          "fade_in": 5000
        }
      ],
      "pad_start": 20000
    },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.