# Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
 It is currently Wed Jan 29, 2020 2:50 pm

 All times are UTC - 5 hours

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Using qtimeMBS to create wave picturePosted: Wed Oct 20, 2010 12:16 pm

Joined: Fri Jan 08, 2010 9:59 am
Posts: 315
Hi there all MBS users (and Christian)

I'm looking at using the qtimeMBS functions to shoot thru a movie at poistions of say the duration/100
at those points I want to get the

I have this
TimeMBS as integer
time units = seconds * time scale
Position = PositionTime / TimeScale
and
GetSoundLevelMeterValue as integer (method from class QTGrabberMBS)

this is what I want (if you could fill in the blanks) (player is the movieplayer on the window, canvas1 is well, a canvas)

`dim i,x,y,y0,y1,x1,x2,j, y2,x3 as integer=0dim svolumn(100) as integerx=canvas1.widthy=canvas1.heightdim m as movief=GetOpenFolderItem("")if f <> Nil then  m=f.OpenAsmovie  Player.Movie=mend ifx1=player.durationx2=x1/100for i=0 to 100  //player.position=i*x2                                             - these two lines are what I need the syntax for  //svolumn(i)=player.GetSoundLevelMeterValue  //if svolumn(i)>j then j=svolumn(i)  ' gets the loudest volumn)nextx2=x/100   ' this is the canvas width divided into 100y=canvas.height/2+canvas.top 'sets the midline in the canvasy2=ycanvas1.graphics.ForeColor=&c0000ffx3=0+canvas1.leftfor i=1 to 100  y1=y+(y/j) ' this sets the volumn for the midpoint+the volumn amount  canvas1.graphics.DrawLine(x3,y2,canvas1.left+(x2*i),y1)  y2=y1  x3=x2next`

so, what would I use for the 'rem'ed statements for this to work?

If we find this out, this means that we have a class that we can call to draw a waveform on any canvas, any size in our windows with the help of MBS quicktime features.

and yes, I have googled and searched the web and the forum extensively looking for this.
I know theres a class for this on the web - it's buggy (wont play), takes ages to draw it, and flickers like a beast in windows (so it's not really cross platform)

If I get these answers, I will make a complete class - and I will post it here in step by step instructions so you can't go wrong. Obviously there are a lot of other features to include but this is the bare bones and hopefully there'll be more to come!
cheers,
Sean

Top

 Post subject: Re: Using qtimeMBS to create wave picturePosted: Wed Oct 20, 2010 1:37 pm

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
If you want to draw a waveform, get the raw sound data using movie.SoundRawDataMBS from our plugin.
There you can search the highs and lows for each line you draw in your waveform.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php

Top

 Post subject: Re: Using qtimeMBS to create wave picturePosted: Wed Oct 20, 2010 1:49 pm

Joined: Fri Jan 08, 2010 9:59 am
Posts: 315
How would I go through it to get the different positions?

is the raw data in a memory block?

can you be a little more specific?

I live in Poland - could I give you a call?

Cheers,
Sean

Top

 Post subject: Re: Using qtimeMBS to create wave picturePosted: Wed Oct 20, 2010 3:27 pm

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
There is at least one sample app on our website, I think.

You get a memoryblock with the sound format you requested. So you walk over the bytes and count the min/max values for the channels you requested.

Our office is open tomorrow and the phone number is on the website...

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC - 5 hours

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forum

Search for:
 Jump to:  Select a forum ------------------ General    General    Getting Started    Networking    Databases    Visual Basic to REAL Studio Conversion    Games    Plugins    Tips    Web Control SDK Platform Specific    Windows    Macintosh    Linux    Web Other Topics    Announcements    Off-Topic    Third Party Add-ons
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group