• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

examples/H03-May-2022-973529

src/H03-May-2022-4,5772,939

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D27-Mar-202074 65

.gitignoreH A D27-Mar-202020 43

.gitmodulesH A D27-Mar-2020102 43

.travis.ymlH A D27-Mar-2020711 3428

Cargo.lockH A D27-Mar-20205 KiB199177

Cargo.tomlH A D27-Mar-20202 KiB8872

Cargo.toml.orig-cargoH A D27-Mar-20201.4 KiB7356

LICENSEH A D27-Mar-20201 KiB2217

README.mdH A D27-Mar-20204.8 KiB150114

_config.ymlH A D27-Mar-202025 11

install_csound.shH A D27-Mar-2020127 75

README.md

1[![Build Status](https://travis-ci.org/neithanmo/csound-rs.svg?branch=master)](https://travis-ci.org/neithanmo/csound-rs) [![](https://img.shields.io/crates/v/csound.svg)](https://crates.io/crates/csound)
2# csound
3
4[Csound](https://csound.com/) bindings for Rust.
5
6Documentation can be found [*here*](https://neithanmo.github.io/csound-rs/csound/)
7
8
9## Table of Contents
101. [Installation](#installation)
11   1. [Linux/BSDs](#installation-linux)
12   1. [macOS](#installation-macos)
13   1. [Windows](#installation-windows)
141. [Getting Started](#getting-started)
151. [License](#license)
161. [Contribution](#contribution)
17
18<a name="installation"/>
19
20## Installation
21
22To build the Csound bindings or anything depending on this crate, you need to
23have at least Csound 6.11, previous versions are not suported.
24By default( The only supported way), this crate will attempt to dynamically link to the system-wide libcsound64.
25
26<a name="installation-linux"/>
27
28### Linux/BSDs
29
30You can install Csound using your distro-package manager,
31or in case your package manager has a unsupported version of Csound( <6.11 )
32you have to build it from source.
33
34On Debian/Ubuntu Csound can be installed with
35
36```
37# Make sure the version of this package is >= 6.11
38$ apt-get install libcsound64-6.0 libcsound64-dev
39```
40
41Also, You can compile it from source and install(recommended)
42
43```
44# First, install all the csound's dependencies
45$ apt-get install build-essential libportaudio2 portaudio19-dev cmake /
46flex bison libsndfile1-dev libsndfile1
47```
48then, clone the csound's source code
49```
50# Clone Csound from its repository
51$ git clone https://github.com/csound/csound.git
52```
53Compile and install the library.
54
55```
56# Clone Csound from its repository
57$ cd csound/
58$ cmake . && make && sudo make install
59$ sudo ldconfig
60```
61Csound will be installed in */usr/local/lib*, there is where the build.rs script will look at, for the csound's binaries.
62so, It could be a good idea if you export this path in your bashrc or write a propper pkg-config file.
63
64<a name="installation-macos"/>
65
66### macOS
67
68Please be free to send a pull request with the changes applied to the build
69scripts and instructions about how to use this crate along csound's native library
70
71<a name="installation-windows"/>
72
73### Windows
74
75Download the csound's installer for [*windows*](https://github.com/csound/csound/releases/download/6.12.2/Csound6.12.0-Windows_x64-installer.exe)
76Follow the instalation steps.
771. Locate your csound installation directory ( commonly it is *C:\\Program Files\\Csound6_x64*)
782. Open Command Prompt (make sure you Run as administrator so you're able to add a system environment variable).
793. Set the environment variable as follows:
80```
81$ setx CSOUND_LIB_DIR "C:\\Program Files\\Csound6_x64\\lib"
82```
834. Restart Command Prompt to reload the environment variables then use the following command to check the it's been added correctly.
84```
85$ echo %CSOUND_LIB_DIR%
86```
87You should see the path to your Csound's lib installation.
88
89
90<a name="getting-started"/>
91
92## Getting Started
93
94The API reference can be found
95[here](https://csound.com/docs/api/index.html)
96
97For getting started withCsound-rs, you have to understand some basic concepts about Csound, before to try to use this
98bindigs. Please check the Get Started page in the Csound's site
99[Get Started](https://csound.com/get-started.html)
100In addition there are csound api [examples](https://github.com/csound/csoundAPI_examples) inside of the rust directory.
101
102<a name="license"/>
103
104## Csound's examples for rust
105The easy way to get familiar with csound is to explore the examples. To get the examples we just need to clone this repository.
106```
107# Clone Csound from its repository
108$ git clone https://github.com/neithanmo/csound-rs.git
109```
110Now, go to the repository directory
111```
112# Clone Csound from its repository
113$ cd csound-rs
114```
115For running the examples 1 to 10 just:
116```
117# Runs the example 5
118$ cargo run --release --example example5
119```
120The  example 11 requires some dependencies, but you can run them through calling cargo on their own Cargo.toml file
121```
122# Runs the example 11
123$ cd examples/example11
124$ cargo --release build
125$ cargo run
126```
127## License
128
129csound-rs is licensed under either
130* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
131  http://www.apache.org/licenses/LICENSE-2.0)
132* MIT license ([LICENSE-MIT](LICENSE-MIT) or
133  http://opensource.org/licenses/MIT)
134
135 at your option.
136
137 Csound itself is licensed under the Lesser General Public License version
138 2.1 or (at your option) any later version:
139 https://www.gnu.org/licenses/lgpl-2.1.html
140
141 <a name="contribution"/>
142
143 ## Contribution
144
145 Any kinds of contributions are welcome as a pull request.
146
147 Unless you explicitly state otherwise, any contribution intentionally submitted
148 for inclusion in csound-rs by you, as defined in the Apache-2.0 license, shall be
149 dual licensed as above, without any additional terms or conditions.
150