Skip to content

Commit

Permalink
Test Program 1.3.5
Browse files Browse the repository at this point in the history
Test Program 1.3.5
  • Loading branch information
mstop4 committed Jul 8, 2016
1 parent 9c644d2 commit b1ba944
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 35 deletions.
12 changes: 6 additions & 6 deletions src/FMODGMS Test.gmx/Configs/Default.config.gmx
Expand Up @@ -276,8 +276,8 @@
<option_in_app_purchase_server_url></option_in_app_purchase_server_url>
<option_information>FMODGMS Test Program

FMODGMS version: 0.5.0
FMOD version: Studio 1.08.00</option_information>
FMODGMS version: 0.6.0
FMOD version: Studio 1.08.04</option_information>
<option_interpolate>False</option_interpolate>
<option_ios_adcolony_enable_V4VC>0</option_ios_adcolony_enable_V4VC>
<option_ios_advertising_enable>0</option_ios_advertising_enable>
Expand Down Expand Up @@ -351,7 +351,7 @@ FMOD version: Studio 1.08.00</option_information>
<option_linux_steam_app_id>0</option_linux_steam_app_id>
<option_linux_sync>0</option_linux_sync>
<option_linux_texture_page>2048</option_linux_texture_page>
<option_linux_version_build>4</option_linux_version_build>
<option_linux_version_build>5</option_linux_version_build>
<option_linux_version_major>1</option_linux_version_major>
<option_linux_version_minor>3</option_linux_version_minor>
<option_loadalpha>255</option_loadalpha>
Expand Down Expand Up @@ -468,15 +468,15 @@ FMOD version: Studio 1.08.00</option_information>
<option_tizen_usesplash>False</option_tizen_usesplash>
<option_use_new_audio>True</option_use_new_audio>
<option_variableerrors>False</option_variableerrors>
<option_version>1.3.1</option_version>
<option_version>1.3.5</option_version>
<option_version_build>0</option_version_build>
<option_version_company>M.S.T.O.P.</option_version_company>
<option_version_copyright>(c) 2016 M.S.T.O.P.</option_version_copyright>
<option_version_description>FMODGMS Test Program</option_version_description>
<option_version_major>1</option_version_major>
<option_version_minor>3</option_version_minor>
<option_version_product>FMODGMS Test</option_version_product>
<option_version_release>4</option_version_release>
<option_version_release>5</option_version_release>
<option_win8_advertising_appid></option_win8_advertising_appid>
<option_win8_advertising_enable>0</option_win8_advertising_enable>
<option_win8_advertising_key></option_win8_advertising_key>
Expand Down Expand Up @@ -557,7 +557,7 @@ FMOD version: Studio 1.08.00</option_information>
<option_windows_major_version>1</option_windows_major_version>
<option_windows_nsis_file>Configs\Default\windows\RunnerInstaller.nsi</option_windows_nsis_file>
<option_windows_product_info>FMODGMS Test</option_windows_product_info>
<option_windows_release_version>4</option_windows_release_version>
<option_windows_release_version>5</option_windows_release_version>
<option_windows_runner_finished>Configs\Default\windows\Runner_finish.bmp</option_windows_runner_finished>
<option_windows_runner_header>Configs\Default\windows\Runner_header.bmp</option_windows_runner_header>
<option_windows_save_location>0</option_windows_save_location>
Expand Down
3 changes: 3 additions & 0 deletions src/FMODGMS Test.gmx/FMODGMS Test.project.gmx
Expand Up @@ -133,6 +133,9 @@
<paths name="paths"/>
<scripts name="scripts">
<script>scripts\switch_track.gml</script>
<script>scripts\draw_GUI_modules.gml</script>
<script>scripts\draw_GUI_mp3.gml</script>
<script>scripts\draw_GUI_ogg.gml</script>
</scripts>
<fonts name="fonts">
<font>fonts\fnt_normal</font>
Expand Down
2 changes: 1 addition & 1 deletion src/FMODGMS Test.gmx/extensions/FMODGMS.extension.gmx
Expand Up @@ -3,7 +3,7 @@
<name>FMODGMS</name>
<version>0.6.0</version>
<packageID></packageID>
<ProductID>ACBD3CFF4E539AD869A0E8E3B4B022DD</ProductID>
<ProductID></ProductID>
<date>13/02/2016</date>
<license>Free to use, also for commercial games.</license>
<description></description>
Expand Down
58 changes: 30 additions & 28 deletions src/FMODGMS Test.gmx/objects/obj_player.object.gmx
Expand Up @@ -36,6 +36,13 @@
// Number of bins in Spectrum data
//show_message(FMODGMS_FFT_Set_WindowSize(128));
numBins = FMODGMS_FFT_Get_NumBins();
peakDamping = 0;

// init spectrum visualizer bins
for (var i=0; i&lt;numBins; i++)
{
avgBin[i] = 0;
}

// Load sounds
sound[0] = FMODGMS_Snd_LoadSound(working_directory + "cronolog.s3m");
Expand Down Expand Up @@ -71,10 +78,6 @@
channel_pitch = 1;

window_set_caption("The colours!");

//show_message(FMODGMS_Snd_Get_TagStringFromName(sound[4],"TITLE"));
//show_message(FMODGMS_Snd_Get_TagTypeFromIndex(sound[4],1));
//show_message(FMODGMS_Snd_Get_TagDataTypeFromIndex(sound[4],2));
}
</string>
</argument>
Expand Down Expand Up @@ -102,6 +105,13 @@
{
FMODGMS_Sys_Update();
hue = (hue + 1) mod 256;

// update spectrum visualizer values
for (var i=0; i&lt;numBins; i++)
{
var bin = clamp(FMODGMS_FFT_Get_BinValue(i),0,1);
avgBin[i] = avgBin[i] * peakDamping + bin * (1-peakDamping);
}
}
</string>
</argument>
Expand Down Expand Up @@ -363,42 +373,34 @@ FMODGMS_Chan_Set_Volume(0,channel_volume);
}

// dominant Frequency
draw_text(416,112,"Dominant Freq.: " + string(FMODGMS_FFT_Get_DominantFrequency()) + " Hz");
draw_text(432,112,"Dominant Freq.: " + string(FMODGMS_FFT_Get_DominantFrequency()) + " Hz");

// spectrum

draw_rectangle_colour(416,144,416+numBins*5,244,c_black,c_black,$202020,$202020,false);
draw_rectangle_colour(432,144,432+numBins*5,244,c_black,c_black,$202020,$202020,false);

for (var i=0; i&lt;numBins; i++)
{
var bin = FMODGMS_FFT_Get_BinValue(i);
var col;

if (bin &lt;= 0.5)
col = merge_colour(c_lime,c_yellow,bin*2);
if (avgBin[i] &lt;= 0.5)
col = merge_colour(c_lime,c_yellow,avgBin[i]*2);
else
col = merge_colour(c_yellow,c_red,(bin-0.5)*2);
col = merge_colour(c_yellow,c_red,(avgBin[i]-0.5)*2);

draw_set_colour(col);
draw_rectangle(416+i*5+1,244-bin*100,416+i*5+4,244,false);
draw_rectangle(432+i*5+1,244-avgBin[i]*100,432+i*5+4,244,false);
}

draw_set_color(make_color_hsv((hue+64 mod 256),128,255));
draw_text(16,128,"Position: " + string(FMODGMS_Chan_Get_Position(0)));
draw_set_color(make_color_hsv((hue+80 mod 256),128,255));
draw_text(16,144,"Loop Points: " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],0)) + " - " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],1)));
draw_set_color(make_color_hsv((hue+96 mod 256),128,255));
draw_text(16,160,"Order: " + string(FMODGMS_Chan_Get_ModOrder(0))); // only works with module files
draw_set_color(make_color_hsv((hue+112 mod 256),128,255));
draw_text(16,176,"Pattern: " + string(FMODGMS_Chan_Get_ModPattern(0))); // only works with module files
draw_set_color(make_color_hsv((hue+128 mod 256),128,255));
draw_text(16,192,"Row: " + string(FMODGMS_Chan_Get_ModRow(0))); // only works with module files
draw_set_color(make_color_hsv((hue+144 mod 256),128,255));
draw_text(16,208,"Volume: " + string(channel_volume));
draw_set_color(make_color_hsv((hue+160 mod 256),128,255));
draw_text(16,224,"Playback Freq.: " + string(channel_frequency * channel_pitch) + " Hz# (" + string(channel_frequency) + " x " + string(channel_pitch) + ")");
//draw_set_color(make_color_hsv((hue+176 mod 256),128,255));
//draw_text(16,240,"Pitch: " + string(FMODGMS_Chan_Get_Pitch(0)));
// draw playback info based on filetype

// modules (MOD, XM, S3M, IT)
if (sound_index &lt; 4)
draw_GUI_modules();
else if (sound_index == 4)
draw_GUI_mp3();
//the rest
else
draw_GUI_ogg();

draw_set_color(c_white);
draw_text(16,304,"Space -- Play/Stop#P - Pause/Unpause#Q/A -- Change volume#W/S -- Change frequency#E/D -- Change pitch");
Expand Down
16 changes: 16 additions & 0 deletions src/FMODGMS Test.gmx/scripts/draw_GUI_modules.gml
@@ -0,0 +1,16 @@
///draw_GUI_modules()

draw_set_color(make_color_hsv((hue+64 mod 256),128,255));
draw_text(16,128,"Position: " + string(FMODGMS_Chan_Get_Position(0)));
draw_set_color(make_color_hsv((hue+80 mod 256),128,255));
draw_text(16,144,"Loop Points: " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],0)) + " - " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],1)));
draw_set_color(make_color_hsv((hue+96 mod 256),128,255));
draw_text(16,160,"Order: " + string(FMODGMS_Chan_Get_ModOrder(0))); // only works with module files
draw_set_color(make_color_hsv((hue+112 mod 256),128,255));
draw_text(16,176,"Pattern: " + string(FMODGMS_Chan_Get_ModPattern(0))); // only works with module files
draw_set_color(make_color_hsv((hue+128 mod 256),128,255));
draw_text(16,192,"Row: " + string(FMODGMS_Chan_Get_ModRow(0))); // only works with module files
draw_set_color(make_color_hsv((hue+144 mod 256),128,255));
draw_text(16,208,"Volume: " + string(channel_volume));
draw_set_color(make_color_hsv((hue+160 mod 256),128,255));
draw_text(16,224,"Playback Freq.: " + string(channel_frequency * channel_pitch) + " Hz# (" + string(channel_frequency) + " x " + string(channel_pitch) + ")");
20 changes: 20 additions & 0 deletions src/FMODGMS Test.gmx/scripts/draw_GUI_mp3.gml
@@ -0,0 +1,20 @@
///draw_GUI_mp3()

draw_set_color(make_color_hsv((hue+64 mod 256),128,255));
draw_text(16,128,"Position: " + string(FMODGMS_Chan_Get_Position(0)));
draw_set_color(make_color_hsv((hue+80 mod 256),128,255));
draw_text(16,144,"Loop Points: " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],0)) + " - " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],1)));
draw_set_color(make_color_hsv((hue+96 mod 256),128,255));

// get tags
draw_text(16,176,"Title: " + FMODGMS_Snd_Get_TagStringFromName(sound[4],"TITLE"));
draw_set_color(make_color_hsv((hue+112 mod 256),128,255));
draw_text(16,192,"Artist: " + FMODGMS_Snd_Get_TagStringFromName(sound[4],"ARTIST"));
draw_set_color(make_color_hsv((hue+128 mod 256),128,255));
draw_text(16,208,"Album: " + FMODGMS_Snd_Get_TagStringFromName(sound[4],"ALBUM"));
draw_set_color(make_color_hsv((hue+144 mod 256),128,255));


draw_text(16,240,"Volume: " + string(channel_volume));
draw_set_color(make_color_hsv((hue+160 mod 256),128,255));
draw_text(16,256,"Playback Freq.: " + string(channel_frequency * channel_pitch) + " Hz# (" + string(channel_frequency) + " x " + string(channel_pitch) + ")");
11 changes: 11 additions & 0 deletions src/FMODGMS Test.gmx/scripts/draw_GUI_ogg.gml
@@ -0,0 +1,11 @@
///draw_GUI_ogg()

draw_set_color(make_color_hsv((hue+64 mod 256),128,255));
draw_text(16,128,"Position: " + string(FMODGMS_Chan_Get_Position(0)));
draw_set_color(make_color_hsv((hue+80 mod 256),128,255));
draw_text(16,144,"Loop Points: " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],0)) + " - " + string(FMODGMS_Snd_Get_LoopPoints(sound[sound_index],1)));
draw_set_color(make_color_hsv((hue+96 mod 256),128,255));
draw_text(16,208,"Volume: " + string(channel_volume));
draw_set_color(make_color_hsv((hue+112 mod 256),128,255));
draw_text(16,224,"Playback Freq.: " + string(channel_frequency * channel_pitch) + " Hz# (" + string(channel_frequency) + " x " + string(channel_pitch) + ")");

0 comments on commit b1ba944

Please sign in to comment.