Here is my code that allows you to use both drums and other instruments!
extensions [sound]
;;turtles own an "instrument" and a "kind"
turtles-own [instrument kind]
to setup
clear-all
cro 4
;;drum turtles
ask turtle 0 [set instrument "Bass Drum 1" set kind "drum"]
ask turtle 1 [set instrument "Low Tom" set kind "drum"]
;;instrument turtles
ask turtle 2 [set instrument "Marimba" set kind "pitched"]
ask turtle 3 [set instrument "Marimba" set kind "pitched"]
end
to go
ask turtles [
fd 1
right random 90
left random 90
;;check if the turtle is a drum or not
ifelse kind = "drum" [
;;plays a drum note
sound:play-drum instrument (180 + pxcor)
]
[
;;plays a non-drum note
sound:play-note instrument (60 + pxcor) 128 .2
]
wait random 2 * (.25)
]
end