note-root-octave

Differences

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

Link to this comparison view

Next revision
Previous revision
note-root-octave [2024/03/07 22:21] – created steve.wangnote-root-octave [2024/03/18 18:50] (current) steve.wang
Line 1: Line 1:
 ====== How noteMaps, rootMaps and, octaveMaps work together to produce a midi note ====== ====== How noteMaps, rootMaps and, octaveMaps work together to produce a midi note ======
  
 +** Overview: ** This tutorial teaches you how to use three different things, rootMaps, chordMaps, noteMaps, in Konduktiva to get the same effect in 3 different ways.
 +
 +**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>
 +const K = require('konduktiva')
 +let e = K.setUpMusicalEnvironment(K.defaultConfigurationObject,4,'exampleMidiPlayer')
 +</code>
 +
 +
 +rootMaps, chordMaps and, noteMaps work are combined to get the final midi note sent. I will use an example to explain it.
 +<code javascript>
 +let root = 'C'
 +let octave = 8
 +let note = 6
 +
 +let finalNote = K.Note.midi(root + octave) + note
 +console.log(finalNote) //144
 +</code>
 +
 +It is basically just an equation. So,  for instance we want the result 12 there are a few different ways can go about this.
 +
 +<code javascript>
 +//Using root and octave:
 +K.Note.midi('C' + 0) + 0
 +
 +//Using note:
 +K.Note.midi('C' + -1) + 12
 +</code>
  • note-root-octave.1709878863.txt.gz
  • Last modified: 2024/03/07 22:21
  • by steve.wang