Improvisation means creating your own melodies by ear. You now know more than enough to begin improvising. Although some licks and melodies are derived entirely from one scale, it is also common for notes from a combination of scales to be used.
Most musicians create new melodies completely by ear, drawing on all the sounds they are familiar with. When you are learning, the best approach is to learn all the sounds and scales but also to experiment with making up your own licks totally by ear.
Composing is usually done by intuition based on subconscious knowledge, then rounded off with fine tuning based on conscious knowledge, i.e., the creating is done by ear and the theoretical analysis comes later.
A good way to begin improvising is to use a short rhythm pattern, (e.g., two swung eighth notes) and move it between different notes to create variations. This is demonstrated in the following example.
Once you are comfortable with this, try using a longer rhythm pattern. It is a good idea to play any new rhythm on one note until you have it memorized. This next example demonstrates a rhythm on one note and then on a variety of pitches.
Here is another variation that uses a set rhythm pattern. Notice the way using the rhythm on different groups of notes creates a call and response effect between the phrases.
Another useful improvising technique is to begin with a short rhythmic phrase and then add longer variations, each one adding something to what has gone before.