i have a working version of the waveform canvas control however i have trimmed all the wave form draw part and instead i have drawn a cilinder that fills up. If anyone is interested on this and also anyone can help me run the debug below please let me know. I want to post the complete working code but i would like it to include the waveform too.
On 2/22/07, Luis Cordova <[EMAIL PROTECTED]> wrote: > I am having problems debugging the code in > http://www.sonicamigos.com/etejkowski/code.html > for windows since i do not have a log of what the values look like for > a particular wave file. If anyone sees the sample.mov under their > quicktime directory could someone run the code on a mac, log the > values and send them to me please? > I hope I am not asking too much, > > the log function that is not there and that you probably will need to > add under the Log method is > > 'Log s > // This method logs a string into the debug.txt file > Dim file As FolderItem > Dim fileStream As TextOutputStream > file= GetFolderItem("debug.log") > if file.Exists then > fileStream=file.AppendToTextFile > else > fileStream=file.CreateTextFile > End if > > fileStream.WriteLine s > fileStream.Close > > thanks for your help, if you choose to use any other wave file or > movie please let me know which and send it to me too, > > Many thanks, > > luis > On 2/21/07, Luis Cordova <[EMAIL PROTECTED]> wrote: > > Within the drawwave method in WaveformCanvas object the value YScale > > will be always 1 by definition of the size of the Canvas. So neither > > the YScale nor the me.height value which is always 300 will accomplish > > that whatever the signal range of theSampleValue it will fall between > > +150 and -150. > > > > The line in the code is this: > > n = (theSampleValue/256) * me.height > > > > because theSampleValue is integer, it seems to me that there will be a > > great separation if the number falls above 256 and below. If below > > then n will tend to very little and if above then it will be very > > high. > > I was proposing: > > n= theSampleValue > > however, I have not seen any negative value though in the wave > > soundmemoryblock. > > > > any hints? > > > > luis > > > > On 2/20/07, Luis Cordova <[EMAIL PROTECTED]> wrote: > > > Ok, now I corrected the x value. It seems that a division was made of > > > two values being the denominator too high of a value so the result was > > > always 0 and then this number in turn would divide another which will > > > result in the negative infinite number we were seeing. Now it advances > > > nicely provided I place the code: > > > > > > if theXScale < 1 then > > > theXScale = 1 > > > end if > > > > > > however now I see that there are still some tweaks to do because the y > > > value spikes at the beginning and they do show up too low in the rest > > > of the signal tail. > > > I can see the signal varying however it does not provide for a proper > > > view of the signal. I wonder if this is the same behavior in a Mac? > > > > > > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
