code: protected void setNewPlayerTuningFor(final ChannelMemory aktMemo, final int newPeriod)
  	{
  		if (newPeriod<=0) 
  			aktMemo.currentTuning = 0;
  		else
  		if (frequencyTableType==Helpers.XM_LINEAR_TABLE)
  		{
  			final int xm_period_value = newPeriod>>2;
  			int newFrequency = Helpers.lintab[xm_period_value % 768] >> (xm_period_value / 768);
  			aktMemo.currentTuning = (int)(((long)newFrequency<<Helpers.SHIFT) / sampleRate);
  		}
  		else
  			aktMemo.currentTuning = globalTuning/newPeriod; // in globalTuning, all constant values are already calculated. (see above)
  	}
docs: This Method now takes the current Period (e.g. 856<<4) and calculates the
  playerTuning to be used. I.e. a value like 2, which means every second sample in the
  current instrument is to be played. A value of 0.5 means, every sample is played twice.
  As we use int-values, this again is shiftet.
  @param aktMemo
  @param newPeriod