Sometimes you need to work out the tempo of a recording in order to be able to place it accurately in time with the rest of your score.
This is easy if you know the tempo, or it's one tempo all the way through (i.e was recorded to a metronome). If the piece of music you're working to wasn't recorded to a metronome, or you don't have an existing tempo map, then the tempo may vary and it might be difficult to work with it in StaffPad.
You can always import a tempo map from a MIDI file, if you have one, using the tempo staff's "Import Tempo from MIDI file" feature. However, if you don't have an existing tempo map and need to make one, StaffPad makes this really easy with the new Tempo Mapping feature.
To enable tempo mapping, first create a tempo staff. Then, tap the tempo staff's name and toggle the "Tempo Mapping" switch on. You may also want to deactivate Adaptive Audio from the audio you're mapping; otherwise, you may find that the time stretch interferes with your tempo mapping process.
Once you're in tempo mapping mode, you can drag the beat and bar markers of the tempo staff around to set the tempo graphically. This can be really useful if you need to line up the bars and beats with transients in the audio waveform. Alternatively, enable the metronome and do it by ear.
As you drag the bar and beat markers around, you'll see StaffPad creating tempo marks for you. You can average out the tempo by deleting a few tempo marks; in tempo mapping, StaffPad will average out the tempo between two tempos, so that the overall time (in seconds) from point-to-point remains the same.
Once you're finished, you can disable tempo mapping and re-enable any adaptive audio. You may need to set the clip's tempo manually by long pressing on any audio clips you just mapped and choosing "Set Clip Tempo".
Once StaffPad is aware of the tempo of the clip, you can safely enable Adaptive Audio and change the tempo and key freely from then on.