Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ikoamu committed Sep 12, 2024
1 parent 8c93471 commit ec026f6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
7 changes: 4 additions & 3 deletions 20240902004634-org_modeとlivecoding.org
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ https://tidalcycles.org/
** さっそく音を鳴らしてみる

#+begin_src tidal :results silent
d1 $ sound "bd:0 sd:1"
d1 $ sound "bd sd"
#+end_src

- bd: バスドラム
Expand All @@ -192,6 +192,7 @@ d1 $ sound "bd:0 sd:1"
d1 $ sound "bd sd"
#+end_src

#+ATTR_ORG: :width 700
[[file:./img/bd_sn.svg]]

*** tidalcyclesのサイクルという概念
Expand All @@ -209,7 +210,7 @@ d1 $ sound "bd sd"
d1 $ sound "bd"

-- ベース
d2 $ sound "bd"
-- d2 $ sound "bd"
-- メロディー
--d3 $ sound "cp"
#+end_src
Expand All @@ -218,7 +219,7 @@ d1 $ sound "bd sd"
: tidal>

#+begin_src tidal :results silent
setcps (155/60/4)
setcps (150/60/4)
#+end_src

基本的にはこんな感じ
Expand Down
34 changes: 20 additions & 14 deletions 20240903214432-org_babelでtidalcyclesを実行したい.org
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,30 @@
https://github.com/ikoamu/ob-tidalcycles/blob/main/ob-tidalcycles.el

#+begin_src elisp
(defun org-babel-execute:tidal (body params)
"Execute a block of Tidal Cycles code with org-babel.
This function is called by `org-babel-execute-src-block'"
(interactive)
(let ((result (ignore-errors
(tidal-send-string "hush") t)))
(unless result (tidal-start-haskell)))
(tidal-send-string ":{")
(tidal-send-string body)
(tidal-send-string ":}")
;; result is always tidal>
"tidal>")
(defun org-babel-execute:tidal (body params)
"Execute a block of Tidal Cycles code with org-babel.
This function is called by `org-babel-execute-src-block'"
(interactive)
;(let ((result (ignore-errors
; (tidal-send-string "hush") t)))
; (unless result (tidal-start-haskell)))
(tidal-send-string ":{")
(tidal-send-string body)
(tidal-send-string ":}")
;; result is always tidal>
"tidal>")
#+end_src

#+RESULTS:
: org-babel-execute:tidal

#+header :nohash yes
#+begin_src tidal
-- d1 $ sound "bd"
hush
-- d1 $ sound "bd*8"

#+end_src

#+RESULTS:
: tidal>

* headerをつけたい
Binary file modified org-roam.db
Binary file not shown.

0 comments on commit ec026f6

Please sign in to comment.