Skip to main content
Inspiring
March 8, 2026
Question

Extendscript create bars and tone timebase

  • March 8, 2026
  • 2 replies
  • 36 views

Hi folks

I'm trying to create bars and tone programmatically using the API. I can't figure out the format of timebase, it either fails or creates a 29.97 bars and tone (I want 24fps)

Docs say

app.project.newBarsAndTone(width, height, timeBase, PARNum, PARDen, audioSampleRate, name)

 

Here's what I've tried.

Fails     

var audioSampleRate = sequence.getSettings().audioSampleRate;



var bars = app.project.newBarsAndTone(1920, 1080, "24.00", 1, 1, audioSampleRate, "filler");

var bars = app.project.newBarsAndTone(1920, 1080, "24.00 fps", 1, 1, audioSampleRate, "filler");

So it's not a string, even though the docs say a timebase is a string

 

Sequence.timebase¶

app.project.sequences[index].timebase

 

Description¶

The number of ticks per frame in the sequence. Converted to seconds, this is commonly referred to as the frame duration of the sequence.

 

Type¶

String; read-only.

 

Creates 29.97 , which is assumed is the default?   

var bars = app.project.newBarsAndTone(1920, 1080, 24.00, 1, 1, audioSampleRate, "filler");

var bars = app.project.newBarsAndTone(1920, 1080, 24, 1, 1, audioSampleRate, "filler");

var bars = app.project.newBarsAndTone(1920, 1080, 10584000000, 1, 1, audioSampleRate, "filler");

var bars = app.project.newBarsAndTone(1920, 1080, sequence.timebase, 1, 1, audioSampleRate, "filler");

 

Can anyone help with the correct parameters?

 

 

 

    2 replies

    Bruce Bullis
    Legend
    June 10, 2026

    I think the timebases in use, are those referred to at the top of the PProPanel sample:

     

    var TIMEDISPLAY_24Timecode				= 100;
    var TIMEDISPLAY_25Timecode = 101;
    var TIMEDISPLAY_2997DropTimecode = 102;
    var TIMEDISPLAY_2997NonDropTimecode = 103;
    var TIMEDISPLAY_30Timecode = 104;
    var TIMEDISPLAY_50Timecode = 105;
    var TIMEDISPLAY_5994DropTimecode = 106;
    var TIMEDISPLAY_5994NonDropTimecode = 107;
    var TIMEDISPLAY_60Timecode = 108;
    var TIMEDISPLAY_Frames = 109;
    var TIMEDISPLAY_23976Timecode = 110;
    var TIMEDISPLAY_16mmFeetFrames = 111;
    var TIMEDISPLAY_35mmFeetFrames = 112;
    var TIMEDISPLAY_48Timecode = 113;
    var TIMEDISPLAY_AudioSamplesTimecode = 200;
    var TIMEDISPLAY_AudioMsTimecode = 201;

    The following is successful:

     

    var timeBase = 102;

    app.project.newBarsAndTone(666, 555, timeBase, 1, 1, 48000, "Tony")

     

    Community Manager
    June 8, 2026

    Hey there, ​@Imkindofabigdeal,

    Thanks for the question. I think we’d need a product team member to help here. ​@Bruce Bullis might be able to assist here. Sorry for the hassle.

     

    Thanks,
    Kevin