TOOT 14: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: Throughout these TOOTS, separate score and orchestra files were used. However, today it is probably more common to write a single Unified Csound code file, called a CSD. If we look again a...)
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Throughout these TOOTS, separate score and orchestra files were used.
Throughout these TOOTS, separate score and orchestra files were used.
However, today it is probably more common to write a single
However, today it is probably more common to write a single
Unified Csound code file, called a CSD. If we look again at
Unified Csound code file, called a [[CSD Files|CSD]]. If we look again at
TOOT 1, we have the following files
TOOT 1, we have the following files


Line 14: Line 14:
</pre>
</pre>
}}
}}



{{ Box File | Toot01.sco | 2=<pre>
{{ Box File | Toot01.sco | 2=<pre>
Line 60: Line 61:
}}
}}


For writing Csound code on OLPC, we would strongly advise that CSDs are used, as they are more compact and self-contained.
For writing Csound code for OLPC on the XO, we would strongly advise that CSDs are used, as they are more compact and self-contained.

Latest revision as of 12:31, 25 March 2008

Throughout these TOOTS, separate score and orchestra files were used. However, today it is probably more common to write a single Unified Csound code file, called a CSD. If we look again at TOOT 1, we have the following files

 File: Toot01.orc
 instr 1

	a1	oscil	10000, 440, 1

		out	a1

 endin


 File: Toot01.sco
f1	0	4096	10	1	; use GEN10 to compute a sine wave

;ins	strt	dur

i1	0	4

e

A CSD containing both orchestra and score above will look like this:

 File: Toot14.csd

<CsoundSynthesizer>

<CsInstruments>
 instr 1

	a1	oscil	10000, 440, 1

		out	a1

 endin

</CsInstruments>

<CsScore>
f1	0	4096	10	1	; use GEN10 to compute a sine wave

;ins	strt	dur

i1	0	4

e
</CsScore>

</CsoundSynthesizer> 

For writing Csound code for OLPC on the XO, we would strongly advise that CSDs are used, as they are more compact and self-contained.