VOGONS


First post, by vladr

User metadata
Rank Oldbie
Rank
Oldbie

If a given partial is muted then MidiChannel::SetPatch() will only set pcache[].playPartial/.usePartial to false and continue. If this was the first time the patch was set on the given channel, the remainder of pcache[] remains uninitialized and MidiChannel::PlayPoly() will crash miserably when attempting to compute the pulse width (pcache[].pwsens not being set).

Quick fix would be to zero out pcache in MidiChannel's constructor

	bend = 0x1000;
memset(polyTable,0,sizeof(polyTable));
+ memset(pcache, 0, sizeof(pcache));

if(cnum==8) {

Reply 1 of 1, by canadacow

User metadata
Rank Member
Rank
Member

Got it. Just added that code to my emulator now. One of the things I'm trying to get a handle on is the filter velocity sensitivity, the amplitude level and the amplitude velocity sensitivity parameters. I've worked on these before but they still don't sound right.