On a midi keyboard/piano, if I play both the chords and the vocal melody at the same time. How do you make the melody sound more prominent than the chords? In general, which makes the melody more prominent, pitching a melody an octave above the chords or an octave below the chords it? I tried both but I can't tell.
In general, people perceive higher sounds more prominently than lower ones, all things being equal. However in practice our perception is multi-determined, so in the way it's asked, there's not a concise answer to the question. For example, density of sound (i.e., chords) can produce the effect of loudness, so that chords in which each note is the same volume as the melody will be perceived as louder than the melody.
Dealing with this problem is a basic part of piano training -- learning to balance volume between the hands and even individual fingers, and the starting point is near always learning to "bring out" a (higher) melody over a (lower) accompaniment. A touch-sensitive keyboard will allow for this with practice. The basic idea is to put more weight in the louder part(s). We talk about weight rather than force, because thinking in terms of force tends to result in a harsh sound (on an acoustic instrument, at least) and poor technique (which is more of a concern, because excessive force can lead to injury).
On a keyboard that doesn't allow for such variations in touch, one could try splitting the keyboard between two sounds such that one has some quality (loudness or distinctive timbre, for example) that makes it more prominent and the other has qualities that reduce its impact.
Volume and tone (timbre) are more important that the octave.
Of course the emphasis on melodic line is what really makes the difference. It's hard to describe in objective terms, but melodic emphasis is what makes the melody stand out. It's a line with unique qualities. It depends on the texture, but in homophonic music the texture is one main melody with accompaniment. The main melody is unique while the accompaniment is more generic.
Just think of a bass singer. A bass could sing low to accompaniment in the high register of the piano. If you want to remove the textual aspect of the singing, just consider a bassoon instead. The timbral difference makes the melody part stand out.
In the case of a single instrument, like a piano, volume is one of the important things to bring out the melody. Louder parts tend to be heard as the main focus and therefore "the" melody. But the melodic emphasis part should be considered too. If an even touch was used in a passage, so volume would be a factor, the uniqueness of line will help bring out a melody. A generic broken chord pattern played against a line with mixed rhythms a much intervallic variety will tend to be heard as broken chord accompaniment to a main melodic line.
Having said all that, the top voice tends to be heard as "the" melody. If a passage was block chord with all parts moving in quarter notes, smooth step-wise voice leading in all parts, you might be hard pressed to say which part is "the" melody. In such a case the top part will probably be heard as the melody.
Indeed typically higher notes come to the first plane easier. Typically during the bass solos the rest of the band goes very quiet... or the bass moves to its higher registers.
If you don't have access to dynamics, you can use other means: articulation (legato/portato/staccato), timing, and also arrangement. Organ and harpsichord music might be a great source of inspiration. In this example of Fugue from Bach Toccata in C-minor BWV 911:
note how articulation is used to differentiate between the voices. It also helps that the fugue builds upon a theme of characteristic motifs which are repeated in various voices which makes it easier for the listener to distinguish them.