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

Commit ed86d1b

Browse files
examples, remove footgun in dataset class
1 parent 9463932 commit ed86d1b

3 files changed

Lines changed: 183 additions & 10 deletions

File tree

examples/notochord/generate-demo.scd

Lines changed: 179 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ Quarks.install("API")
262262
~last_event_time = nil;
263263

264264
// choose instruments for the player and Notochord
265-
~player_inst = 21;
266-
~include_instrument = [12];
265+
~player_inst = 12;
266+
~include_instrument = [55, 120,]; //notochord instruments
267267
~allow_end = true;
268268

269269
~instrument_temp = 1;
@@ -278,14 +278,185 @@ Quarks.install("API")
278278
~clear_prediction.();
279279
~output.releaseAll;
280280
~noto.reset;
281-
Routine{4.sleep; ~gate = true}.play;
281+
Routine{5.sleep; ~gate = true}.play;
282282
)
283283

284-
285284
~hush.()
286285

287-
288-
289-
290-
286+
/*
287+
Piano
288+
289+
1 Acoustic Grand Piano
290+
2 Bright Acoustic Piano
291+
3 Electric Grand Piano
292+
4 Honky-tonk Piano
293+
5 Electric Piano 1 (usually a Rhodes Piano)
294+
6 Electric Piano 2 (usually an FM piano patch)
295+
7 Harpsichord
296+
8 Clavinet
297+
298+
Chromatic Percussion
299+
300+
9 Celesta
301+
10 Glockenspiel
302+
11 Music Box
303+
12 Vibraphone
304+
13 Marimba
305+
14 Xylophone
306+
15 Tubular Bells
307+
16 Dulcimer
308+
309+
Organ
310+
311+
17 Drawbar Organ
312+
18 Percussive Organ
313+
19 Rock Organ
314+
20 Church Organ
315+
21 Reed Organ
316+
22 Accordion
317+
23 Harmonica
318+
24 Tango Accordion
319+
320+
Guitar
321+
322+
25 Acoustic Guitar (nylon)
323+
26 Acoustic Guitar (steel)
324+
27 Electric Guitar (jazz)
325+
28 Electric Guitar (clean)
326+
29 Electric Guitar (muted)
327+
30 Electric Guitar (overdriven)
328+
31 Electric Guitar (distortion)
329+
32 Electric Guitar (harmonics)
330+
331+
Bass
332+
333+
33 Acoustic Bass
334+
34 Electric Bass (finger)
335+
35 Electric Bass (picked)
336+
36 Fretless Bass
337+
37 Slap Bass 1
338+
38 Slap Bass 2
339+
39 Synth Bass 1
340+
40 Synth Bass 2
341+
342+
Strings
343+
344+
41 Violin
345+
42 Viola
346+
43 Cello
347+
44 Contrabass
348+
45 Tremolo Strings
349+
46 Pizzicato Strings
350+
47 Orchestral Harp
351+
48 Timpani
352+
353+
Ensemble
354+
355+
49 String Ensemble 1
356+
50 String Ensemble 2
357+
51 Synth Strings 1
358+
52 Synth Strings 2
359+
53 Choir Aahs
360+
54 Voice Oohs (or Doos)
361+
55 Synth Voice or Solo Vox
362+
56 Orchestra Hit
363+
364+
Brass
365+
366+
57 Trumpet
367+
58 Trombone
368+
59 Tuba
369+
60 Muted Trumpet
370+
61 French Horn
371+
62 Brass Section
372+
63 Synth Brass 1
373+
64 Synth Brass 2
374+
375+
Reed
376+
377+
65 Soprano Sax
378+
66 Alto Sax
379+
67 Tenor Sax
380+
68 Baritone Sax
381+
69 Oboe
382+
70 English Horn
383+
71 Bassoon
384+
72 Clarinet
385+
386+
Pipe
387+
388+
73 Piccolo
389+
74 Flute
390+
75 Recorder
391+
76 Pan Flute
392+
77 Blown bottle
393+
78 Shakuhachi
394+
79 Whistle
395+
80 Ocarina
396+
397+
Synth Lead
398+
399+
81 Lead 1 (square)
400+
82 Lead 2 (sawtooth)
401+
83 Lead 3 (calliope)
402+
84 Lead 4 (chiff)
403+
85 Lead 5 (charang, a guitar-like lead)
404+
86 Lead 6 (space voice)
405+
87 Lead 7 (fifths)
406+
88 Lead 8 (bass and lead)
407+
408+
Synth Pad
409+
410+
89 Pad 1 (new age or fantasia, a warm pad stacked with a bell)
411+
90 Pad 2 (warm)
412+
91 Pad 3 (polysynth or poly)
413+
92 Pad 4 (choir)
414+
93 Pad 5 (bowed glass or bowed)
415+
94 Pad 6 (metallic)
416+
95 Pad 7 (halo)
417+
96 Pad 8 (sweep)
418+
419+
Synth Effects
420+
421+
97 FX 1 (rain)
422+
98 FX 2 (soundtrack, a bright perfect fifth pad)
423+
99 FX 3 (crystal)
424+
100 FX 4 (atmosphere, usually a nylon-like sound)
425+
101 FX 5 (brightness)
426+
102 FX 6 (goblins)
427+
103 FX 7 (echoes or echo drops)
428+
104 FX 8 (sci-fi or star theme)
429+
430+
Ethnic
431+
432+
105 Sitar
433+
106 Banjo
434+
107 Shamisen
435+
108 Koto
436+
109 Kalimba
437+
110 Bag pipe
438+
111 Fiddle
439+
112 Shanai
440+
441+
Percussive
442+
443+
113 Tinkle Bell
444+
114 Agogô
445+
115 Steel Drums
446+
116 Woodblock
447+
117 Taiko Drum
448+
118 Melodic Tom or 808 Toms
449+
119 Synth Drum
450+
120 Reverse Cymbal
451+
452+
Sound Effects
453+
454+
121 Guitar Fret Noise
455+
122 Breath Noise
456+
123 Seashore
457+
124 Bird Tweet
458+
125 Telephone Ring
459+
126 Helicopter
460+
127 Applause
461+
128 Gunshot*/
291462

examples/notochord/tidalcycles/notochord-demo.tidal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
-- Notochord demo patterns
22

33

4+
hush
5+
46
do
57
p "choosepitch"
68
$ ncinst " 8 [ 13*3 [17 27 ]]"

notochord/notochord/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from torch.utils.data import Dataset, DataLoader
88

99
class MIDIDataset(Dataset):
10-
def __init__(self, data_dir, batch_len, transpose=5, speed=0.1, glob='**/*.pkl', test_len=1024):
10+
def __init__(self, data_dir, batch_len, transpose=5, speed=0.1, glob='**/*.pkl', test_len=2048):
1111
#, clamp_time=(-,10)):
1212
"""
1313
"""
@@ -21,7 +21,7 @@ def __init__(self, data_dir, batch_len, transpose=5, speed=0.1, glob='**/*.pkl',
2121
self.prog_start_token = 0
2222
# self.clamp_time = clamp_time
2323
self.testing = False
24-
self.max_test_len = 2048
24+
self.max_test_len = test_len
2525

2626
def __len__(self):
2727
return len(self.files)

0 commit comments

Comments
 (0)