Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| first_steps [2024/02/25 18:55] – steve.wang | first_steps [2025/08/01 22:39] (current) – steve.wang | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== First Steps with Konduktiva====== | ====== First Steps with Konduktiva====== | ||
| **Overview: ** This tutorial will act as a guide about how to get started after installating Konduktiva. See how to [[https:// | **Overview: ** This tutorial will act as a guide about how to get started after installating Konduktiva. See how to [[https:// | ||
| + | |||
| + | To check the version of Konduktiva which is installed, run this in the directory: | ||
| + | <code javascript> | ||
| + | npm show konduktiva version | ||
| + | </ | ||
| **Things To Note: ** Only follow this tutorial after you have correctly followed the installation instructions. | **Things To Note: ** Only follow this tutorial after you have correctly followed the installation instructions. | ||
| Line 12: | Line 17: | ||
| </ | </ | ||
| - | OR | + | NOTE: await import |
| - | <code javascript> | + | |
| - | const K = await import(' | + | After this is loaded, you will need to open your DAW and set it up. Here [[https:// |
| - | </code> | + | |
| - | After this is loaded, you will need to open one instance of MIDI output. | + | Next, setup a default/ |
| <code javascript> | <code javascript> | ||
| - | let e = K.setUpMusicalEnvironment(0) | + | let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject, |
| </ | </ | ||
| Line 51: | Line 55: | ||
| </ | </ | ||
| You should here something like this: | You should here something like this: | ||
| - | {{ : | ||
| - | You can also restart the node session by cressing CTRL + D in the terminal and typing node again. Then you might want to try some of these other functions: | + | {{ :default-config-obj-audio.mp3 |}} |
| - | < | + | You can also restart the node session by pressing CTRL + D in the terminal and typing node again. Then you might want to try some of these other functions: |
| - | let e = K.setUpMusicalEnvironment(0) | + | |
| - | e.play(' | + | |
| - | //OR | + | |
| - | let e = K.setUpMusicalEnvironment(1) | + | |
| - | e.play(' | + | |
| - | //OR | + | |
| - | let e = K.setUpMusicalEnvironment(3) | + | |
| - | e.play(' | + | |
| - | </ | + | |
| - | REMEMBER | + | |
| - | Konduktiva can send MIDI messages | + | If there is no sound check out [[connecting-konduktiva-to-music-synthesizer-using-carla# |
| - | < | + | The configuration object |
| - | let e = K.setUpMusicalEnvironment(2) | + | |
| - | e.play(' | + | |
| - | e.play(' | + | |
| + | <code javascript> | ||
| + | let e = K.setUpMusicalEnvironment(K.lsystemData, | ||
| </ | </ | ||
| - | You should here both your music synthesizer | + | {{ : |
| + | |||
| + | Konduktiva can send MIDI messages to more than one music synthesizer session. Try opening another session of your music synthesizer | ||
| + | |||
| + | <code javascript> | ||
| + | let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject, | ||
| - | {{ : | ||
| - | Next open 2 more music synthesizer session. One of the new ones should be listening to channel 3. The other new one should be listening to channel 4. 4 in total and run the code below: | ||
| - | < | ||
| - | let e = K.setUpMusicalEnvironment(4) | ||
| e.play(' | e.play(' | ||
| e.play(' | e.play(' | ||
| - | e.play(' | + | |
| - | e.play(' | + | |
| </ | </ | ||
| + | You should hear both your music synthesizer sessions playing the same thing but with different voices. It should sound something like this: | ||
| + | {{ : | ||
| - | This might sound something like this: | ||
| - | {{ : | ||
| - | You can allow multiple | + | To stop all players: |
| <code javascript> | <code javascript> | ||
| - | e.play(' | + | e.stopAll() |
| - | e.play(' | + | |
| - | e.play(' | + | |
| </ | </ | ||
| - | All the exampleMidiPlayers should be playing now. | + | To here different sounds try these function calls. Remember to restart nodejs and Konduktiva everytime |
| - | + | ||
| - | After each line you should here an extra layer of sound. | + | |
| - | + | ||
| - | It might sound something like this: | + | |
| - | + | ||
| - | {{ : | + | |
| - | + | ||
| - | To stop a specific session. This will stop exampleMidiPlayer3 player: | + | |
| <code javascript> | <code javascript> | ||
| - | e.stop('exampleMidiPlayer3') | + | let e = K.setUpMusicalEnvironment(K.circleOfFifthChords, |
| - | </ | + | |
| - | To stop all players: | + | let e = K.setUpMusicalEnvironment(K.circleOfFifthMelody, |
| - | <code javascript> | + | |
| - | e.stopAll() | + | |
| </ | </ | ||
| - | Explanation of K.setUpMusicalEnvironment function: | + | circleOfFifthChords: |
| + | {{ : | ||
| + | |||
| + | circleOfFifthMelody: | ||
| + | {{ : | ||
| - | Argument 0 is for the most basic. | ||
| - | Argument 1 is for one player | ||
| - | Argument 2 is for two players. | ||
| - | Argument 3 is for simple musical environment | ||
| - | Argument 4 is for 4 players | ||
| - | Argument 5 is for a more complex/ | ||
| - | Argument 6 is for a musical environment with multiple copies of the same player. Add another argument to control amount of copies. The default will be four. Here is an example: | ||
| - | <code javascript> | ||
| - | let e = K.setUpMusicalEnvironment(6, | ||
| - | console.log(K.all(e.players)) | ||
| - | </ | ||
| All the variables that control the music can be set by using the beginner friendly musicalEnvironment configuration objects. Example configuration objects can be found in the file [[https:// | All the variables that control the music can be set by using the beginner friendly musicalEnvironment configuration objects. Example configuration objects can be found in the file [[https:// | ||