Waveform Macros - Question

Discussion about: tracktion.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Does anyone know how to get the BPM of a project programmatically using macros? It would be nice if there were a list of valid Tracktion Waveform object names somewhere. I tried something like this to see if I could get a list of project properties but "project" isn't a valid object.

var projprops=project.getPropertyNames();

I was hoping BPM was one of the project properties returned but I can't even get the property list because "project" isn't a valid object.
At the end of the day, I just want to get the BPM into a variable. Anyone know how to do this? (and as a bonus answer, if you know where I can find a list of valid Waveform objects to use in macros, that would be helpful!).

Thanks.

Post

Has anyone been able to get the function getPropertyNames to work? Even with a valid object it just tells me that the function is unknown.

By the way, you would probably be looking for an Edit object rather than a Project and the property might be called tempo rather than BPM. I'm not sure if the tempo is a single Edit property or if there is an array of tempos in the tempo track.

It's so hard to find things in Waveform's scripting.
Surely there must be consensus by now...

Post

Have not been able to make getPropertyNames work either. The documentation of the scripting capability of Waveform is horrid. As much as I like the DAW, the scripting capability just doesn't seem to be there. It really needs to be improved.

Post

It definitely needs to be bought up to date, and I'd consider a worthy part of a paid update.

Post

jga wrote: Mon Aug 05, 2024 6:32 pm Does anyone know how to get the BPM of a project programmatically using macros? It would be nice if there were a list of valid Tracktion Waveform object names somewhere. I tried something like this to see if I could get a list of project properties but "project" isn't a valid object.

Thanks.
BPM isn't fixed across a project. It can change at any point, possibly several times throughout, so it wouldn't make sense for there to be a single value.
[W10-64, T5/6/7/W8/9/10/11/12/13, 32(to W8)&64 all, Spike],[W7-32, T5/6/7/W8, Gina16] everything underused.

Post

Makes sense. Perhaps they could implement a method that pulls BPM at a specified point in the project. Something like:

var bpm = Traction.getTempo(5.0.0)

Post

... or at the current playback position ?
Waveform 13; Win10 desktop/8 Gig; Win11 Laptop; MPK261; VFX+disfunctional ESQ-1

Post

Right - something like this maybe...

var localBPM = Traction.getTempo(Tracktion.getPosition('playHead'))

Post Reply

Return to “Tracktion”