@TZK,
I was going to send you an email about this thread. I didn't see that plug-in because I was searching the DBPro thread. Thanks for it.
I created a sound using nothing but DBPro source and putting the sound into a memblock. I didn't load a sound file but simply played the sound. Download the 7z file that contains the exe. It's only 804 KB. A function was created and the following data went into it. This is based on Ric's Create Sound code.
frequency#,length#,loudness#,bend#,decay#,vibratospeed#,vibratodepth#,tremelospeed#,tremelodepth#,attack#
Data that went into memblock
dword1=1
dword2=2
dword3=22050
dword4=88200
dword5=4
dword6=16
dword7=0
position=0
write memblock dword 1, position, dword1 : inc position,4
write memblock dword 1, position, dword2 : inc position,4
write memblock dword 1, position, dword3 : inc position,4
write memblock dword 1, position, dword4 : inc position,4
write memblock dword 1, position, dword5 : inc position,4
write memblock dword 1, position, dword6 : inc position,4
write memblock dword 1, position, dword7 : inc position,4
Here is where you generate and write the wave in the function
rem generate and write wave
riseinloudness#=loudness#
for x=1 to samples
outInteger=int(sin((x/122.5)*(frequency#+vibratodepth#*sin(theta#)))*(loudness#-fallinloudness#-riseinloudness#+tremelodepth#*sin(phi#)))*3.0
if outInteger <-32767 then outInteger=-32767
if outInteger>32767 then outInteger=32767 ?
outWord=outInteger
inc theta#,vibratospeed#
inc phi#,tremelospeed#
dec frequency#,bend#
if fallinloudness#<loudness#
inc fallinloudness#,decay#
endif
if riseinloudness#>0
dec riseinloudness#,attack#
endif
write memblock word 1,position,outWord : inc position,2
next x
if sound exist(soundnumber)=1 then delete sound soundnumber
make sound from memblock 999, 1 ` assumes you won't need sound number 999!
clone sound soundnumber, 999
delete sound 999
` memblock no longer required
delete memblock 1
Tobias_Ripper you probably should recognize some of the terminology and understand the code a little bit.
This is some fun stuff.
THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why. For me, theory and practice are combined: nothing works and I don't know why.