Skip to content
NimBASS is a Nim wrapper for the BASS audio library.
Nim
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests Get basstest working on Linux Dec 4, 2017
.gitignore
LICENSE Initial commit Nov 8, 2017
README.md
nimbass.cfg
nimbass.nimble

README.md

NimBASS is a Nim wrapper for the BASS audio library.

NimBASS is distributed as a Nimble package and depends on nimgen and c2nim to generate the wrappers. The BASS library and header files are downloaded using curl/powershell and extracted using unzip/powershell.

Installation

NimBASS can be installed via Nimble:

> nimble install nimbass

This will download, wrap and install NimBASS in the standard Nimble package location, typically ~/.nimble. Once installed, it can be imported into any Nim program.

Usage

Module documentation can be found here.

import strutils

import nimbass/bass
import nimbass/bass_fx

discard BASS_Init(cint(-1), cast[DWORD](44100), cast[DWORD](0), cast[DWORD](0), nil)

echo "Bass: " & $BASS_GetVersion().toHex()
echo "Bass FX: " & $BASS_FX_GetVersion().toHex()

NimBASS currently wraps the main BASS functions and BASS FX. Make sure to copy the appropriate dll/dylib/so files into the lib path or the executable directory. They will be in the ~/.nimble/pkgs/nimbass-xxx/nimbass/nimbass directory

Credits

NimBASS wraps BASS and all licensing terms of BASS apply to the usage of this package.

Credits go out to c2nim as well without which this package would be greatly limited in its abilities.

Feedback

NimBASS is a work in progress and any feedback or suggestions are welcome. It is hosted on GitHub with an MIT license so issues, forks and PRs are most appreciated.

You can’t perform that action at this time.