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 [2025/07/29 03:03] (current) – 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: | ||
| Line 122: | Line 121: | ||
| {{ : | {{ : | ||
| - | [[http:// | + | [[https:// |