Re: Stuck notes in Rax and Synthtest
Re: Stuck notes in Rax and Synthtest
- Subject: Re: Stuck notes in Rax and Synthtest
- From: "Chris Reed" <email@hidden>
- Date: Tue, 06 May 2003 17:52:51 -0600
Interesting... I was under the impression that you should really only
deliver MIDI events to a MusicDevice before the buffer is rendered. That
way there is a clearly defined "0" sample offset. I guess this isn't a
requirement, but is it the preferred way to do things? Is there any
documentation about what a MusicDevice should do if it receives an event
while a buffer is being rendered, and what 0 means then?
Btwm SynthTest does not handle events itself. It uses an
AUMIDIController.
-chris
On Tue, 06 May 2003 18:46:47 +0100, "Angus F. Hewlett"
<email@hidden> said:
>
It's OK, found it - was threading-related. Needed to put a mutex to pause
>
delivery of MIDI events to my plug's buffer while Render() was doing its
>
thing.
>
>
At 01:41 PM 5/6/2003 -0400, Robert Grant wrote:
>
>Hi Angus,
>
>
>
>I wouldn't put it past Rax to cock up some of the MIDI message
>
>handling. I've just taken a look and this is the loop for passing
>
>messages to the music device:
>
>
>
> for ( j = 0; j < list->numPackets; ++j) {
>
> Byte* msg = inPacket->data;
>
> do {
>
> if ((msg[0] & 0xF) == m_channel) {
>
> MusicDeviceMIDIEvent(unit, msg[0],
>
> msg[1], msg[2], 0);
>
> if (msg[0] >> 4 == 0x09 && msg[2] > 0) noteOn = TRUE;
>
> }
>
> } while(msg = NextMIDIEvent(inPacket, msg));
>
>
>
> inPacket = MIDIPacketNext(inPacket);
>
> }
>
>
>
>This is probably very wrong but this code is called in the MIDIReadProc
>
>thread.
>
>
>
>Robert.
>
>
>
>
>
>On Tuesday, May 6, 2003, at 11:22 AM, Angus F. Hewlett wrote:
>
>
>
>> Hi all,
>
>>
>
>> Am seeing a problem in these AU hosts relating to my MIDI handling
>
>> routines.
>
>>
>
>> In Rax and Synthtest, we are seeing frequent, easily-reproducible stuck
>
>> notes when played from a MIDI keyboard. The MIDI data handling
>
>> routines in
>
>> my code look to be OK, so I'm wondering if it might be threading
>
>> related.
>
>> Are there any special precautions I need to take in the MIDI routines
>
>> for a
>
>> MusicDevice?
>
>>
>
>> Regards,
>
>> Angus.
>
>> =======================================================
>
>> Angus F. Hewlett, Technical Director
>
>> FXpansion Audio UK Ltd - http://www.fxpansion.com
>
>> =======================================================
>
>> _______________________________________________
>
>> coreaudio-api mailing list | email@hidden
>
>> Help/Unsubscribe/Archives:
>
>> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
>> Do not post admin requests to the list. They will be ignored.
>
>
>
>
>
=======================================================
>
Angus F. Hewlett, Technical Director
>
FXpansion Audio UK Ltd - http://www.fxpansion.com
>
=======================================================
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.