Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
adding-midi-file-to-musical-environment [2024/02/23 23:36] – steve.wang | adding-midi-file-to-musical-environment [2024/03/20 18:37] (current) – steve.wang | ||
---|---|---|---|
Line 3: | Line 3: | ||
**Overview: ** A midi file can be played via Konduktiva. During this process, the midi data will also be convert in forms to normal Konduktiva information (Quantized maps etc.) | **Overview: ** A midi file can be played via Konduktiva. During this process, the midi data will also be convert in forms to normal Konduktiva information (Quantized maps etc.) | ||
- | **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, | ||
+ | </ | ||
===== addMidiFileToMusicalEnvironment ===== | ===== addMidiFileToMusicalEnvironment ===== | ||
Line 43: | Line 47: | ||
== Code == | == Code == | ||
WARNING: Remember to change the file paths according to the place you have installed the MIDI files. Or place the downloaded MIDI files to the directory you have launched nodejs in. | WARNING: Remember to change the file paths according to the place you have installed the MIDI files. Or place the downloaded MIDI files to the directory you have launched nodejs in. | ||
+ | |||
+ | For the first 3 examples, you will need 1 music synthesizer session listening to channel 1. However for the last example, you will need 7 music synthesizer sessions. Each music synthesizer should be listening to a number from 1 to 7 (Including 1 and 7). | ||
<code javascript> | <code javascript> | ||
Line 60: | Line 66: | ||
e.stopWithConnected(' | e.stopWithConnected(' | ||
- | let scarBro = K.addMidiFileToMusicalEnvironment(' | + | //7 music synthesizer sessions listening to channel 1 through 7. |
- | let scarBroPlayers = scarBro | + | let scarBro = K.addMidiFileToMusicalEnvironment(' |
- | e.play(' | + | let scarBroPlayers = scarBro([' |
- | e.stop(' | + | scarBroPlayers.forEach(x => { |
+ | | ||
+ | }) | ||
+ | scarBroPlayers.forEach(x => { | ||
+ | | ||
+ | }) | ||
+ | </ | ||
- | //Open 7 Music Synthesizer sessions first | + | CPlayers alone should sound like this: |
- | K.addMidiFileToMusicalEnvironment('/ | + | {{ : |
- | let scarPlayers = [' | + | |
- | e.playN(scarPlayers) | + | |
- | e.stopN(scarPlayers) | + | |
- | </ | + | bwvPlayers alone should sound like this: |
+ | {{ : | ||
+ | |||
+ | scarFairPlayers alone should sound like this: | ||
+ | {{ : | ||
+ | scarBroPlayers alone should sound like this: | ||
+ | |||
+ | {{ : |