Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
quantizedmaps-tutorial [2024/03/18 17:34] – steve.wang | quantizedmaps-tutorial [2024/08/09 00:25] (current) – steve.wang | ||
---|---|---|---|
Line 40: | Line 40: | ||
====== Adding QuantizedMaps To The MusicalEnvironment ====== | ====== Adding QuantizedMaps To The MusicalEnvironment ====== | ||
+ | |||
+ | Konduktiva has three main ways for users to add their music into the MusicalEnironment. Having multiple means for this was necessary to provide appropriate interfaces for different use cases and users. The first is the most direct yet potentially dangerous way: to add things directly to the MusicalEnvironment. This is the quickest way for those who know their way around the system, but it will not stop the user from inputting incorrect types of information or inputting things in the wrong format. The second way of doing this is using configuration objects which allows the user to place all the data into a JavaScript object under specific property names. This method is usually only used when the MusicalEnvironment is created or when a new Player is created because the usage of this method automatically removes the old data without further confirmation (the method users are advised to start the MusicalEnvironment in these tutorials). There is limited error checking for this part of the process. The third way which is recommended for novice users: the addMap method of the MusicalEnvironment. This method has extensive error checking and it will do actions like convert or format data when necessary. The error thrown will also inform the user of what needs to be fixed. | ||
+ | |||
The recommended way to change specific variables in the MusicalEnvironment is to use the addMap method because it checks for many different types of errors and common mistakes when coding quickly. However, if you are confident and need more speed you can choose to directly interact with the MusicalEnvironment object. Here are some examples | The recommended way to change specific variables in the MusicalEnvironment is to use the addMap method because it checks for many different types of errors and common mistakes when coding quickly. However, if you are confident and need more speed you can choose to directly interact with the MusicalEnvironment object. Here are some examples | ||
===== Changing Octaves ===== | ===== Changing Octaves ===== | ||
Line 88: | Line 91: | ||
) | ) | ||
//OR | //OR | ||
- | e.noteMaps[e.players.exampleMidiPlayer4.noteMap] = new QuantizedMap(5, | + | e.noteMaps[e.players.exampleMidiPlayer4.noteMap] = new K.QuantizedMap(5, |
</ | </ | ||