first_steps

First Steps with Konduktiva

Overview: This tutorial will act as a guide about how to get started after installating Konduktiva. See how to install Konduktiva on the Konduktiva Github page

Things To Note: Only follow this tutorial after you have correctly followed the installation instructions.

Start the nodejs REPL in a terminal if you have installed Konduktiva globally (using the -g tag). If not navigate the the directory where you have installed Konduktiva using the cd command or using the file manager navigate to the location you have installed Konduktiva and open a terminal there.:

 node

Run the following line of code in the REPL which will load the Konduktiva library if you have installed it throught npm:

const K = require('konduktiva')

OR

const K = await import('konduktiva')

After this is loaded, you will need to open one instance of MIDI output. Next, setup a default/example MusicalEnvironment with

let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject, 1,'exampleMidiPlayer')

If you log ``e``, you will see that is a MusicalEnvironment class. It has some basic configurations for the new user to get started

you change the tempo(speed) like this

//Makes music go slower
e.changeTempo(80)
 
//Makes music go faster
e.changeTempo(180)

Before you can start playing music, you have to connect Konduktiva to your music synthesizer of choice. Click here to learn how to do so

Now you can start playing some beats. Ensure you music synthesizer is listening to channel 1. Try this command to allow one player to start playing.

e.play('exampleMidiPlayer1')

Stop it by doing this:

e.stop('exampleMidiPlayer1')

You should here something like this:

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:

The configuration object (first argument controls the type of sound you hear. Try passing in a different configuration object and some extra configurations (last argument).

let e = K.setUpMusicalEnvironment(K.lsystemData,1,'exampleMidiPlayer', K.exampleMusicalEnvironmentsExtraConfig)

Konduktiva can send MIDI messages to more than one music synthesizer session. Try opening another session of your music synthesizer and configure the new one to listen to channel 2. To hear a more obvious difference configure the second music synthesizer to use a different voice. Then, try this function:

let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject,2,'exampleMidiPlayer')

e.play('exampleMidiPlayer1')
e.play('exampleMidiPlayer2')

To stop all players:

e.stopAll()

You should here both your music synthesizer sessions playing the same thing but with different voices. It should sound something like this:

ADD AUDIO HERE

To here different sounds try these function calls. Remember to restart nodejs and Konduktiva everytime you run one of these funcitons. As you learn more about Konduktiva, you will learn other ways to do this so you do not have to restart node every single time.

let e = K.setUpMusicalEnvironment(K.circleOfFifthChords,1,'exampleMidiPlayer', K.exampleMusicalEnvironmentsExtraConfig)
 
let e = K.setUpMusicalEnvironment(K.circleOfFifthMelody,1,'exampleMidiPlayer', K.exampleMusicalEnvironmentsExtraConfig)

circleOfFifthChords:

circleOfFifthMelody:

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 example-melodies-data.js and documentation on the musicalEnvironment configuration objects can be found in the file Konduktiva-documentation.md.

Recommended reading Conceptual Overview

Click to learn about QuantizedMaps and how they are used in Konduktiva

  • first_steps.txt
  • Last modified: 2024/03/11 17:48
  • by steve.wang