Key-command for "insert tempo at cursor"?

Hello,

Is there a key-command (or a way to make a macro) to insert a new automation point in the tempo track at the cursor position, at the current tempo?

This would make my life easier, as one thing that bugs me is that inserting a tempo point with the mouse doesn’t snap to the quantize setting… Moving it does, but not inserting it, which is inconsistent with other parts of the program… Why??

Thanks!

I AGREE!!! When I find a point in the piece, then open the tempo track, it would be great to insert a point at the cursor location regardless of the grid. Now, I zoom in a ton and then click the point in.

1 Like

+1

Needed.

+1000

Try this - Make it and assign a Key command:

You can also use similar thing to insert Signature:

2 Likes

Regarding inserting a point with the mouse:
If you use these settings (pencil tool and grid snaps at cursor) you can insert tempo events at the cursor.
grafik

Of course, if you can set the Grid setting to “Cursor” only, as you probably know.

Yes this is the standard way tbh.

What we’re after here is a method that involves a simple key press to insert a tempo change at the cursor position.

Instead of having to move the mouse and change tools Etc.

2 Likes

I understand. The first two gents looked like they tried to look for a key command only because it doesn’t work with the mouse. So, if it works with the mouse maybe there is no need for the key command anymore?
The mouse solution works only on the tempo track directly, though. It doesn’t work in the Tempo Editor, as the editor has its own snap settings.

(I also see how old this thread is, I am posting this for future visitors.)

My preference would be to have have a key-command. Find position, enter KC, enter value, done.
The mouse comment was a secondary one of frustration.

Cheers!

2 Likes

Yes exactly. So for now my PLE will work. (Except when in VFE mode as you know.)

Let’s hope our request for KC gets implemented.

2 Likes

I remember asking Greg about this during one of his Cubase hangouts and he was surprised that there wasn’t a way to do it via key commmand. Huge +1!

2 Likes

Another +1. I wouldn’t complain if this “tech” was also available for any automation track and MIDI CC lane data either. I do have a makeshift LE preset for CC1 (transforms velocity into CC1, thus creating a single CC node under the selected event), but it would be awesome if I could just use one key command to “mark” any point under the cursor at any time.

2 Likes

Thanks for this PLE preset! It works with a few caveats (are there fixes for these?):

  • Won’t work if focus is on a different track list than where the tempo track is (we use the Upper and Lower Track list scheme in the Project window, the Upper Track List contains Tempo, Signature, Marker and other utility type tracks, and the Lower Track List contains Audio, Instruments, etc… so if our Lower Track List is highlighted the PLE won’t work).
  • Has annoying glitch that puts the view at bar 1

Update: I’ve built a Keyboard Maestro Macro to deal with all this (working somewhat reliably):

  1. Divide Track List (to undo upper and lower, i.e. one track list)
  2. first try crashed cubase so added .2 pause
  3. Trigger PLE preset
  4. Return (because tempo field is highlighted and ready for input)
  5. 2 nudge key commands (brings view back into focus of playhead)
  6. Divide Track List (again, to re-divide the track list)
1 Like

Great job! It kinda amazes me that inserting tempo cannot be handled at least with some CCs. Perhaps I should give it a try, though I barely change tempo (if ever) :smiley:

OK, back.

Here’s a snippet for changing BPM using a knob set to CC 24 - Channel 0 - TwosComplement, while at the same time inserting the new BPM at cursor. This will work as long as we are on the Tempo Track.

I’ve followed the instructions given by @Phil_Pendlebury, however instead of creating a PLE (not possible in midi remote) I’ve created a sequence of commands to execute.

I’ve done some pretty basic testing, seems to work well here, but who knows? :slight_smile: However, it can give some ideas to anyone interested into this approach.

var midiremote_api = require('midiremote_api_v1')
var deviceDriver = midiremote_api.makeDeviceDriver('Intro', 'Script BPM', 'Someone')

var midiInput = deviceDriver.mPorts.makeMidiInput("midiInput")
var midiOutput = deviceDriver.mPorts.makeMidiOutput("midiOutput")

var detect = deviceDriver.makeDetectionUnit()
detect
    .detectPortPair(midiInput, midiOutput)
    .expectInputNameContains('your midi input name or part of it')
    .expectOutputNameContains('your midi output name or part of it')
    
var surface=deviceDriver.mSurface

var knobBPM=surface.makeKnob(0,0,1,1)
knobBPM.mSurfaceValue.mMidiBinding
    .setInputPort(midiInput)
    .bindToControlChange(0,24)
    .setTypeRelativeTwosComplement()

var page=deviceDriver.mMapping.makePage("page")

var delayMS=10
var timeStampForKnob=0

var bpmStep=1 


page.mHostAccess.mTransport.mTimeDisplay.mOnChangeTempoBPM=function(activeDevice,activeMapping,BPM){

    activeDevice.setState("BPM",""+BPM)

}

var customVarBPMUp=surface.makeCustomValueVariable("customVarBPMUp")
var customVarBPMDown=surface.makeCustomValueVariable("customVarBPMDown")

var dummyBPMUp=page.mCustom.makeHostValueVariable("dummyBPMUp")
var dummyBPMDown=page.mCustom.makeHostValueVariable("dummyBPMDown")

var ourSequence=[['Navigate','Right'],['Edit','Copy'],['Edit','Paste'],['Transport','Enter Tempo']]

var ourSequenceLength=ourSequence.length
var ourSequenceCustomVars=[]

for(var i=0;i<ourSequenceLength;i++){
    
    var customSequenceStepVar=surface.makeCustomValueVariable("customSequenceStepVar"+i)
    ourSequenceCustomVars.push(customSequenceStepVar)

}

for(var i=0;i<ourSequenceLength;i++){

    page.makeCommandBinding(ourSequenceCustomVars[i],ourSequence[i][0],ourSequence[i][1]).mOnValueChange=function(activeDevice,activeMapping,value,diff){
       
        var i=this.i 
        if(i<this.ourSequenceLength-1){
 
            i++
            ourSequenceCustomVars[i].setProcessValue(activeDevice,1-ourSequenceCustomVars[i].getProcessValue(activeDevice))

        } else {

            ourSequenceCustomVar.setProcessValue(activeDevice,1-ourSequenceCustomVar.getProcessValue(activeDevice))
        
        }

    }.bind({i,ourSequenceLength})

}

var ourSequenceCustomVar=surface.makeCustomValueVariable("ourSequenceCustomVar")


var finalBPMDummyHostValue=page.mCustom.makeHostValueVariable("finalBPMDummyHostValue")

page.makeValueBinding(ourSequenceCustomVar,finalBPMDummyHostValue).mOnValueChange=function(activeDevice,activeMapping,value,diff){
    
    var newBPMInt=parseInt(activeDevice.getState("newBPM"))
    page.mHostAccess.mTransport.mTimeDisplay.setTempoBPM(activeMapping,newBPMInt)

}

knobBPM.mSurfaceValue.mOnProcessValueChange=function(activeDevice,value,diff){
    
    var currentStamp=new Date().getTime()

    if (currentStamp<timeStampForKnob+delayMS){

        return 
    }

    timeStampForKnob=currentStamp

    if(diff<0 || value==0){

        customVarBPMDown.setProcessValue(activeDevice,1-customVarBPMDown.getProcessValue(activeDevice))

    } else {

        customVarBPMUp.setProcessValue(activeDevice,1-customVarBPMUp.getProcessValue(activeDevice))

    }

}


page.makeValueBinding(customVarBPMUp,dummyBPMUp).mOnValueChange=function(activeDevice,activeMapping,value,diff){

    updateBPM(activeDevice,1)   

}

page.makeValueBinding(customVarBPMDown,dummyBPMDown).mOnValueChange=function(activeDevice,activeMapping,value,diff){

    updateBPM(activeDevice,-1)   
    
}


function updateBPM(activeDevice,direction){

    var BPMInt=parseInt(activeDevice.getState("BPM"))
    
    var newBPM=BPMInt+direction*bpmStep 
    
    if(!(newBPM>360 || newBPM<1)){

        activeDevice.setState("newBPM",""+newBPM)

        ourSequenceCustomVars[0].setProcessValue(activeDevice,1-ourSequenceCustomVars[0].getProcessValue(activeDevice))

    }

}