| Yes, I have run up against the same phenomenon: with regard to note events,
about twice as much data seems to be coming through as should come through.
As a result, I shy away from midiin, often using notnum and veloc instead.
OTOH, researching the issue, I seem to recall that the extra messages have
to do with the fact that midiin is receiving all the data, while at the same
time, instrument 1 is also receiving all of channel 1's note information. It
may well be that changing instrument number will solve the problem. (But
maybe not too.)
Art Hunkins
----- Original Message -----
From: "Oeyvind Brandtsegg"
To:
Sent: Sunday, March 19, 2006 12:11 PM
Subject: [Cs-dev] midiin bug ?
> I wonder if there's a bug in midiin,
> it seems to register midi note data incorrectly.
>
> Upon receving a midi note on, it reports status byte 144 twice,
> where the first one is correct,
> and the second one seems to be note off of the previous note played
(kstatus = 144, kdata2 = 0).
>
> When I run the following code inside an instr:
>
> kstatus, kchan, kdata1, kdata2 midiin
> printk2 kstatus
> if kstatus == 0 kgoto noprint
> printks "midi in note:%d velocity:%d %n", 1, kdata1, kdata2
> noprint:
>
> If I play the note 48, (on, then off),
> then note 50 (on, then off,
> it will print this:
>
> i1 0.00000
> i1 144.00000
> midi in note:48 velocity:10
> i1 144.00000
> midi in note:48 velocity:10
> i1 0.00000
> i1 0.00000
> i1 144.00000
> midi in note:48 velocity:0
> i1 0.00000
> i1 144.00000
> midi in note:52 velocity:30
> i1 144.00000
> midi in note:48 velocity:0
> i1 0.00000
> i1 0.00000
> i1 144.00000
> midi in note:52 velocity:0
> i1 0.00000
>
> best
> Oeyvind
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |