SuperDirt.start;
- Ctrl + Enter
C-c C-s
で起動C-c C-c
で一行C-Enter
で1セクション
(add-to-list 'all-the-icons-mode-icon-alist
'(f90-mode all-the-icons-faicon "tidal"))
(add-to-list 'all-the-icons-icon-alist
'(
"\\.tidal"
all-the-icons-octicon "pulse"
:height 1.0 :v-adjust 0.0 :face all-the-icons-blue
))
(defvar tidal-boot-script-path "c:/Users/{User}/AppData/Roaming/Cabal/x86_64-windows-ghc-8.10.3/tidal-1.6.1/BootTidal.hs"
;; (let ((filepath
;; (cond
;; ((string-equal system-type "windows-nt")
;; '(("path" . "echo off && for /f %a in ('ghc-pkg latest tidal') do (for /f \"tokens=2\" %i in ('ghc-pkg describe %a ^| findstr data-dir') do (echo %i))")
;; ("separator" . "\\")
;; ))
;; ((or (string-equal system-type "darwin") (string-equal system-type "gnu/linux"))
;; '(("path" . "ghc-pkg field tidal data-dir")
;; ("separator" . "/")
;; ))
;; )
;; ))
;; (concat
;; (string-trim (cadr (split-string
;; (shell-command-to-string (cdr (assoc "path" filepath))) ":")))
;; (cdr (assoc "separator" filepath))
;; "BootTidal.hs")
;; )
;; "*Full path to BootTidal.hs (inferred by introspecting ghc-pkg package db)."
)
(add-to-list 'load-path "~/Tidal")
(require 'haskell-mode)
(require 'tidal)
(global-set-key (kbd "C-c d") 'dirt-samples-toggle)
;; WIP: SuperColliderをEmacsから起動
(add-to-list 'load-path "~/.emacs.d/myel/boot-sc")
(with-eval-after-load "tidal"
(require 'boot-sc)
(define-key tidal-mode-map (kbd "C-c s s") 'sclang-start)
(define-key tidal-mode-map (kbd "C-c s q") 'sclang-quit))
(use-package neotree
:init
(setq-default neo-keymap-style 'concise)
:config
(setq neo-smart-open t)
(setq neo-create-file-auto-open t)
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
(bind-key [f8] 'neotree-toggle)
(bind-key "RET" 'neotree-enter-hide neotree-mode-map)
(bind-key "a" 'neotree-hidden-file-toggle neotree-mode-map)
(bind-key "<left>" 'neotree-select-up-node neotree-mode-map)
(bind-key "<right>" 'neotree-change-root neotree-mode-map))
(defun neotree-text-scale ()
"Text scale for neotree."
(interactive)
(text-scale-adjust 0)
(text-scale-decrease 1)
(message nil))
(add-hook 'neo-after-create-hook
(lambda (_)
(call-interactively 'neotree-text-scale)))
;; neotree enter hide
;; Tips from https://github.com/jaypei/emacs-neotree/issues/77
(defun neo-open-file-hide (full-path &optional arg)
"Open file and hiding neotree.
The description of FULL-PATH & ARG is in `neotree-enter'."
(neo-global--select-mru-window arg)
(find-file full-path)
(neotree-hide))
(defun neotree-enter-hide (&optional arg)
"Neo-open-file-hide if file, Neo-open-dir if dir.
The description of ARG is in `neo-buffer--execute'."
(interactive "P")
(neo-buffer--execute arg 'neo-open-file-hide 'neo-open-dir))
(defun open-dirt-samples ()
(interactive)
(neo-global--open-dir "c:/Users/{User}/AppData/Local/SuperCollider/downloaded-quarks/Dirt-Samples"))
(defun dirt-samples-toggle ()
"Toggle show the NeoTree window."
(interactive)
(if (neo-global--window-exists-p)
(neotree-hide)
(open-dirt-samples)))
https://tidalcycles.org/docs/patternlib/tutorials/cycles#convert-between-bpm-and-cps
-- BPM 120
setcps (120/60/4)
d1 $ s "supersaw(5, 8)"
#n "[c4, e4, g4, <a4 b4>]"
#sustain "[0.1 0.2 0.1 0.4]*2"
hush
-- 1. [0|0|0|0|0|0|0|0]
-- 2. [1|0|1|0|1|0|1|1]
d2 $stack[
-- s "ifdrums(5, 8)" #n (run 3),
s "supersaw(5, 8, 3)"
#n "[c4, e4, g4, <a4 b4>]"
#sustain "1"
#room "0.7"
#gain "0.5"
]
hush
d3 $ s "supercomparator(5, 8, 3)"
#n "[c4, e4, g4, <a4 b4>]"
hush
d4 $ stack
s "supernoise*2" #n "[c5]" #sustain "0.1"
]
d3 $ s "supersaw(2, 4)"
#n "[c4, e4, <a4 b4>]"
#sustain "0.2"
hush
d1 $stack[
s "clubkick(5, 8, 3)" #n "1" #lpf 1000,
s "<~ bass ~ bass, bass(3, 8)>" #n "1",
s "hh(9, 16)"
]