Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Csound
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Csound code == Csound takes two specially formatted [[text file]]s as input. The ''orchestra'' describes the nature of the instruments and the ''score'' describes notes and other parameters along a timeline. Csound processes the instructions in these files and renders an [[audio file]] or real-time audio stream as output. The ''orchestra'' and ''score'' files may be unified into a single structured file using [[markup language]] tags (a CSD file with [[filename extension]] .csd). Here is a very simple example of a unified Csound data file which produces a [[wave file]] containing a one-second [[sine wave]] tone of 1 [[Kilohertz|kHz]] at a [[Sampling frequency|sample rate]] of 96 kHz: <syntaxhighlight lang="csound-csd"> <CsoundSynthesizer> <CsOptions> csound -W -d -o tone.wav </CsOptions> <CsInstruments> sr = 96000 ; Sample rate. kr = 9600 ; Control signal rate. ksmps = 10 ; Samples per control signal. nchnls = 1 ; Number of output channels. instr 1 a1 oscil p4, p5, 1 ; Oscillator: p4 and p5 are the arguments from the score, 1 is the table number. out a1 ; Output. endin </CsInstruments> <CsScore> f1 0 8192 10 1 ; Table containing a sine wave. Built-in generator 10 produces a sum of sinusoids, here only one. i1 0 1 20000 1000 ; Play one second of one kHz at amplitude 20000. e </CsScore> </CsoundSynthesizer> </syntaxhighlight> As with many other programming languages, writing long programs in Csound can be eased by using an [[integrated development environment]] for editing, previewing, testing, and [[debugging]]. The one now officially supported is CsoundQt. It has many features, such as automatic code insertion, integrated documentation browser, integrated widgets for graphically controlling parameters in realtime, plus a button for playing the code.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Csound
(section)
Add topic