creating-players

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
creating-players [2024/03/10 20:01] steve.wangcreating-players [2024/03/18 20:22] (current) – [Example] steve.wang
Line 5: Line 5:
 **Things To Note:** This tutorial assumes you have already installed Konduktiva successfully using the [[https://github.com/renickbell/konduktiva|Konduktiva installation]] instructions and have read through and understood the [[:first_steps|first steps tutorial]]. The tutorial also assumes 2 things. One, Konduktiva has been assigned to the //K// variable. Two, user created a Musical Environment using the //setUpMusicalEnvironment// function using //K.defaultConfigurationObject// as the first argument and //'exampleMidiPlayer'// as the third argument then, assigned the output to the //e// variable. **Things To Note:** This tutorial assumes you have already installed Konduktiva successfully using the [[https://github.com/renickbell/konduktiva|Konduktiva installation]] instructions and have read through and understood the [[:first_steps|first steps tutorial]]. The tutorial also assumes 2 things. One, Konduktiva has been assigned to the //K// variable. Two, user created a Musical Environment using the //setUpMusicalEnvironment// function using //K.defaultConfigurationObject// as the first argument and //'exampleMidiPlayer'// as the third argument then, assigned the output to the //e// variable.
 <code javascript> <code javascript>
-let K = require('./src/combined.js') +const K = require('konduktiva') 
-let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject,4,'exampleMidiPlayer')+let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject,4,'exampleMidiPlayer', K.exampleMusicalEnvironmentsExtraConfig)
 </code> </code>
  
Line 134: Line 134:
 //K.simpleMelodyDataTemplate is a simple template of a configuration object //K.simpleMelodyDataTemplate is a simple template of a configuration object
 simpleMelodyData.velocity = [100, 100, 100, 100] simpleMelodyData.velocity = [100, 100, 100, 100]
-simpleMelodyData.rhythmMap = [1, 234]+simpleMelodyData.rhythmMap = [1, 111]
 simpleMelodyData.noteValues = [[1], [2], [3], [4]] simpleMelodyData.noteValues = [[1], [2], [3], [4]]
 simpleMelodyData.rootMap = [ 'C', 'C', 'C', 'C' ] simpleMelodyData.rootMap = [ 'C', 'C', 'C', 'C' ]
Line 170: Line 170:
 //K.simpleMelodyDataTemplate is a simple template of a configuration object //K.simpleMelodyDataTemplate is a simple template of a configuration object
 simpleMelodyData.velocity = [100, 100, 100, 100] simpleMelodyData.velocity = [100, 100, 100, 100]
-simpleMelodyData.rhythmMap = [1, 234]+simpleMelodyData.rhythmMap = [1, 111]
 simpleMelodyData.noteValues = [[1], [2], [3], [4]] simpleMelodyData.noteValues = [[1], [2], [3], [4]]
 simpleMelodyData.rootMap = [ 'C', 'C', 'C', 'C' ] simpleMelodyData.rootMap = [ 'C', 'C', 'C', 'C' ]
Line 182: Line 182:
 //make or modify player to use info: //make or modify player to use info:
 K.assignPlayerForMusicSynthesizerMidiOutput(e, 'p1','exampleMidiPlayer1') K.assignPlayerForMusicSynthesizerMidiOutput(e, 'p1','exampleMidiPlayer1')
 +//configure legatoMap:
 +e.players.exampleMidiPlayer1.legatoMap = 'default'
  
 //signal to player to start playing: //signal to player to start playing:
  • creating-players.1710126074.txt.gz
  • Last modified: 2024/03/10 20:01
  • by steve.wang