Writing words to a melody that already exists is a different craft from writing a poem. The shape is given. The work is to find language that lives inside it without sounding forced into it.
Start by counting the syllables the melody offers in each phrase, and the syllables your line currently has. The gap between the two numbers tells you what kind of rewrite you need — a word swap, a reordering, or a different idea.
The syllable counter in Ilena gives you that count beside the text, so the measurement does not interrupt the writing.
A line with the right number of syllables can still sit badly. English is a stress-timed language: the strong beats of the melody want the strong syllables of the words. This is why English metre counts feet rather than syllables — an iambic pentameter is five feet of weak-strong, so ten syllables with five of them accented. French does the opposite and counts syllables alone, which is the whole reason a French lyric and an English one of identical length behave differently against the same tune.
Put a weak syllable on a strong beat and the listener hears the seam — the word sounds mispronounced even though it is not. This is the most common reason a line that "counts correctly" still feels wrong.
Match the accents first. The count follows more easily than the other way round.
A melody does not always give one note per syllable. A single vowel can be held across several notes — a melisma — and two syllables can be crushed into one beat when the tempo asks for it. Setting one note per syllable is called syllabic writing; hymns and most folk song do it, and the contrast is what makes a held note stand out at all.
This is a resource, not a problem. A long note wants an open vowel that can be sustained; a fast run wants short, consonant-light words. Choosing words for their sound, not only their meaning, is most of the work here.
When a line has to lose a syllable, the temptation is to cut the nearest small word. That usually damages the meaning first and the rhythm second.
It is often better to rephrase the whole line around a shorter load-bearing word. A synonym search, an antonym that inverts the sentence, or a different image can all produce a line that fits and still says what you meant.
When the end of the line has to change, the rhyme changes with it — see how to choose stronger rhymes.
Fitting words to music produces many near-identical drafts. The third attempt fits but has lost something the first one had, and by then nobody remembers exactly what the first one said.
Ilena keeps the successive versions of a work so that comparing them does not depend on memory.
The habit is older than the software. Leonard Cohen worked Hallelujah through some eighty verses across several years before releasing it, and then kept rewriting it in performance — the surviving drafts are the record of what each attempt was trying to fix.
Measure your lines, search rhymes and synonyms, and keep every version — all beside the text you are writing.