Good point, yes, I'll use one or the other.mystran wrote:d_m_chambers_ wrote:mystran wrote:Does "exactCrossTime" go backwards from the end of the sample? If that's the case then I suppose you can do it like that as well.kryptonaut wrote: @mystran - what's wrong with the calculation of newPhase? It's the phaseincrement for a whole step multiplied by the post-crossing fraction of a step, which should be ok shouldn't it?Code: Select all
//Calculate the exact time when mSyncPhase would have reached 1.0 (this is the value to use for exactCrossTime): double exactCrossTime = mSyncPhase/mSyncPhaseIncrement;edit: oh nvm, seems these are consistent but.. why use different math for the two cases?Code: Select all
//Normal minBLEP: while(mPhase >= 1.0) { mPhase -= 1.0; double exactCrossTime = 1.0-((mPhaseIncrement-mPhase)/mPhaseIncrement);
If you have the time and are interested I wonder if you might listen to the audio samples as I'm sure there is still loads of aliasing. Surely minBLEP should be able to do better that that? If so, any ideas why the existing code is not quite right? I guess I still need to worry about the things you mentioned earlier:
Thanks againmystran wrote:(for higher order BLEPs, repeat the same with any non-zero derivatives and scale results by slaveFreq^N for the Nth derivative; this assumes your BLEP tables are sensibly scaled.. but it's hard to get the trivial step wrong at least)
......
There is an additional corner case where a slave has a transition (either from one segment to another, or normal reset) earlier during the same sample, so after (1) you should then go and check for any events (transitions or resets) for the slave with the crossing time as the upper limit of what to process and only once the next event is past this time can you continue with (2..4) .. but it just takes some restructuring of code really so I'd just get the normal cases working fine first.

