[Cs-dev] Small issue when inputting event to destroy table via the api
| Date | 2009-12-28 00:54 |
| From | andy fillebrown |
| Subject | [Cs-dev] Small issue when inputting event to destroy table via the api |
Hi,
I ran into a small issue when inputting the message "f -1 0" to csound
via the api. With just the 2 pfields, linevent.c reported "too few
pfields" ...
linevent.c
305 if (UNLIKELY(pcnt < 3 && e.opcod != 'e')) { /* check
sufficient pfields */
306 csound->ErrorMsg(csound, Str("too few pfields"));
307 goto Lerr;
... so I added a dummy "0" to the message and musmon.c reported
"insert_score_event(): insufficient p-fields" ...
musmon.c
1091 /* check for required p-fields */
1092 switch (evt->opcod) {
1093 case 'f':
1094 if (UNLIKELY(evt->pcnt < 4))
1095 goto pfld_err;
... so I added another dummy "0" to the message and the api deleted
the table without complaint.
The final workaround message sent to Csound via the api was "f -1 0 0 0".
No worries ...just posting here so I'll be able to search for it when
I forget why it doesn't work in a few months =)
Cheers,
~ andy.f
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |
| Date | 2009-12-28 10:26 |
| From | Victor Lazzarini |
| Subject | Re: [Cs-dev] Small issue when inputting event to destroy table via the api |
Perhaps we can add a case where if the p1 is negative we don't look
for any further
p-fields?
Victor
On 28 Dec 2009, at 00:54, andy fillebrown wrote:
> Hi,
>
> I ran into a small issue when inputting the message "f -1 0" to csound
> via the api. With just the 2 pfields, linevent.c reported "too few
> pfields" ...
>
> linevent.c
> 305 if (UNLIKELY(pcnt < 3 && e.opcod != 'e')) { /* check
> sufficient pfields */
> 306 csound->ErrorMsg(csound, Str("too few pfields"));
> 307 goto Lerr;
>
> ... so I added a dummy "0" to the message and musmon.c reported
> "insert_score_event(): insufficient p-fields" ...
>
> musmon.c
> 1091 /* check for required p-fields */
> 1092 switch (evt->opcod) {
> 1093 case 'f':
> 1094 if (UNLIKELY(evt->pcnt < 4))
> 1095 goto pfld_err;
>
> ... so I added another dummy "0" to the message and the api deleted
> the table without complaint.
>
> The final workaround message sent to Csound via the api was "f -1 0
> 0 0".
>
> No worries ...just posting here so I'll be able to search for it when
> I forget why it doesn't work in a few months =)
>
> Cheers,
> ~ andy.f
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast
> and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |
| Date | 2009-12-28 18:10 |
| From | john ffitch |
| Subject | Re: [Cs-dev] Small issue when inputting event to destroy table via the api |
> Perhaps we can add a case where if the p1 is negative we don't look > for any further > p-fields? Think that is done ==John ffitch ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
| Date | 2009-12-28 19:22 |
| From | andy fillebrown |
| Subject | Re: [Cs-dev] Small issue when inputting event to destroy table via the api |
Thank you John. Cheers, ~ andy.f On Mon, Dec 28, 2009 at 1:10 PM, john ffitch |
| Date | 2009-12-29 12:51 |
| From | andy fillebrown |
| Subject | Re: [Cs-dev] Small issue when inputting event to destroy table via the api |
One more needs relaxing in musmon.c ... musmon.c 1099 case 'a': 1100 if (UNLIKELY(evt->pcnt < 3)) 1101 goto pfld_err; ~ andy.f On Mon, Dec 28, 2009 at 2:22 PM, andy fillebrown |
| Date | 2009-12-30 10:54 |
| From | john ffitch |
| Subject | Re: [Cs-dev] Small issue when inputting event to destroy table via the api |
> One more needs relaxing in musmon.c ... > > musmon.c > 1099 case 'a': > 1100 if (UNLIKELY(evt->pcnt < 3)) > 1101 goto pfld_err; > > ~ andy.f Do not understand: a is said to need 3 arguments. The manual says p1 Carries no meaning. Usually zero. p2 Action time, in beats, at which advance is to begin. p3 Number of beats to advance without producing sound. ==John ffitch ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
| Date | 2009-12-30 12:37 |
| From | andy fillebrown |
| Subject | Re: [Cs-dev] Small issue when inputting event to destroy table via the api |
Sorry, I should have pasted more of the switch statement: It's falling
through to line 1100 from case 'f'...
musmon.c
1093 switch (evt->opcod) {
1094 case 'f':
1095 if (UNLIKELY((evt->pcnt < 4) && (p[1]>0)))
1096 goto pfld_err;
1097 case 'i':
1098 case 'q':
1099 case 'a':
1100 if (UNLIKELY(evt->pcnt < 3))
1101 goto pfld_err;
... so the lineevent "f -1 0" still fails, despite the fix at line 1095
Cheers,
~ andy.f
On Wed, Dec 30, 2009 at 5:54 AM, john ffitch |