Csound Csound-dev Csound-tekno Search About

[Csnd] ctrl7 initial output strangeness

Date2011-07-04 01:20
FromJim Aikin
Subject[Csnd] ctrl7 initial output strangeness
I'm using ctrl7 to receive the input from some MIDI sliders. What I'm finding
is:

1) This opcode outputs an initial value when the instrument containing it is
called, even if there is no new incoming MIDI CC message in the input
buffer.

2) The output varies, seemingly in a consistent way, depending possibly on
which CC number is being read (??). Given this code --

gkAttack01		ctrl7	1, 8, 0.001, 0.3
gkDecay01		ctrl7	1, 9, 0.1, 1.1
gkPitchLoopLen	ctrl7	1, 11, 3, 16

ktrig init 1
if ktrig == 1 then
       printf		"gkAttack is %f,\n gkDecay is %f,\n gkPitchLoopLen is %f\n",
ktrig, gkAttack01, gkDecay01, gkPitchLoopLen
	ktrig = 0
endif

... the output looks like this:

gkAttack is 0.151677,
 gkDecay is 0.100000,
 gkPitchLoopLen is 16.000000

In other words, the first value is set to the midpoint of min and max, the
second is set to min, and the third is set to max! Needless to say, none of
these is the values with which I've initialized the gk values in the global
instrument header. The init values are 0.001, 0.5, and 4, respectively.

This result is fairly perplexing, possibly a bug. It definitely makes using
MIDI sliders difficult, as one can't be at all sure what values Csound will
be using when playback starts.

User error? Bug? Are there workarounds? Suggestions much appreciated.

--Jim Aikin


--
View this message in context: http://csound.1045644.n5.nabble.com/ctrl7-initial-output-strangeness-tp4548479p4548479.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"