Ask Your Question
1

How do I play samples at random values of a specific scale or chord?

asked 2016-06-13 09:12:14 -0500

kindohm gravatar image

updated 2016-06-19 22:09:49 -0500

I want to play a pattern that has note values randomly selected from a specific chord or scale.

The only way I know how to do this is to specify the scale values in a variable, then use the choose and up functions to pick the notes:

let pent = [0,2,4,7,9]

d1 $ s "arpy*8" # up (choose(pent))

Is there a better way to do this using the new s n notation?

edit retag flag offensive close merge delete

Comments

Separate Q: how'd you get the nice text formatting? triple backtick doesn't seem supported, and \<pre\> doesn't have syntax coloring and I can't figure out how to escape angle brackets...

bgold gravatar imagebgold ( 2016-06-13 11:39:08 -0500 )edit

@bgold indent with four spaces, or highlight your text and choose the code format button in the rich text editor (which just indents your text by four spaces).

kindohm gravatar imagekindohm ( 2016-06-13 12:11:02 -0500 )edit

This isn't working for me. I get a "parse error on input 'dl' tidal"

mitchk gravatar imagemitchk ( 2016-06-18 16:15:55 -0500 )edit

@mitchk you'll get that error if you eval both lines as a single block. try eval'ing each line separately. I'll edit my question to add a line break.

kindohm gravatar imagekindohm ( 2016-06-19 22:09:30 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2016-06-15 08:25:37 -0500

telephon gravatar image

You can modify the pitch model and then just use notes as index into that scale.

E.g. in supercollider:

(
~dirt.orbits[0].set(\freq, #{ 
    (~n.degreeToKey([0, 0.5, 1, 4, 5, 5.5, 9.2, 11], 12) + 60).midicps
});
)

In Tidal:

d1 $ slow 2 $ sound "gabor*16" # n (run 16)

There are more examples under pitch-model.scd

edit flag offensive delete link more

Comments

do you know a way to do it in Tidal? I'm curious about the same question but in conjunction with tidal-midi so this answer won't work for me. any help much appreciated, thanks!

jakes gravatar imagejakes ( 2016-06-26 14:58:13 -0500 )edit
0

answered 2016-06-13 11:32:33 -0500

bgold gravatar image

updated 2016-06-13 11:36:17 -0500

Not directly, but I can think of some weird hacky ways. Here's one:

d1 $ spread' (<~) (fmap fromIntegral $ irand 4) $ sound "[bd sn:2 hh cp]/4"

Somewhat more flexible, using zoom (and also abusing spread'):

let selectFrom n = spread' (\x -> zoom (fromIntegral x/ fromIntegral n, fromIntegral (x + 1)/fromIntegral n)) (irand n)
d1 $ sound $ selectFrom 4 "bd sn:2 hh cp"
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-06-13 09:12:14 -0500

Seen: 1,998 times

Last updated: Jun 19 '16