Using Melodyne is one way of making a tempo map, and great when it works, but doesn't always give you the best results if the audio is very free and not enough transients to mark the beats, or there are lead instruments that are loud that are ahead or behind the beat. If Melodyne doesn't make a good map, it is easy in Studio One to just open the tempo track at the top, and slide the bars (or beats) to the position in the audio track that correspond to that bar or beat. You have to hold Ctrl while you slide the beat position to the left or right. The easiest way is to have the metronome on, and play the track and hear when the metronome gets out. Then take your mouse to the beat or bar in the timeline, and position it just below (inside the tempo track) and hold control and slide it to the right position (using your eyes on the audio track, or just listening.) After that, as you say, you can make a BIAB steady BPM follow your free tempo track.