Developer Tutorial : Midi Event Music Visuals

contains the latest version of our visualizer plugin (replacing Chrome)
[You can only see part of this thread as you are not logged in to the forums]
StevenM
Mon Jul 11, 2011 4:02 am

Developer Tutorial : Midi Event Music Visuals

06. FL Studio ZGameEditor Visualizer: Midi Event Music Visualization

This is an incredible feature within the ZGameEditor. In this video I will show you how to link midi data to your music visualizations. We will link note on off data to turn an object light on/off for a 3d sphere and also use midi keys to move the object in all directions. The concept of status messages and other events like volume,panning, and velocity is also explained.



To monitor midi messages.

Code: Select all

void OnMidiMessage(int Status, int Data1, int Data2)
{
trace("Status="+IntToStr(Status));
trace("Data1="+IntToStr(Data1));
trace("Data2="+IntToStr(Data2));
}


Pitch Values:

This is a special case where the Data1 and Data2 need to be combined to a 14-bit value between 0..16383.

This function does the trick:

Code: Select all

int PitchBytes(int First, int Second)
 {
int data14bit;
 data14bit = Second;
 data14bit = data14bit << 7;
 data14bit = data14bit|First;
 return data14bit;
 }


Pitch Function useage Example:

Code: Select all

//use function to convert data1 and data2 to a standard 14bit value.

float Pitch=PitchBytes(MidiData1,Mididata2);

//for use you can rescale values to suite your needs, this sets a range of -127 to 127

int PitchScaled=floor(((Pitch-8192)/16383)*127*2);



DJ Nobody
Mon Jul 11, 2011 7:00 pm

Re: Developer Tutorial : Midi Event Music Visuals

yes thats the strange thing made this btw, I wa...
You do not have the required permissions to view the files attached to this post.




StevenM
Tue Jul 12, 2011 3:06 am

Re: Developer Tutorial : Midi Event Music Visuals

Here You Go.Onloaded ZExpression creates 36 cub...
You do not have the required permissions to view the files attached to this post.






Kjell
Tue Jul 12, 2011 3:47 pm

Re: Developer Tutorial : Midi Event Music Visuals

Actually, the gluLookAt function would be prett...
You do not have the required permissions to view the files attached to this post.

DJ Nobody
Tue Jul 12, 2011 5:38 pm

Re: Developer Tutorial : Midi Event Music Visuals

still needs work but:colored the notes and made...
You do not have the required permissions to view the files attached to this post.






DJ Nobody
Thu Jul 14, 2011 3:46 pm

Re: Developer Tutorial : Midi Event Music Visuals

StevenM wrote:2d is easier but switching to 3d ...
You do not have the required permissions to view the files attached to this post.


Return to “ZGameEditor Visualizer forum”