Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package schismtracker for openSUSE:Factory checked in at 2021-11-18 10:33:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/schismtracker (Old) and /work/SRC/openSUSE:Factory/.schismtracker.new.1895 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "schismtracker" Thu Nov 18 10:33:31 2021 rev:16 rq:931933 version:20211116 Changes: -------- --- /work/SRC/openSUSE:Factory/schismtracker/schismtracker.changes 2021-06-26 21:26:04.983392426 +0200 +++ /work/SRC/openSUSE:Factory/.schismtracker.new.1895/schismtracker.changes 2021-11-18 10:33:47.103904692 +0100 @@ -1,0 +2,24 @@ +Wed Nov 17 09:43:57 UTC 2021 - Jan Engelhardt <[email protected]> + +- Update to release 20211116 + * Reset filter when previewing different instrments + * Fix ST3 GUS/SB detection on big-endian platforms + +------------------------------------------------------------------- +Mon Nov 15 22:45:45 UTC 2021 - Jan Engelhardt <[email protected]> + +- Update to release 20211115 + * Add warning for lost patterns when saving MOD files + * Fix S3M tracker identification bug + * Add support for reading OPL instruments from MPTM files + * Allow loading ModPlug volume column panning in S3M files + * Reset mixing volume to 48 for S3Ms made with GUS + * Strip zero-param commands that only have memory in IT from + MOD/XM files when loading + * Fix depth of instrument pitch-pan separation + * Fix incorrect position calculation after reaching end of + ping-pong loops + * Add rudimentary detection for SoundTracker MODs in file browser + * Apply pitch/pan separation as part of instrument panning + +------------------------------------------------------------------- Old: ---- 20210525.tar.gz New: ---- 20211116.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ schismtracker.spec ++++++ --- /var/tmp/diff_new_pack.luGTyN/_old 2021-11-18 10:33:47.615905169 +0100 +++ /var/tmp/diff_new_pack.luGTyN/_new 2021-11-18 10:33:47.619905172 +0100 @@ -17,7 +17,7 @@ Name: schismtracker -Version: 20210525 +Version: 20211116 Release: 0 Summary: Music editor that matches the look and feel of Impulse Tracker License: GPL-2.0-or-later ++++++ 20210525.tar.gz -> 20211116.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/.github/workflows/build.yml new/schismtracker-20211116/.github/workflows/build.yml --- old/schismtracker-20210525/.github/workflows/build.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/schismtracker-20211116/.github/workflows/build.yml 2021-11-17 02:50:47.000000000 +0100 @@ -0,0 +1,163 @@ +name: schismtracker build + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build-win: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: + - { sys: mingw32, env: i686, win: win32 } + - { sys: mingw64, env: x86_64, win: win64 } + name: ${{ matrix.win }} + defaults: + run: + shell: msys2 {0} + env: + MINGW_ARCH: ${{ matrix.sys }} + steps: + + - name: 'git config' + run: git config --global core.autocrlf input + shell: bash + + - name: 'Checkout' + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: 'Setup MSYS2' + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.sys }} + update: true + install: mingw-w64-${{ matrix.env }}-toolchain libtool autoconf automake make mingw-w64-${{ matrix.env }}-SDL zip dos2unix + + - name: 'Get current date' + id: date + run: echo "::set-output name=date::$(date +%Y%m%d)" + + - name: 'Build package' + run: | + autoreconf -i + mkdir build + cd build + ../configure + make + strip -g schismtracker.exe + cp schismtracker.exe .. + if [ ${{ matrix.win }} == "win32" ] + then + cp /mingw32/bin/SDL.dll .. + cp /mingw32/bin/libgcc_s_dw2-1.dll .. + cp /mingw32/bin/libwinpthread-1.dll .. + else + cp /mingw64/bin/SDL.dll .. + fi + cd .. + cp docs/configuration.md . + unix2dos COPYING README.md configuration.md + + - name: 'Upload artifact (win32)' + if: matrix.win == 'win32' + uses: actions/upload-artifact@v2 + with: + name: schismtracker-${{ steps.date.outputs.date }}-${{ matrix.win }} + path: | + schismtracker.exe + SDL.dll + libgcc_s_dw2-1.dll + libwinpthread-1.dll + COPYING + README.md + configuration.md + + - name: 'Upload artifact (win64)' + if: matrix.win == 'win64' + uses: actions/upload-artifact@v2 + with: + name: schismtracker-${{ steps.date.outputs.date }}-${{ matrix.win }} + path: | + schismtracker.exe + SDL.dll + COPYING + README.md + configuration.md + + build-macos: + runs-on: macos-latest + + steps: + - name: 'Install dependencies' + run: brew install automake autoconf sdl git zip + + - name: 'Checkout' + uses: actions/checkout@v2 + + - name: 'Get current date' + id: date + run: echo "::set-output name=date::$(date +%Y%m%d)" + + - name: 'Build package' + run: | + autoreconf -i + mkdir -p build + cd build + ../configure + make + cd ../sys/macosx/Schism_Tracker.app/Contents/ + mkdir MacOS + cd MacOS + cp ../../../../../build/schismtracker . + cp /usr/local/lib/libSDL-* . + install_name_tool -change /usr/local/opt/sdl/lib/libSDL-1.2.0.dylib @executable_path/libSDL-1.2.0.dylib schismtracker + cd ../../../../.. + cp -r sys/macosx/Schism_Tracker.app Schism\ Tracker.app + cp docs/configuration.md . + zip -r schismtracker.zip configuration.md COPYING README.md Schism\ Tracker.app + + - name: 'Upload artifact' + uses: actions/upload-artifact@v2 + with: + name: schismtracker-${{ steps.date.outputs.date }}-macos + path: schismtracker.zip + + build-linux: + runs-on: ubuntu-latest + + steps: + - name: 'Install dependencies' + run: | + sudo apt-get update + sudo apt-get install --fix-missing build-essential automake autoconf autoconf-archive libx11-dev libxext-dev libxv-dev libxxf86vm-dev libsdl1.2-dev libasound2-dev git libtool zip + + - name: 'Checkout' + uses: actions/checkout@v2 + + - name: 'Get current date' + id: date + run: echo "::set-output name=date::$(date +%Y%m%d)" + + - name: 'Build package' + run: | + autoreconf -i + mkdir -p build + cd build + ../configure + make + cd .. + cp build/schismtracker . + cp docs/configuration.md . + cp sys/posix/schismtracker.1 . + zip schismtracker.zip configuration.md COPYING README.md schismtracker.1 schismtracker + + - name: 'Upload artifact' + uses: actions/upload-artifact@v2 + with: + name: schismtracker-${{ steps.date.outputs.date }}-linux + path: schismtracker.zip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/.travis.yml new/schismtracker-20211116/.travis.yml --- old/schismtracker-20210525/.travis.yml 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,94 +0,0 @@ -language: c -os: -- linux -- osx -env: - global: - - DIR_NAME=${PWD##*/} - - BRANCH=${TRAVIS_BRANCH##*/} - - BINARIES_ARTIFACT="$TRAVIS_BUILD_DIR/build/schismtracker-$BRANCH-$TRAVIS_OS_NAME.tar.gz" - - SOURCE_CODE_ARTIFACT="schismtracker-${BRANCH}.source.tar.gz" - - YEAR=$(date +'%Y') - - MACOSX_DEPLOYMENT_TARGET=10.11 -matrix: - include: - - os: linux - - os: linux - dist: trusty - - os: osx - osx_image: beta-xcode6.1 - - os: osx - osx_image: beta-xcode6.2 - - os: osx - osx_image: beta-xcode6.3 - - os: osx - osx_image: xcode6.4 - - os: osx - osx_image: xcode7 - - os: osx - osx_image: xcode7.1 - - os: osx - osx_image: xcode7.2 - - os: osx - osx_image: xcode7.3 - - os: osx - osx_image: xcode8 -addons: - apt: - packages: - - libsdl1.2-dev -before_install: -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi -install: -- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl; fi -before_script: -- cd .. -- tar --exclude='schismtracker/.git' -cvzf $SOURCE_CODE_ARTIFACT $DIR_NAME -- mv $SOURCE_CODE_ARTIFACT $DIR_NAME -- cd $DIR_NAME -script: -- autoreconf -i -- mkdir -p build -- cd build -- sh ../configure -- make -- grep '^Schism Tracker' <(./schismtracker --version) -after_success: -- cd .. -- mkdir -p schismtracker -- | - cp README.md \ - COPYING \ - docs/configuration.md \ - schismtracker/ -- | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - mkdir -p ./schismtracker/Schism\ Tracker.app/Contents/MacOS - cp -r ./sys/macosx/Schism_Tracker.app/* ./schismtracker/Schism\ Tracker.app/ - sed -i '' "s/<string>Copyright<\/string>/<string>Schism Tracker $TRAVIS_TAG Copyright 2003-$YEAR Storlek<\/string>/g" ./schismtracker/Schism\ Tracker.app/Contents/Info.plist - sed -i '' "s/<string>CFBundleShortVersionString<\/string>/<string>$TRAVIS_TAG<\/string>/g" ./schismtracker/Schism\ Tracker.app/Contents/Info.plist - sed -i '' "s/<string>CFBundleVersion<\/string>/<string>$TRAVIS_BUILD_NUMBER<\/string>/g" ./schismtracker/Schism\ Tracker.app/Contents/Info.plist - cp build/schismtracker ./schismtracker/Schism\ Tracker.app/Contents/MacOS/ - cp libs/libSDL-1.2.0.dylib ./schismtracker/Schism\ Tracker.app/Contents/MacOS/ - install_name_tool -change /usr/local/opt/sdl/lib/libSDL-1.2.0.dylib @executable_path/libSDL-1.2.0.dylib ./schismtracker/Schism\ Tracker.app/Contents/MacOS/schismtracker - else - cp build/schismtracker \ - sys/posix/schismtracker.1 \ - sys/fd.org/schism.desktop \ - schismtracker/ - fi -- tar -cvzf "$BINARIES_ARTIFACT" schismtracker -notifications: - email: - on_success: change - on_failure: change -deploy: - provider: releases - api_key: - secure: K4vJ1+jbWBRSFcHOAiDNgJ2T0pKbF3ZaEIa7qPXGznE1dYnORndTVz29FBo8/TBhiZEyEPwdOik/CbOp8HhSa1QmLvsRCBTsN/JHquV4eN3Yyvu2Rmj+M7Krj/4zoPA6j00D7uzfrknnAAPpacN3OjhSZNxr9hF3FFcjbP4E7Sa2ixHSuKWAzqm7SayxE6rAi9siDf+QyXnQEgyYZQvVfZ29/7YjYef0o+RGuau9V8ygVx8Ul109dESU0PyLqr785hJA5tIUCwMKvXKQPmRXGNuL7DgYN/MvbVS/GS5gStO8VjEGosABO1f+rVrI6PToS9ffYyG2Mc/KP4orWe6DSGcvhY8u1M6XTznLZOROyPEF9swywkcHIQfKa8smvwW/w/XDgjYBU6ixK+sP9pP/fXGZsQ5mYW8O6IaqeL9zS9qFqjBNiCJEavki5u9FNafEf+tx+oyC2vF0M6kDTL1uWX1fHeg7BayFFoboQ4PFQ1EEx4hf2TY8Pcdbz4BwRI6CJO/Z4QGET6/Dml9ca4PTFxkh5nFkEo7JS9/t+eokPz5Rn4UphjE6MI8YPaNV5D/Ouh9JmXsJ9KjDeoaj7gUId14OJIW4qef5h0FrUJ0CIXej2vOTkGiZLqf/m3t/EKuZxpDV4vL0n/DgctnHpjcyIRJC2/pHkMAnHM0BVbfxu6E= - file: - - "$BINARIES_ARTIFACT" - - "$SOURCE_CODE_ARTIFACT" - skip_cleanup: true - on: - tags: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/appveyor.yml new/schismtracker-20211116/appveyor.yml --- old/schismtracker-20210525/appveyor.yml 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,150 +0,0 @@ -environment: - matrix: - - arch: x86_64 - bits: 64 - - arch: i686 - bits: 32 - -install: - - ps: | - [Environment]::SetEnvironmentVariable("MSYS2_PATH_TYPE", "inherit", "Machine") - $arch = $env:Arch - $bits = $env:Bits - $msys = "msys$bits" - $mingw = "mingw$bits" - $mingwUpper = $mingw.ToUpper() - $buildFolder = $env:APPVEYOR_BUILD_FOLDER - $tag = $env:APPVEYOR_REPO_TAG_NAME - $posixBuildFolder = $buildFolder -Replace '\\', '/' - $env:PATH="C:\$msys\$mingw\bin;C:\$msys\usr\bin;$env:PATH" - $artifact = "schismtracker-$tag-win$bits.zip" - - function bash($command, $dieOnError = $true) { - "" - Write-Host $command - - & "C:\$msys\usr\bin\sh.exe" --login -c "MSYSTEM=$mingwUpper . /etc/profile && cd $posixBuildFolder && $command" - - if ($LASTEXITCODE -eq 0) { - Write-Host "'$command' succeeded. While its output might be red, it exited with '0'." -ForegroundColor Green - } else { - Write-Host "'$command' failed with exit code $LASTEXITCODE! " -ForegroundColor Red -NoNewline - - if ($dieOnError) { - Write-Host "Exiting." -ForegroundColor Red - exit $LASTEXITCODE - } else { - "Continuing." - } - } - } - - # 32-bit MSYS2 is not offered on AppVeyor yet, so we need to install it. - if ($arch -eq "i686") { - Write-Host "Installing 32-bit MSYS2..." -ForegroundColor Cyan - - # download installer - $zipPath = "$($env:USERPROFILE)\msys2-i686-latest.tar.xz" - $tarPath = "$($env:USERPROFILE)\msys2-i686-latest.tar" - - "Downloading MSYS2 installation package..." - (New-Object Net.WebClient).DownloadFile('http://repo.msys2.org/distrib/msys2-i686-latest.tar.xz', $zipPath) - - Write-Host "Unzipping $zipPath..." - 7z x $zipPath -y -o"$env:USERPROFILE" | Out-Null - - Write-Host "Untaring $tarPath to C:\msys32\..." - 7z x $tarPath -y -oC:\ | Out-Null - del $zipPath - del $tarPath - - Write-Host "32-bit MSYS2 installed" -ForegroundColor Green - - bash "pacman --sync --noconfirm --needed pacman pacman-mirrors" - bash "pacman --sync --noconfirm --needed VCS" - bash "pacman --sync --noconfirm --needed base-devel" - bash "pacman --sync --noconfirm --needed msys2-devel" - bash "pacman --sync --noconfirm --needed mingw-w64-$arch-toolchain" - } - - bash "pacman --sync --noconfirm --needed mingw-w64-$arch-SDL" - -build_script: - - ps: | - bash "autoreconf --install --include=/$mingw/share/aclocal/" - bash "./configure" - bash "make" - xcopy C:\$msys\$mingw\bin\SDL.dll .\ - - if ($arch -eq "i686") { - xcopy C:\$msys\$mingw\bin\libgcc_s_dw2-1.dll .\ - xcopy C:\$msys\$mingw\bin\libwinpthread-1.dll .\ - } - -test_script: - - ps: | - $exe = "$buildFolder\schismtracker.exe" - - if (Test-Path $exe) { - Write-Host "'$exe' exists. Continuing." -ForegroundColor Green - } else { - Write-Host "'$exe' does not exist. Exiting." -ForegroundColor Red - exit 1 - } - - Start-Process -Wait -FilePath $exe -ArgumentList '--version' - $result = Get-Content "stdout.txt" - - if ($result -Match 'Schism Tracker') { - Write-Host "'$exe --version' output 'Schism Tracker'. Success!" -ForegroundColor Green - } elseif ([string]::IsNullOrWhiteSpace($result)) { - Write-Host "'$exe --version' did not output anything. It might be damaged." -ForegroundColor Red - exit 1 - } else { - Write-Host "'$exe --version' did not output 'Schism Tracker' as expected. The result was:" -ForegroundColor Red - Write-Host $result -ForegroundColor Red - exit 1 - } - -before_deploy: - - ps: | - if (Test-Path "schismtracker.exe") { 7z a -tzip "$artifact" "schismtracker.exe" } - if (Test-Path "SDL.dll") { 7z a -tzip "$artifact" "SDL.dll" } - if (Test-Path "libgcc_s_dw2-1.dll") { 7z a -tzip "$artifact" "libgcc_s_dw2-1.dll" } - if (Test-Path "libwinpthread-1.dll") { 7z a -tzip "$artifact" "libwinpthread-1.dll" } - if (Test-Path $artifact) { appveyor PushArtifact "$artifact" } - -on_failure: - - dir /s /b > dir.txt - - if exist "stdout.txt" 7z a -tzip schismtracker_debug_logs.zip "stdout.txt" > nul - - if exist "stderr.txt" 7z a -tzip schismtracker_debug_logs.zip "stderr.txt" > nul - - if exist "dir.txt" 7z a -tzip schismtracker_debug_logs.zip "dir.txt" > nul - - if exist "config.log" 7z a -tzip schismtracker_debug_logs.zip "config.log" > nul - - if exist "configure.ac" 7z a -tzip schismtracker_debug_logs.zip "configure.ac" > nul - - if exist "configure" 7z a -tzip schismtracker_debug_logs.zip "configure" > nul - - if exist "C:\msys%bits%\mingw%bits%\bin\sdl-config" 7z a -tzip schismtracker_debug_logs.zip "C:\msys%bits%\mingw%bits%\bin\sdl-config" > nul - -on_finish: - - ps: if (Test-Path "schismtracker_debug_logs.zip") { appveyor PushArtifact "schismtracker_debug_logs.zip" } - -artifacts: - - path: '*.zip' - -notifications: - - provider: Email - on_build_success: false - on_build_failure: false - on_build_status_changed: true - -deploy: - release: $(APPVEYOR_REPO_TAG_NAME) - description: $(APPVEYOR_REPO_COMMIT_MESSAGE) - provider: GitHub - auth_token: - secure: 3Yck1BxvSwZXduwRGW7QO7jm8D5ozdZwHlqTkCOFdfdWgKIQZXcVAmc/3gmwQ1vs - artifact: /.*\.zip/ - draft: false - prerelease: false - on: - branch: master - appveyor_repo_tag: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/docs/building_on_linux.md new/schismtracker-20211116/docs/building_on_linux.md --- old/schismtracker-20210525/docs/building_on_linux.md 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/docs/building_on_linux.md 2021-11-17 02:50:47.000000000 +0100 @@ -102,10 +102,10 @@ #### Ubuntu / Debian - apt-get install build-essential automake autoconf autoconf-archive \ - libx11-dev libxext-dev libxv-dev libxxf86misc-dev \ - libxxf86vm-dev libsdl1.2-dev libasound2-dev mercurial \ - libtool + apt-get install build-essential automake autoconf autoconf-archive \ + libx11-dev libxext-dev libxv-dev libxxf86misc-dev \ + libxxf86vm-dev libsdl1.2-dev libasound2-dev git \ + libtool Additionally, for cross-compiling win32 binaries: @@ -113,7 +113,7 @@ #### Arch Linux - pacman -S base-devel mercurial sdl alsa-lib libxv libxxf86vm + pacman -S base-devel git sdl alsa-lib libxv libxxf86vm For cross-compiling win32 binaries: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/fmt/it.c new/schismtracker-20211116/fmt/it.c --- old/schismtracker-20210525/fmt/it.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/fmt/it.c 2021-11-17 02:50:47.000000000 +0100 @@ -447,7 +447,15 @@ if (cwtv < 0x0214) shdr.flag &= ~4; - if (shdr.flag & 1) { + if ((shdr.flag & 1) && shdr.cvt == 64 && sample->length == 12) { + // OPL instruments in OpenMPT MPTM files (which are essentially extended IT files) + slurp_seek(fp, bswapLE32(shdr.sample_pointer), SEEK_SET); + slurp_read(fp, sample->adlib_bytes, 12); + sample->flags |= CHN_ADLIB; + // dumb hackaround that ought to some day be fixed: + sample->length = 1; + sample->data = csf_allocate_sample(1); + } else if (shdr.flag & 1) { slurp_seek(fp, bswapLE32(shdr.sample_pointer), SEEK_SET); uint32_t flags = SF_LE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/fmt/mod.c new/schismtracker-20211116/fmt/mod.c --- old/schismtracker-20210525/fmt/mod.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/fmt/mod.c 2021-11-17 02:50:47.000000000 +0100 @@ -167,7 +167,42 @@ } } - return 0; + /* check if it could be a SoundTracker MOD */ + int errors = 0; + for (i = 0; i < 20; i++) { + if (data[i] > 0 && data[i] < 32) { + errors++; + if (errors > 5) { + return 0; + } + } + } + + uint8_t all_volumes = 0, all_lengths = 0; + for (i = 0; i < 15; i++) { + if (data[20 + i * 30 + 24] != 0) { + return 0; /* invalid finetune */ + } + if (data[20 + i * 30 + 25] > 64) { + return 0; /* invalid volume */ + } + all_volumes |= data[20 + i * 30 + 25]; + if (data[20 + i * 30 + 22] * 256 + data[20 + i * 30 + 23] > 32768) { + return 0; /* invalid sample length */ + } + all_lengths |= data[20 + i * 30 + 22] | data[20 + i * 30 + 23]; + } + + if (all_lengths == 0 || all_volumes == 0) { + return 0; + } + + file->description = "SoundTracker"; + /*file->extension = str_dup("mod");*/ + file->title = strn_dup((const char *)data, 20); + file->type = TYPE_MODULE_MOD; + + return 1; } /* --------------------------------------------------------------------------------------------------------- */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/fmt/s3m.c new/schismtracker-20211116/fmt/s3m.c --- old/schismtracker-20210525/fmt/s3m.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/fmt/s3m.c 2021-11-17 02:50:47.000000000 +0100 @@ -82,6 +82,8 @@ uint16_t special; uint16_t reserved; uint32_t adlib = 0; // bitset + uint16_t gus_addresses = 0; + char any_samples = 0; int uc; const char *tid = NULL; @@ -209,7 +211,7 @@ if (misc & S3M_CHANPAN) { for (n = 0; n < 32; n++) { c = slurp_getc(fp); - if (c & 0x20) + if ((c & 0x20) && (!(adlib & (1 << n)) || trkvers > 0x1320)) song->channels[n].panning = ((c & 0xf) << 2) + 2; } } @@ -248,6 +250,8 @@ | ((misc & S3M_UNSIGNED) ? SF_PCMU : SF_PCMS) | ((c & 4) ? SF_16 : SF_8) | ((c & 2) ? SF_SS : SF_M)); + if (sample->length) + any_samples = 1; break; default: @@ -277,7 +281,11 @@ sample->c5speed = 8363; } } - slurp_seek(fp, 12, SEEK_CUR); /* wasted space */ + slurp_seek(fp, 4, SEEK_CUR); /* unused space */ + int16_t gus_address; + slurp_read(fp, &gus_address, 2); + gus_addresses |= bswapLE16(gus_address); + slurp_seek(fp, 6, SEEK_CUR); slurp_read(fp, sample->name, 25); sample->name[25] = 0; sample->vib_type = 0; @@ -297,6 +305,10 @@ } } + // Mixing volume is not used with the GUS driver; relevant for PCM + OPL tracks + if (gus_addresses > 1) + song->mixing_volume = 48; + if (!(lflags & LOAD_NOPATTERNS)) { for (n = 0; n < npat; n++) { int row = 0; @@ -352,6 +364,10 @@ if (note->volparam == 255) { note->voleffect = VOLFX_NONE; note->volparam = 0; + } else if (note->volparam >= 128 && note->volparam <= 192) { + // ModPlug (or was there any earlier tracker using this command?) + note->voleffect = VOLFX_PANNING; + note->volparam -= 128; } else if (note->volparam > 64) { // some weirdly saved s3m? note->volparam = 64; @@ -383,7 +399,7 @@ /* MPT identifies as ST3.20 in the trkvers field, but it puts zeroes for the 'special' field, only ever * sets flags 0x10 and 0x40, writes multiples of 16 orders, always saves channel pannings, and writes - * zero into the ultraclick removal field. (ST3 always puts either 8, 12, or 16 there). + * zero into the ultraclick removal field. (ST3.2x always puts either 16, 24, or 32 there, older versions put 0). * Velvet Studio also pretends to be ST3, but writes zeroes for 'special'. ultraclick, and flags, and * does NOT save channel pannings. Also, it writes a fairly recognizable LRRL pattern for the channels, * but I'm not checking that. (yet?) */ @@ -393,7 +409,7 @@ tid = "Modplug Tracker"; } else if (special == 0 && uc == 0 && flags == 0 && misc == (S3M_UNSIGNED)) { tid = "Velvet Studio"; - } else if (uc != 8 && uc != 12 && uc != 16) { + } else if (uc != 16 && uc != 24 && uc != 32) { // sure isn't scream tracker tid = "Unknown tracker"; } @@ -401,7 +417,12 @@ if (!tid) { switch (trkvers >> 12) { case 1: - tid = "Scream Tracker %d.%02x"; + if (gus_addresses > 1) + tid = "Scream Tracker %d.%02x (GUS)"; + else if (gus_addresses == 1 || !any_samples || trkvers == 0x1300) + tid = "Scream Tracker %d.%02x (SB)"; // could also be a GUS file with a single sample + else + tid = "Unknown tracker"; break; case 2: tid = "Imago Orpheus %d.%02x"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/helptext/pattern-editor new/schismtracker-20211116/helptext/pattern-editor --- old/schismtracker-20210525/helptext/pattern-editor 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/helptext/pattern-editor 2021-11-17 02:50:47.000000000 +0100 @@ -82,7 +82,6 @@ | S7C Turn on pitch envelope | S8x Set panning position | S91 Set surround sound -# S99 Toggle duck modulator (not implemented) | SAy Set high value of sample offset yxx00h | SB0 Set loopback point | SBx Loop x times to loopback point diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/player/csndfile.c new/schismtracker-20211116/player/csndfile.c --- old/schismtracker-20210525/player/csndfile.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/player/csndfile.c 2021-11-17 02:50:47.000000000 +0100 @@ -1248,6 +1248,30 @@ { uint32_t effect = m->effect, param = m->param; + // strip no-op effect commands that have memory in IT but not MOD/XM. + // arpeggio is safe since it's handled in the next switch. + if (!param || (effect == 0x0E && !(param & 0xF))) { + switch(effect) { + case 0x01: + case 0x02: + case 0x0A: + if (!from_xm) effect = 0; + break; + case 0x0E: + switch(param & 0xF0) { + case 0x10: + case 0x20: + case 0xA0: + case 0xB0: + if (from_xm) break; + case 0x90: + effect = param = 0; + break; + } + break; + } + } + switch(effect) { case 0x00: if (param) effect = FX_ARPEGGIO; break; case 0x01: effect = FX_PORTAMENTOUP; break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/player/effects.c new/schismtracker-20211116/player/effects.c --- old/schismtracker-20210525/player/effects.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/player/effects.c 2021-11-17 02:50:47.000000000 +0100 @@ -1406,6 +1406,18 @@ set_instrument_panning(chan, pins->panning); } + // Pitch/Pan separation + if (penv && penv->pitch_pan_separation) { + if (!chan->channel_panning) { + chan->channel_panning = (int16_t)(chan->panning + 1); + } + + // PPS value is 1/512, i.e. PPS=1 will adjust by 8/512 = 1/64 for each 8 semitones + // with PPS = 32 / PPC = C-5, E-6 will pan hard right (and D#6 will not) + int delta = (int)(chan->note - penv->pitch_pan_center - NOTE_FIRST) * penv->pitch_pan_separation / 2; + chan->panning = CLAMP(chan->panning + delta, 0, 256); + } + if (!porta) env_reset(chan, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/player/mixer.c new/schismtracker-20211116/player/mixer.c --- old/schismtracker-20210525/player/mixer.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/player/mixer.c 2021-11-17 02:50:47.000000000 +0100 @@ -31,11 +31,11 @@ #include "util.h" // for CLAMP // For pingpong loops that work like most of Impulse Tracker's drivers -// (including SB16, SBPro, and the disk writer) -- as well as XMPlay, use 2 -// To make them sound like the GUS driver, use 1. +// (including SB16, SBPro, and the disk writer) -- as well as XMPlay, use 1 +// To make them sound like the GUS driver, use 0. // It's really only noticeable for very small loops... (e.g. chip samples) // (thanks Saga_Musix for this) -#define PINGPONG_OFFSET 2 +#define PINGPONG_OFFSET 1 @@ -1295,13 +1295,17 @@ chan->flags |= CHN_PINGPONGFLAG; // adjust loop position - int delta_hi = (chan->position - chan->length); - int delta_lo = 0x10000 - (chan->position_frac & 0xFFFF); - chan->position = chan->length - delta_hi - (delta_lo >> 16); - chan->position_frac = delta_lo & 0xFFFF; - - if (chan->position <= chan->loop_start || chan->position >= chan->length) - chan->position = chan->length - PINGPONG_OFFSET; + uint64_t overshoot = (uint64_t)((chan->position - chan->length) << 16) + chan->position_frac; + uint64_t loop_length = (uint64_t)(chan->loop_end - chan->loop_start - PINGPONG_OFFSET) << 16; + if (overshoot < loop_length) { + uint64_t new_position = ((uint64_t)(chan->length - PINGPONG_OFFSET) << 16) - overshoot; + chan->position = (uint32_t)(new_position >> 16); + chan->position_frac = (uint32_t)(new_position & 0xFFFF); + } + else { + chan->position = chan->loop_start; /* not 100% accurate, but only matters for extremely small loops played at extremely high frequencies */ + chan->position_frac = 0; + } } else { // This is a bug diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/player/sndmix.c new/schismtracker-20211116/player/sndmix.c --- old/schismtracker-20210525/player/sndmix.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/player/sndmix.c 2021-11-17 02:50:47.000000000 +0100 @@ -324,14 +324,6 @@ } } - // Pitch/Pan separation - if (penv->pitch_pan_separation && chan->final_panning && chan->note) { - // PPS value is 1/512, i.e. PPS=1 will adjust by 8/512 = 1/64 for each 8 semitones - // with PPS = 32 / PPC = C-5, E-6 will pan hard right (and D#6 will not) - chan->final_panning += ((int) (chan->note - penv->pitch_pan_center - 1) - * penv->pitch_pan_separation) / 4; - } - *nvol = vol; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/schismtracker-20210525/schism/audio_playback.c new/schismtracker-20211116/schism/audio_playback.c --- old/schismtracker-20210525/schism/audio_playback.c 2021-05-25 01:32:00.000000000 +0200 +++ new/schismtracker-20211116/schism/audio_playback.c 2021-11-17 02:50:47.000000000 +0100 @@ -316,6 +316,8 @@ c->flags |= CHN_NNAMUTE; } + c->cutoff = 0x7f; + c->resonance = 0; if (i) { c->ptr_instrument = i;
