Restored from previous forum. Originally posted by iRoNiC.
How can do syncro-effects with xxx.MOD ?
How create equalizers or other like WINAMP ?
With MIDAS ?
With FMOD ?
With BASSMOD ?
...
Like :
GetModuleSamplePlaying(voicenumber)=true or false
GetModuleSampleBeginingPlaying(voicenumber)=true or false
thanx
IRONIC
Basic Coder
GetModuleVoicePlaying(voicenumber)
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Kale.
The BassMod.dll includes the BASS synchronizers. and for the equalizers, check out the full Bass.dll http://www.un4seen.com/
--Kale
In love with PureBasic!
The BassMod.dll includes the BASS synchronizers. and for the equalizers, check out the full Bass.dll http://www.un4seen.com/
--Kale
In love with PureBasic!
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Kale.
this is what i use:
--Kale
In love with PureBasic!
this is what i use:
Code: Select all
;===========================================================================
; BASSMOD CONSTANTS
;===========================================================================
#BASSTRUE = 1 ;Use this instead of VB Booleans
#BASSFALSE = 0 ;Use this instead of VB Booleans
;Error codes returned by BASSMOD_GetErrorCode()
#BASS_OK = 0 ;all is OK
#BASS_ERROR_MEM = 1 ;memory error
#BASS_ERROR_FILEOPEN = 2 ;can't open the file
#BASS_ERROR_DRIVER = 3 ;can't find a free/valid driver
#BASS_ERROR_HANDLE = 5 ;invalid handle
#BASS_ERROR_FORMAT = 6 ;unsupported format
#BASS_ERROR_POSITION = 7 ;invalid playback position
#BASS_ERROR_INIT = 8 ;BASS_Init has not been successfully called
#BASS_ERROR_ALREADY = 14 ;already initialized/loaded
#BASS_ERROR_NOPAUSE = 16 ;not paused
#BASS_ERROR_ILLTYPE = 19 ;an illegal type was specified
#BASS_ERROR_ILLPARAM = 20 ;an illegal parameter was specified
#BASS_ERROR_DEVICE = 23 ;illegal device number
#BASS_ERROR_NOPLAY = 24 ;not playing
#BASS_ERROR_NOMUSIC = 28 ;no MOD music has been loaded
#BASS_ERROR_NOSYNC = 30 ;synchronizers have been disabled
#BASS_ERROR_UNKNOWN = -1 ;some other mystery error
;Device setup flags
#BASS_DEVICE_DEFAULT = -1 ;use default sound device
#BASS_LOAD_FROMMEMORY = 1 ;load file from memory
#BASS_LOAD_FROMFILE = 0 ; load file from a file
#BASS_DEVICE_8BITS = 1 ;use 8 bit resolution, Else 16 bit
#BASS_DEVICE_MONO = 2 ;use mono, Else stereo
#BASS_DEVICE_NOSYNC = 16 ;disable synchronizers
#BASS_DEVICE_LEAVEVOL = 32 ;leave volume as it is
;Music flags
;Ramping doesn't take a lot of extra processing And improves
;the sound quality by removing "clicks". Sensitive ramping will
;leave sharp attacked samples, unlike normal ramping.
#BASS_MUSIC_RAMP = 1 ;normal ramping
#BASS_MUSIC_RAMPS = 2 ;sensitive ramping
#BASS_MUSIC_LOOP = 4 ;loop music
#BASS_MUSIC_FT2MOD = 16 ;play .MOD as FastTracker 2 does
#BASS_MUSIC_PT1MOD = 32 ;play .MOD as ProTracker 1 does
#BASS_MUSIC_POSRESET = 256 ;stop all notes when moving position
#BASS_MUSIC_SURROUND = 512 ;surround sound
#BASS_MUSIC_SURROUND2 = 1024 ;surround sound (mode 2)
#BASS_MUSIC_STOPBACK = 2048 ;stop the music on a backwards jump effect
#BASS_MUSIC_CALCLEN = 8192 ;calculate playback length
#BASS_MUSIC_NOSAMPLE = $400000 ;don't load the samples
;Sync types (with BASSMOD_MusicSetSync() "param" And SYNCPROC "data"
;definitions) & flags.
#BASS_SYNC_POS = 0
#BASS_SYNC_MUSICPOS = 0
;Sync when the music reaches a position.
;param: LOWORD=order (0=first, -1=all) HIWORD=row (0=first, -1=all)
;Data : LOWORD=order HIWORD=row
#BASS_SYNC_MUSICINST = 1
;Sync when an instrument (sample For the non-instrument based formats)
;is played in the music (not including retrigs).
;param: LOWORD=instrument (1=first) HIWORD=note (0=c0...119=b9, -1=all)
;Data : LOWORD=note HIWORD=volume (0-64)
#BASS_SYNC_END = 2
;Sync when the music reaches the end.
;param: not used
;Data : not used
#BASS_SYNC_MUSICFX = 3
;Sync when the "sync" effect (XM/MTM/MOD: E8x/Wxx, IT/S3M: S2x) is used.
;param: 0:data=pos, 1:data="x" value
;Data : param=0: LOWORD=order HIWORD=row, param=1: "x" value
#BASS_SYNC_ONETIME = 2147483648 ; FLAG: sync only once, Else continuously
;Sync callback function. NOTE: a sync callback function should be very
;quick (eg. just posting a message) as other syncs cannot be processed
;Until it has finished.
;handle : The sync that has occured
;Data : Additional Data associated with the sync's occurance
argv.s=ProgramParameter()
OpenLibrary(0, "bassmod.dll")
CallFunction(0, "BASSMOD_Init" , #BASS_DEVICE_DEFAULT, 44010, #BASS_DEVICE_NOSYNC)
CallFunction(0, "BASSMOD_MusicLoad", #BASS_LOAD_FROMFILE, argv, 0, 0, #BASS_MUSIC_RAMP)
;CallFunction(0, "BASSMOD_MusicLoad", #BASS_LOAD_FROMMEMORY, ?music, 0, 0, #BASS_MUSIC_RAMP) ; for binaries
CallFunction(0, "BASSMOD_SetVolume", 70)
CallFunction(0, "BASSMOD_MusicPlay")
MessageRequester("PureBasic - Module player", "Playing module: "+Chr(10)+"-----------------------------------"+Chr(10)+GetFilePart(argv), 0)
CallFunction(0, "BASSMOD_MusicStop")
CloseLibrary(0)
End
;music:
;IncludeBinary"test.xm"
In love with PureBasic!
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by iRoNiC.
Thanx a lot, it works well
But
Load, play or stop a MOD is easy but,
Use it to get a sync is more dificule
I don't know how to get the ROW position or Other
It is explain in the BASSMOD.DOC but, my procedure return me a false value.
It return a DWORD, HIGHWORD=Row and LOWWORD=Pos
How can i get in 2 integers variables the HWORD and the LWORD ?
It's a pointer problem, i think...
THANX AGAIN...
IRONIC
Basic Coder
Thanx a lot, it works well
But
Load, play or stop a MOD is easy but,
Use it to get a sync is more dificule
I don't know how to get the ROW position or Other
It is explain in the BASSMOD.DOC but, my procedure return me a false value.
It return a DWORD, HIGHWORD=Row and LOWWORD=Pos
How can i get in 2 integers variables the HWORD and the LWORD ?
It's a pointer problem, i think...
THANX AGAIN...
IRONIC
Basic Coder
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by iRoNiC.
Thanx, thanx again but
Another question :
I'm a beginer in pointers then, to use the GetModuleName, i must use pointer return in procedure to show a string
I don't understand how to do !!
and, for syncro, i must use handle too,i don't understand again...
Someone can explain me a bit
IRONIC
Basic Coder
Thanx, thanx again but
Another question :
I'm a beginer in pointers then, to use the GetModuleName, i must use pointer return in procedure to show a string
I don't understand how to do !!
and, for syncro, i must use handle too,i don't understand again...
Someone can explain me a bit
IRONIC
Basic Coder
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
You mean something like this?
About the handle thing, what do you mean?
El_Choni
You mean something like this?
Code: Select all
Buffer = AllocateMemory(0, #MAX_PATH)
GetModuleName(Buffer)
ModuleName$ = PeekS(Buffer)
FreeMemory(0)
El_Choni
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by iRoNiC.
Thanx again
In the BASSMOD (See BASMOD DOC), We can use a Sync
There is a Callback function : SYNCPROC
HSYNC WINAPI BASSMOD_MusicSetSync(
DWORD type,
DWORD param,
SYNCPROC *proc,
DWORD user
);
AND
void CALLBACK YourSyncProc(
HSYNC handle,
DWORD data
DWORD user
);
It's easy to use BASSMOD Funtion but
Hard to use CALLBACK Function
What is the way to do a sync for Making equalizer like
Soundtracker or Noisetracker ? For only 4 voices
I don't care about the number of sample, I want to get if the voice is :
- Start play, is playing or is Stoped
On voice 0,1,2 or 3 (Only for .MOD) 4 voices
Hope to be understand...
IRONIC
Basic Coder
Thanx again
In the BASSMOD (See BASMOD DOC), We can use a Sync
There is a Callback function : SYNCPROC
HSYNC WINAPI BASSMOD_MusicSetSync(
DWORD type,
DWORD param,
SYNCPROC *proc,
DWORD user
);
AND
void CALLBACK YourSyncProc(
HSYNC handle,
DWORD data
DWORD user
);
It's easy to use BASSMOD Funtion but
Hard to use CALLBACK Function
What is the way to do a sync for Making equalizer like
Soundtracker or Noisetracker ? For only 4 voices
I don't care about the number of sample, I want to get if the voice is :
- Start play, is playing or is Stoped
On voice 0,1,2 or 3 (Only for .MOD) 4 voices
Hope to be understand...
IRONIC
Basic Coder