The red line marks the end of a song (or the song loop, if "loop" is turned on.) Do you see the slim timeline right above the pattern field? Right-click your mouse on it to set the red line to any time you wish.
left-mouse-click on the timeline sets the start of the song. right-mouse-click on the timeline sets the end of the song.
If loop is turned on (the button right under "play"), then another line will appear for the loop-back point. SHIFT+left-mouse-click sets the start of the loop. (whereby you can drag it, too, just using left-click on it and drag).
Have fun and don't hold back if you have questions. Try to answer them yourself first, though. See if you can find some documentation. I'm sure DrPetter has left you some on the website.
right click on the note. Really, find the documentation, it comes with the original download of musagi from his website's project page for musagi ( www.drpetter.se/project_musagi.html ) You'll find a folder called "documentation". It should answer many of your questions!