這份文件是**2023年度C-LAB Creators《Live Coding 研究推廣計畫》** 工作坊補充資料與常用連結彙整。內容包含工作坊使用到的以下兩種音樂軟體 [TOC] ## TidalCycles ### 學習資源 * TidalCycles網頁中的教學影片[Tutorial](https://tidalcycles.org/docs/patternlib/tutorials/course1)是最推薦的起點,很適合工作坊後繼續探索。由TidalCycles的主要開發者Alex McLean親自解說,另外還有這份教材的線上討論區[(目錄1](https://club.tidalcycles.org/t/weeks-1-4-index/395)[ 目錄2)](https://club.tidalcycles.org/t/weeks-5-8-index/1345),每個章節皆有練習挑戰與網友的創意回饋。另外一份由Lucy Cheesman編寫的[工作坊教學](https://tidalcycles.org/docs/patternlib/tutorials/workshop)也是很好的初學參考資料。 * Documentation與Reference是經常重複訪問的頁面 * [Documentation | Tidal Cycles](https://tidalcycles.org/docs/ "Documentation Reference | Tidal Cycles | Tidal Cycles") * [Reference | Tidal Cycles](https://tidalcycles.org/docs/reference/cycles "Cycles | Tidal Cycles") * TidalCycles舊網站上的內容也很豐富,如果你想研究、復盤早期的代碼,舊網站與討論區是你的好幫手。 * https://userbase.tidalcycles.org/Userbase.html * [Patterns I Have Known and Loved - Alex Mclean](https://github.com/yaxu/pihkal/blob/master/pihkal.pdf) * 波特蘭社區學院 (Portland Community College) 資助計畫 pdxOpenTech製作的Estaury教材。Estaury是工作坊中使用的簡易版TidalCycles。 [AlgoMusic II: TidalCycles, MIDI, and Beyond - pdxOpenTech](https://pdxopen.tech/courses/algomusic-ii-tidalcycles-midi-and-beyond/ "AlgoMusic II: TidalCycles, MIDI, and Beyond - pdxOpenTech") * 程式設計師兼電子音樂人Kindohm (Mike Hodnick)的[youtube頻道](https://www.youtube.com/@kindohm/playlists)有許多TidalCycles的教學與直播存檔。Kindohm自成一格的寫作創意將現場性與音樂表現平衡得很好,他常透過MIDI串聯硬體的電子合成器,將TidalCycles當作一個可編碼的序列器。如果你喜歡他的音樂 [Kindohm Live @ ICLC 2016, Hamilton, Ontario](https://www.youtube.com/watch?v=smQOiFt8e4Q "Kindohm Live @ ICLC 2016, Hamilton, Ontario - YouTube")千萬別錯過這個頻道。<iframe style="border: 0; width: 100%; height: 120px;" src="https://bandcamp.com/EmbeddedPlayer/album=2609768379/size=large/bgcol=ffffff/linkcol=0687f5/tracklist=false/artwork=small/transparent=true/" seamless><a href="https://conditionalrecs.bandcamp.com/album/risc-chip">RISC Chip by Kindohm</a></iframe> 2016年發行的《RISC Chip》將專輯代碼與聲音採樣上線,好比提供了整張電子音樂的樂譜,之後的人可重新演繹、改寫、演出。 https://github.com/kindohm/risc-chip ### 常用連結與功能表單 * TidalCycles 中提供的聲音取樣,想不起來、不知道還有哪些聲音可用嗎? 這裡可以找到所有聲音的名稱。 [tidalcycles/Dirt-Samples: Set of samples used in Dirt](https://github.com/tidalcycles/Dirt-Samples "tidalcycles/Dirt-Samples: Set of samples used in Dirt") * TidalCycles單機版可以用chordList、scaleList列出合聲和音階表,不過在Estaury裡沒有這項功能,因此將chordList(和聲)、scaleList(音階)、arpmode(琶音模式)列出。 * 和聲表 ``` major maj aug plus sharp5 six 6 sixNine six9 sixby9 6by9 major7 maj7 major9 maj9 add9 major11 maj11 add11 major13 maj13 add13 dom7 dom9 dom11 dom13 sevenFlat5 7f5 sevenSharp5 7s5 sevenFlat9 7f9 nine eleven 11 thirteen 13 minor min diminish ed dim minorSharp5 msharp5 mS5 minor6 min6 m6 minorSixNine minor69 min69 minSixNine m69 mSixNine m6by9 minor7flat5 min7f lat5 m7flat5 m7f5 minor7 min7 m7 minor7sharp5 min7sharp5 m7sharp5 m7s5 minor7flat9 min7flat9 m7flat9 m7f9 minor7sharp9 m in7sharp9 m7sharp9 m7s9 diminished7 dim7 minor9 min9 m9 minor11 min11 m11 minor13 min13 m13 one 1 five 5 sus2 sus4 seven Sus2 7sus2 sevenSus4 7sus4 nineSus4 ninesus4 9sus4 sevenFlat10 7f10 nineSharp5 9s5 m9sharp5 m9s5 sevenSharp5flat9 7s5f9 m7sharp5flat9 elevenSharp 11s m11sharp m11s ``` * 音階表 ``` minPent majPent ritusen egyptian kumai hirajoshi iwato chinese indian pelog prometheus scriabin gong shang jiao zhi yu whole wholetone augmented augmented2 hexMajor7 hexDorian hexPhrygian hexSus hexMajor6 hexAeolian major ionian dorian phrygian lydian mixolydian aeolian minor locrian harmonicMinor harmonicMajor melodicMinor melodicMinorDesc melodicMajor bartok hindu todi purvi marva bhairav ahirbhairav superLocrian romanianMinor hungarianMinor neapolitanMinor enigmatic spanish leadingWhole lydianMinor neapolitanMajor locrianMajor diminished octatonic diminished2 octatonic2 messiaen1 messiaen2 messiaen3 messiaen4 messiaen5 messiaen6 messiaen7 chromatic bayati hijaz sikah rast saba iraq ``` * 琶音模式 ``` up down updown downup up&down down&up converge diverge disconverge pinkyup pinkyupdown thumbup thumbupdown ``` * 歐幾里得節奏算法 * [Tutorial - euclidean-sequences | Tidal Cycles](https://tidalcycles.org/docs/getting-started/tutorial/#euclidean-sequences "Tutorial | Tidal Cycles") * [合成少數派-來了來了,地表最強的中文歐幾里得節奏教程_嗶哩嗶哩](https://www.bilibili.com/video/BV1AZ4y1q7ab/?vd_source=28325c4d248513b84f6aac064f0b10e2 "来了来了,地表最强的中文欧几里得节奏教程_哔哩哔哩_bilibili") * 世界民樂節奏的歐幾里得表示法 來源 : The Euclidean Algorithm Generates Traditional Musical Rhythms by Toussaint [(pdf)](http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf) ``` (2,5) : 十三世紀的波斯節奏 Khafif-e-ramal。 (3,4):哥倫比亞 Cumbia 和千里達及多巴哥 Calypso 節奏的原型。 (3,5,2):另一種13世紀的波斯 Khafif-e-ramal 節奏,以及羅馬尼亞民間舞蹈節奏。 (3,7) : 保加利亞民間舞蹈中使用的 Ruchenitza 節奏。 (3,8) : 古巴的 tresillo 節奏模式。 (4,7) : 另一種 Ruchenitza 保加利亞民間舞節奏。 (4,9) : 土耳其的 Aksak 阿克薩克節奏。 (4,11) : 法蘭克·扎帕(Frank Zappa)在其作品《Outside Now》中使用的音型。 (5,6) : 約克-薩邁York-Samai,一種流行的阿拉伯節奏。 (5,7) : 納瓦哈特 Nawakhat 節奏,另一種流行的阿拉伯節奏。 (5,8) : 古巴的 cinquillo 節奏。 (5,9) : 阿格薩格-薩邁 Agsag-Samai,一種流行的阿拉伯節奏。 (5,11) : 穆索爾斯基 Moussorgsky 在《展覽會之畫》(Pictures at an Exhibition)中使用的節奏。 (5,12) : 南非兒童歌曲中的文達 Venda 拍手節奏。 (5,16) : 巴西的巴薩諾瓦 Bossa-Nova 節奏。 (7,8) : 用 Bendir(手鼓)演奏的典型節奏。 (7,12) : 西非常見的鈴鐺bell節奏。 (7,16,14) : 巴西的桑巴 Samba 節奏。 (9,16) : 非洲中部地區常見的節奏。 (11,24,14) : 中非阿卡俾格米人Aka Pygmies的節奏。 (13,24,5) : 另一個桑加河上游upper Sangha風格的阿卡俾格米人節奏。 ``` * 如果於主機安裝TidalCycles * BootTidal.hs [The Boot File | Tidal Cycles](https://tidalcycles.org/docs/configuration/boot-tidal "The Boot File | Tidal Cycles") * [TidalCycles Github中提供的模板](https://github.com/tidalcycles/Tidal/blob/main/BootTidal.hs) * 不同編輯器會有不同設置,這是我在VScode編輯器中用的設定 ``` :set -XOverloadedStrings :set prompt "" import Sound.Tidal.Context import System.IO (hSetEncoding, stdout, utf8) hSetEncoding stdout utf8 tidal <- startTidal (superdirtTarget {oLatency = 0.05, oAddress = "127.0.0.1", oPort = 57120}) (defaultConfig {cVerbose = True, cFrameTimespan = 1/20}) :{ let only = (hush >>) p = streamReplace tidal hush = streamHush tidal list = streamList tidal mute = streamMute tidal unmute = streamUnmute tidal unmuteAll = streamUnmuteAll tidal unsoloAll = streamUnsoloAll tidal solo = streamSolo tidal unsolo = streamUnsolo tidal once = streamOnce tidal first = streamFirst tidal asap = once nudgeAll = streamNudgeAll tidal all = streamAll tidal resetCycles = streamResetCycles tidal setCycle = streamSetCycle tidal setcps = asap . cps getcps = streamGetcps tidal getnow = streamGetnow tidal xfade i = transition tidal True (Sound.Tidal.Transition.xfadeIn 4) i xfadeIn i t = transition tidal True (Sound.Tidal.Transition.xfadeIn t) i histpan i t = transition tidal True (Sound.Tidal.Transition.histpan t) i wait i t = transition tidal True (Sound.Tidal.Transition.wait t) i waitT i f t = transition tidal True (Sound.Tidal.Transition.waitT f t) i jump i = transition tidal True (Sound.Tidal.Transition.jump) i jumpIn i t = transition tidal True (Sound.Tidal.Transition.jumpIn t) i jumpIn' i t = transition tidal True (Sound.Tidal.Transition.jumpIn' t) i jumpMod i t = transition tidal True (Sound.Tidal.Transition.jumpMod t) i jumpMod' i t p = transition tidal True (Sound.Tidal.Transition.jumpMod' t p) i mortal i lifespan release = transition tidal True (Sound.Tidal.Transition.mortal lifespan release) i interpolate i = transition tidal True (Sound.Tidal.Transition.interpolate) i interpolateIn i t = transition tidal True (Sound.Tidal.Transition.interpolateIn t) i clutch i = transition tidal True (Sound.Tidal.Transition.clutch) i clutchIn i t = transition tidal True (Sound.Tidal.Transition.clutchIn t) i anticipate i = transition tidal True (Sound.Tidal.Transition.anticipate) i anticipateIn i t = transition tidal True (Sound.Tidal.Transition.anticipateIn t) i forId i t = transition tidal False (Sound.Tidal.Transition.mortalOverlay t) i d1 = p 1 . (|< orbit 0) d2 = p 2 . (|< orbit 1) d3 = p 3 . (|< orbit 2) d4 = p 4 . (|< orbit 3) d5 = p 5 . (|< orbit 4) d6 = p 6 . (|< orbit 5) d7 = p 7 . (|< orbit 6) d8 = p 8 . (|< orbit 7) d9 = p 9 . (|< orbit 8) d10 = p 10 . (|< orbit 9) d11 = p 11 . (|< orbit 10) d12 = p 12 . (|< orbit 11) d13 = p 13 d14 = p 14 d15 = p 15 d16 = p 16 :} :{ let getState = streamGet tidal setI = streamSetI tidal setF = streamSetF tidal setS = streamSetS tidal setR = streamSetR tidal setB = streamSetB tidal :} :set prompt "tidal> " :set prompt-cont "" default (Pattern String, Integer, Double) ``` * startup.scd [Start Tidal | Tidal Cycles](https://tidalcycles.org/docs/getting-started/tidal_start/ "Start Tidal | Tidal Cycles") ``` /* This is an example startup file. You can load it from your startup file (to be found in Platform.userAppSupportDir +/+ "startup.scd") */ ( s.reboot { // server options are only updated on reboot // configure the sound server: here you could add hardware specific options // see http://doc.sccode.org/Classes/ServerOptions.html s.options.numBuffers = 1024 * 256; // increase this if you need to load more samples s.options.memSize = 8192 * 32; // increase this if you get "alloc failed" messages s.options.numWireBufs = 64; // increase this if you get "exceeded number of interconnect buffers" messages s.options.maxNodes = 1024 * 32; // increase this if you are getting drop outs and the message "too many nodes" s.options.numOutputBusChannels = 2; // set this to your hardware output channel size, if necessary s.options.numInputBusChannels = 2; // set this to your hardware output channel size, if necessary // boot the server and start SuperDirt s.waitForBoot { ~dirt = SuperDirt(2, s); // two output channels, increase if you want to pan across more channels ~dirt.loadSoundFiles; // load samples (path containing a wildcard can be passed in) // for example: ~dirt.loadSoundFiles("/Users/myUserName/Dirt/samples/*"); // s.sync; // optionally: wait for samples to be read ~dirt.start(57120, 0 ! 12); // start listening on port 57120, create two busses each sending audio to channel 0 // optional, needed for convenient access from sclang: ( ~d1 = ~dirt.orbits[0]; ~d2 = ~dirt.orbits[1]; ~d3 = ~dirt.orbits[2]; ~d4 = ~dirt.orbits[3]; ~d5 = ~dirt.orbits[4]; ~d6 = ~dirt.orbits[5]; ~d7 = ~dirt.orbits[6]; ~d8 = ~dirt.orbits[7]; ~d9 = ~dirt.orbits[8]; ~d10 = ~dirt.orbits[9]; ~d11 = ~dirt.orbits[10]; ~d12 = ~dirt.orbits[11]; ); }; s.latency = 0.3; // increase this if you get "late" messages }; ); ``` * 網友共編的TidalCycles連結中轉站 [tidalcycles/awesome-tidalcycles: List of awesome things related to the live coding system TidalCycles and its close relatives](https://github.com/tidalcycles/awesome-tidalcycles "tidalcycles/awesome-tidalcycles: List of awesome things related to the live coding system TidalCycles and its close relatives") ## Supercollider TidalCycles透過Supercollider(SC)聲音引擎發聲。 好比食譜與廚師的關係,用tidalcycles寫一份食譜(描述音樂),交由廚師Supercollider將食物做出來(聲音合成、播放)。如果想進一步在SC中製作自己的軟體合成器音源(SynthDef)或是在音軌中添加個人的效果需要一些基本的SC編寫能力。編寫SC代碼須在本機端安裝TidalCycles,如果是網頁版的TidalCycles就沒有改寫SC的空間。下面推薦初學SC好用的教材。 ### 學習資源 [awesome-supercollider](https://github.com/madskjeldgaard/awesome-supercollider)這份由電子音樂家madskjeldgaard編輯的文件有非常詳細的整理,以下是筆者推薦的幾個。 * 伊利諾大學厄巴納香檳分校實驗音樂工作室的Supercollider課程,由Eli Fieldsteel教授主持,多個學期的線上教學影片可在頻道中收看,分為初階、進階和極短篇等不同的系列。 [Eli Fieldsteel - YouTube](https://www.youtube.com/@elifieldsteel/playlists "Eli Fieldsteel - YouTube") * 電子音樂學者Nick Collins的SuperCollider教程 https://composerprogrammer.com/teaching/supercollider/sctutorial/tutorial.html * 薩塞克斯大學Thor Magnusson教授編寫的[《Scoring Sound : Creative Music Coding with SuperCollider》](https://leanpub.com/ScoringSound "Scoring Sound by Thor Magnusson [Leanpub PDF/iPad/Kindle]") 提供線上閱讀和購買支持。此外、工作坊中用到的Threnoscope也是由Thor Magnusson教授設計。 * [Fredrik Olofsson Musikproduktion f0blog tweets](https://fredrikolofsson.com/f0blog/tweets/ ". . Fredrik Olofsson Musikproduktion . . f0blog tweets") SC tweet是用極短字數編寫聲響的行為,以140個字符為上限,這個數字是社群網站twitter誕生時的字數限制,在twitter上分享SC代碼的文化不斷延續到今日。[^1] [^1]: 《Be Brief: Convergences and Possibilities of Live-Coding and sctweeting》by Martins, Felipe M., & Padovani, José Henrique. https://zenodo.org/record/7843864 這篇文章中深入探討了SCtweeting與live coding兩種行為之間的異同。 * sccode supercollider程式碼分享站 [SuperCollider Code](https://sccode.org/ "SuperCollider Code") ### SynthDef for Tidal 偏好純電子合成的聲響勝過採樣音源(Sampling)嗎? Supercollider中可以用SynthDef製作聲音合成器,像是模仿、重組經典鼓機或合成器、樂器的音色等等。SynthDef可在TidalCycles中使用,聲音的參數也能透過TidalCycles調變。 * [Week 5, lesson 3 - adding and using superdirt synths ](https://club.tidalcycles.org/t/week-5-lesson-3-adding-and-using-superdirt-synths/1115 "Week 5, lesson 3 - adding and using superdirt synths - Learning Tidalcycles course / Week 5 - notes, chords, arpeggios and Algoraoke - Tidal Club") * [SynthDefs for Tidal - Resources - Tidal Club](https://club.tidalcycles.org/t/synthdefs-for-tidal/1092 "SynthDefs for Tidal - Resources - Tidal Club") * [Eris Fairbanks - [for Tidal Club] Making your own synths ](https://www.youtube.com/watch?v=qZKDI8sVy8Q)