Learning how to play an instrument is rather difficult. On the same token, knowing how to play one and learning a new song is a task all its own. Repetitive practice is the only way to learn complex riffs, but it all comes down to muscle memory. The only problem is that you can’t always take your instrument with you during the day.
If you happen to play guitar, then you’ll be in luck with the PocketStrings Portable Guitar Practice Tool. This is a six-stringed board with frets that will let you rehearse fingerings for chords or challenging licks. When you slide it open, it measures 13.25x2x1”. This is a $30 purchase that will help you master your music. You could probably build something simple at home or air-guitar your way through it, but this is a way for things to feel a bit more genuine and sturdy.
https://www.youtube.com/watch?v=I93DkfUlWi8