Skip to content

Silver-Ore-Team/zBassMusic

Repository files navigation

zBassMusic

zBassMusic is a modern music system for Gothic games based on ZenGin. It replaces the original DirectMusic system with a custom engine built on top of BASS Audio Library to provide easier workflow for composers and additional functions for the perfect soundtrack design. The most important features include:

Features:

  • Direct playback of common audio formats (WAV, OGG, MP3) instead of DirectMusic proprietary formats
  • Out-of-the-box support for existing music theme definitions (just change the audio file)
  • Alternative scheduling & transition systems to support smooth cross-fades between themes
  • Loading of music files from VDF volumes (DirectMusic required physical files)
  • Scriptable interface for controlling the system from Deadalus scripts
  • Backward compatibility with original .sgt music (it's redirected to the DirectMusic system)

Getting Started

Download zBassMusic.vdf and place it inside <GOTHIC_ROOT>/Data with Union installed to automatically load the system at the start of the game. With default settings you can use modern audio formats directly in MusicInst.d like:

instance SYS_MENU(C_MUSICTHEME_DEF)
{
	// 1. WAV file will load and play instead of .sgt
	file = "modern_audio_file.wav";      // old: file = "gamestart.sgt";
	
	// 2. You can use `transtype` to enable simple fade-in-fade-out transitions
	//      TRANSITION_TYPE_INTRO        - fade-in on start
	//      TRANSITION_TYPE_END          - fade-out on end
	//      TRANSITION_TYPE_ENDANDINTRO  - fade-in on start AND fade-out on end
	transtype = TRANSITION_TYPE_ENDANDINTRO;
	transsubtype = TRANSITION_SUB_TYPE_BEAT;
	
	// 3. Bass can emulate DX8 Reverb effect but in a limited range 
	reverbmix = -12;    // reverbmix in [-96, 0]        (dB)
	reverbtime = 3000;  // reverbtime in [0.001, 3000]  (milliseconds0)
	// If your instance exceeds these limits, the effect will not apply!
};

Documentation

Build

Build instructions are available in the Developer Guide.

Support

If you have found a bug in zBassMusic, please create an issue.

Before creating a new issue, you can try to enable debug logging and get the logs to include in the issue. See Debugging

Discord

You can contact the authors and maintainers on Discord. Look for @tehe.official.

Gothic Modding Community

Biggest community of international Gothic modders. https://discord.gg/6rQQGVQK

🇵🇱 Historia Neka

Official Discord of Nek's History, the mod we are working on and started zBassMusic for it. https://discord.gg/cvd6jhKB`

License

zBassMusic is licensed under MIT license excluding some dependencies.

union-api and gothic-api are licensed under GNU GENERAL PUBLIC LICENSE V3.

BASS library is licensed under a proprietary license that's free for non-commercial use only. For commercial licensing please refer to www.un4seen.com.

GothicVDFS 2.6 Copyright (c) 2001-2003, Nico Bendlin, Copyright (c) 1994-2002, Peter Sabath / TRIACOM Software GmbH