UEZ

FModMem UDF build 2017-01-30

3 posts in this topic

#1 ·  Posted (edited)

Hi,

I created a FMOD UDF whereas the DLL calls are done from memory.

Credits to trancexx for the Subrogation functions!

 

Supported formats:

- .MOD (protracker/fasttracker modules)
- .S3M (screamtracker 3 modules)
- .XM (fasttracker 2 modules)
- .IT (impulse tracker modules)
- .MID (MIDI files)
- .RMI (MIDI files)
- .SGT (DirectMusic segment files)
- .FSB (FMOD Sample Bank files)
- .MP3
- .OGG
- .WAV
- .MP2 
- .RAW

 

Current added function list (sum = 70):

FMUSICMEM_FreeSong
FMUSICMEM_GetBPM
FMUSICMEM_GetGlobalVolume
FMUSICMEM_GetMasterVolume
FMUSICMEM_GetName
FMUSICMEM_GetNumChannels
FMUSICMEM_GetNumInstruments
FMUSICMEM_GetNumOrders
FMUSICMEM_GetNumPatterns
FMUSICMEM_GetNumSamples
FMUSICMEM_GetOrder
FMUSICMEM_GetPaused
FMUSICMEM_GetRow
FMUSICMEM_GetSpeed
FMUSICMEM_GetTime
FMUSICMEM_GetType
FMUSICMEM_IsFinished
FMUSICMEM_LoadSong
FMUSICMEM_LoadSongEx
FMUSICMEM_OptimizeChannels
FMUSICMEM_PlaySong
FMUSICMEM_SetMasterVolume
FMUSICMEM_SetOrder
FMUSICMEM_SetPaused
FMUSICMEM_StopAllSongs
FMUSICMEM_StopSong
FSOUNDMEM_Close
FSOUNDMEM_DSP_Create
FSOUNDMEM_DSP_Free
FSOUNDMEM_DSP_GetActive
FSOUNDMEM_DSP_GetFFTUnit
FSOUNDMEM_DSP_GetSpectrum
FSOUNDMEM_DSP_SetActive
FSOUNDMEM_DSP_SetPriority
FSOUNDMEM_GetAmplitude
FSOUNDMEM_GetChannelsPlaying
FSOUNDMEM_GetCPUUsage
FSOUNDMEM_GetCurrentLevels
FSOUNDMEM_GetError
FSOUNDMEM_GetFrequency
FSOUNDMEM_GetGetSurround
FSOUNDMEM_GetMaxChannels
FSOUNDMEM_GetPan
FSOUNDMEM_GetPaused
FSOUNDMEM_GetVolume
FSOUNDMEM_Init
FSOUNDMEM_SetPaused
FSOUNDMEM_SetSpeakerMode
FSOUNDMEM_SetSurround
FSOUNDMEM_SetVolume
FSOUNDMEM_SetVolumeAbsolute
FSOUNDMEM_Stream_Close
FSOUNDMEM_Stream_FindTagField
FSOUNDMEM_Stream_GetLength
FSOUNDMEM_Stream_GetLengthMs
FSOUNDMEM_Stream_GetNumTagFields
FSOUNDMEM_Stream_GetOpenState
FSOUNDMEM_Stream_GetPosition
FSOUNDMEM_Stream_GetTagField
FSOUNDMEM_Stream_GetTime
FSOUNDMEM_Stream_Net_GetStatus
FSOUNDMEM_Stream_Net_SetMetadataCallback
FSOUNDMEM_Stream_Net_SetProxy
FSOUNDMEM_Stream_Open
FSOUNDMEM_Stream_Play
FSOUNDMEM_Stream_PlayEx
FSOUNDMEM_Stream_SetLoopCount
FSOUNDMEM_Stream_SetPosition
FSOUNDMEM_Stream_SetTime
FSOUNDMEM_Stream_Stop

 

In the zip archive you can find 6 examples.

 

Download at download section: 

 

If you have created additional examples, feel free to post it here.

Edited by UEZ
4 people like this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites



Very nice UEZ, well done!

Share this post


Link to post
Share on other sites

Works perfectly !

Thanks


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • nacerbaaziz
      By nacerbaaziz
      hellow guys
      I am a blind young man
      I started a project to make an audio player
      with recorder
      I ended the player and i did not know how to recorder
      This player is Compatible with the blind and visually impaired and ordinary users
      Unfortunately I do not see so I could not merge images and icons
      So I hope you will be able to help me in this matter
      I will bring you the open source project and please help me to add images, icons and recorder, the project is requires easy access in order to be compatible with the screen readers, Please take this into account.
      the software is organized so the recorder is In a special  menu that Contains stop and start and pause and save.
      The same is true for player
      Please help
      And greetings to all
      easy player.zip
    • wakillon
      By wakillon
      I love chiptune music, but BASS only support XM, IT, S3M, MOD, MTM, UMX and MO3 file format for MOD music.
       
      1 | Nintendo NES and SNES Sound File Players
      May be you already have some files with extension nsf, nsfe, spc or rsn (unzip rsn files for get spc collection files inside) but you can't play them in a AutoIt script ?
      So I searched around a bit, and found 2 DLL ( nsf_player.dll and spc_player.dll ) for play Nintendo NES and SNES Sound Files.
      Interest of those DLL is that they can play from file path or binary data, avoiding temp files.
      Dll and audio files are embedded in scripts for permit you to test them right away.
      Some info/download links are in front of each script.
       
      2 | ModPlug Player
      Another dll found : npmod32.dll who support mod, s3m, xm, med, it, s3z, mdz, itz, xmz and wav files.
      Interest : it can play some rares chiptune formats, you can also pause, set volume and set position.
      Inconvenient : do not load from binary datas.
      Dll and audio files are embedded in script and i have added a gui for permit you to try right away !
      Warning : Do not work on Win8.
       
      3 | ZXTune Player 2 (basszxtune.dll v2.4.5) UPDATE of 23 DEC 2016
      Using BASSZXTUNE chiptune support for BASS ( Support  as0, asc, ay, ftc, gtr, psc, psg, psm, pt1, pt2, pt3, sqt, st1, s, st3, stc, stp, ts, txt, vtx, ym, chi, dmm, dst, m, sqd, str, sid, cop, tf0, tfc, tfd, tfe, $b, $m, ahx, ayc, bin, cc3, d, dsq, esv, fdi, gam, gamplus, gbs, gym, hes, hrm, hrp, lzs, msp, mtc, nsf, nsfe, p, pcd, sap, scl, spc, szx, td0, tlz, tlzp, trd, trs, vgm )
      Interest : it can play lot of rares chiptune formats, while benefiting from all bass functions.
      Inconvenient : dll size.(5860ko)
      Dll and audio files are embedded in script.
       
      4 | TitchySID Player 
      Files and dll are loaded in memory.
      Interest : dll size (8ko), you can Play/Stop/Pause/Resume and choose which subsong to play.
      Inconvenient : only SID audio files supported ( PSID & RSID)
      Dll and audio files are embedded in script.
      Tested under Win7 and Win8.
      Edit : added a Sid header viewer : SidHeaderViewer.au3
       
      5 | MiniFmod Player
      Interest : dll size (20ko)
      Inconvenient : only xm audio files supported.
       
      6 | Npnez Player 
      Using npnez.dll (88ko) for play Gameboy Sound System audio files and some others ( kss, hes, nsf, ay, gbr, gbs, gb, nsd, sgc )
      Interest : Can be loaded in memory, subsong can be set and volume can be adjusted ( perfect for create a fade when exiting ) 
      Inconvenient : for an unknow reason, only 20% of my hes collection is playable...
       
      7 | µFMOD Player 
      Interest : dll size (10ko), can be loaded in memory, support Play/Stop/Pause/Resume actions and volume can be adjusted ( perfect for create a fade when exiting ) 
      Inconvenient : only xm audio files supported.
       
      8 | MagicV2m Player 
      Interest : dll size (20ko), Play/Stop/IsPlay/SetAutoRepeat/Progress
      Inconvenient : only v2m audio files supported, V2mPlayStream is not reliable, so prefer V2mPlayFile instead.
       
      9 | OSMEngine Player 
      OSMEngine.dll (80 ko)(Oldskool Musics Engine) permit to play snd, sndh, fc, fc4, fc14 and some rare jam audio files from Amiga/Atari ST(E)
      Interest : audio can be loaded in memory, and Pause/Resume/SetVolume/GetInfos are available
      Inconvenient : none at the moment. 
       
      10 | Ayfly Player
      Ayfly.dll (268 ko) is a AY-891x emulator and player who support
      the following tracker formats : aqt, asc, ay, fxm, gtr, psc, psg, pt1, pt2, pt3, sqt, stc, stp, vtx, ym and zxs (ZX Spectrum Emulator Snapshot) files.
      Interest : SetVolume/GetInfos are available
      Inconvenient : a function named "ay_initsongindirect" for load module in memory exists, but due to the poor documentation provided i do not succeed to get it to work...
       
      11 | GMGME Player
      GMGME.dll is a emulated music DLL that allows you to play ay, gbs, gym, hes, kss, nsf/nsfe, sap, spc and vgm files.
      Interest : Can play ATARI SAP files (only type B and C) , Set Volume and Set Tempo are available
      Inconvenient : Dll Size (and his imports) , and audio files can not be loaded in memory.
       
      12 | SC68 Player
      sc68replay.dll (166 ko) is a Freebasic DLL compiled from "sc68replay" src that allows you to play SC68  (Atari ST and Amiga audio formats)  files.
      Interest : Can play from file and memory
      Inconvenient : Unfortunatelly for an unknown reason not all sc68 files are supported.
       
      13 | Extended Module Player
      LibXmp.dll  (272 ko)  can "read" xm, mod, it, s3m, med, 669 but also some rares formats
      abk, amd, amf, dbm, digi, dtm, emod, far, flx, fnk, gdm, hsc, imf, j2b, liq, m15, mdl, mfp, mgt, mtm, mtn, okt, psm, ptm, rad, rtm, sfx, smp, stim, stm, stx, ult, umx, wow, ym3812
      Despite its name, it's not a "player" but a library that renders module files to RAW PCM data.
      So the interest in this script was to find a way to convert those raw datas into a "playable" sound.
      With Waveform Audio Interface i create a pseudo Wav header who permit to play datas as a Wav file.
      Interest : Can play from file and memory
      Inconvenient : Time to render datas (depends of file size)
       
      14 | LibModPlug Player
      LibModPlug.dll (102 ko)  can "read" xm, it, mod, s3m, med, 669 and also amf, ams, dbm, dmf, dsm, far, j2b, mdl, mt2, mtm, okt, psm, ptm, stm, ult, umx.
      As LibXmp.dll, it's a library that renders module files to RAW PCM data.
      For this one, i create a real binary wave header for be able to play it easily from memory with winmm.dll PlaySoundW function.
      Interests : Can play from file and memory, and have some nice sound effects : Surround, MegaBass and Reverb  (used in script example)
      It can also replace modplug player(2) for Win 8+ users
      Inconvenient : Time to render datas (depends of file size)
       
      15 | AdPlug Player
      AdPlug.dll ( 69ko ) is an AdLib sound player library who is able to play the following files type :  A2M, ADL, AMD, BAM, CFF, CMF, D00, DFM, DMO, DRO, DTM, HSC, HSP, IMF, KSM, LAA, LDS, M, MAD, MID, MKJ, MSC, MTK, RAD, RAW, RIX, ROL, S3M, SA2, SAT, SCI, SNG, XAD, XMS, XSM
      For this one, time to render datas is to long, so i needed to find an other way for play modules.
      Using Bass.dll and particulary the "BASS_StreamPutData" function i succeeded to play module in loop while rendering it.
      Both DLL are loaded in memory, and 16 different module types are available in the script. No includes/files needed. Just run it.
      Warning : for a unique file extension (example .sng), it's sometimes possible to have several filetypes from different trackers !
      AdPlug.dll Imports : msvcp71.dll, msvcr71.dll in C:\Windows\SysWOW64  ( VC Redist Installer )
      Interests : Can read some obscure rare formats.
      Inconvenient : Can not read from memory
       
      16 | LibMikmod Player
      LibMikmod.dll (85ko) will currently play the following common and not so common  formats : 669, AMF, DSM, FAR, GDM, IMF, IT, MED, MOD, MTM, S3M, STM, STX, ULT, UNI, XM  
      Interests : Can load from memory
      Inconvenient : only for full-screen applications, because if the application has not the focus sound is muted
       
       
      Downloads are available in the download section
      Dedicated to chiptune Lovers ! 
      Music Links : 
      asma.atari.org  woolyss.com  chipmusic.org  demozoo.org  modarchive.org  modules.pl  keygenmusic.net  zxtunes.com  mazemod.org  amigaremix.com  pouet.net  plopbox.eu  Modland
    • UEZ
      By UEZ
      A FMOD UDF to play music whereas the DLL calls are done from memory.
      Supported formats:
      - .MOD (protracker/fasttracker modules) - .S3M (screamtracker 3 modules) - .XM (fasttracker 2 modules) - .IT (impulse tracker modules) - .MID (MIDI files) - .RMI (MIDI files) - .SGT (DirectMusic segment files) - .FSB (FMOD Sample Bank files) - .MP3 - .OGG - .WAV - .MP2 - .RAW  
      Click the forum URL to the right for more information.