Drum music notation and Sonic PI notation

I have noted down the drum notes available with sonic pi:

:drum_heavy_kick
:drum_tom_mid_soft
:drum_tom_mid_hard
:drum_tom_lo_soft
:drum_tom_lo_hard
:drum_tom_hi_soft
:drum_tom_hi_hard
:drum_splash_soft
:drum_splash_hard
:drum_snare_soft
:drum_snare_hard
:drum_cymbal_soft
:drum_cymbal_hard
:drum_cymbal_open
:drum_cymbal_closed
:drum_cymbal_pedal
:drum_bass_soft
:drum_bass_hard

I have seen a notation convention for drums here:

As per the above link, I try to match the sonic pi notation to drum notation:

The Bass Drum / Kick Drum
:drum_bass_soft
:drum_bass_hard

Floor Tom
:drum_tom_lo_soft
:drum_tom_lo_hard

Tom drum 1
:drum_tom_hi_soft
:drum_tom_hi_hard

Tom drum 2
:drum_tom_lo_soft
:drum_tom_lo_hard

Snare drum
:drum_snare_soft
:drum_snare_hard

Ride ?
:drum_cymbal_soft
:drum_cymbal_hard

Hi-hat.
:drum_cymbal_open
:drum_cymbal_closed

Hi-Hat pedal
:drum_cymbal_pedal

The Crash Cymbal
(which one in sonic pi?)

Can somebody verify whether the above match is correct or not?

Hey @vinodv - I don’t know the exact mapping myself, but you may find some clues by having a look at the original source - these drum samples were from a pack on freesound:
https://freesound.org/people/menegass/packs/6393/

As to being certain about the exact matches - can’t say that I’ll know for sure.
That seems fairly close to me, except if Tom drum 2 is lower than Tom drum 1, but higher than Floor Tom, then Floor Tom and Tom Drum 2 wouldn’t both be :drum_tom_lo_*. Maybe Tom drum 2 is :drum_tom_mid_*?

Regarding the Crash cymbal, I do know that there is often a distinction made between a Splash and a Crash cymbal. You’ll only find a Splash cymbal sample in that :drum_* sample pack in Sonic Pi. Whether the name of the drum type in that sample is accurate, I wouldn’t know. How picky you want to be about the sound difference if it is indeed a Splash and not a Crash is up to you :man_shrugging:

Hi @vindov

That drum notation is broadly right for a sort of basic ‘five piece’ rock drum kit you might buy from a shop, but in percussion there are so many variations that it rarely maps perfectly. Often a score will have it’s own notation for a particular piece - e.g. the place for ‘rock snare drum’ means something else, a timbale for instance.

I think the kit in SPi just has Hi Tom and Lo Tom, but you can emulate a nice floor tom, lower in pitch, by beatstreching out the Lo Tom.

The cymbal sounds are a bit unclear as to what they are, but again you can use the standard ones and manipulate them with the sample parameters to do quite a lot - e.g. stretch one out to be roughly like a crash, or shorter and higher pitch for a splash. There’s not really a recognisable ride sound IMO.

I don’t think Spi is trying to be an authentic acoustic drum kit. For that you need a sampler of some kind with lots of samples taken at different volumes. Although that can be driven from SPi. If you want some more info on that, let me know.

BTW there are a lot more interesting electronic drum sounds in the samples e.g. bigger snare drum sounds and kick drums under :sd_ and :bd_

Hope that helps.

2 Likes

Can you provide some example code on how to do this.

Note that beatstretching would certainly achieve the result you’re suggesting, though it is mostly helpful for stretching or shrinking a sample’s length to fit a certain number of beats (thus altering the sample’s pitch/rate at the same time).
Altering the sample’s rate directly may be just as useful here, since I assume we’re just interested in changing the pitch, not fitting the length to a certain time :man_shrugging:

1 Like

@ethancrawford sure yes, and better explained with rate, I was just in the habit of using beatstretch for other reasons. @vinodv here’s some code of a kit in action. Not a very convincing crash IMO :smile:, but an interesting sound and you get the idea.

The main thing here is in the function ‘p’ where the samples are tuned with various parameters. There are more parameters to play with.

#Sample Drums, Hi, Lo and Floor Tom
use_bpm 110

live_loop :drumtest do
  #stop
  cue :bar
  sleep 4
end

live_loop :drums do
  sync :bar
  a = 1.0
  s = [:drum_tom_hi_hard,
       :drum_tom_lo_hard,
       :drum_tom_lo_hard,
       :drum_splash_hard]
  
  
  define :p do |i|
    case i
    when 0
      sample s[i], rate: 1, amp: a*0.5
    when 1
      sample s[i], rate: 1, amp: a*0.2
    when 2
      sample s[i], rate: 0.6, amp: a*0.3 #Floor Tom
    when 3
      sample s[i], rate: 0.6, finish: 0.3, amp: a*0.3 #'Crash'
    end
  end
  
  with_fx :echo, mix: 0.1, phase: 0.75, decay: 12 do
    in_thread do
      16.times do
        tick
        p(0) if ("x-------x-------"[look]=="x") #Hi
        p(1) if ("------x---x-----"[look]=="x") #Lo
        p(2) if ("----x-------x---"[look]=="x") #Floor
        p(3) if ("x---------------"[look]=="x") #Crash
        sleep 1.0/4
      end
    end
  end
end

Do you mean :drum_tom_lo_hard again instead of :drum_tom_lo?

1 Like

Yes, corrected! Blimey ethan you’re on the case :smile: