Author Topic: intros/demos sound Vumeter  (Read 7841 times)

0 Members and 1 Guest are viewing this topic.

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 260
  • Karma: 18
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Re: intros/demos sound Vumeter
« Reply #20 on: July 05, 2016 »
Here comes the package.

first, install the PureCOLOR-500-Installer.exe, is needed to customize the EQ Bars.
For more options then, press F1 and check the external Lib Helpfile

If you need more transparency for the EQ i can add a Alpha Layer.
« Last Edit: July 05, 2016 by inc. »
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline ~Ar-S~

  • C= 64
  • **
  • Posts: 44
  • Karma: 26
  • Demo RuleZ
    • View Profile
Re: intros/demos sound Vumeter
« Reply #21 on: July 20, 2016 »
here is a pretty good exemple from Dobro to  make a good spectrum with Fmodex Dll.
i use it to make my (pretty good) webradio player.
http://ldvmultimedia.com/telecharger_ars_stream_radio.php

EnJoY

Code: [Select]
;***********************************************
;Titre  :*test_fmodex
;Auteur  : Dobro
;Date  :24/10/2013
;Heure  :17:22:14
;Version Purebasic :  PureBasic 5.20 LTS (Windows - x86)
; Libairies necessaire : Fmodex.pbi
;***********************************************


Enumeration
#window
#image
EndEnumeration


XIncludeFile "E:\MULTIMEDIA\PUREBASIC\5.20\_Fmodex_5_20\fmodex.pbi"


Declare    Oscillo(sound)


; **************** initialisation Sprite des 512 niveaux************
Global Dim Arr.F(512) ; tableau pour les 512 niveaux
If InitSprite() = 0
MessageRequester("Erreur", "Impossible d'ouvrir l'écran & l'environnement nécessaire aux sprites !", 0)
End
EndIf
Structure sprite
x.l
y.l
EndStructure
Global Dim sprite.sprite(512)
; creation de la fenetre d'affichage des niveau

If OpenWindow(#window, pos_x, pos_y, 300, 55, "Pure Radio", #PB_Window_SystemMenu)

If OpenWindowedScreen(WindowID(#window), 4, 4,290,50,0,0,0 )
ClearScreen(RGB($0,$0,$0))
FlipBuffers()

For i=1 To 512 Step 4
CreateSprite(i,2,32):CreateImage(#image,2,32,32)
sprite(i)\x=i
sprite(i)\y=50
StartDrawing ( ImageOutput (#image))
DrawingMode ( #PB_2DDrawing_Gradient )
;
BackColor($0000FF)
GradientColor(0.4, $00FFFF)
GradientColor(0.6, $FFFF00)
FrontColor($FF0000)
LinearGradient(0, 0, 2, 32)

Box(0, 0, 2, 32)
StopDrawing ()

StartDrawing ( SpriteOutput (i))
DrawImage(ImageID(#image),0,0)
StopDrawing()

Next i

EndIf
EndIf
; *******************************************



url$="http://50.7.98.106:8398/"

; ************init ****************************
FMOD_System_Create(@fmodsystem)
FMOD_System_Init(fmodsystem, 32, 0, 0)
; ***************************************


FMOD_System_CreateStream(fmodsystem, @url$, #FMOD_CREATESTREAM, 0, @sound)

FMOD_System_PlaySound(fmodsystem, 0, sound, 0, @channel) ; joue l'url



;str.s = OpenFileRequester("Choose a soundfile", "c:", "*.*|*.*", 0)
If str.s<>"" ; on charge le fichier
;FMOD_System_CreateStream(fmodsystem, @str, #FMOD_SOFTWARE, 0, @sound) ; creer le stream
;FMOD_Sound_GetLength(sound, @longueur, #FMOD_TIMEUNIT_MS) ; recupe la taille du son dans longueur
; FMOD_System_PlaySound(fmodsystem, 0, sound, 0, @channel) ; joue
EndIf

Repeat
Evenement.l= WaitWindowEvent(2)


FMOD_Channel_GetSpectrum(channel, Arr(), 512, 0, 0 ) ; recuperere les 512 niveaux des frequences
Oscillo(sound) ; le graph au centre ecran graphique


Select EventWindow()
;-evenement window


EndSelect

FlipBuffers()
ClearScreen(0)
Until Evenement = #PB_Event_CloseWindow

Procedure Oscillo(sound)
Static compteur.F,compteur2.F
compteur.F=compteur.F+1
compteur2.F=compteur2.F+10
largeur=290 :hauteur=50


If state=0 And play=1
For spr=1 To 512 Step 4
variation=25* Sin(compteur2*#PI/180)
sprite(spr)\x=spr
sprite(spr)\y= variation* Sin(spr*#PI/180)
DisplaySprite(spr,sprite(spr)\x+compteur.F,sprite(spr)\y)
sprite(spr)\y=50 ; remet le sprite en bas
If sprite(spr)\x+compteur.F>512
compteur.F=0
sprite(spr)\x=0
EndIf

Next spr

Else
For spr=1 To 512 Step 4
sprite(spr)\y=sprite(spr)\y-Arr(spr)*32*spr
DisplaySprite(spr,sprite(spr)\x,sprite(spr)\y)
sprite(spr)\y=50 ; remet le sprite en bas
Next spr
EndIf

EndProcedure


~ Ar-S ~

Offline waste

  • C= 64
  • **
  • Posts: 46
  • Karma: 2
    • View Profile
Re: intros/demos sound Vumeter
« Reply #22 on: July 26, 2016 »
hi ars , thanks and hello (jmg49 on french pb board)

i used either fmodex and mp3d lib from inc. example , i will stay on mp3d with v2m support and EQ visualization

fmod doesn't play .v2m file format .... so .exe size is bigger 

it does the work,

thanks to all,

« Last Edit: August 04, 2016 by waste »

Offline ~Ar-S~

  • C= 64
  • **
  • Posts: 44
  • Karma: 26
  • Demo RuleZ
    • View Profile
Re: intros/demos sound Vumeter
« Reply #23 on: August 03, 2016 »
Please Add d3dx9_43.dll to your zip
~ Ar-S ~

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 260
  • Karma: 18
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Re: intros/demos sound Vumeter
« Reply #24 on: August 03, 2016 »
Just simple install directx9c. This Demos require DX9.
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline waste

  • C= 64
  • **
  • Posts: 46
  • Karma: 2
    • View Profile
Re: intros/demos sound Vumeter
« Reply #25 on: August 04, 2016 »

done !

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 260
  • Karma: 18
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Re: intros/demos sound Vumeter
« Reply #26 on: February 28, 2017 »
Just a quick Reply.

i found a sourcecode and some nice effects you may be interest for a VU Meter:
see attachment
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline waste

  • C= 64
  • **
  • Posts: 46
  • Karma: 2
    • View Profile
Re: intros/demos sound Vumeter
« Reply #27 on: February 28, 2017 »

line effect with reflection is great !

thanks

bass lib is used in this case, good for learning