# Pattern pieces of a pattern -- a bug in 'bite'?

EDIT: I think what I'm looking for is the 'bite' function with '@' in mininotation. But it's giving me a bug when I try to use it this way. See two posts below for a simple example.

[OLD QUESTION]:
Is there a way to pattern pieces or chunks of another pattern? Similar to `select` but with a stack of patterns instead of a list of stacks of patterns (like here).

This might seem like a barely-useful syntactical difference, but I keep running into this question when I try to recreate songs, like the "resonance" cover I recently posted in discord. Seems like something that's easy to do on piano or a DAW (copy paste a stack of notes in a region) but hard to do with tidal. Would be really powerful for midi_to_tidalcycles output too!

Something like

`arrangeDiv 3 "0@8 1@6 2@18" "bd hh sd"`

would divide the pattern (or stack of patterns) into thirds and then you pattern those thirds (0, 1, and 2).

I've tried: patterning `RotR` and `fast` to move the parts of the pattern around to the right places. This should work in theory but it's very hard to get right .

`nTake` and state memory would work for this example, but it wouldn't work on stacks and becomes tricky with chords. Also I don't think it can be used on scale degrees.

Also, I wonder if this would work with triangle braces like "bd hh "

Cheers!

Or wait, is this just `bite` or `slice`? checking.

OK, I'm getting this bug now with `bite`, on tidal version 1.9.4

`let m = sound "midi" # midichan 0`

`d1 \$ n "0 4 7" # m`

For a negative control: parameterize `bite` so it does nothing. The above code sounds exactly like

`d1 \$ bite 3 "0 1 2" \$ n "0 4 7" # m`

good!

(it's dividing the pattern into 3 and patterning those chunks in the normal order).

Modifying the beat works for this pattern in `bite`:

`d1 \$ bite 3 "[0!5] [1!3] [2!9]" \$ n "0 4 7" # m`

but then this fails:

`d1 \$ bite 3 "0@5 1@6 2@5" \$ n "0 4 7" # m`

It adds extra onsets for some reason, instead of just shifting the three notes around.

I raised an issue on Github : bug with 'bite' and '@' in mininotation · Issue #1053 · tidalcycles/Tidal · GitHub