File: inbox.txt

package info (click to toggle)
csound 1%3A6.03.2~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 45,708 kB
  • ctags: 30,934
  • sloc: ansic: 166,298; cpp: 57,275; python: 9,433; xml: 1,302; yacc: 1,072; lex: 833; perl: 635; java: 618; lisp: 562; sh: 514; makefile: 459; tcl: 341
file content (33 lines) | stat: -rw-r--r-- 1,491 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
This file contains information that has not yet been incorporated into the system documentation, mostly taken from mailing list messages.

===

fftlib.c  contains the pow-of-two fft code, mxfft.c the non-pow-of-two fft code and pvsanal.c contains
the pvsanal etc opcodes (which use the fft code).

===

1) We can create variables as the instrument is constructed by the
compiler (create_instrument()), this
adds the variables to the instrument pool correctly.
2) In the case of ksmps and kr, these were originally thought of as
global symbols, so when they appear
in local code, we need to trapped them, which we can do by checking if
they exist in the local pool (createArg())
3) In order to be able to access them more easily, we also have to
point their memBlock to the correct
slot in the pool, which we can do as the instrument is instantiated
(instance()).
4) ksmps and kr are originally set to the global values of ksmps and
kr, but in setksmps they are set to
whatever new value is requested. Also in the case of UDOs, we make
sure that they are set to local
values in case these are passed as the last (optional) argument to the opcode.

What took me a while to figure out was 3), because the current code
only dealt with arguments that were
explicitly used in the code, anything created internally was ignored
by instance(), and so the memBlock of
the internal variables was not being initialised to the slot in the
pool (but the slot was there as the pool
was correctly created).