Csound Csound-dev Csound-tekno Search About

[Cs-dev] Possible GEN5 render bug

Date2011-02-02 11:52
FromErik de Castro Lopo
Subject[Cs-dev] Possible GEN5 render bug
Hi all,

I'm looking at come example compositions from Dr Boulanger's
Csound Catalogue, in particular a composition called "The
Heartbeat" by Julie Friedman.

When playing the CSD file using Csound 5.13 the heartbeat
instrument has an extra click that isn't present in the
MP3 file included in the Catalogue.

I've extracted just the instrument and a subset of the
score and included it below.

Debugging a bit further the click occurs be cause of
this line:

    a2  oscili  iamp, 1/idur, 72

changing that to

    a2  oscili  iamp, 0.99/idur, 72

fixes the problem but I'm curious about the fact that an older
version of csound rendered this file without clicks.

Cheers,
Erik



;JULIE FRIEDMAN MS107CSOUND BERKLEE COLLEGE OF MUSIC

;THE HEARTBEAT
sr        =         44100
kr        =         441
ksmps     =         100
nchnls = 2

instr 2			;HEARTBEAT
idur = p3
iamp = p4/2
ifq  = 4
if1  = 13
if2  = 13
a2  oscili  iamp, 1/idur, 72
a2  oscili  a2, ifq, if2
a1  oscili  iamp, 1/idur, 71
a1  oscili  a1, ifq, if1
outs (a1+a2) * 4.5, (a1+a2) * 4.5
endin



;JULIE FRIEDMAN MS107CSOUND BERKLEE COLLEGE OF MUSIC
;THE HEARTBEAT
f1 0 4096 10 1 								; SINE WAVE

f2 0 8192 10 1 .5 .3 .25 .2 .167 .14 .111 	; SAWTOOTH

f3 0 2048 10 1 0 .3 0 .2 0 .14 0 .111 		; SQUARE

f4 0 2048 10 1 1 1 1 .7 .5 .3 .1			; PULSE

f9  0   4096  10 .28 1 .74 .66 .78 .48 .05 .33 .12 .08 .01 .54 .19 .08 .05 .16 .01 .11 .3 .02 .2

f19 0 1024  19 .5 .5 270 .5

f11  0   512   9  1  1  0f12  0   512   9  10 1 0  16 1.5 0  22 2.  0  23 1.5 0

f13  0   512   9  25 1 0  29  .5 0  32  .2 0

f14  0   512   9  16 1 0  20 1.  0  22 1   0  34 2   0  38 1 0   47 1 0

f15  0   512   9  50 2 0  53 1   0  65 1   0  70 1   0  77 1 0  100 1 0

f71  0   513   5  4096 512 1 ; equals '1 512 .0024'

f72  0   513   5   128 512 1 ; equals '1 512 .0078'


;HEARTBEAT

; 		start   idur    iamp
i2		0    	.2    	6000
i2		.25   	.4		8000
i2		2		.2		6000
i2   	2.25   	.4		8000
i2		4    	.2    	6000
i2	    4.25   	.4		8000
i2		6		.2		6000
i2   	6.25   	.4		8000
i2		8    	.2    	6000
i2		8.25   	.4		8000
i2		10		.2		6000
i2   	10.25   .4		8000

e






-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-02-02 12:37
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible GEN5 render bug
Sounds like an event duration issue. If ksmps is reduced to, say, 10,  
the extra click is not there. Maybe csound is
adding one extra ksmps block of duration at the end of each note(a  
bug) .

Victor
On 2 Feb 2011, at 11:52, Erik de Castro Lopo wrote:

> Hi all,
>
> I'm looking at come example compositions from Dr Boulanger's
> Csound Catalogue, in particular a composition called "The
> Heartbeat" by Julie Friedman.
>
> When playing the CSD file using Csound 5.13 the heartbeat
> instrument has an extra click that isn't present in the
> MP3 file included in the Catalogue.
>
> I've extracted just the instrument and a subset of the
> score and included it below.
>
> Debugging a bit further the click occurs be cause of
> this line:
>
>    a2  oscili  iamp, 1/idur, 72
>
> changing that to
>
>    a2  oscili  iamp, 0.99/idur, 72
>
> fixes the problem but I'm curious about the fact that an older
> version of csound rendered this file without clicks.
>
> Cheers,
> Erik
>
> 
> 
> ;JULIE FRIEDMAN MS107CSOUND BERKLEE COLLEGE OF MUSIC
>
> ;THE HEARTBEAT
> sr        =         44100
> kr        =         441
> ksmps     =         100
> nchnls = 2
>
> instr 2			;HEARTBEAT
> idur = p3
> iamp = p4/2
> ifq  = 4
> if1  = 13
> if2  = 13
> a2  oscili  iamp, 1/idur, 72
> a2  oscili  a2, ifq, if2
> a1  oscili  iamp, 1/idur, 71
> a1  oscili  a1, ifq, if1
> outs (a1+a2) * 4.5, (a1+a2) * 4.5
> endin
>
> 
> 
> ;JULIE FRIEDMAN MS107CSOUND BERKLEE COLLEGE OF MUSIC
> ;THE HEARTBEAT
> f1 0 4096 10 1 								; SINE WAVE
>
> f2 0 8192 10 1 .5 .3 .25 .2 .167 .14 .111 	; SAWTOOTH
>
> f3 0 2048 10 1 0 .3 0 .2 0 .14 0 .111 		; SQUARE
>
> f4 0 2048 10 1 1 1 1 .7 .5 .3 .1			; PULSE
>
> f9  0   4096  10 .28 1 .74 .66 .78 .48 .05 .33 .12 .08 .01 .54 .19 . 
> 08 .05 .16 .01 .11 .3 .02 .2
>
> f19 0 1024  19 .5 .5 270 .5
>
> f11  0   512   9  1  1  0f12  0   512   9  10 1 0  16 1.5 0  22 2.   
> 0  23 1.5 0
>
> f13  0   512   9  25 1 0  29  .5 0  32  .2 0
>
> f14  0   512   9  16 1 0  20 1.  0  22 1   0  34 2   0  38 1 0   47  
> 1 0
>
> f15  0   512   9  50 2 0  53 1   0  65 1   0  70 1   0  77 1 0  100  
> 1 0
>
> f71  0   513   5  4096 512 1 ; equals '1 512 .0024'
>
> f72  0   513   5   128 512 1 ; equals '1 512 .0078'
>
>
> ;HEARTBEAT
>
> ; 		start   idur    iamp
> i2		0    	.2    	6000
> i2		.25   	.4		8000
> i2		2		.2		6000
> i2   	2.25   	.4		8000
> i2		4    	.2    	6000
> i2	    4.25   	.4		8000
> i2		6		.2		6000
> i2   	6.25   	.4		8000
> i2		8    	.2    	6000
> i2		8.25   	.4		8000
> i2		10		.2		6000
> i2   	10.25   .4		8000
>
> e
>
> 
> 
>
>
>
> -- 
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better  
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-02-02 12:40
FromVictor Lazzarini
SubjectRe: [Cs-dev] Possible GEN5 render bug
In fact, if you set

idur = p3 + 1/kr

there is no click anymore, as the duration of the envelope seems to  
match the actual note duration.
Looks like a bug extending the note duration by 1 k-cycle.

Victor

On 2 Feb 2011, at 11:52, Erik de Castro Lopo wrote:

> Hi all,
>
> I'm looking at come example compositions from Dr Boulanger's
> Csound Catalogue, in particular a composition called "The
> Heartbeat" by Julie Friedman.
>
> When playing the CSD file using Csound 5.13 the heartbeat
> instrument has an extra click that isn't present in the
> MP3 file included in the Catalogue.
>
> I've extracted just the instrument and a subset of the
> score and included it below.
>
> Debugging a bit further the click occurs be cause of
> this line:
>
>    a2  oscili  iamp, 1/idur, 72
>
> changing that to
>
>    a2  oscili  iamp, 0.99/idur, 72
>
> fixes the problem but I'm curious about the fact that an older
> version of csound rendered this file without clicks.
>
> Cheers,
> Erik
>
> 
> 
> ;JULIE FRIEDMAN MS107CSOUND BERKLEE COLLEGE OF MUSIC
>
> ;THE HEARTBEAT
> sr        =         44100
> kr        =         441
> ksmps     =         100
> nchnls = 2
>
> instr 2			;HEARTBEAT
> idur = p3
> iamp = p4/2
> ifq  = 4
> if1  = 13
> if2  = 13
> a2  oscili  iamp, 1/idur, 72
> a2  oscili  a2, ifq, if2
> a1  oscili  iamp, 1/idur, 71
> a1  oscili  a1, ifq, if1
> outs (a1+a2) * 4.5, (a1+a2) * 4.5
> endin
>
> 
> 
> ;JULIE FRIEDMAN MS107CSOUND BERKLEE COLLEGE OF MUSIC
> ;THE HEARTBEAT
> f1 0 4096 10 1 								; SINE WAVE
>
> f2 0 8192 10 1 .5 .3 .25 .2 .167 .14 .111 	; SAWTOOTH
>
> f3 0 2048 10 1 0 .3 0 .2 0 .14 0 .111 		; SQUARE
>
> f4 0 2048 10 1 1 1 1 .7 .5 .3 .1			; PULSE
>
> f9  0   4096  10 .28 1 .74 .66 .78 .48 .05 .33 .12 .08 .01 .54 .19 . 
> 08 .05 .16 .01 .11 .3 .02 .2
>
> f19 0 1024  19 .5 .5 270 .5
>
> f11  0   512   9  1  1  0f12  0   512   9  10 1 0  16 1.5 0  22 2.   
> 0  23 1.5 0
>
> f13  0   512   9  25 1 0  29  .5 0  32  .2 0
>
> f14  0   512   9  16 1 0  20 1.  0  22 1   0  34 2   0  38 1 0   47  
> 1 0
>
> f15  0   512   9  50 2 0  53 1   0  65 1   0  70 1   0  77 1 0  100  
> 1 0
>
> f71  0   513   5  4096 512 1 ; equals '1 512 .0024'
>
> f72  0   513   5   128 512 1 ; equals '1 512 .0078'
>
>
> ;HEARTBEAT
>
> ; 		start   idur    iamp
> i2		0    	.2    	6000
> i2		.25   	.4		8000
> i2		2		.2		6000
> i2   	2.25   	.4		8000
> i2		4    	.2    	6000
> i2	    4.25   	.4		8000
> i2		6		.2		6000
> i2   	6.25   	.4		8000
> i2		8    	.2    	6000
> i2		8.25   	.4		8000
> i2		10		.2		6000
> i2   	10.25   .4		8000
>
> e
>
> 
> 
>
>
>
> -- 
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better  
> price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net