Csound Csound-dev Csound-tekno Search About

[Cs-dev] a missing beat

Date2005-02-04 04:27
FromDave Phillips
Subject[Cs-dev] a missing beat
Greetings:

  When testing Cs5 with the attached csd file I discovered that the 
second beat of instr 1 does not sound when instr 2 is played. Could 
someone else test this file ?

  I ran it in Linux with this command line:

    csound -o oscil.wav -W -d -m0 oscil.csd

Best,

dp









instr 1
kamp = p4
kfreq = p5
ifn = 1
aosc oscili kamp,kfreq,ifn
kenv linseg 0,p3*.01,1,p3*.03,0,p3*.96,0
aout = aosc*kenv
out aout
endin

instr 2
kamp = p4
kfreq = p5
ifn = 2
aosc oscili kamp,kfreq,ifn
kenv linseg 0,p3*.03,1,p3*.23,.69,p3*.74,0
aout = aosc*kenv
out aout
endin




f1 0 8192 10 1
f2 0 8192 10 1 0 .9 0 0 .7 0 0 0 .6 0 0 0 0 .5 0 0 0 0 0 .4 0 0 0 0 0 0 
.3 0 0 0 0 0 0 0 .2 0 0 0 0 0 0 0 0 .1

t 0 144

i1 0 1 5000 69
i. + . <    <
i. . . <    <
i. . . <    72
i. . . <    <
i. . . <    <
i. . . <    <
i. . . 5700 68

i2 0 .25 6000 220
i. + .   6050 .
i. . .   6075 440
i. . .   6075 440
i. 1 1  6100 220
i. + .  <    .
i. . .  <    440
i. . .  <    .
i. . .  <    220
i. . .  <    .
i. . .  6025 440

e







-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 05:07
Fromkelly
SubjectRe: [Cs-dev] a missing beat
Attachmentstest.ogg  
this is what i got. linux snapshot, cvs'd moments ago... i hear  a hole. 
maybe two missing notes...
k.


Dave Phillips wrote:
> Greetings:
> 
>  When testing Cs5 with the attached csd file I discovered that the 
> second beat of instr 1 does not sound when instr 2 is played. Could 
> someone else test this file ?
> 
>  I ran it in Linux with this command line:
> 
>    csound -o oscil.wav -W -d -m0 oscil.csd
> 
> Best,
> 
> dp
> 
> 
> 
> 
> 
> 
> 
> 
> 
> instr 1
> kamp = p4
> kfreq = p5
> ifn = 1
> aosc oscili kamp,kfreq,ifn
> kenv linseg 0,p3*.01,1,p3*.03,0,p3*.96,0
> aout = aosc*kenv
> out aout
> endin
> 
> instr 2
> kamp = p4
> kfreq = p5
> ifn = 2
> aosc oscili kamp,kfreq,ifn
> kenv linseg 0,p3*.03,1,p3*.23,.69,p3*.74,0
> aout = aosc*kenv
> out aout
> endin
> 
> 
> 
> 
> f1 0 8192 10 1
> f2 0 8192 10 1 0 .9 0 0 .7 0 0 0 .6 0 0 0 0 .5 0 0 0 0 0 .4 0 0 0 0 0 0 
> .3 0 0 0 0 0 0 0 .2 0 0 0 0 0 0 0 0 .1
> 
> t 0 144
> 
> i1 0 1 5000 69
> i. + . <    <
> i. . . <    <
> i. . . <    72
> i. . . <    <
> i. . . <    <
> i. . . <    <
> i. . . 5700 68
> 
> i2 0 .25 6000 220
> i. + .   6050 .
> i. . .   6075 440
> i. . .   6075 440
> i. 1 1  6100 220
> i. + .  <    .
> i. . .  <    440
> i. . .  <    .
> i. . .  <    220
> i. . .  <    .
> i. . .  6025 440
> 
> e
> 
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2005-02-04 11:27
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
Dave Phillips wrote:

>  When testing Cs5 with the attached csd file I discovered that the 
> second beat of instr 1 does not sound when instr 2 is played. Could 
> someone else test this file ?

I also noticed that sometimes notes are dropped, and in fact this
is not even a new problem. Not sure about why this happens, though.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 12:58
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
The bug seems to be in sensevents(), as simply renaming playevents to
sensevents, and sensevents to playevents appears to fix this odd behavior.
Of course, the real solution is to find out what is broken in sensevents.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 13:12
FromAndres Cabrera
SubjectRe: [Cs-dev] a missing beat
(Sorry for the dev post-my email address is having problems with the 
sourceforge server...)

Hi,
I'm seeing the same behaviour, which seems to vary if the tempo is
changed. When the tempo is 60, all notes sound OK. Try 140, and other
high values, and see how some other notes disappear...
(I'm trying it in realtime with -odac0 -b441 -B441)

Andrés

Dave Phillips wrote:

 > Greetings:
 >
 >  When testing Cs5 with the attached csd file I discovered that the 
second beat of instr 1 does not sound when instr 2 is played. Could 
someone else test this file ?
 >
 >  I ran it in Linux with this command line:
 >
 >    csound -o oscil.wav -W -d -m0 oscil.csd
 >
 > Best,
 >
 > dp
 >
 >
 >
 > 
 >
 > 
 > 
 >
 > 
 > instr 1
 > kamp = p4
 > kfreq = p5
 > ifn = 1
 > aosc oscili kamp,kfreq,ifn
 > kenv linseg 0,p3*.01,1,p3*.03,0,p3*.96,0
 > aout = aosc*kenv
 > out aout
 > endin
 >
 > instr 2
 > kamp = p4
 > kfreq = p5
 > ifn = 2
 > aosc oscili kamp,kfreq,ifn
 > kenv linseg 0,p3*.03,1,p3*.23,.69,p3*.74,0
 > aout = aosc*kenv
 > out aout
 > endin
 >
 > 
 >
 > 
 > f1 0 8192 10 1
 > f2 0 8192 10 1 0 .9 0 0 .7 0 0 0 .6 0 0 0 0 .5 0 0 0 0 0 .4 0 0 0 0 0 
0 .3 0 0 0 0 0 0 0 .2 0 0 0 0 0 0 0 0 .1
 >
 > t 0 144
 >
 > i1 0 1 5000 69
 > i. + . <    <
 > i. . . <    <
 > i. . . <    72
 > i. . . <    <
 > i. . . <    <
 > i. . . <    <
 > i. . . 5700 68
 >
 > i2 0 .25 6000 220
 > i. + .   6050 .
 > i. . .   6075 440
 > i. . .   6075 440
 > i. 1 1  6100 220
 > i. + .  <    .
 > i. . .  <    440
 > i. . .  <    .
 > i. . .  <    220
 > i. . .  <    .
 > i. . .  6025 440
 >
 > e
 > 
 >
 > 
 >
 >
 >
 >
 > -------------------------------------------------------
 > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
 > Tool for open source databases. Create drag-&-drop reports. Save time
 > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
 > Download a FREE copy at http://www.intelliview.com/go/osdn_nl
 > _______________________________________________
 > Csound-devel mailing list
 > Csound-devel@lists.sourceforge.net
 > https://lists.sourceforge.net/lists/listinfo/csound-devel
 >
 >
 >




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 13:27
FromDave Phillips
SubjectRe: [Cs-dev] a missing beat
Istvan Varga wrote:

> The bug seems to be in sensevents(), as simply renaming playevents to
> sensevents, and sensevents to playevents appears to fix this odd 
> behavior.
> Of course, the real solution is to find out what is broken in sensevents.

Thanks for checking this behavior, Istvan.

I find sensevents() in Top/csound.c and playevents() in Engine/musmon.c. 
Exactly what should I do to eliminate the missing beat problem ? Should 
all calls to sensevents() be replaced by playevents() ?

Best,

dp




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 13:32
FromDave Phillips
Subject[Cs-dev] CsoundVST under Cs5
Greetings:

  Just a quick report for now. The CsoundVST frontend is working well 
under Linux, but it segfaults after a successful rendering. No other 
error reported, sorry, just a segmentation fault.

  Btw, some of the FLTK csd files I've tested work fine when run from 
CsoundVST, others do not.

  Realtime audio from the prompt is still not so good with 
'-+rtaudio=alsa -o dac' unless I run it with 'su -c' and --sched.

Best,

dp




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 13:38
FromDave Phillips
SubjectRe: [Cs-dev] a missing beat
Andres Cabrera wrote:

> I'm seeing the same behaviour, which seems to vary if the tempo is
> changed. When the tempo is 60, all notes sound OK. Try 140, and other
> high values, and see how some other notes disappear...
> (I'm trying it in realtime with -odac0 -b441 -B441)

Yes, you're right. I checked it at 60, then 120, and both tempos worked 
perfectly. But when I raised the tempo to 144 the second beat again 
disappeared for instr 1 and instr 2.

Hmm... a problem with tempo ??

Best,

dp












-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 13:41
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
Dave Phillips wrote:

> I find sensevents() in Top/csound.c and playevents() in Engine/musmon.c. 
> Exactly what should I do to eliminate the missing beat problem ? Should 
> all calls to sensevents() be replaced by playevents() ?

playevents is supposed to play an entire score, while sensevents only plays
notes for some specified number of k-periods. In theory, there should be
only one implementation, sensevents, and playevents should call it in a loop,
rather than reinventing the wheel. So, currently we have two similar functions
with almost the same purpose, but maintained separately and with a different
set of bugs (playevents seems to be more reliable as it was used in Csound4).


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 19:57
Frommatt
SubjectRe: [Cs-dev] a missing beat
you might want to compare sensevents() to the csound4 sources.  i seem 
to
remember fixing a bug in csound4 that was similar to this.


On Feb 4, 2005, at 5:41 AM, Istvan Varga wrote:

> Dave Phillips wrote:
>
>> I find sensevents() in Top/csound.c and playevents() in 
>> Engine/musmon.c. Exactly what should I do to eliminate the missing 
>> beat problem ? Should all calls to sensevents() be replaced by 
>> playevents() ?
>
> playevents is supposed to play an entire score, while sensevents only 
> plays
> notes for some specified number of k-periods. In theory, there should 
> be
> only one implementation, sensevents, and playevents should call it in 
> a loop,
> rather than reinventing the wheel. So, currently we have two similar 
> functions
> with almost the same purpose, but maintained separately and with a 
> different
> set of bugs (playevents seems to be more reliable as it was used in 
> Csound4).
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 20:10
FromMatt Ingalls
SubjectRe: [Cs-dev] a missing beat
i should also mention there are some other bugs associated with 
senseevents() that
i have never been able to track down

like:

s
f0 60
s


doesnt work, in fact i think maybe the first statement after an 's' is 
always ignored or something like that?   [ the workaround is just add 
another f0, but noone knows that ]

i think there may be a few other things like this, but unfortunately
playevents/sensevents is ~really~ complicated.  i seem to remember it 
took me like 3 FULL days to get my head around playevents and reshape 
it into sensevents().

everytime i try getting back into this code i dont last long before im 
tearing my hair out.



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 20:31
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
matt wrote:

> you might want to compare sensevents() to the csound4 sources.  i seem to
> remember fixing a bug in csound4 that was similar to this.

I have compared the two versions (csound4 and csound5) of sensevents(),
but the only differences that may be relevant to this issue are like
this one:

   csound5:
     if (frstoff->offtim < e->p[2])
   csound4:
     if ((int)(ekr*frstoff->offtim + FL(0.5)) < (int)(ekr*e->p[2] + FL(0.5)))

However, I already made similar changes, and the problem is still not fixed,
just more difficult to reproduce and does not occur as frequently.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 20:38
Frommatt
SubjectRe: [Cs-dev] a missing beat
does the same problem happen in cs4?

On Feb 4, 2005, at 12:31 PM, Istvan Varga wrote:

> matt wrote:
>
>> you might want to compare sensevents() to the csound4 sources.  i 
>> seem to
>> remember fixing a bug in csound4 that was similar to this.
>
> I have compared the two versions (csound4 and csound5) of sensevents(),
> but the only differences that may be relevant to this issue are like
> this one:
>
>   csound5:
>     if (frstoff->offtim < e->p[2])
>   csound4:
>     if ((int)(ekr*frstoff->offtim + FL(0.5)) < (int)(ekr*e->p[2] + 
> FL(0.5)))
>
> However, I already made similar changes, and the problem is still not 
> fixed,
> just more difficult to reproduce and does not occur as frequently.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 20:47
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
matt wrote:

> does the same problem happen in cs4?

I do not know, I need to build cs4 to find it out. It is not sure though
if csound4 uses sensevents by default. If playevents is used, then it will
of course work.

By the way, I found these differences:

          (opcod == 'e' && sectno > 1)) {
        timtot += curp2;
-      nxtim = nxtbt = prvbt = curbt = curp2 = FL(0.0);
+      prvbt = curbt = curp2 = FL(0.0);
        printf(Str("end of section %d\t sect peak amps:"),sectno);
        for (n=nchnls, maxp=smaxamp; n--; )

[...]

        if (actanchor.nxtact == NULL)           /*   if no indef ins */
          rlsmemfiles();                        /*    purge memfiles */
-      nxtim = nxtbt = curp2 = curbt = FL(0.0);        /*   reset sec times */
+      curp2 = curbt = FL(0.0);                /*   reset sec times */
        printf(Str("SECTION %d:\n"), ++sectno);
  #ifdef mills_macintosh

Lines that start with '-' are in csound5, and '+' lines are in csound4.
Does this have to do something with the problem at new sections ?


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 21:00
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
Dave Phillips wrote:

>  I haven't yet checked against JR's version, but the problem is gone in
> Istvan's 4.24.1. However, even his version has the problem with section
> repeats obliterating any t (tempo) statement in the score.

4.24.1 uses an improved version of playevents(), with better timing
accuracy, and has implementation for 'beat mode'. It does not use
sensevents(), that's why the error does not occur.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 21:03
FromDave Phillips
SubjectRe: [Cs-dev] a missing beat
Hi Matt:

  I haven't yet checked against JR's version, but the problem is gone in 
Istvan's 4.24.1. However, even his version has the problem with section 
repeats obliterating any t (tempo) statement in the score.

Best,

dp



matt wrote:

> does the same problem happen in cs4?
>
> On Feb 4, 2005, at 12:31 PM, Istvan Varga wrote:
>
>> matt wrote:
>>
>>> you might want to compare sensevents() to the csound4 sources.  i 
>>> seem to
>>> remember fixing a bug in csound4 that was similar to this.
>>
>>
>> I have compared the two versions (csound4 and csound5) of sensevents(),
>> but the only differences that may be relevant to this issue are like
>> this one:
>>
>>   csound5:
>>     if (frstoff->offtim < e->p[2])
>>   csound4:
>>     if ((int)(ekr*frstoff->offtim + FL(0.5)) < (int)(ekr*e->p[2] + 
>> FL(0.5)))
>>
>> However, I already made similar changes, and the problem is still not 
>> fixed,
>> just more difficult to reproduce and does not occur as frequently.
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
>> Tool for open source databases. Create drag-&-drop reports. Save time
>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 21:07
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
Now I tried the csound4 sensevents() in csound, with the minimal changes
needed to make it actually compile (such as the use of a csound pointer
and sstrcod<->SSTRCOD), and it does drop notes. It is better than the
original csound5 version, but is exactly the same as my "fixed" one.
Maybe a rewrite of sensevents() would be useful...



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-04 23:34
FromMatt Ingalls
SubjectRe: [Cs-dev] a missing beat
>
> Maybe a rewrite of sensevents() would be useful...

that definitely be something pretty substanital, probably changing
code outside of sensevents/playevents and definitely would
not be fun!   but if someone wants to do it...

i agree with your earlier comment that playevents() should just call
sensevents().   the only reason it doesnt is that playevents was there
first and as sensevents was a fairly drastic change, playevents was left
as is rather than being replaced. [ and obviously with good reason
because the functionality is not completely the same! ]

ill try to take a look into this stuff today..
-m



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-05 00:03
FromvanDongen/Gilcher
SubjectRe: [Cs-dev] a missing beat
AttachmentsNone  

Date2005-02-05 07:39
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] a missing beat
The problem is that since the change to sensevents there has been a
stream of odd errors.  I spent days (about 4) chasing a bug here before I
discovered that all the code I understood was being bypassed.  OK so I
almost fixed that bug, but it is still odd as it generates a
zero0length event what does noting, and I cannot find out how.  Shows
as an extra line after a s score command.
==John ffitch


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-05 07:49
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] a missing beat
>>>>> "Istvan" == Istvan Varga  writes:

 Istvan> matt wrote:
 >> does the same problem happen in cs4?

 Istvan> I do not know, I need to build cs4 to find it out. It is not sure though
 Istvan> if csound4 uses sensevents by default. If playevents is used, then it will
 Istvan> of course work.

 Istvan> By the way, I found these differences:

 Istvan>           (opcod == 'e' && sectno > 1)) {
 Istvan>         timtot += curp2;
 Istvan> -      nxtim = nxtbt = prvbt = curbt = curp2 = FL(0.0);
 Istvan> +      prvbt = curbt = curp2 = FL(0.0);
 Istvan>         printf(Str("end of section %d\t sect peak amps:"),sectno);
 Istvan>         for (n=nchnls, maxp=smaxamp; n--; )

 Istvan> [...]

 Istvan>         if (actanchor.nxtact == NULL)           /*   if no indef ins */
 Istvan>           rlsmemfiles();                        /*    purge memfiles */
 Istvan> -      nxtim = nxtbt = curp2 = curbt = FL(0.0);        /*   reset sec times */
 Istvan> +      curp2 = curbt = FL(0.0);                /*   reset sec times */
 Istvan>         printf(Str("SECTION %d:\n"), ++sectno);
 Istvan>   #ifdef mills_macintosh

 Istvan> Lines that start with '-' are in csound5, and '+' lines are in csound4.
 Istvan> Does this have to do something with the problem at new sections ?

This is what I had to do to stop it ignoring silence at the start of
a section.  See previous message

==John ffitch


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-05 11:16
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
Matt Ingalls wrote:

> that definitely be something pretty substanital, probably changing
> code outside of sensevents/playevents and definitely would
> not be fun!   but if someone wants to do it...

I have started implementing the following ideas:
   * simplified kperf() that always performs exactly one k-period
     and does not handle RT events (already done)
   * new sensevents() based on playevents() that senses events for
     exactly one k-period, and does handle RT events.
   * playevents() will just call sensevents() and kperf() in a loop,
     checking for the return value (sensevents will need three return
     values now: 0: normal performance, 1: terminate (to emulate
     playevents()==0), 2: end of score (i.e. playevents()==1).
   * fix csound.c so that it will work again after the above changes...



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-05 17:24
FromDave Phillips
Subject[Cs-dev] Cs5 realtime MIDI report
Greetings:

  I tested yesterday's CVS sources with the CSD file attached below. I 
used these command options:

    csound -+rtaudio=alsa --expression-opt -odac:plughw:0 -d -m0 -b64 
-B256 -M/dev/snd/midiC0D0 midi-in.csd

  Performance was excellent again, with good sound and negligible 
latency. Note that I did not need --sched and that the test was done as 
normal user. The test is very light-weight, merely a means of testing 
MIDI input, but it does demonstrate the very low latency possible with 
those options. I'll test it under some stress later today.

  Linux RH9, low-latency kernel 2.4.26 from Planet CCRMA, GCC 3.2.2, 
ALSA 1.04.

Best regards,

dp

;;; midi-in.csd







        instr 1
iamp    ampmidi 5000
kfreq   cpsmidib
a1      oscili  iamp,kfreq,1
a2      oscili  iamp,kfreq*1.003,2
a3      oscili  iamp,kfreq*.997,3
asig    =       a1+a2+a3
kenv    linenr  1,.07,.11,.01
        out     asig*kenv
        endin


; ==============================================


f1 0 8192 10 .1 0 .2 0 0 .4 0 0 0 0 .8
f2 0 8192 10 1 0 .9 0 0 .7 0 0 0 .4
f3 0 8192 10 .5 0 .6 0 0 .3 0 0 0 .9
f0 10000
e








-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-06 09:41
FromIain Duncan
SubjectRe: [Cs-dev] a missing beat
Can you announce to the list when you think it would be worth testing 
new fixes on this issue?

Thanks
iain

Istvan Varga wrote:
> Matt Ingalls wrote:
> 
>> that definitely be something pretty substanital, probably changing
>> code outside of sensevents/playevents and definitely would
>> not be fun!   but if someone wants to do it...
> 
> 
> I have started implementing the following ideas:
>   * simplified kperf() that always performs exactly one k-period
>     and does not handle RT events (already done)
>   * new sensevents() based on playevents() that senses events for
>     exactly one k-period, and does handle RT events.
>   * playevents() will just call sensevents() and kperf() in a loop,
>     checking for the return value (sensevents will need three return
>     values now: 0: normal performance, 1: terminate (to emulate
>     playevents()==0), 2: end of score (i.e. playevents()==1).
>   * fix csound.c so that it will work again after the above changes...
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-06 13:13
FromIain Duncan
SubjectRe: [Cs-dev] build report, re: a missing beat
Just rebuilt. As far as I can tell, the dropped note problem is gone. 
But the score I'm testing it with is a pretty full groove, so I am not 
100% certain. Can't hear any dropping though, and it was dead obvious 
before.

If I use the rt-audio=alsa module, I can rock out without any problems, 
even pushing cpu up to 80%. There are still midi printf messages from 
various inputs ( certain cc messages especially, and sometimes program 
change messages ) but they cause no glitch in the audio. As far as I can 
tell from a short test, this is gig ready for me. Whoo hoo!

If I use port audio, the note dropping appears to be fine too. However, 
the midi input causes clicking when the messages get printed, and I 
think maybe even sometimes without them.

Unfortunately, CsoundVST no longer builds:

Starting language-specific parse...
frontends/CsoundVST/Event.hpp:37: Template 'pair' undefined.
frontends/CsoundVST/Event.hpp:162: Warning(362): operator= ignored
frontends/CsoundVST/Event.hpp:163: Warning(362): operator= ignored
frontends/CsoundVST/Midifile.hpp:36: Template 'pair' undefined.
Processing types...
frontends/CsoundVST/Event.hpp:73: Warning(401): Nothing known about
class 'ublas::vector'. Ignored.
frontends/CsoundVST/Event.hpp:73: Warning(401): Maybe you forgot to
instantiate 'ublas::vector' using %template.
frontends/CsoundVST/Midifile.hpp:112: Warning(401): Nothing known about
class 'std::vector'. Ignored.
frontends/CsoundVST/Midifile.hpp:112: Warning(401): Maybe you forgot to
instantiate 'std::vector' using %template.C++ analysis...
Generating wrappers...
frontends/CsoundVST/Event.hpp:95: Warning(462): Unable to set variable
of type int [].
frontends/CsoundVST/Event.hpp:96: Warning(462): Unable to set variable
of type char const *[].
frontends/CsoundVST/Midifile.hpp:108: Warning(510): friend function
'operator <' ignored.
frontends/CsoundVST/Node.hpp:50: Warning(515): Target language argument
'ublas::matrix const &globalCoordinates' discards const in
director method Node::traverse.
frontends/CsoundVST/Node.hpp:50: Warning(515): Target language argument
'ublas::matrix const &coordinates' discards const in director
method Node::produceOrTransform.
scons: *** [frontends/CsoundVST/CsoundVST_wrap.cc] Error 2
scons: building terminated because of errors.


Istvan Varga wrote:
> Iain Duncan wrote:
> 
>> Can you announce to the list when you think it would be worth testing
>> new fixes on this issue?
> 
> 
> You can already try the CVS sources. The dropped notes may be fixed now,
> but more testing is needed, as well as some optimizations in the k-rate 
> loop.
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-06 22:16
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
Iain Duncan wrote:

> Can you announce to the list when you think it would be worth testing
> new fixes on this issue?

You can already try the CVS sources. The dropped notes may be fixed now,
but more testing is needed, as well as some optimizations in the k-rate loop.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-24 01:50
Frommatt
SubjectRe: [Cs-dev] a missing beat
thanks for fixing this istvan.  i put in some changes in csound4 
reflecting the same.

although im using > .5 instead of > .51 and it seems to work.

why are you using .51?

On Feb 6, 2005, at 2:16 PM, Istvan Varga wrote:

> Iain Duncan wrote:
>
>> Can you announce to the list when you think it would be worth testing
>> new fixes on this issue?
>
> You can already try the CVS sources. The dropped notes may be fixed 
> now,
> but more testing is needed, as well as some optimizations in the 
> k-rate loop.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-24 12:11
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
matt wrote:

> thanks for fixing this istvan.  i put in some changes in csound4 
> reflecting the same.
> 
> although im using > .5 instead of > .51 and it seems to work.
> 
> why are you using .51?

It is for safety; I have run into obscure bugs related to floating
point rounding errors that sometimes caused Csound to get trapped
in an infinite loop in sensevents(). The use of .51 is one of my
attempts to fix that bug; it does not seem to occur now in Csound5,
and it may be that the 0.51 is not really needed (I also made a
number of other changes to fix the bug), but I am not 100% sure.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-25 23:37
FromAndres Cabrera
SubjectRe: [Cs-dev] a missing beat
Would that bug manifest itself as a repeating buffer (an annoying cyclic 
noise- freezing csound) when a midi note is received. I have experienced 
this on CsoundAV very rarely and unpredictably, and if this was the fix 
it would be fantastic!

Cheers,
Andres

Istvan Varga wrote:
> matt wrote:
> 
>> thanks for fixing this istvan.  i put in some changes in csound4 
>> reflecting the same.
>>
>> although im using > .5 instead of > .51 and it seems to work.
>>
>> why are you using .51?
> 
> 
> It is for safety; I have run into obscure bugs related to floating
> point rounding errors that sometimes caused Csound to get trapped
> in an infinite loop in sensevents(). The use of .51 is one of my
> attempts to fix that bug; it does not seem to occur now in Csound5,
> and it may be that the 0.51 is not really needed (I also made a
> number of other changes to fix the bug), but I am not 100% sure.
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-26 10:27
FromIstvan Varga
SubjectRe: [Cs-dev] a missing beat
Andres Cabrera wrote:

> Would that bug manifest itself as a repeating buffer (an annoying cyclic 
> noise- freezing csound) when a midi note is received. I have experienced 
> this on CsoundAV very rarely and unpredictably, and if this was the fix 
> it would be fantastic!

No, this bug has made Csound hang indefinitely without any sound output,
and it was a score bug, not MIDI.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net