Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update transitions.md #217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update transitions.md #217

wants to merge 1 commit into from

Conversation

crcdng
Copy link
Contributor

@crcdng crcdng commented May 28, 2023

fixes the type signature of interpolateIn

fixed the type signature of interpolateIn
@Zalastax
Copy link
Collaborator

Hi @crcdng,

Many thanks for putting attention to this!

This is a step in the right direction, but transition (which interpolate is implemented through l) uses ID in latest Tidal:

https://github.com/tidalcycles/Tidal/blob/7a7669519ca9841daf288323db71041c479f45fb/src/Sound/Tidal/Transition.hs#L44

The current type signature is thus Sound.Tidal.ID.ID -> ControlPattern -> IO () as far as I can tell. What version of Tidal are you on?

@crcdng
Copy link
Contributor Author

crcdng commented Jul 30, 2023

Hi @crcdng,

Many thanks for putting attention to this!

This is a step in the right direction, but transition (which interpolate is implemented through l) uses ID in latest Tidal:

https://github.com/tidalcycles/Tidal/blob/7a7669519ca9841daf288323db71041c479f45fb/src/Sound/Tidal/Transition.hs#L44

The current type signature is thus Sound.Tidal.ID.ID -> ControlPattern -> IO () as far as I can tell. What version of Tidal are you on?

1.9.4

I think the issue here (and I believe similarly in #216) is that the signature in the documentation...

Type: interpolateIn :: Time -> [ControlPattern] -> ControlPattern

does not match the text and the example below it:

"Morph control values between patterns in a given number of cycles. The first argument supplied to interpolate is the ID of the new pattern that is created and the second is the number of cycles."

d1 $ sound "arpy*16" # cutoff 100
interpolateIn 1 2 $ sound "arpy*16" # cutoff 16000

And in the source code file you referenced above there is actually a third variant which does not match either version:

interpolateIn :: Time -> Time -> [ControlSignal] -> ControlSignal

@yaxu
Copy link
Member

yaxu commented Jul 30, 2023

The interpolateIn that the end user gets is defined in BootTidal.hs in v1.9: https://github.com/tidalcycles/Tidal/blob/3b44c5fb514721fb255901523e71ab1487da4f9d/BootTidal.hs#L46

The transitions need re-integrating into the current main branch. We should tidy things up in the process so that the internal helpers are given different names to the end user functions, maybe prefixed with _.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants