Steven Curtin wrote:
> For some reason the global value of 'sinefreq' is not changing. I would
> think that it would written into inside the freq_control instrument and
> then affect the frequency of sine_tone.
1. You want freq_control to export, not import, sinefreq
2. You can only make ivar and ksig variables global, as per 188.8.131.52.3.
The software is wrong for letting you make an asig global.
3. I think what you really want is a score-based controller here --
globals are "really" for communication between instr's.
I would use a score like
n1: 0.0 sine_tone 1.0 100 0.5
0.0 n1 control sinefreq 300
0.2 n1 control sinefreq 400
This is more suggestive of your intention, and more efficient
But what you suggest also works if freq_control exports sinefreq.
> I tried doing a repeating step function by filling a table with step values
> and then playing it out with oscil. The problem with oscil is that it
> expects to interpolate unless the phase accumulator always lands on the
> integer values of the table. This is probably the reason for the oscil vs
> oscili opcodes in Csound. Maybe this can be an argument in SAOL?
Just write your own unit generator using tableread() and floor()!
Procedural abstraction is your friend!
> One other way of having a repeating step or control function in csound is
> the reinit statement. Is there some equivalent to this so I can make a
> repeating function with the aline statement below.
I always thought that reinit was confusing. Can you (or someone)
give me an example of something that's really hard to do without it?
I can propose its addition if it's sorely needed.
-- +-----------------+ | Eric Scheirer |A-7b5 D7b9|G-7 C7|Cb C-7b5 F7#9|Bb |B-7 E7| |email@example.com| < http://sound.media.mit.edu/~eds > | 617 253 0112 |A A/G# F#-7 F#-/E|Eb-7b5 D7b5|Db|C7b5 B7b5|Bb| +-----------------+
This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:32 EST