# Technique for Playing Drum Samples in Pattern

**URL:** <https://in-thread.sonic-pi.net/t/technique-for-playing-drum-samples-in-pattern/6332>\
**Category:** Support, Help & Resources\
**Created:** [January 4, 2022, 9:02pm UTC](https://in-thread.sonic-pi.net/t/technique-for-playing-drum-samples-in-pattern/6332 "2022-01-04T21:02:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [January 5, 2022, 2:30am UTC](https://in-thread.sonic-pi.net/t/technique-for-playing-drum-samples-in-pattern/6332/2 "2022-01-05T02:30:13Z")

</div>

Hey Nick,

> [@](#):
>
> I’m wondering if this technique is documented anywhere?

Nope, not really. It works, but it’s not an ‘official’ Sonic Pi technique 🙂

> [@](#):
>
> Is it common?

There are a bunch of people that use this idea - whether it’s common is harder to answer 😄  
I’d say at least that it’s popular with folks that want to work with a more visual style of pattern representation.

> [@](#):
>
> Is there a ‘better’ way?

Well, there’s no right or wrong here… it comes down to personal preference! 😄  
There are a handful of interesting ways based on the same idea that other folks have used to represent grid patterns - here’s a few more:

> [@Binary Drum Sequencer - new ways to code drums](https://in-thread.sonic-pi.net/t/binary-drum-sequencer-new-ways-to-code-drums/1618):
>
> Hello! I’ve been playing around with some new ways to create drum tracks in Sonic Pi. This one is fast and fun and I think some of you will be tempted to try it out. Briefly, this style of live coding keeps all your drums in a single live\_loop, uses a single ticker and a single sleep command. It should save your fingers from working too hard to create complex drum loops. All it takes is a bit of binary know-how, and some ruby sugar to make it work. use\_bpm 240 live\_loop :drums do tick o…

> [@Hexadecimal/binary rhythmic scheme](https://in-thread.sonic-pi.net/t/hexadecimal-binary-rhythmic-scheme/1899):
>
> Hexadecimal/binary rhythmic scheme Note that “spread” example 3 in documentation live\_loop :euclid\_beat do sample :elec\_bong, amp: 1.5 if (spread 3, 8).tick sample :perc\_snap, amp: 0.8 if (spread 7, 11).look sample :bd\_haus, amp: 2 if (spread 1, 4).look sleep 0.125 end Binary rhythmic scheme # Binary rhythmic scheme def schr(num) num.split(//).collect { |n| n == "1" } end live\_loop :euclid\_beat do sample :elec\_bong, amp: 1.5 if schr('10010010').ring.tick…

> [@Idea for drums management](https://in-thread.sonic-pi.net/t/idea-for-drums-management/4874):
>
> Hello, I’m new here and I want to share with you this implementation I made to handle drums inside a Sonic Pi track, in order to understand if this can be a good solution slight_smile I liked the idea I found around the web (mostly [here](https://www.youtube.com/watch?v=RaJZho7p2Y4) and [here](https://gist.github.com/darinwilson/a3e5909db339838a67fe)) to map the beats inside an array, to emulate somehow the common grids used by real drum machines and simplify the creation of beats. I also wanted to have something that gives the possibility to manage in easy way the evolution of the beats during …

---

_[View the full topic](https://in-thread.sonic-pi.net/t/technique-for-playing-drum-samples-in-pattern/6332)._
