How to write Riffs in electronic music

If your original music sounds nice but can't get attention or isn't memorable, what you probably need is a riff. Defined in the New World Encylopedia
In music, a riff is an ostinato figure (a repeated chord progression, pattern, or melodic fragment), often played by instruments in the rhythmic section, such as the guitar or keyboard, that forms the basis or accompaniment of a composition. A riff can be as simple as a single, exciting note or a more complex arrangement, as long as it is catchy and hooks the listener's attention within the context of the song without distracting him or her from the overall piece. Riffing on a melody or progression can be perceived as similar to how one would riff on a subject by extending a singular thought, idea or inspiration into a bit, or routine.
Interested? Join us from 1030 am to 1 pm at the NUS Electronic Music Lab, NUS Centre for the Arts Studios, on Sat 21 May 2016 and learn how.

Here are some memorable examples of riffs in electronic music, which we will be analyzing and learning from for our lesson

Faithless - Insomnia

Avicii - Levels

Kygo - Stole the Show

Major Lazer - Lean On

Calvin Harris - Summer

Eric Prydz - Pjanoo

Hardwell - Spaceman