11' -----------------------------------------------------------------------------------------------------
22' QB64 MOD Player
3- ' Copyright (c) 2022 Samuel Gomes
3+ ' Copyright (c) 2023 Samuel Gomes
44' -----------------------------------------------------------------------------------------------------
55
66' -----------------------------------------------------------------------------------------------------
@@ -121,6 +121,7 @@ Sub PrintVisualization
121121 Shared Pattern () As NoteType
122122 Shared Sample () As SampleType
123123 Shared SoftSynth As SoftSynthType
124+ Shared Voice () As VoiceType
124125 Shared MixerBufferLeft () As Single
125126 Shared MixerBufferRight () As Single
126127
@@ -183,7 +184,7 @@ Sub PrintVisualization
183184 End If
184185
185186 ' Now just dump everything to the screen
186- For i = j To TEXT_LINE_MAX
187+ For i = j To TEXT_LINE_MAX - 1
187188 Locate i, x
188189 Color 15 , 0
189190
@@ -224,6 +225,13 @@ Sub PrintVisualization
224225 End If
225226 Next
226227
228+ ' Print the footer
229+ Color 16 , 7
230+ Locate TEXT_LINE_MAX, x : Print Using " ###### " ; Song.samplesPerTick;
231+ For i = 0 To Song.channels - 1
232+ Print Using " (##) V: ## P: ### " ; i + 1 , Voice (i ).volume; Voice (i ).panning;
233+ Next
234+
227235 Dim As Long fftSamples, fftSamplesHalf , fftBits
228236
229237 fftSamples = fft_previous_power_of_two (Song.samplesPerTick ) ' we need power of 2 for our FFT function
@@ -237,6 +245,8 @@ Sub PrintVisualization
237245 fft_analyze_float Offset (SpectrumAnalyzerLeft (0 )), Offset (MixerBufferLeft (0 )), 1 , fftBits ' the left samples first
238246 fft_analyze_float Offset (SpectrumAnalyzerRight (0 )), Offset (MixerBufferRight (0 )), 1 , fftBits ' and now the right ones
239247
248+ Color , 0
249+
240250 For i = 0 To fftSamplesHalf - 1
241251 j = (i * SpectrumAnalyzerHeight ) \ fftSamplesHalf ' this is the y location where we need to draw the bar
242252
@@ -534,7 +544,7 @@ Function ProcessCommandLine~%%
534544 Dim e As Unsigned Byte : e = EVENT_NONE
535545
536546 If (Command $(1 ) = " /?" Or Command $(1 ) = " -?" ) Then
537- MessageBox APP_NAME, APP_NAME + Chr $(13 ) + " Syntax: QB64MODP [modfile.mod]" + Chr $(13 ) + " /?: Shows this message" + String $(2 , 13 ) + " Copyright (c) 2022 , Samuel Gomes" + String $(2 , 13 ) + " https://github.com/a740g/" , " info"
547+ MessageBox APP_NAME, APP_NAME + Chr $(13 ) + " Syntax: QB64MODP [modfile.mod]" + Chr $(13 ) + " /?: Shows this message" + String $(2 , 13 ) + " Copyright (c) 2023 , Samuel Gomes" + String $(2 , 13 ) + " https://github.com/a740g/" , " info"
538548 e = EVENT_QUIT
539549 Else
540550 For i = 1 To CommandCount
0 commit comments