Coder Social home page Coder Social logo

csound / csoundapi_examples Goto Github PK

View Code? Open in Web Editor NEW
98.0 98.0 29.0 21.09 MB

Examples for learning the Csound API from various languages

C 6.35% Clojure 6.25% C++ 3.13% C# 6.85% Go 6.27% Groovy 6.33% Java 8.42% Ruby 4.64% Lua 8.10% Python 11.07% Racket 1.25% CMake 0.18% Forth 0.31% Jupyter Notebook 17.14% Csound Document 0.65% Rust 7.01% Visual Basic .NET 6.04%

csoundapi_examples's Introduction

CSOUND

Version 7.0.0 (beta)

This is the the develop branch of the Csound main code repository. At the moment, we are developing the next main version (moving from 6.x to 7.0), and this branch reflects current work-in-progress. This is still undergoing changes and fixes until the first release, scheduled for September 2024. Anyone seeking the latest 6.x version please checkout the csound6 branch (or the master branch, containing the latest and final release of this version).

Build Status

A sound and music computing system.

Csound is copyright (c) 1991-2020 The Csound Developers, see CONTRIBUTORS

Csound is free software; you can redistribute them and/or modify them under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Csound is distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

GETTING STARTED

This repository contains the code for the core Csound library, the interfaces library, and the command-line interface frontend. It also contains specific code for ports to various embedded, mobile and web platforms.

For general project information, please look at http://csound.com, where all details about Csound, what it does, its history, music made with it, and many other things can be found.

The Csound Reference Manual can be found online at http://docs.csound.com.

The Csound API application programming interface reference may be found online at http://csound.github.io/docs/api/index.html.

Information on how to build Csound on various platforms is given in the BUILD.md file at the top level directory of this repository.

Information about build pipelines with Azure and Github actions is given in DockerFiles/Readme.md.

CONTRIBUTORS

Csound contains contributions from musicians, scientists, and programmers from around the world. They include (but are not limited to):

  • Allan Lee
  • Andres Cabrera
  • Anthony Kozar
  • Barry Vercoe
  • Bill Gardner
  • Bill Verplank
  • Dan Ellis
  • David Macintyre
  • Ed Costello
  • Eli Breder
  • Fabio P. Bertolotti
  • Felipe Sataler
  • François Pinot
  • Gabriel Maldonado
  • Greg Sullivan
  • Hans Mikelson
  • Henri Manson
  • Ian McCurdy
  • Istvan Varga
  • Jean Piché
  • Joachim Heintz
  • John Ramsdell
  • John ffitch
  • Marc Resibois
  • Mark Dolson
  • Matt Ingalls
  • Max Mathews
  • Michael Casey
  • Michael Clark
  • Michael Gogins
  • Mike Berry
  • Nate Whetsell
  • Paris Smaragdis
  • Perry Cook
  • Peter Neubäcker
  • Peter Nix
  • Rasmus Ekman
  • Richard Dobson
  • Richard Karpen
  • Rob Shaw
  • Robin Whittle
  • Rory Walsh
  • Sean Costello
  • Stephen Kyne
  • Steven Yi
  • Tito Latini
  • Tom Erbe
  • Victor Lazzarini
  • Ville Pulkki

csoundapi_examples's People

Contributors

daveseidel avatar fggp avatar francesco66 avatar joachimheintz avatar kunstmusik avatar neithanmo avatar renenyffenegger avatar rhenninger avatar rorywalsh avatar vlazzarini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csoundapi_examples's Issues

Issue on Python Tutorial 8,9,10 (CtcsoundAPIExamples.ipynb)

I get the following errors while running the CtcsoundAPIExamples.ipynb file:

My Setup:

  • Python 3.7
  • Jupyter 1.0.0
  • Numpy 1.16.1
  • ctsound 0.0.3

ERROR LOG:

ValueError Traceback (most recent call last)
~/Code/csound_python/venv/lib/python3.7/site-packages/numpy/core/_internal.py in _dtype_from_pep3118(spec)
597 stream = _Stream(spec)
--> 598 dtype, align = __dtype_from_pep3118(stream, is_subdtype=False)
599 return dtype

~/Code/csound_python/venv/lib/python3.7/site-packages/numpy/core/_internal.py in __dtype_from_pep3118(stream, is_subdtype)
674 else:
--> 675 raise ValueError("Unknown PEP 3118 data type specifier %r" % stream.s)
676

ValueError: Unknown PEP 3118 data type specifier 'P'

The above exception was the direct cause of the following exception:

ValueError Traceback (most recent call last)
in
68
69 # Create a set of ChannelUpdaters
---> 70 channels = [ChannelUpdater("amp", RandomLine(.4, .2)),
71 ChannelUpdater("freq", RandomLine(400, 80)),
72 ChannelUpdater("resonance", RandomLine(0.4, .3))]

in init(self, channelName, updater)
30 def init(self, channelName, updater):
31 self.updater = updater
---> 32 self.channel = createChannel(channelName)
33
34 def update(self):

in createChannel(channelName)
24 def createChannel(channelName):
25 chn, _ = c.channelPtr(channelName,
---> 26 ctcsound.CSOUND_CONTROL_CHANNEL | ctcsound.CSOUND_INPUT_CHANNEL)
27 return chn
28

~/Code/csound_python/venv/lib/python3.7/site-packages/ctcsound.py in channelPtr(self, name, type_)
1592 arrayType = np.ctypeslib.ndpointer(MYFLT, 1, (length,), 'C_CONTIGUOUS')
1593 p = cast(ptr, arrayType)
-> 1594 return np.ctypeslib.as_array(p), err
1595 elif ret == CSOUND_MEMORY:
1596 err = 'Not enough memory for allocating channel'

~/Code/csound_python/venv/lib/python3.7/site-packages/numpy/ctypeslib.py in as_array(obj, shape)
517 obj = ctypes.cast(obj, p_arr_type).contents
518
--> 519 return array(obj, copy=False)
520
521

ValueError: '<P' is not a valid PEP 3118 buffer format string

Issues with building Java examples

@kunstmusik I'm getting a build error when using the Ant method to build the examples on macOS Monterey (M1 silicon)

[javac] /Users/boonier/GIT/csoundAPI_examples/java/src/csoundapiexamples/Example1.java:18: error: package csnd6 does not exist
[javac] import csnd6.Csound;

Is the build config not finding the required Csound6 libs? The build.xml references the netbeans build config:

<import file="nbproject/build-impl.xml"/> in which I assume the class path is:

javac.classpath=\ ${libs.csnd6.classpath}

I assume this means the config though Netbeans, which I am not using.

I've got the usual symlinks in /Library/Java/Extensions for csnd6.jar and lib_jcsound6.jnilib

Any ideas?

many thanks

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.