TR8S + TidalCycles = ❤️

Hi all. Been having loads of fun tidaling on a Roland TR-8S. It's an awesome pair for tidal, but quite tricky to get the MIDI mappings right - sharing mine here to (hopefully) save someone's time.

-- TR8S MIDI CC Map
tr8sChanArray = [36,38,43,47,50,37,39,42,46,49,51]
tr8sAltChanArray = [35,40,41,45,48,56,54,44,55,57,59]
tr8sToneCCArray = [20,25,46,49,52,55,58,61,80,83,86]
tr8sDecayCCArray = [23,28,47,50,53,56,59,62,81,84,87]
tr8sCtrlCCArray = [96,97,102,103,104,105,106,107,108,109,110]

-- TR8S Functions
:{
let ctrl = modw
    noteToTR8STuneCC idx pat = ccv (fmap (fromIntegral . (`mod` 127) . toInteger . floor . (* 64) . (/ 12) . toRational . maybe 0 nvalue . M.lookup "note") pat) # ccn (tr8sToneCCArray!!idx)
    susToTR8SDecayCC idx pat = ccv (range 0 127 $ maybe 0 fvalue <$> M.lookup "sustain" <$> pat) # ccn (tr8sDecayCCArray!!idx)
    modwToTR8SDecayCC idx pat = ccv (maybe 0 fvalue <$> M.lookup "modwheel" <$> pat) # ccn (tr8sCtrlCCArray!!idx)
    tr idx pat = p (toID $ "tr8s" ++ show (tr8sToneCCArray!!idx))
      $ stack (pat : fmap (\translator -> translator idx pat) [ noteToTR8STuneCC, susToTR8SDecayCC, modwToTR8SDecayCC ])
      # stack [
        s "tr" # midichan 9 # midinote (tr8sChanArray!!idx),
        s "loopback" # midichan (pure $ fromIntegral idx)
      ]
    trbank num = asap $ progNum num # s "tr"
    trs pats = mapM_ (\(pat,idx) -> tr idx pat) $ zip pats [0..16]
:}

-- channels by name (as written on the device)
:{
let bd = d1
    sd = d2
    lt = d3
    mt = d4
    ht = d5
    rs = d6
    hc = d7
    ch = d8
    oh = d9
    cc = d10
    rc = d11
:}

-- If you want to substitute d1-12 with tr8s channels
:{
let d1 = tr 0
    d2 = tr 1
    d3 = tr 2
    d4 = tr 3
    d5 = tr 4
    d6 = tr 5
    d7 = tr 6
    d8 = tr 7
    d9 = tr 8
    d10 = tr 9 
    d11 = tr 10
    d12 = tr 11
    d13 = tr 12
    d14 = tr 13
    d15 = tr 14
    d16 = tr 15
:}

Usage:

bd $ n "0*2"

sn $ n "~ 0"

lt $ (scale "major" $ note "0*4") # sus 0.1 # ctrl 1

mt $ scale "major" $ note "0 2 4 7" #

This definition provides the ctrl, note and sus methods to control the ctrl, tune and decay knobs respectively

3 Likes

PS.: Should we start a repo for storing synth / midi devices / external device definitions for tidal? Is there enough demand for this kind of knowledge?

1 Like