Sharing: Metronome Macro Button

Discussions about Macros for DTouch for Cubase and DTouch for Nuendo
Post Reply
TonyR
Posts: 42
Joined: 25 Oct 2019 18:09
Location: Austin, Texas USA
Contact:

Sharing: Metronome Macro Button

Post by TonyR » 13 Dec 2019 14:29

Created a metronome button that switches on when off and vice versa. Sharing for anyone that could use it.

I don't know how to upload the .dat file, so here is the code. Please note, remove “(indent spaces)” in the code and just add a few spaces in there.
# Macro Metronome
metval = dtmacro.get_metronome()
if metval:
(indent spaces) metval = 0
(indent spaces) showmsg = "off"
else:
(indent spaces) metval = 1
(indent spaces) showmsg = "on"
# dtmacro.show_status_msg_wait(showmsg)
dtmacro.set_metronome(metval)
# Macro Metronome code end
Would appreciate if someone can tell me how to upload .dat files to this forum for sharing.

DT_bettinzana
Posts: 772
Joined: 21 Feb 2016 12:05

Re: Sharing: Metronome Macro Button

Post by DT_bettinzana » 13 Dec 2019 16:11

TonyR wrote:
13 Dec 2019 14:29
Created a metronome button that switches on when off and vice versa. Sharing for anyone that could use it.

I don't know how to upload the .dat file, so here is the code. Please note, remove “(indent spaces)” in the code and just add a few spaces in there.
# Macro Metronome
metval = dtmacro.get_metronome()
if metval:
(indent spaces) metval = 0
(indent spaces) showmsg = "off"
else:
(indent spaces) metval = 1
(indent spaces) showmsg = "on"
# dtmacro.show_status_msg_wait(showmsg)
dtmacro.set_metronome(metval)
# Macro Metronome code end
Would appreciate if someone can tell me how to upload .dat files to this forum for sharing.
Hello and thank you for the macro. It is useful for all the other users to read a piece of code.
Anyway, in this case DTouch already has a "Standard Function Button" (check the section "Transport") named "Click ON/OFF". The advantage of this button is that it shows the status.

To upload a .dat file you can use the "attachements" function of this forum. It appears when you write a post.
Silvano Bettinzana
Devil Technologies

TonyR
Posts: 42
Joined: 25 Oct 2019 18:09
Location: Austin, Texas USA
Contact:

Re: Sharing: Metronome Macro Button

Post by TonyR » 13 Dec 2019 17:21

Thanks. I didn’t see that one in the button selection menu. :oops:

Post Reply