Csound Csound-dev Csound-tekno Search About

click

Date2016-07-17 12:57
FromMenno Knevel
Subjectclick
i'm building an instrument with ftmorf and adsynt. One note sounds fine but i
get a click when a second note starts while the first note is still active.
I think it has to do with the re-using of the existing ftable 10.

How can avoid such a click?

Output:
new alloc for instr 1:
ftable 10:
ftgenonce: created new func: 10
method 1
B  1.921 ..  3.879 T  3.877 TT  3.877 M:  0.63822  0.66706
new alloc for instr 1:
ftgenonce: re-using existing func: 10.000000

A small part of the code: 
kndx  linseg   1, p3, 5                  
ftmorf kndx, 10, 11



--
View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-07-17 20:06
FromSteven Yi
SubjectRe: click
Making a guess from the code snippet given, it seems to me that the
issue is that you are using a single ftable for the iresfn argument of
ftmorf, which the two instrument instances would then share.  You may
want to use ftgentmp to create a local ftable for the instance of the
instrument and use the generated ftable number for the iresfn
argument. Something like:

ifno ftgentmp 0, 0, isize, 10, 1
kndx  linseg   1, p3, 5
ftmorf kndx, 10, ifno



On Sun, Jul 17, 2016 at 7:57 AM, Menno Knevel  wrote:
> i'm building an instrument with ftmorf and adsynt. One note sounds fine but i
> get a click when a second note starts while the first note is still active.
> I think it has to do with the re-using of the existing ftable 10.
>
> How can avoid such a click?
>
> Output:
> new alloc for instr 1:
> ftable 10:
> ftgenonce: created new func: 10
> method 1
> B  1.921 ..  3.879 T  3.877 TT  3.877 M:  0.63822  0.66706
> new alloc for instr 1:
> ftgenonce: re-using existing func: 10.000000
>
> A small part of the code:
> kndx  linseg   1, p3, 5
> ftmorf kndx, 10, 11
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-07-19 19:54
FromMenno Knevel
SubjectRe: click
i'm not sure if that is the final solution for the clicks.

I have rendered, using Blue (WinXound does the same) this instrument with 2
notes:
i1 0 10 100 .71
i1 3 6  50 .861
where p4 stands for freq and p5 for amp.

The output is this:
system sr: 48000.000000
 0: dac:system:playback_ (system:playback_)
writing 512 sample blks of 64-bit floats to dac:system:playback_ 
SECTION 1:
new alloc for instr 1:
ftable 10:
ftable 170:
puur natuur
new alloc for instr 3:
WARNING: rtjack: xrun in real time audio
B  0.000 ..  3.000 T  2.997 TT  2.997 M:  0.84671  0.98565
new alloc for instr 1:
WARNING: replacing previous ftable 10
ftable 10:
ftable 171:
puur natuur
B  3.000 .. 11.421 T 11.419 TT 11.419 M:  0.58571  0.54982
new alloc for instr 2:
  rtevent:	   T 11.424 TT 11.424 M:  0.00000  0.00000
Score finished in csoundPerformKsmps().
inactive allocs returned to freespace
end of score.		   overall amps:  0.84671  0.98565
	   overall samples out of range:        0        0
0 errors in performance

I see something happening at 3 seconds. The (first) note gets interrupted by
the replacing of ftable 10.
Why else does it read: B  0.000 ..  3.000 T  2.997 TT  2.997 M:  0.84671 
0.98565 ?
The note is 10 seconds long, not 3.
At 3 seconds there is a second note starting, now with its own created
ftable 171, while the other had ftable 170. This is due to:

ifno ftgentmp 0, 0, 4096, 10, 1
kndx  linseg   i(), p3, i()  
;ifno    =   11                            ; or use the sequencer
ftmorf kndx, 10, ifno
......
asigR	oscbnk kfreq, , , , i(), ,
, , , , ilfo, , , ,
, , , i()-1, ifno, gicos, gicos, gieqffn,
gieqlfn, gieqqfn
prints "puur natuur\n"

This is a blue file.

The spectogram in Audacity looks like this:
04.png   
there you can see the "end" of note 1 that should not end there but at 10
seconds...

Any ideas?



--
View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641p5750694.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-07-19 19:56
FromMenno Knevel
SubjectRe: click
This is a better screenshot of Audacity's spectrum, because it shows the
seconds and the click at second 3:
39.png   



--
View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641p5750695.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-07-20 02:56
FromSteven Yi
SubjectRe: click
I think it'd be easiest at this point if you could post a CSD or .blue
file (or email me off list). I'll be happy to take a look to diagnose.

On Tue, Jul 19, 2016 at 2:56 PM, Menno Knevel  wrote:
> This is a better screenshot of Audacity's spectrum, because it shows the
> seconds and the click at second 3:
> 39.png 
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641p5750695.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-07-20 11:11
FromMenno Knevel
SubjectRe: click
That is a generous offer, Steven, thank you.
I will send you a file off-list.



--
View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641p5750721.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-07-21 11:08
FromMenno Knevel
SubjectRe: click
As it turns out, it is the --sample-accurate flag that caused the clicks.

I don't think this is correct behaviour - shall i do a bug report?



--
View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641p5750735.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-07-21 16:05
Fromjpff
SubjectRe: click
yes please

On Thu, 21 Jul 2016, Menno Knevel wrote:

> As it turns out, it is the --sample-accurate flag that caused the clicks.
>
> I don't think this is correct behaviour - shall i do a bug report?
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/click-tp5750641p5750735.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here