From 8ac7ce65e3f4378a32fe7821733609180b8b39ed Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 11 Aug 2017 10:46:55 +0100 Subject: [PATCH] add now/retrig and make the prompt (and prompt2 for multiline things) silent. a good idea? --- lib/BootTidal.hs | 3 ++- lib/repl.js | 10 +++++++++- package.json | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/BootTidal.hs b/lib/BootTidal.hs index 37373c2..e2aa269 100644 --- a/lib/BootTidal.hs +++ b/lib/BootTidal.hs @@ -28,4 +28,5 @@ let bps x = cps (x/2) let hush = mapM_ ($ silence) [d1,d2,d3,d4,d5,d6,d7,d8,d9,c1,c2,c3,c4,c5,c6,c7,c8,c9] let solo = (>>) hush -:set prompt "tidal> " +:set prompt "" +:set prompt2 "" diff --git a/lib/repl.js b/lib/repl.js index 6a25072..767c5aa 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -48,7 +48,7 @@ export default class REPL { doSpawn() { this.repl = spawn(this.getGhciPath(), ['-XOverloadedStrings'], { shell: true }); this.repl.stderr.on('data', (data) => { - console.error(data.toString('utf8')); + console.error(data.toString('utf8') + "
"); this.consoleView.logStderr(); this.consoleView.logStderr(data.toString('utf8')); this.consoleView.logStderr(); @@ -78,6 +78,14 @@ export default class REPL { } tidalSendExpression(expression) { + this.tidalSendLine("now' <- getNow") + this.tidalSendLine(':{'); + this.tidalSendLine("let now = nextSam now'") + this.tidalSendLine(" retrig = (now `rotR`)") + this.tidalSendLine(" fadeOut n = spread' (_degradeBy) (retrig $ slow n $ envL)") + this.tidalSendLine(" fadeIn n = spread' (_degradeBy) (retrig $ slow n $ (1-) <$> envL)") + this.tidalSendLine(':}'); + this.tidalSendLine(':{'); var splits = expression.split('\n'); for (var i = 0; i < splits.length; i++) { diff --git a/package.json b/package.json index 21d4e8f..1a025d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tidalcycles", "main": "./lib/tidalcycles", - "version": "0.9.2", + "version": "0.9.3", "description": "Atom package for TidalCycles, a language for live coding pattern.", "activationCommands": { "atom-text-editor": [