Ask Your Question

Viewing and using Cycle Number / Time

asked 2017-06-03 22:53:52 -0500

rocklobster343 gravatar image

Hey Tidal Team,

So after following some of the guides I still can't quite seem to get a hold of how to view the number of cycles within Tidal after it's clock has been running.

What command would I send to Tidal to view the clock cycle number? I would like to compose and trigger events based upon the cycle number.

While trying to figure this out I could not get this block from the guide to work

 d1 $ (pure now) ~> seqP [ 
      (0, 12, sound "bd bd*2"), 
      (4, 12, sound "hh*2 [sn cp] cp future*4"), 
      (8, 12, sound (samples "arpy*8" (run 16)))

Before trying that I ran

import Sound.Tidal.Time

but still receive the error:

"Variable not in scope: now : : Time * Perhaps you meant 'not' (imported from Prelude)

My plan is to use the seqP to compose a song based on triggering events at specific cycle numbers

Also if there are other better strategies for using Tidal to compose large scale compositions, I would love to hear your technique.

Thank You!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-06-04 09:42:54 -0500

It is strange that you are getting the not in scope error. I'm able to issue the code that you shared and get the song. In fact, I'm composing a piece myself which looks like:

d2 $ pure now ~> seqP
-- Intro 1
    [ (0, 16, bells)
    , (0, 16, noiseEffect)
    , (8, 16, bassyPad)
    , (12, 16, loopAt 4 $ s "vuplifter")
-- Drop
    , (16, 32, drums)
    , (16, 28, hihats)
    , (16, 32, droneBass)
    , (16, 24, noiseEffect)
    , (16, 28, bassyPad)
    , (16, 32, bells)
    , (16, 32, lead1)
    ] # room 0.1

Theorically, you shouldn't need to view the current cycle ever, but in case that you really need to print it out, you can do a hack, using some Haskell standard functions and the when function:

import System.IO.Unsafe

showCycle x = unsafePerformIO (print x >> return True)

d1 $ when showCycle (# gain 1) (sound "bd")

After evaluating this, you should get the cycle number in the console each tick.

About the song composition tips, as you can see in my seqP block, I have names like bells, noiseEffect, etc... That is because I like to compose a pattern in the way I like, tweaking ADSR, adding crush and other effects. After I have something I like I simply bind the pattern to a name for reusing it afterwards:

bells = slow 4 $ stut 6 0.1 0.3 $ stack
        [ n "ds7 f7 [ds7 d7] c7" # s "supersaw" # sustain 10
        , n "ds8 f8 [ds8 d8] c8" # s "supersquare" # attack 0.1 # release 4
        ] # sustain 0.2 # gain 0.7

With this it helps me stay sane when separating instruments, and remind me of the tracks of DAWs.

edit flag offensive delete link more

Question Tools


Asked: 2017-06-03 22:53:52 -0500

Seen: 600 times

Last updated: Jun 04 '17