Author Topic: Waveform - Tempostream?!  (Read 237 times)

ralph000

  • Posts: 2
Waveform - Tempostream?!
« on: 23 Aug '17 - 19:02 »
Hi there,

is there a way to display a waveform after in-/de- creasing the tempo of a track?
The original waveform is created out of the file and of of course there are no changes.
So if i select an mp3 song my waveform will be created with th origin data, then i apply the "tempo" but in this case
the waveform doesnīt match to the tempostream any longer, it should be either longer or shorter then the origin one.
Of course i found the waveform property tempofactor, but i canīt notice any changes if i apply this property.
Thanx for a hint!

Greets Ralph

radio42

  • Posts: 4574
Re: Waveform - Tempostream?!
« Reply #1 on: 25 Aug '17 - 19:27 »
You need to recreate the Graphic... did you do that?

ralph000

  • Posts: 2
Re: Waveform - Tempostream?!
« Reply #2 on: 26 Aug '17 - 12:52 »
Hi thanx for your reply,

sure, i did, after applying, for testing, wf.tempofactor=0.1,......wf.createbitmap(.....), i also tried rerendering the WF, no success.
If i do the same with the gainfactor property i get the changes in the WF.
So far i didnīt searched  for, but thereīs no way to create a Wf out of a decoded tempostream, right?

Ralph
« Last Edit: 26 Aug '17 - 18:08 by ralph000 »

radio42

  • Posts: 4574
Re: Waveform - Tempostream?!
« Reply #3 on: 28 Aug '17 - 08:12 »
The "TempoFactor" property only internally sets "SyncFactor" property.
I don't know how you display the WaveForm, but the SyncFactor influences the following methods:
- SyncPlayback
- Position2Rendering
- Position2Playback
- Position2Frames
- Frame2Bytes

When you call the "CreateBitmap" method, you always specify the 'clipRectangle' region, as well as the 'frameStart' and 'frameEnd'.
As such, the WaveForm in the given region would always look the same for any given frameStart/End - regardless of any set tempo.
I.e. you would change the tempo of a stream, you would need to adjust the region (clipRectangle) yourself accordingly.
E.g. a stream played at half speed would mean a twice as long region.