Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.

Commit 58d7aac

Browse files
support legato
1 parent 71bf81e commit 58d7aac

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

examples/notochord/tidalcycles/notochord.tidal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ p "choosepitch"
55
$ ncinst "7 [9*3 [17 25]]"
66
# ncpitch "-1 [48 -1]"
77
# ncvel (range 30 120 $ sine)
8-
# cps 1
8+
# cps 1
9+
# legato 4
910

1011
hush
1112

@@ -14,6 +15,7 @@ p "chooseinst"
1415
<| ncpitch (run 8 + 48)
1516
# ncvel (range 30 120 $ sine)
1617
# cps 1
18+
# legato 0.5
1719

1820
hush
1921

examples/notochord/tidalcycles/tidal-notochord.scd

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ thisProcess.openUDPPort(6789); // from tidal
33
~python = NetAddr.new("127.0.0.1", 9999); // to python
44
)
55

6+
// (
7+
// s.waitForBoot{
8+
// ~dirt = SuperDirt.new;
9+
// ~dirt.loadSoundFiles("~/Music/sample/dirt/*");
10+
// ~dirt.start(57120);
11+
// }
12+
// )
13+
614

715
// for sending MIDI to ableton
816
(
@@ -90,6 +98,7 @@ MIDIClient.init;
9098
OSCdef(\from_tidal, {
9199
arg msg, time, src;
92100
var args = Dictionary.newFrom(msg[1..]);
101+
var delta = args[\delta] * (args[\legato]?1);
93102
// `time` is the start time
94103
// args[\delta] is the duration
95104
\tidal_feed.postln;
@@ -116,7 +125,7 @@ OSCdef(\from_tidal, {
116125
// is 'frozen' and ready to (query_)feed notochord.
117126

118127
~schedule_events.(
119-
time, args[\delta], args[\ncinst], args[\ncpitch], args[\ncvel]
128+
time, delta, args[\ncinst], args[\ncpitch], args[\ncvel]
120129
);
121130
}
122131

@@ -144,14 +153,14 @@ OSCdef(\from_tidal, {
144153

145154
// if any parts not determined
146155
~any_missing.(event).if{
147-
// query_feed
156+
// query_feed notochord
148157
// include handle to event for writing the result
149158
~python.sendMsg(
150159
"/notochord/query_feed", \handle, handle,
151160
*~event_to_query.(event)
152161
)
153162
}{
154-
// else feed
163+
// else just feed notochord
155164
~python.sendMsg(
156165
"/notochord/feed", *event.asPairs
157166
)
@@ -232,6 +241,8 @@ OSCdef(\from_python, {
232241

233242
}, "notochord/query_return");
234243

244+
~python.sendMsg("/notochord/reset");
245+
~release_all.(0);
235246
)
236247

237248

0 commit comments

Comments
 (0)