I would say for that it can be a little tough to progress with a melody further once you figure out something analogical to
d1 $ stut' 3 (1/12) (|+ note "<5 7>") $ s "superpiano"
which obviously will sound kind of "right" by ear and you might even know what to do with it, but then how do you manage to pattern out the melody that you have in your head, but so it still works inside of the function, tricky, huh?
What I would highly recommend is fiddling around with patterning out note changes with functions such as mentioned above stutWith or plyWith (it isn't in the docs I think but here's a video of Kindohm explaining it out which is worth checking out if you haven't seen it), striate/striate' can be really interesting for coming up with funky harmonic stuff/textures, also what you see in @nilhartman's example is a probably really good way of executing code if you have the melody sort of ready before hand or want a specific pattern/progression and then modify it afterwards.
Also, don't be afraid of longer samples, whole sequences can be very nicely chopped up and then reassembled (here's here's a video by @yaxu on bite/chew, slice/splice functions which will surely come handy), apart from these,
sustain and begin are your best friends.
If you ie. don't really want to striate a 30s sample into 3072 bits each of them 1/12 of the length of the whole sample (worth trying when it's one of those cold early mornings during spring) then apply some function to it, it can be quite an inspiring method to make a recording of yourself hitting a two-three note sequence on your favourite synth (can be with a little pause inbetween).
Load it up, mess around with it (again, if anyone asked me what's fun I'd say striate), and if you don't like what happens with the two other notes at some point you can just cut the sustain off and you're left with only the base note. Tidy.
If you have any hardware or a bunch of favourite VSTs, obviously using midi is a very good idea as well, although after writing a bit of code I usually end up recording stuff that looks like this:
Here's a more or less melodic tidal session I had done the other day.
tl;dr try to make a trance record then change the sample