Giter Club home page Giter Club logo

csound-rs's Introduction

Build Status

csound

Csound bindings for Rust.

Documentation can be found here

Table of Contents

  1. Installation
    1. Linux/BSDs
    2. macOS
    3. Windows
  2. Getting Started
  3. License
  4. Contribution

To build the Csound bindings or anything depending on this crate, you need to have at least Csound 6.11, previous versions are not suported. By default( The only supported way), this crate will attempt to dynamically link to the system-wide libcsound64.

You need to install Csound with your distributions package manager, or in case your package manager has a unsupported version of Csound( <6.11 ) you have to build it from source.

On Debian/Ubuntu Csound can be installed with

# Make sure the version of this package is >= 6.11
$ apt-get install libcsound64-6.0 libcsound64-dev

Also, You can compile it from source and install(recommended)

# First, install all the csound's dependencies
$ apt-get install build-essential libportaudio2 portaudio19-dev cmake //
lib64ncurses5-dev lib64ncurses5 flex bison libsndfile1-dev libsndfile1

then, clone the csound's source code

# Clone Csound from its repository
$ git clone https://github.com/csound/csound.git

Compile and install the library.

# Clone Csound from its repository
$ cd csound/
$ cmake . && make && sudo make install
$ sudo ldconfig

Csound will be installed in /usr/local/lib, there is where the build.rs script will look at, for the csound's binaries. so, It could be a good idea if you export this path in your bashrc or write a propper pkg-config file.

Please be free to send a pull request with the changes applied to the build scripts and instructions about how to use this crate along csound's native library

Download the csound's installer for windows Follow the instalation steps.

  1. Locate your csound installation directory ( commonly it is C:\Program Files\Csound6_x64)
  2. Open Command Prompt (make sure you Run as administrator so you're able to add a system environment variable).
  3. Set the environment variable as follows:
$ setx CSOUND_LIB_DIR "C:\\Program Files\\Csound6_x64\\lib"
  1. Restart Command Prompt to reload the environment variables then use the following command to check the it's been added correctly.
$ echo %CSOUND_LIB_DIR%

You should see the path to your Csound's lib installation.

The API reference can be found here

For getting started withCsound-rs, you have to understand some basic concepts about Csound, before to try to use this bindigs. Please check the Get Started page in the Csound's site Get Started In addition there are csound api examples inside of the rust directory.

The easy way to get familiar with csound is to explore the examples. To get the examples we just need to clone this repository.

# Clone Csound from its repository
$ git clone https://github.com/neithanmo/csound-rs.git

Now, go to the repository directory

# Clone Csound from its repository
$ cd csound-rs

For running the examples 1 to 10 just:

# Runs the example 5
$ cargo run --release --example example5

The example 11 requires some dependencies, but you can run them through calling cargo on their own Cargo.toml file

# Runs the example 11
$ cd examples/example11
$ cargo --release build
$ cargo run

License

csound-rs is licensed under either

at your option.

Csound itself is licensed under the Lesser General Public License version 2.1 or (at your option) any later version: https://www.gnu.org/licenses/lgpl-2.1.html

Any kinds of contributions are welcome as a pull request.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in csound-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

csound-rs's People

Contributors

neithanmo avatar

Watchers

 avatar

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.