Tuning hard and soft magnetic FePt nanocomposites