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

add now/retrig and make the prompt (and prompt2 for multiline things)… #22

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add now/retrig and make the prompt (and prompt2 for multiline things)…
… silent. a good idea?
  • Loading branch information
yaxu committed Aug 11, 2017
commit 8ac7ce65e3f4378a32fe7821733609180b8b39ed
3 changes: 2 additions & 1 deletion lib/BootTidal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
10 changes: 9 additions & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') + "<br />");
this.consoleView.logStderr();
this.consoleView.logStderr(data.toString('utf8'));
this.consoleView.logStderr();
Expand Down Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down