{"id":11219,"date":"2024-11-20T06:02:46","date_gmt":"2024-11-20T04:02:46","guid":{"rendered":"https:\/\/store.algosyntax.com\/?post_type=asx-lms-tutorial-cpt&#038;p=11219"},"modified":"2026-03-09T08:36:04","modified_gmt":"2026-03-09T06:36:04","slug":"midiengine-3-api-and-music-session-object-model","status":"publish","type":"asx-lms-tutorial-cpt","link":"https:\/\/store.algosyntax.com\/tutorials\/unreal-engine\/midiengine-3-api-and-music-session-object-model\/","title":{"rendered":"MidiEngine 3 API and Music Session Object Model"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"11219\" class=\"elementor elementor-11219\" data-elementor-post-type=\"asx-lms-tutorial-cpt\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3a1c28a e-flex e-con-boxed e-con e-parent\" data-id=\"3a1c28a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-18414e1 elementor-widget elementor-widget-heading\" data-id=\"18414e1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Overview of The MidiEngine 3 API\n<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-491393b elementor-widget elementor-widget-text-editor\" data-id=\"491393b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>MidiEngine emphasizes an object-oriented structure using Unreal Engine\u2019s <code>UObject<\/code> system. This design enhances the accessibility and manipulability of MIDI data through Blueprints and game code, facilitating dynamic and interactive musical experiences.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-daf6a63 elementor-widget elementor-widget-video\" data-id=\"daf6a63\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/youtu.be\\\/8dWqkLmO6U8&quot;,&quot;lazy_load&quot;:&quot;yes&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b0d7367 elementor-widget elementor-widget-heading\" data-id=\"b0d7367\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Key Components of the Music Session Object Model\n<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3abd7c3 elementor-widget elementor-widget-text-editor\" data-id=\"3abd7c3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>The Music Session Object Model in MidiEngine 3 API consists of several interconnected <code>UObject<\/code> classes that represent different aspects of a MIDI file. NB: each class is prefixed with &#8220;UAx&#8221; ,example &#8220;UAxMusicSession&#8221; Below is a detailed breakdown of each component:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-495aad3 elementor-widget elementor-widget-image\" data-id=\"495aad3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1392\" height=\"650\" src=\"https:\/\/store.algosyntax.com\/wp-content\/uploads\/marketplace\/unreal-engine\/midiengine\/musicsessionobjectmodel.jpg\" class=\"attachment-large size-large wp-image-11229\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-95bd16d elementor-widget elementor-widget-text-editor\" data-id=\"95bd16d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h3>1. MidiNote<\/h3><ul><li><strong>Description:<\/strong> Represents an individual MIDI note.<\/li><li><strong>Functionality:<\/strong> Stores information such as pitch, velocity, duration, and timing of a single note.<\/li><li><strong>Usage:<\/strong> Acts as the fundamental building block for creating more complex musical structures.<\/li><\/ul><h3>2. MidiTrack<\/h3><ul><li><strong>Description:<\/strong> A container for multiple <code>MidiNote<\/code> objects.<\/li><li><strong>Functionality:<\/strong> Organizes notes into a coherent sequence, representing a single track within a MIDI file.<\/li><li><strong>Usage:<\/strong> Facilitates the management of notes, allowing for operations like adding, removing, or modifying notes within a track.<\/li><\/ul><h3>3. MidiPattern<\/h3><ul><li><strong>Description:<\/strong> A collection of <code>MidiTrack<\/code> objects.<\/li><li><strong>Functionality:<\/strong> Groups multiple tracks into a pattern, which can represent a specific section or layer of a song.<\/li><li><strong>Usage:<\/strong> Enables the organization of complex musical arrangements by managing multiple tracks simultaneously.<\/li><\/ul><h3>4. MidiPattern Clip<\/h3><ul><li><strong>Description:<\/strong> References a specific <code>MidiPattern<\/code>.<\/li><li><strong>Functionality:<\/strong> Acts as a pointer to a <code>MidiPattern<\/code>, allowing for the reuse and arrangement of patterns within a sequence.<\/li><li><strong>Usage:<\/strong> Facilitates the creation of dynamic and reusable musical sections within a music sequence.<\/li><\/ul><h3>5. MusicSequenceTrack<\/h3><ul><li><strong>Description:<\/strong> A container for arranging <code>MidiPattern Clips<\/code> and <code>Audio Clips<\/code>.<\/li><li><strong>Functionality:<\/strong> Organizes clips into a sequence, enabling the arrangement of MIDI patterns and audio elements within a music session.<\/li><li><strong>Usage:<\/strong> Allows developers to structure the flow of a song by sequencing different musical and audio components.<\/li><\/ul><h3>6. MusicSession<\/h3><ul><li><strong>Description:<\/strong> The top-level container that holds multiple <code>MidiPatterns<\/code>, <code>MusicSequenceTracks<\/code>, and song arrangements.<\/li><li><strong>Functionality:<\/strong> Manages the overall structure of a musical piece, including different patterns, their arrangements, and sequence tracks within a session.<\/li><li><strong>Usage:<\/strong> Serves as the central hub for handling entire MIDI compositions, enabling comprehensive control and manipulation of the music session.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3d98fd5 elementor-widget elementor-widget-heading\" data-id=\"3d98fd5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Importing MIDI Files<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1e503d7 elementor-widget elementor-widget-text-editor\" data-id=\"1e503d7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>When a MIDI file is imported into MidiEngine 3 API, the following process occurs:<\/p><ol><li><strong>Creation of MusicSession:<\/strong> A new <code>MusicSession<\/code> object is instantiated to serve as the container for the imported MIDI data.<\/li><li><strong>Reading the MIDI File:<\/strong> The <code>.midi<\/code> file is parsed and converted into a\u00a0 <code>MidiPattern<\/code> object.<\/li><li><strong>Organizing Patterns:<\/strong> A <code>MidiPattern<\/code> contains multiple <code>MidiTrack<\/code> objects, which in turn contain <code>MidiNote<\/code> objects representing individual notes..<\/li><\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-31017ed elementor-widget elementor-widget-heading\" data-id=\"31017ed\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Advantages of Using MidiEngine 3 API \n <\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f0ee284 elementor-widget elementor-widget-text-editor\" data-id=\"f0ee284\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li><strong>Simplified Access:<\/strong> The <code>UObject<\/code> architecture allows for straightforward access and manipulation of MIDI data within Blueprints and game threads.<\/li><li><strong>Modular Structure:<\/strong> The hierarchical object model (MidiNote \u2192 MidiTrack \u2192 MidiPattern \u2192 MusicSession) provides a clear and organized framework for managing complex musical compositions.<\/li><li><strong>Enhanced Flexibility:<\/strong> Developers can easily read, modify, and interact with MIDI data, enabling dynamic music behavior and integration within interactive environments.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-38fca45 elementor-widget elementor-widget-button\" data-id=\"38fca45\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/store.algosyntax.com\/marketplace\/unreal-engine\/midi-engine\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Get Midi Engine 3<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"featured_media":0,"template":"","asx-lms-tutorial-categories":[92,45],"asx-lms-tutorial-tags":[103],"class_list":["post-11219","asx-lms-tutorial-cpt","type-asx-lms-tutorial-cpt","status-publish","hentry","asx-lms-tutorial-categories-midi-engine","asx-lms-tutorial-categories-unreal-engine","asx-lms-tutorial-tags-midiengine-plugin","entry"],"acf":[],"_links":{"self":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/11219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt"}],"about":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/types\/asx-lms-tutorial-cpt"}],"version-history":[{"count":0,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-cpt\/11219\/revisions"}],"wp:attachment":[{"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/media?parent=11219"}],"wp:term":[{"taxonomy":"asx-lms-tutorial-categories","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-categories?post=11219"},{"taxonomy":"asx-lms-tutorial-tags","embeddable":true,"href":"https:\/\/store.algosyntax.com\/asx-rest\/wp\/v2\/asx-lms-tutorial-tags?post=11219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}