Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
action-functions [2024/03/18 20:23] – steve.wang | action-functions [2024/04/24 17:37] (current) – [midiSequencedRhythm/callMusicSynthesizerRhythm:] steve.wang | ||
---|---|---|---|
Line 7: | Line 7: | ||
const K = require(' | const K = require(' | ||
let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject, | let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject, | ||
- | |||
</ | </ | ||
Line 40: | Line 39: | ||
==== default: ==== | ==== default: ==== | ||
{{ : | {{ : | ||
- | ==== midiSequencedRhythm/ | ||
- | {{ : | ||
==== sendNotesMidiInfo: | ==== sendNotesMidiInfo: | ||
Line 62: | Line 59: | ||
<code javascript> | <code javascript> | ||
const K = require(' | const K = require(' | ||
- | let e = K.setUpMusicalEnvironment(1) | + | let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject, |
</ | </ | ||
Line 76: | Line 73: | ||
console.log(' | console.log(' | ||
console.log(' | console.log(' | ||
- | console.log(' | + | console.log(' |
} | } | ||
</ | </ | ||
+ | |||
+ | Notice we did not use b argument. The b argument is for next onset. To get beat use e.currentBeat(). | ||
Next we have to make it so the players in the MusicalEnvironment can use it. To do so, we have the add it to the actions object of the MusicalEnvironment: | Next we have to make it so the players in the MusicalEnvironment can use it. To do so, we have the add it to the actions object of the MusicalEnvironment: |