Bug#759190: csound: The STKSitar opcode can create a buildup of clipped samples as illustrated by the attached csd file

Forrest Cahoon forrest.cahoon at gmail.com
Mon Aug 25 05:30:38 UTC 2014


Package: csound
Version: 1:6.03.2~dfsg-1
Severity: normal

The following CSD produces unexpected output: this may be a problem with
Csound, or STK, or both -- I'm filing this as a Csound bug because that's the
application I'm using when I experience the problem.

The CSD has two descending tone sequences played with the STKSitar opcode. The
duration of each note is 0.4 seconds and they are played 0.1 seconds apart, so
there should be no more than 4 notes playing simultaneously. Towards the end of
the first descending sequence, the volume shoots up dramatically, creating a
great deal of distortion.

There is a pause of 1.0 seconds before the second descending sequence, which
should be adequate for all notes from the first sequence to complete. Yet when
the second sequence plays, the distortion occurs almost immediately, on notes
which played without issue during the first tone sequence.

It appears that some sort of buffer is building up and not being flushed
adequately, but that's just speculation.

<CsoundSynthesizer>

<CsInstruments>
sr=48000
ksmps=1
nchnls=2
0dbfs=1

instr 1 ;STKSitar
iAmpl = 0.2
iFreq = p4
aOut STKSitar iFreq, iAmpl
outs aOut, aOut
endin

</CsInstruments>

<CsScore>

i1      0.0     0.4     1024.0
i1      ^+0.1     .     960.0
i1      ^+0.1     .     896.0
i1      ^+0.1     .     853.3333
i1      ^+0.1     .     768.0
i1      ^+0.1     .     731.4286
i1      ^+0.1     .     716.8
i1      ^+0.1     .     682.6667
i1      ^+0.1     .     640.0
i1      ^+0.1     .     597.3333
i1      ^+0.1     .     512.0
i1      ^+0.1     .     480.0
i1      ^+0.1     .     448.0
i1      ^+0.1     .     426.66666
i1      ^+0.1     .     384.0
i1      ^+0.1     .     365.7143
i1      ^+0.1     .     358.4
i1      ^+0.1     .     341.33334
i1      ^+0.1     .     320.0
i1      ^+0.1     .     298.66666
i1      ^+0.1     .     256.0
i1      ^+0.1     .     240.0
i1      ^+0.1     .     224.0
i1      ^+0.1     .     213.33333
i1      ^+0.1     .     192.0
i1      ^+0.1     .     182.85715
i1      ^+0.1     .     179.2
i1      ^+0.1     .     170.66667
i1      ^+0.1     .     160.0
i1      ^+0.1     .     149.33333
i1      ^+0.1     .     128.0
i1      ^+0.1     .     120.0
i1      ^+0.1     .     112.0
i1      ^+0.1     .     106.666664
i1      ^+0.1     .     96.0
i1      ^+0.1     .     91.42857
i1      ^+0.1     .     89.6
i1      ^+0.1     .     85.333336
i1      ^+0.1     .     80.0
i1      ^+0.1     .     74.666664
i1      ^+0.1     .     64.0

i1      ^+1.0     .     1024.0
i1      ^+0.1     .     960.0
i1      ^+0.1     .     896.0
i1      ^+0.1     .     853.3333
i1      ^+0.1     .     768.0
i1      ^+0.1     .     731.4286
i1      ^+0.1     .     716.8
i1      ^+0.1     .     682.6667
i1      ^+0.1     .     640.0
i1      ^+0.1     .     597.3333
i1      ^+0.1     .     512.0
i1      ^+0.1     .     480.0
i1      ^+0.1     .     448.0
i1      ^+0.1     .     426.66666
i1      ^+0.1     .     384.0
i1      ^+0.1     .     365.7143
i1      ^+0.1     .     358.4
i1      ^+0.1     .     341.33334
i1      ^+0.1     .     320.0
i1      ^+0.1     .     298.66666
i1      ^+0.1     .     256.0
i1      ^+0.1     .     240.0
i1      ^+0.1     .     224.0
i1      ^+0.1     .     213.33333
i1      ^+0.1     .     192.0
i1      ^+0.1     .     182.85715
i1      ^+0.1     .     179.2
i1      ^+0.1     .     170.66667
i1      ^+0.1     .     160.0
i1      ^+0.1     .     149.33333
i1      ^+0.1     .     128.0
i1      ^+0.1     .     120.0
i1      ^+0.1     .     112.0
i1      ^+0.1     .     106.666664
i1      ^+0.1     .     96.0
i1      ^+0.1     .     91.42857
i1      ^+0.1     .     89.6
i1      ^+0.1     .     85.333336
i1      ^+0.1     .     80.0
i1      ^+0.1     .     74.666664
i1      ^+0.1     .     64.0

i1      ^+1.0     .     1024.0
i1      ^+0.1     .     960.0
i1      ^+0.1     .     896.0
i1      ^+0.1     .     853.3333
i1      ^+0.1     .     768.0
i1      ^+0.1     .     731.4286
i1      ^+0.1     .     716.8
i1      ^+0.1     .     682.6667
i1      ^+0.1     .     640.0
i1      ^+0.1     .     597.3333
i1      ^+0.1     .     512.0
i1      ^+0.1     .     480.0
i1      ^+0.1     .     448.0
i1      ^+0.1     .     426.66666
i1      ^+0.1     .     384.0
i1      ^+0.1     .     365.7143
i1      ^+0.1     .     358.4
i1      ^+0.1     .     341.33334
i1      ^+0.1     .     320.0
i1      ^+0.1     .     298.66666
i1      ^+0.1     .     256.0
i1      ^+0.1     .     240.0
i1      ^+0.1     .     224.0
i1      ^+0.1     .     213.33333
i1      ^+0.1     .     192.0
i1      ^+0.1     .     182.85715
i1      ^+0.1     .     179.2
i1      ^+0.1     .     170.66667
i1      ^+0.1     .     160.0
i1      ^+0.1     .     149.33333
i1      ^+0.1     .     128.0
i1      ^+0.1     .     120.0
i1      ^+0.1     .     112.0
i1      ^+0.1     .     106.666664
i1      ^+0.1     .     96.0
i1      ^+0.1     .     91.42857
i1      ^+0.1     .     89.6
i1      ^+0.1     .     85.333336
i1      ^+0.1     .     80.0
i1      ^+0.1     .     74.666664
i1      ^+0.1     .     64.0

e

</CsScore>

</CsoundSynthesizer>



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages csound depends on:
ii  libc6            2.19-9
ii  libcsound64-6.0  1:6.03.2~dfsg-1
ii  libgcc1          1:4.9.1-8
ii  libgomp1         4.9.1-8
ii  libstdc++6       4.9.1-8

Versions of packages csound recommends:
ii  csound-utils  1:6.03.2~dfsg-1

csound suggests no packages.

-- no debconf information
-------------- next part --------------
<CsoundSynthesizer>

<CsInstruments>
sr=48000
ksmps=1
nchnls=2
0dbfs=1

instr 1	;STKSitar
iAmpl = 0.2
iFreq = p4
aOut STKSitar iFreq, iAmpl
outs aOut, aOut
endin

</CsInstruments>

<CsScore>

i1	0.0	0.4	1024.0
i1	^+0.1	  .	960.0
i1	^+0.1	  .	896.0
i1	^+0.1	  .	853.3333
i1	^+0.1	  .	768.0
i1	^+0.1	  .	731.4286
i1	^+0.1	  .	716.8
i1	^+0.1	  .	682.6667
i1	^+0.1	  .	640.0
i1	^+0.1	  .	597.3333
i1	^+0.1	  .	512.0
i1	^+0.1	  .	480.0
i1	^+0.1	  .	448.0
i1	^+0.1	  .	426.66666
i1	^+0.1	  .	384.0
i1	^+0.1	  .	365.7143
i1	^+0.1	  .	358.4
i1	^+0.1	  .	341.33334
i1	^+0.1	  .	320.0
i1	^+0.1	  .	298.66666
i1	^+0.1	  .	256.0
i1	^+0.1	  .	240.0
i1	^+0.1	  .	224.0
i1	^+0.1	  .	213.33333
i1	^+0.1	  .	192.0
i1	^+0.1	  .	182.85715
i1	^+0.1	  .	179.2
i1	^+0.1	  .	170.66667
i1	^+0.1	  .	160.0
i1	^+0.1	  .	149.33333
i1	^+0.1	  .	128.0
i1	^+0.1	  .	120.0
i1	^+0.1	  .	112.0
i1	^+0.1	  .	106.666664
i1	^+0.1	  .	96.0
i1	^+0.1	  .	91.42857
i1	^+0.1	  .	89.6
i1	^+0.1	  .	85.333336
i1	^+0.1	  .	80.0
i1	^+0.1	  .	74.666664
i1	^+0.1	  .	64.0

i1	^+1.0	  .	1024.0
i1	^+0.1	  .	960.0
i1	^+0.1	  .	896.0
i1	^+0.1	  .	853.3333
i1	^+0.1	  .	768.0
i1	^+0.1	  .	731.4286
i1	^+0.1	  .	716.8
i1	^+0.1	  .	682.6667
i1	^+0.1	  .	640.0
i1	^+0.1	  .	597.3333
i1	^+0.1	  .	512.0
i1	^+0.1	  .	480.0
i1	^+0.1	  .	448.0
i1	^+0.1	  .	426.66666
i1	^+0.1	  .	384.0
i1	^+0.1	  .	365.7143
i1	^+0.1	  .	358.4
i1	^+0.1	  .	341.33334
i1	^+0.1	  .	320.0
i1	^+0.1	  .	298.66666
i1	^+0.1	  .	256.0
i1	^+0.1	  .	240.0
i1	^+0.1	  .	224.0
i1	^+0.1	  .	213.33333
i1	^+0.1	  .	192.0
i1	^+0.1	  .	182.85715
i1	^+0.1	  .	179.2
i1	^+0.1	  .	170.66667
i1	^+0.1	  .	160.0
i1	^+0.1	  .	149.33333
i1	^+0.1	  .	128.0
i1	^+0.1	  .	120.0
i1	^+0.1	  .	112.0
i1	^+0.1	  .	106.666664
i1	^+0.1	  .	96.0
i1	^+0.1	  .	91.42857
i1	^+0.1	  .	89.6
i1	^+0.1	  .	85.333336
i1	^+0.1	  .	80.0
i1	^+0.1	  .	74.666664
i1	^+0.1	  .	64.0

i1	^+1.0	  .	1024.0
i1	^+0.1	  .	960.0
i1	^+0.1	  .	896.0
i1	^+0.1	  .	853.3333
i1	^+0.1	  .	768.0
i1	^+0.1	  .	731.4286
i1	^+0.1	  .	716.8
i1	^+0.1	  .	682.6667
i1	^+0.1	  .	640.0
i1	^+0.1	  .	597.3333
i1	^+0.1	  .	512.0
i1	^+0.1	  .	480.0
i1	^+0.1	  .	448.0
i1	^+0.1	  .	426.66666
i1	^+0.1	  .	384.0
i1	^+0.1	  .	365.7143
i1	^+0.1	  .	358.4
i1	^+0.1	  .	341.33334
i1	^+0.1	  .	320.0
i1	^+0.1	  .	298.66666
i1	^+0.1	  .	256.0
i1	^+0.1	  .	240.0
i1	^+0.1	  .	224.0
i1	^+0.1	  .	213.33333
i1	^+0.1	  .	192.0
i1	^+0.1	  .	182.85715
i1	^+0.1	  .	179.2
i1	^+0.1	  .	170.66667
i1	^+0.1	  .	160.0
i1	^+0.1	  .	149.33333
i1	^+0.1	  .	128.0
i1	^+0.1	  .	120.0
i1	^+0.1	  .	112.0
i1	^+0.1	  .	106.666664
i1	^+0.1	  .	96.0
i1	^+0.1	  .	91.42857
i1	^+0.1	  .	89.6
i1	^+0.1	  .	85.333336
i1	^+0.1	  .	80.0
i1	^+0.1	  .	74.666664
i1	^+0.1	  .	64.0

e

</CsScore>

</CsoundSynthesizer>


More information about the pkg-multimedia-maintainers mailing list