-
Notifications
You must be signed in to change notification settings - Fork 1
/
example-session.js
58 lines (47 loc) · 1.56 KB
/
example-session.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// --------------------------------------------------------------------------
// -- romanNumeral.js
// -- initial author: Renick Bell ([email protected])
// -- initial creation date: Thu Jun 8 10:11 AM CST 2023
// -- contributors: Yiler Huang ([email protected]); Steve Wang ([email protected])
// -- license: GPL 3.0
// --------------------------------------------------------------------------
.load ./steve-mod-konduktiva/modified-konduktiva-revised.js
.load ./steve-mod-konduktiva/testingKonduktiva-revised.js
.load ./steve-mod-konduktiva/konduktiva-superdirt-revised.js
.load ./steve-mod-konduktiva/defaultsuperdirtplayers-revised.js
.load ./utilities-general.js
.load ./utilities-array.js
.load ./midi.js
.load ./rhythm.js
.load ./configure-konduktiva.js
setupScheduler(e)
e.startScheduler()
const easymidi = require('easymidi');
const {
Chord,
Interval,
Note,
Scale,
Key,
Progression,
Midi
} = require("tonal")
updateMidiOutputList(e)
let progression = ["IIm9", "IIm9", "V", "V", "IIIm7", "IIIm7", "VIm","VIm"]
let chords = generateChords("D", 5, progression)
let iois = [1,1,1,1]
generateMidiInfoData2 = {
velocity: buildArray(8, ((x) => {
return steveRandomRange(80, 110)
})),
IoIs: iois,
bools: [true, true, true, true],
music: generateChords("C", 5,generateChordProgression(iois, "C", 0.5)),
total: 8,
type: "chords"
}
e.changeTempo(113)
let beats = [0,1,2,3]
assignPlayerForMusicSynthesizerSession(1, generateMidiInfoData2, beats, 1)
e.play('musicSynthesizerSession1')
e.stop("musicSynthesizerSession1")