When I have to write the notes on the piano roll for a certain sound, how do I establish the length (end of cycle) of the sample, for example a 2-bar bar etc..
Sorry, I don't really understand the question. What are you trying to achieve exactly?