dktr0 / extramuros

language-neutral shared-buffer networked live coding system
78 stars 20 forks source link

Instructions fail with TidalCycles on Debian #13

Closed PLNech closed 4 years ago

PLNech commented 4 years ago

Hey, thanks for this project! Sadly I wasn't able to sucessfully connect with TidalCycles on Debian:

Setup

$ lsb_release -a
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.12 (stretch) Release: 9.12 Codename: stretch


- Installed with `git clone` then `npm install -g extramuros` (NPM `v6.14.2`).

# Problem

- Having installed Tidal with Cabal, I tried the `--tidalCabal`` option: Tidal starts successfully, but seems to fail on the definition of functions like `anticipate`:
<details>

### Command

node client.js --server 127.0.0.1 --tidalCabal --feedback


### Stack trace

extramuros: connecting to ws://127.0.0.1:8000... extramuros: connected to ws://127.0.0.1:8000 Tidal/GHCI initialized GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help

Prel ude> Prel ude> Some flags have not been recognized: prompt-cont,

Liste ning for controls on 127.0.0.1:6010 Control listen failed. Perhaps ther e's already another tidal instance listening on that port?

<in teractive>:17:29: error: • Couldn't match type ‘Bool’ with ‘Pattern ControlMa p’ Expected type: ControlP attern Actual type: Bool

• In the second argument of ‘streamOnce’, namely ‘False’ In the expression: stream Once tidal False In an equation for ‘once’: once = streamOnce tidal False

< interactive>:18:29: error:

• Couldn't match 

type ‘Bool’ with ‘Patt ern ControlMap’ Expected type: ControlPattern

Actual type: Bool • In the second argument of ‘streamOnce’, namely ‘True’

In the expression: streamOnce tidal Tr ue In an equation for ‘asap’: asap = streamOnce tid al True

< interactive>:22:14: error:

Variable not in scope:

asap :: ControlPattern -> c

< interactive>:23:33: error: • Couldn't m atch expected type ‘Bool’

              with actual type 

‘Time -> [Contro lPattern] -> ControlPattern’

• Probable cause: ‘xfadeIn’ is applied to too few arguments

In the second argument of ‘transition’, namely ‘( xfadeIn 4)’ In the expression: tra nsition tidal (xfadeIn 4) i In an equation for ‘xfade’:

      xfade i = transiti

on tidal (xfadeIn 4) i

:24:37: error: • C ouldn't match expected type ‘Bool’ with actual type ‘Time -> [ControlPatt ern] -> ControlPattern’ • Probable cause: ‘xfadeIn’ is applied to too few arguments In the second argument of ‘transition’, namely ‘( xfadeIn t)’ In the expression: tra nsition tidal (xfadeIn t ) i In an equation for ‘xfadeIn ’: xfadeIn i t = transition tidal (xfadeIn t) i :25:37: error: • C ouldn't match expected type ‘Bool’ with actual type ‘Time -> [Con trolPattern] -> ControlPa ttern’ • Probable cause: ‘histpa n’ is applied to too few arguments In the second argument of ‘transi tion’, namely ‘(histpan t)’ In the expression: transition tidal (histpan t) i In an equation for ‘histpan’: his tpan i t = transition ti dal (histpan t) i :26:34: error: • Couldn't match expe cted type ‘Bool’ w ith actual type ‘Time -> [ControlPattern] -> Cont rolPattern’ • Probable cause: ‘wai t’ is applied to too few arguments In the second argument of ‘trans ition’, namely ‘(wait t)’ In the expression: transition tidal (wait t) i In an equation for ‘wait’: wait i t = t ransition tidal (wait t) i :27:37: error: • Co uldn't match expected t ype ‘Bool’ with actual type ‘Time -> [C ontrolPattern] -> Control Pattern’ • Probable cause: ‘waitT’ is applied to too few arguments In the second argument of ‘transitio n’, namely ‘(waitT f t)’ In the expression: transition tidal (waitT f t) i In an equation for ‘waitT’: waitT i f t = tran sition tidal (waitT f t) i :28:32: error: • Co uldn't match expect ed type ‘Bool’ with actual type ‘Time -> [ControlPa ttern] -> ControlPat tern’ • Probable cause: ‘jum p’ is applied to too few arguments In the second argument of ‘t ransition’, namely ‘(jump )’ In the expression: transi tion tidal (jump) i In an equation for ‘jump ’: jump i = tran sition tidal (jump) i < interactive>:29:36: error: • Could n't match expected ty pe ‘Bool’ with actual type ‘Time -> [ControlPattern] -> ControlPattern’ • Probable cause: ‘jumpIn’ is applied to too few arguments In the second argument of ‘transit ion’, namely ‘(jumpIn t)’ In the expression: transitio n tidal (jumpIn t) i In an equation for ‘jumpI n’: jumpIn i t = transition tid al (jumpIn t) i :30:37: error: • Couldn 't match expected type ‘Bool’ with actual type ‘Time -> [Control Pattern] -> Contro lPattern’ • Probable cause: ‘jumpIn'’ is applied to too few arguments In the second argument of ‘trans ition’, namely ‘( jumpIn' t)’ In the expression: transitio n tidal (jumpIn' t) i In an equation for ‘jumpIn'’: jumpIn' i t = transition t idal (jumpIn' t) i < interactive>:31:37: error: • Couldn't match expected type ‘Bool’ with actual t ype ‘Time -> [Contr olPattern] -> Contro lPattern’ • Probable cause: ‘jumpMod’ is applied to too few arguments In the second argument of ‘transition ’, namely ‘(jumpMod t )’ In the expression: trans ition tidal (jumpM od t) i In an equation for ‘jumpMod’: jumpMod i t = t ransition tidal (jumpM od t) i :32:51: error: • Couldn't match expe cted type ‘Bool’ with actual type ‘T ime -> [ControlPattern ] -> ControlPattern’ • Probable cause: ‘mortal’ is applied to too few arguments In the second argument of ‘transition’ , namely ‘(mortal lifesp an release)’ In the expression: transition tidal (mo rtal lifespan release ) i In an equation for ‘mor tal’: mortal i lifespan release = transition tidal (mortal lifespan rel ease) i :33:39 : error: • Couldn't ma tch expected type ‘Boo l’ with actual type ‘Time -> [Cont rolPattern] -> Contro lPattern’ • Probable cause: ‘i nterpolate’ is applied to too few arguments In the second argument of ‘transition’ , namely ‘(interpolat e)’ In the expression: transition tida l (interpolate) i In an equation for ‘interpolate ’: interp olate i = tran sition tidal (interpolate) i :34:43: error: • Couldn't match expected type ‘Bo ol’ with actual type ‘Tim e -> [ControlPattern] -> ControlPattern’ • Probable cause: ‘inter polateIn’ is applied to too few arguments In the second argument of ‘transition ’, namely ‘(inte rpolateIn t)’ In the expression: transition tidal (interpolateIn t) i In an equation for ‘interp olateIn’: inte rpolateIn i t = tra nsition tidal (inter polateIn t) i :35:34: error: • Co uldn't match expec ted type ‘Bool’ with actua l type ‘Time -> [ Pattern a0] -> Pat tern a0’ • Probable cause: ‘clutch’ is applied to too few arguments In the second argument of ‘transi tion’, namely ‘(clutch) ’ In the expression: tran sition tidal (clu tch) i In an equation for ‘clutch’: clutch i = trans ition tidal (clut ch) i :36 :38: error: • Could n't match expecte d type ‘Bool’ with actual t ype ‘Time -> [Pat tern a0] -> Patter n a0’ • Probable cause: ‘c lutchIn’ is applied to too few arguments In the second argument of ‘transition ’, namely ‘(clutchIn t )’ In the expression: tr ansition tidal (c lutchIn t) i In an equation for ‘clutchIn ’: clutchIn i t = transition tidal (clutchIn t) i :37 :38: error: • Couldn 't match expected type ‘Bool’ with actual ty pe ‘Time -> [Cont rolPattern] -> Con trolPattern’ • Probable cause: ‘anticipate’ is applied to too few arguments In the second argument of ‘tra nsition’, namely ‘(anti cipate)’ In the expression: transition tidal (anticipate) i In an equation for ‘antici pate’: anticipa te i = transition ti dal (anticipa te) i : 38:42: error: • Couldn't match expected type ‘Bool’ with actual type ‘Time -> [ControlPattern] -> ControlPattern’ • Probable cause: ‘anticipateIn’ is applied to too few arguments In the second argument of ‘transitio n’, namely ‘(ant icipateIn t) ’ In the expression: transition tidal (antic ipateIn t) i In an equation for ‘anticipa teIn’: anticipate In i t = tr ansition tidal (anti cipateIn t) i ``` # Investigation - Client & Server sucessfully communicate: ``` {"type":"eval","code":"d1 $ s \"bd\""} extramuros: broadcast to 2 clients {"type":"eval","code":"d1 $ s \"bd\""} extramuros: broadcast to 2 clients {"type":"eval","code":"d2 $ s \"hh(4,7)\"\n"} ----- extramuros: connecting to ws://127.0.0.1:8000... extramuros: connected to ws://127.0.0.1:8000 ``` - When running directly with `| sclang`, it seems to work: ``` SuperDirt: listening to Tidal on port 57120 sc3> (var syn, sound;syn = SynthDef.new("example2", {arg freq = 440, amp = 0.2;Out.ar(0, SinOsc.ar(freq,mul: amp));});syn.load(s);) (var syn, sound;syn = SynthDef.new("example2", {arg freq = 440, amp = 0.2;Out.ar(0, SinOsc.ar(freq,mul: amp));});syn.load(s);) -> a SynthDef ``` Any idea what could cause these issues? Thanks for your help!
dktr0 commented 4 years ago

The first error you mention seems to be because you are sending Tidal/Haskell code to SuperCollider. (If you are just trying to play with Tidal via extramuros no need to engage with the SuperCollider modes in extramuros - just launch SuperDirt in the SC IDE like normal at all locations, and then launch the extramuros client with Tidal flags.)

Then, the errors in the stack trace you provide, when launching with the Tidal flags, testify to a mismatch between your version of Tidal and the Tidal startup script provided by extramuros. If you are using an old version of Tidal updating Tidal might just fix this. If not, a better bet may be to direct extramuros to your BootTidal.hs file explicitly using the (oops, undocumented) --tidalCustom flag. Example: node client.js -s 127.0.0.1 --ws-port 8000 --tidalCustom ~/path/to/my/BootTidal.hs

(While I am here I should mention that if you just want to play with Tidal in a collaborative browser setting with others, then Estuary is a better bet than extramuros - more flexible, rearrangeable views, support for other languages, can work on zero install basis but can also work with SuperDirt if you prefer: https://estuary.mcmaster.ca - use Chrome/Chromium/Opera)

dktr0 commented 4 years ago

PS -- if you installed Tidal with cabal then I think the example above should be: node client.js -s 127.0.0.1 --ws-port 8000 --tidalCabal --tidalCustom ~/path/to/my/BootTidal.hs

dktr0 commented 4 years ago

PPS - just added --tidalCustom to the help that you get when you enter node client.js --help

PLNech commented 4 years ago

Hey @dktr0, thanks so much for the instant response! Using --tidalCustom and --tidalCabal I was able to connect to my Tidal install :ok_hand:

_FWIW, I'm running Tidal v1.4.8, listed as latest when I run cabal update :manshrugging: