Skip to content

Commit

Permalink
Reloaded / Fx Tap : progress
Browse files Browse the repository at this point in the history
* Work on ui for tap tempo (thank's to marc :-)
  • Loading branch information
d-j-a-y committed Aug 10, 2016
1 parent d05f53f commit dc4c45f
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 10 deletions.
127 changes: 117 additions & 10 deletions veejay-current/veejay-client/share/gveejay.reloaded.glade
Original file line number Diff line number Diff line change
Expand Up @@ -1691,6 +1691,12 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkButton" id="generators_close">
<property name="visible">True</property>
Expand Down Expand Up @@ -5529,6 +5535,101 @@
<property name="type">tab</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="frame_fxloop">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<widget class="GtkHBox" id="hbox49">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<widget class="GtkButton" id="button_tap">
<property name="label" translatable="yes">tap</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_button_tap_clicked" />
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label_tap">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">null</property>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_tap_clear">
<property name="label" translatable="yes">clear tap</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="toggle_tap">
<property name="label" translatable="yes">tap toggle</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label37">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;FX Loop&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="scrolledwindow50">
<property name="visible">True</property>
Expand Down Expand Up @@ -5582,7 +5683,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip" translatable="yes">Clear all sequencer slots</property>
<signal name="clicked" handler="on_button_seq_clearall_clicked" swapped="no"/>
<signal name="clicked" handler="on_button_seq_clearall_clicked" />
<child>
<widget class="GtkHBox" id="hbox48">
<property name="visible">True</property>
Expand Down Expand Up @@ -5812,7 +5913,7 @@
</child>
</widget>
<packing>
<property name="position">2</property>
<property name="position">3</property>
</packing>
</child>
<child>
Expand All @@ -5823,7 +5924,7 @@
<property name="use_markup">True</property>
</widget>
<packing>
<property name="position">2</property>
<property name="position">3</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
Expand Down Expand Up @@ -6259,7 +6360,7 @@
</child>
</widget>
<packing>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
<child>
Expand All @@ -6270,7 +6371,7 @@
<property name="use_markup">True</property>
</widget>
<packing>
<property name="position">3</property>
<property name="position">4</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
Expand Down Expand Up @@ -7471,7 +7572,7 @@
</child>
</widget>
<packing>
<property name="position">4</property>
<property name="position">5</property>
</packing>
</child>
<child>
Expand All @@ -7482,7 +7583,7 @@
<property name="use_markup">True</property>
</widget>
<packing>
<property name="position">4</property>
<property name="position">5</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
Expand Down Expand Up @@ -11629,7 +11730,7 @@ YUV (current)</property>
</child>
</widget>
<packing>
<property name="position">5</property>
<property name="position">6</property>
</packing>
</child>
<child>
Expand All @@ -11640,7 +11741,7 @@ YUV (current)</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="position">5</property>
<property name="position">6</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
Expand Down Expand Up @@ -14787,7 +14888,7 @@ YUV (current)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip" translatable="yes">Save Samplelist</property>
<property name="tooltip" translatable="yes">Save Samplelist (press [SHIFT] to Save as)</property>
<signal name="button_press_event" handler="on_button_samplelist_qsave_clicked" />
<child>
<widget class="GtkAlignment" id="alignment55">
Expand Down Expand Up @@ -16271,6 +16372,12 @@ YUV (current)</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkButton" id="inputstream_close">
<property name="visible">True</property>
Expand Down
32 changes: 32 additions & 0 deletions veejay-current/veejay-client/src/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#include <veejay/vj-msg.h>
#include <gtktimeselection.h>
#include <veejay/vims.h>
#include <sys/time.h>
#include <sys/timeb.h>

static int config_file_status = 0;
static gchar *config_file = NULL;
static int srt_locked_ = 0;
Expand Down Expand Up @@ -2559,6 +2562,35 @@ int on_curve_buttontime_clicked()
return 1;
}

static struct timeb tap_time;
static int firsttap;
void on_button_tap_clicked (GtkWidget *widget , gpointer user_data)
{
struct timeb current_time;
ftime(&current_time);

GtkLabel *label = GTK_LABEL(glade_xml_get_widget_( info->main_window, "label_tap" ));

if(firsttap == 0)
{
firsttap = 1;
veejay_memcpy( &tap_time, &current_time, sizeof(struct timeb ));

if (label)
{
gtk_label_set_text (label, "TAP TAP TAP");
}
}
else
{
double diff_time = difftime(current_time.time, tap_time.time) + ((current_time.millitm - tap_time.millitm)/1000.0);

veejay_memcpy( &tap_time, &current_time, sizeof(struct timeb ));

vj_msg(VEEJAY_MSG_INFO, "%lf", 60/diff_time);
gtk_label_set_text (label, "");
}
}

void on_framerate_inc_clicked( GtkWidget *w, gpointer data )
{
Expand Down

0 comments on commit dc4c45f

Please sign in to comment.