Lines Matching defs:offset
804 * calculate pitch offset
806 * 0xE000 is no pitch offset at 44100Hz sample.
814 int offset;
816 /* calculate offset */
818 offset = (vp->reg.fixkey - vp->reg.root) * 4096 / 12;
820 offset = (vp->note - vp->reg.root) * 4096 / 12;
822 offset = (offset * vp->reg.scaleTuning) / 100;
823 offset += vp->reg.tune * 4096 / 1200;
826 offset += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 3072;
834 offset += chan->gm_rpn_coarse_tuning * 4096 / (12 * 128);
835 offset += chan->gm_rpn_fine_tuning / 24;
842 offset += fx->val[EMUX_FX_INIT_PITCH];
847 offset += 0xe000 + vp->reg.rate_offset;
848 offset += vp->emu->pitch_shift;
849 LIMITVALUE(offset, 0, 0xffff);
850 if (offset == vp->apitch)
852 vp->apitch = offset;