Hello,
Is it possible to convert sample audio to picture? (For crear wavform)
I find algorithme lua for this, is it possible with Hollywood?
sample to picture
Re: sample to picture
Code: Select all
LoadSample(1,"hollywood:Examples/Hollywood/Epiphany/bounce.wav")
Switch GetAttribute(#SAMPLE,1,#ATTRTYPE)
Case #MONO8:
NPrint("MONO8")
Case #MONO16:
NPrint("MONO16")
Case #STEREO8:
NPrint("STEREO8")
Case #STEREO16:
NPrint("STEREO16")
EndSwitch
NPrint("Duration:",GetAttribute(#SAMPLE,1,#ATTRDURATION),"ms")
NPrint("PCM Frames:",GetAttribute(#SAMPLE,1,#ATTRNUMFRAMES))
table,count=GetSampleData(1)
NPrint("Count:",count)
StartPath(1)
MoveTo(1,0,128)
For i=0 To 640
LineTo(1,i,table[i])
Next
Line(0,250,640,250,#WHITE)
DrawPath(1,0,250,#RED)
WaitLeftMouse
Re: sample to picture
Lazi very Thank you!!!
Re: sample to picture
Lazi
After test this algoritm no good work. Have you tested with other sample??
thank you
After test this algoritm no good work. Have you tested with other sample??
thank you
Re: sample to picture
No, not tested with others.
This is a mono 8 bit sample and the script should be modified to handle other types.
You asked if is it possible, so I said with that script: yes, it is possible of course!
This is a mono 8 bit sample and the script should be modified to handle other types.
You asked if is it possible, so I said with that script: yes, it is possible of course!
Re: sample to picture
ok thank you for your help