How to create a synth riff

Dudes How to create a synth riffas in these songs? I think i can resample synth shot then use the Pattern/Sample commands(Retrig or another)to make such a beeping noise ???

Examples:

https://www.youtube.com/watch?v=M7alvEZ4jeI

https://www.youtube.com/watch?v=4tG6rbvB7Ck

Simply cut off the note earlier using a cut command in case you want to cut notes before the next line is triggered. If you use samples, set the NNA to cut to have next notes cut off the previous note.

Well, use a synth or a sample that will produce such a sound? Both sound quite a bit like a high note “clavinet” (or clavichord? dunno what’s legit names for that sound…) sound, though the first like it has some resonz filter on it giving it a formant touch like an oboe or whatever. FM (soft-)Synths often sport such sounds. Maybe eq the base sound a bit to weaken first few freqs from the fundamental to give it more of that bleepy sound. Ya know, it’s the stuff reggae people often use with a wahwah, but without the wah and at higher pitches. As I know hiphop people they’ve just sampled some solo from a funk tune or whatever, chopped it up and placed the slices/notes to their liking of making up a new melody.

P.S.: If the base sample you’d like to work with falls off too quick in volume, try compressing it hard so the ringing is amplified in relation to the attack and the falloff is evened out. If you like a constant “bleep” with that sound, it’s up to the art of sensibly looping the right part of a oneshot sample, take care to watch the waveform as to where to set the loop points, as fm-ish samples are not like analogue synth wavecylces, often cycling through certain irregularities. Other bleeps similliar to that I’ve heard in Hiphop actually use analogue synth tones, but these 2 “bleep riffs” are def clavinet sounds.