Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| creating-players [2024/02/29 18:29] – steve.wang | creating-players [2024/03/18 20:22] (current) – [Example] steve.wang | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| **Overview: ** This tutorial will teach you how to create your own players like the ones that came with the example MusicalEnvironment. | **Overview: ** This tutorial will teach you how to create your own players like the ones that came with the example MusicalEnvironment. | ||
| - | **Things To Note:** This tutorial assumes you have already installed Konduktiva successfully using the [[https:// | + | **Things To Note:** This tutorial assumes you have already installed Konduktiva successfully using the [[https:// |
| + | <code javascript> | ||
| + | const K = require(' | ||
| + | let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject, | ||
| + | </ | ||
| Line 130: | Line 134: | ||
| // | // | ||
| simpleMelodyData.velocity = [100, 100, 100, 100] | simpleMelodyData.velocity = [100, 100, 100, 100] | ||
| - | simpleMelodyData.rhythmMap = [1, 2, 3, 4] | + | simpleMelodyData.rhythmMap = [1, 1, 1, 1] |
| simpleMelodyData.noteValues = [[1], [2], [3], [4]] | simpleMelodyData.noteValues = [[1], [2], [3], [4]] | ||
| simpleMelodyData.rootMap = [ ' | simpleMelodyData.rootMap = [ ' | ||
| //Add it to MuiscalEnvironment: | //Add it to MuiscalEnvironment: | ||
| - | recordConfigurationDataIntoMusicalEnvironment(simpleMelodyData, | + | K.recordConfigurationDataIntoMusicalEnvironment(simpleMelodyData, |
| </ | </ | ||
| Line 166: | Line 170: | ||
| // | // | ||
| simpleMelodyData.velocity = [100, 100, 100, 100] | simpleMelodyData.velocity = [100, 100, 100, 100] | ||
| - | simpleMelodyData.rhythmMap = [1, 2, 3, 4] | + | simpleMelodyData.rhythmMap = [1, 1, 1, 1] |
| simpleMelodyData.noteValues = [[1], [2], [3], [4]] | simpleMelodyData.noteValues = [[1], [2], [3], [4]] | ||
| simpleMelodyData.rootMap = [ ' | simpleMelodyData.rootMap = [ ' | ||
| Line 178: | Line 182: | ||
| //make or modify player to use info: | //make or modify player to use info: | ||
| K.assignPlayerForMusicSynthesizerMidiOutput(e, | K.assignPlayerForMusicSynthesizerMidiOutput(e, | ||
| + | //configure legatoMap: | ||
| + | e.players.exampleMidiPlayer1.legatoMap = ' | ||
| //signal to player to start playing: | //signal to player to start playing: | ||