Skip to main content

A tool for writing csound scores that can make handling microtones MUCH easier.

Project description

microcsound

TO INSTALL:


  • Make sure you have Python and Csound installed

  • Choose as install method, pip or git (pip is recommended if you have it)

From pip:

    pip install microcsound

From git:

Either download from the 'dist' directory here, or:

    git clone https://github.com/akjmicro/microcsound

Once downloaded, in the 'microcsound' directory:

    python -m pip install .

  • Files will be installed into a Python lib directory on your system. E.G., on a Linux system, something like /usr/local/lib/Python3.11

  • You may also want to edit the variables at the top of the 'constants.py' script itself, especially the first 'orc_dir' variable. Open it with an editor, and change the four variables towards the top, in the block that look like this:

##### EDIT DEFAULTS HERE:           
##### orchestra dir, where the script can look for your 
##### Csound orchestra files:
orc_dir = '/home/YOUR_LOGIN_NAME/csound_files/'
##### the name, without a full path, of the default Csound orchestra
##### file microcsound will look for if none is explicitly stated
default_orc_file = '8bit.orc'
##### the beginning stub of a Csound command for non-realtime use:
normal_csound_command_stub = 'csound -d -m0 -W'
##### The beginning stub Csound command for realtime use:
rt_csound_command_stub = 'csound -d -m0 -+rtaudio=alsa -b4096 -B4096 -odac'
##### END USER EDITING 

Change these variables to ones that make sense on your system. Just edit between the single quotes to customize. Make sure the single quotes remain intact when you're done!

ABOUT:

Microcsound implements the following features:

  • an intuitive, clean shorthand syntax that allows one to both easily write CSound scores

  • a focus on flexible entry of microtonal music, the emphasis being on enabling one to compose in various equal-temperaments and just intonation.

  • symbols for various microtonal commas, so that extended just intonation harmony is easily accessible in a convenient intuitive way.

  • implementation of chord notation using brackets

  • implementation of a 'time pointer' notation which allows arbitrary number of counterpoint layers in a single 'voice'

See the example 'ciconia.mc' (a rendering of a medieval piece, given in the repo path microcsound/share/data/ciconia.mc) and the tutorials/docs for an understanding of how to use the syntax for your own compositions.

To use:

It's best to start by seeing all the command-line options, so first, try:

         $ microcsound -h

After writing a little example in a file you might name 'yourfile.mc', try this:

         $ microcsound yourfile.mc

The script outputs a wave file to the current directory, by default the wave is called 'microcsound_out.wav', but you can change this using the '-o' command line switch. If you use the '-s', it will avoid the final step of compiling the orc/score pair and just put a csound score to standard out. To put this output into a file, use redirection like so:

         $ microcsound -s yourfile.mc > yourcsoundscore.sco

You could also use an editor like 'joe' or 'emacs' that allows the capture of the text output of a process, and call the script from within the editing session of a .csd (orc+sco) file; in this way one can be between the and tags and fill the space with the script output.

For realtime experimentation, just call the script with the name of a csound '.orc' file, you can edit the variables at the top of the script so that it automatically looks for orchestra files in a default directory.

For instance:

	$ microcsound -i --orc fat_moog.orc

will give you a prompt, and you can type in a microcsound 'score', and when you want it rendered, hit return and type 'done' and then hit return again. In this example above, it will search in the directory I provided in the script for the 'fat_moog.orc' file.

See the csound documentation for how to use all the options and command line switches to get the final audio output from csound. The csound command called by the script can be changed at the top of the script in the "user variables" area.

Enjoy!

Aaron Krister Johnson

Please report bugs and successes to aaron@untwelve.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microcsound-1.2.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

microcsound-1.2.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file microcsound-1.2.0.tar.gz.

File metadata

  • Download URL: microcsound-1.2.0.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for microcsound-1.2.0.tar.gz
Algorithm Hash digest
SHA256 f5c6ce99eb0911ca995fa9dc615bfa3d65de9d2453442465d0bfc9af39453e24
MD5 540d7548278068e9476ca6fb0512867a
BLAKE2b-256 7c339a6f79a1c2921822d5a71ca9e6d96fce52c35fce36648bcd5e7502bd0bf2

See more details on using hashes here.

File details

Details for the file microcsound-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: microcsound-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for microcsound-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbbe63a1216b4c7b1e42eafba67595332073c58106243611cefcd777593a03e1
MD5 c70e24af178524af698007068f6d91c2
BLAKE2b-256 923639d4fbc54b46ef59f777da95e998572ff1cd8ec7d89b5e9c951c83ca43ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page