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

Commit 91768ad

Browse files
scd changes
1 parent 51c3c3a commit 91768ad

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

examples/notochord/generate-demo.scd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Quarks.install("API")
55
(
66
///////// create Notochord API object /////////
77
~noto = Notochord();
8-
~noto.notochordPath = "/Users/victor/Downloads/notochord_lakh_20G.ckpt";
8+
// ~noto.notochordPath = "/Users/victor/Downloads/notochord_lakh_20G.ckpt";
9+
~noto.notochordPath = "/Users/victor/notochord_lakh_23G.pt";
910
// ~noto.notochordPath = "/Users/victor/Downloads/1368.ckpt";
1011
~noto.startNotochord; // run notochord in a terminal
1112
)

examples/notochord/profile.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import fire
1111
from time import time, sleep
1212

13-
def main(checkpoint=None, n=10, warm=5, wait=0):
13+
def main(checkpoint=None, n=30, warm=10, wait=0):
1414
nc = Notochord.from_checkpoint(checkpoint)
1515
nc.eval()
1616
feed_t = query_t = predict_t = 0
@@ -34,7 +34,7 @@ def once():
3434

3535
nonlocal feed_t, query_t, predict_t, r
3636
time
37-
sleep(0.1)
37+
# sleep(0.1)
3838
t = time()
3939
r = nc.predict(
4040
inst=r['instrument'], pitch=r['pitch'],
@@ -43,18 +43,18 @@ def once():
4343
print(r)
4444
predict_t += time() - t
4545

46-
# t = time()
47-
# nc.feed(
48-
# inst=r['instrument'], pitch=r['pitch'],
49-
# time=r['time'], vel=r['velocity'])
50-
# feed_t += time() - t
46+
t = time()
47+
nc.feed(
48+
inst=r['instrument'], pitch=r['pitch'],
49+
time=r['time'], vel=r['velocity'])
50+
feed_t += time() - t
5151

52-
# t = time()
53-
# r = nc.query(
54-
# pitch_temp=0.5, rhythm_temp=0.5, timing_temp=0.1)
55-
# print(r)
56-
# query_t += time() - t
57-
# # print(r.keys())
52+
t = time()
53+
r = nc.query(
54+
pitch_temp=0.5, rhythm_temp=0.5, timing_temp=0.1)
55+
print(r)
56+
query_t += time() - t
57+
# print(r.keys())
5858

5959
for _ in range(warm):
6060
once()

0 commit comments

Comments
 (0)