Rename sync turntable roles
authorAlexander Koenig <alex@lisas.de>
Sat, 13 Feb 2021 23:02:30 +0000 (00:02 +0100)
committerAlexander Koenig <alex@lisas.de>
Sat, 13 Feb 2021 23:02:30 +0000 (00:02 +0100)
src/tX_legacy_vtt.cc
src/tX_maingui.cc
src/tX_midiin.cc
src/tX_mouse.cc
src/tX_seqpar.cc
src/tX_seqpar.h
src/tX_ui_interface.cc
src/tX_vtt.cc
src/tX_vtt.h
src/tX_vttgui.cc
src/tX_vttgui.h

index 3795ee6355c70daeb99c10baaa49fe2a1f8731bb..f922843d957f3fa2a0306ee8f32cf14a70cb07e2 100644 (file)
@@ -39,8 +39,8 @@ int vtt_class :: load_10(FILE * input)
        
        atload(name);
        atload(filename);
-       atload(is_sync_master);
-       atload(is_sync_client);
+       atload(is_sync_leader);
+       atload(is_sync_follower);
        atload(sync_cycles);
        atload(rel_volume);
        recalc_volume();
@@ -79,8 +79,8 @@ int vtt_class :: load_11(FILE * input)
        
        atload(name);
        atload(filename);
-       atload(is_sync_master);
-       atload(is_sync_client);
+       atload(is_sync_leader);
+       atload(is_sync_follower);
        atload(sync_cycles);
        atload(rel_volume);
        recalc_volume();
@@ -117,7 +117,7 @@ int vtt_class :: load_11(FILE * input)
        atload(pid);
        sp_loop.set_persistence_id(pid);
        atload(pid);
-       sp_sync_client.set_persistence_id(pid);
+       sp_sync_follower.set_persistence_id(pid);
        atload(pid);
        sp_sync_cycles.set_persistence_id(pid);
        atload(pid);
@@ -161,8 +161,8 @@ int vtt_class :: load_12(FILE * input)
        atload(buffer);
        this->set_name(buffer);
        atload(filename);
-       atload(is_sync_master);
-       atload(is_sync_client);
+       atload(is_sync_leader);
+       atload(is_sync_follower);
        atload(sync_cycles);
        atload(rel_volume);
        recalc_volume();
@@ -197,7 +197,7 @@ int vtt_class :: load_12(FILE * input)
        atload(pid);
        sp_loop.set_persistence_id(pid);
        atload(pid);
-       sp_sync_client.set_persistence_id(pid);
+       sp_sync_follower.set_persistence_id(pid);
        atload(pid);
        sp_sync_cycles.set_persistence_id(pid);
        atload(pid);
@@ -306,8 +306,8 @@ int vtt_class :: load_13(FILE * input)
        atload(buffer);
        this->set_name(buffer);
        atload(filename);
-       atload(is_sync_master);
-       atload(is_sync_client);
+       atload(is_sync_leader);
+       atload(is_sync_follower);
        atload(sync_cycles);
        atload(rel_volume);
        atload(rel_pitch);
@@ -348,7 +348,7 @@ int vtt_class :: load_13(FILE * input)
        atload(pid);
        sp_loop.set_persistence_id(pid);
        atload(pid);
-       sp_sync_client.set_persistence_id(pid);
+       sp_sync_follower.set_persistence_id(pid);
        atload(pid);
        sp_sync_cycles.set_persistence_id(pid);
        atload(pid);
@@ -463,8 +463,8 @@ int vtt_class :: load_14(FILE * input)
        atload(buffer);
        this->set_name(buffer);
        atload(filename);
-       atload(is_sync_master);
-       atload(is_sync_client);
+       atload(is_sync_leader);
+       atload(is_sync_follower);
        atload(sync_cycles);
        atload(rel_volume);
        atload(rel_pitch);
@@ -508,7 +508,7 @@ int vtt_class :: load_14(FILE * input)
        atload(pid);
        sp_loop.set_persistence_id(pid);
        atload(pid);
-       sp_sync_client.set_persistence_id(pid);
+       sp_sync_follower.set_persistence_id(pid);
        atload(pid);
        sp_sync_cycles.set_persistence_id(pid);
        atload(pid);
index bd6aeb5ee693e316ee6598b993ba0791fe445a7a..28a48acb66a71f3ce8628936431e04ac8ed8c4e1 100644 (file)
@@ -1085,7 +1085,7 @@ Are you sure you really want this?");
        return NULL;    
 }
 
-void create_master_menu() 
+void create_main_menu() 
 {
        GtkWidget *menu_item;
        GtkWidget *sub_menu;
@@ -1339,7 +1339,7 @@ void create_maingui(int x, int y)
        gtk_container_add(GTK_CONTAINER(wrapbox), mother_of_all_boxen);
        gtk_widget_show(mother_of_all_boxen);   
 
-       create_master_menu();
+       create_main_menu();
 
        g_signal_connect(G_OBJECT(main_window), "motion_notify_event", G_CALLBACK(tx_mouse::motion_notify_wrap), &mouse);
        g_signal_connect(G_OBJECT(main_window), "button_press_event", G_CALLBACK(tx_mouse::button_press_wrap), &mouse);
index 164ebf38a55c1c3d8f3fd686da6b9f4695365b5d..bab48804c74e059caaf77fb723b23e6047154606 100644 (file)
@@ -609,7 +609,7 @@ void tX_midiin::auto_assign_midi_mappings(GtkWidget *widget, gpointer dummy)
                
                /* The toggles mapped to notes... */
                cc_note((&(*vtt)->sp_trigger),          0, 60+ctr);
-               cc_note((&(*vtt)->sp_sync_client),      1, 60+ctr);
+               cc_note((&(*vtt)->sp_sync_follower),    1, 60+ctr);
                cc_note((&(*vtt)->sp_loop),             2, 60+ctr);
                cc_note((&(*vtt)->sp_lp_enable),        3, 60+ctr);
                cc_note((&(*vtt)->sp_ec_enable),        4, 60+ctr);
index 6e5572ad4093e3ee4c360d6692ff14cba197089c..5f83f22a64f1cf77d5cb66e5c4662b74639c1713 100644 (file)
@@ -290,7 +290,7 @@ void tx_mouse::key_press(GtkWidget *widget, GdkEventKey *eventKey) {
 
                        case GDK_KEY_Tab: if (press_key(KEY_Tab)) { vtt_class::focus_next(); } break;
 
-                       case GDK_KEY_s: if (press_key(KEY_s)) { vtt->sp_sync_client.receive_input_value(!vtt->is_sync_client); } break;
+                       case GDK_KEY_s: if (press_key(KEY_s)) { vtt->sp_sync_follower.receive_input_value(!vtt->is_sync_follower); } break;
 
                        case GDK_KEY_m:  if (press_key(KEY_m)) { vtt->sp_mute.receive_input_value(1); } break;
                        case GDK_KEY_Control_L:  if (press_key(KEY_Control_L)) { vtt->sp_mute.receive_input_value(1); } break;
index 42e7ea1ac6e21a66146ebe07a44ca77a224cad95..eb0960002e9d331965f11851cd7f208dbbc28e6d 100644 (file)
@@ -639,23 +639,23 @@ void tX_seqpar_vtt_loop :: do_update_graphics ()
 
 /**** Sequencable Parameter: TURNTABLE SYNC CLIENT ****/
 
-tX_seqpar_vtt_sync_client :: tX_seqpar_vtt_sync_client()
+tX_seqpar_vtt_sync_follower :: tX_seqpar_vtt_sync_follower()
 {
        set_mapping_parameters(0,0,0,0);
        is_boolean=true;
 }
 
-void tX_seqpar_vtt_sync_client :: do_exec(const float value)
+void tX_seqpar_vtt_sync_follower :: do_exec(const float value)
 {
-       tt->set_sync_client((value>0), tt->sync_cycles);
+       tt->set_sync_follower((value>0), tt->sync_cycles);
 }
 
-void tX_seqpar_vtt_sync_client :: do_update_graphics ()
+void tX_seqpar_vtt_sync_follower :: do_update_graphics ()
 {
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tt->gui.sync_client), tt->is_sync_client);
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tt->gui.sync_follower), tt->is_sync_follower);
 }
 
-const char * tX_seqpar_vtt_sync_client :: get_name()
+const char * tX_seqpar_vtt_sync_follower :: get_name()
 {
         return "Sync Client (On/Off)";
 }
@@ -669,7 +669,7 @@ tX_seqpar_vtt_sync_cycles :: tX_seqpar_vtt_sync_cycles()
 
 void tX_seqpar_vtt_sync_cycles :: do_exec(const float value)
 {
-       tt->set_sync_client(tt->is_sync_client, (int) value);
+       tt->set_sync_follower(tt->is_sync_follower, (int) value);
 }
 
 void tX_seqpar_vtt_sync_cycles :: do_update_graphics ()
index d014deece8f3667c5537c0378895b91e4b32b670..ca8ff74bd88ea0594b4fe5cc8f048cedc9703d2e 100644 (file)
@@ -282,10 +282,10 @@ class tX_seqpar_vtt_loop : public tX_seqpar_update
         virtual const char *get_name(); 
 };
 
-class tX_seqpar_vtt_sync_client : public tX_seqpar_update
+class tX_seqpar_vtt_sync_follower : public tX_seqpar_update
 {
        public:
-       tX_seqpar_vtt_sync_client();
+       tX_seqpar_vtt_sync_follower();
        private:        
        virtual void do_exec(const float value);
        virtual void do_update_graphics();      
index c00d4ee10b615ba5ee3316eb8b45fa9b83516816..c07ca9ca3e230c02f106f92b81015201ab1d7904 100644 (file)
@@ -35,8 +35,8 @@ create_tx_adjust (void)
   GtkWidget *vbox1;
   GtkWidget *label34;
   GtkWidget *grid7;
-  GtkAdjustment *master_cycles_adj;
-  GtkWidget *master_cycles;
+  GtkAdjustment *leader_cycles_adj;
+  GtkWidget *leader_cycles;
   GtkWidget *label36;
   GtkWidget *label35;
   GtkAdjustment *cycles_adj;
@@ -56,7 +56,7 @@ create_tx_adjust (void)
   gtk_box_pack_start (GTK_BOX (dialog_vbox2), vbox1, TRUE, TRUE, 0);
   gtk_container_set_border_width (GTK_CONTAINER (vbox1), 4);
 
-  label34 = gtk_label_new ("In order to compute the optimum pitch value, please specify how many loops of this turntable should play as fast as how many loops of the masterturntable:");
+  label34 = gtk_label_new ("In order to compute the optimum pitch value, please specify how many loops of this turntable should play as fast as how many loops of the leader turntable:");
   gtk_widget_show (label34);
   gtk_box_pack_start (GTK_BOX (vbox1), label34, FALSE, FALSE, 0);
   gtk_label_set_line_wrap (GTK_LABEL (label34), TRUE);
@@ -66,14 +66,14 @@ create_tx_adjust (void)
   gtk_box_pack_start (GTK_BOX (vbox1), grid7, TRUE, TRUE, 0);
   gtk_grid_set_column_spacing (GTK_GRID (grid7), 3);
 
-  master_cycles_adj = gtk_adjustment_new (1, 1, 100, 1, 10, 0);
-  master_cycles = gtk_spin_button_new (GTK_ADJUSTMENT (master_cycles_adj), 1, 0);
-  gtk_widget_set_hexpand(master_cycles, TRUE);
-  gtk_widget_show (master_cycles);
-  gtk_grid_attach (GTK_GRID (grid7), master_cycles, 1, 1, 1, 1);
-  gtk_widget_set_tooltip_text(master_cycles, "Specify the number of loops for the master turntable.");
+  leader_cycles_adj = gtk_adjustment_new (1, 1, 100, 1, 10, 0);
+  leader_cycles = gtk_spin_button_new (GTK_ADJUSTMENT (leader_cycles_adj), 1, 0);
+  gtk_widget_set_hexpand(leader_cycles, TRUE);
+  gtk_widget_show (leader_cycles);
+  gtk_grid_attach (GTK_GRID (grid7), leader_cycles, 1, 1, 1, 1);
+  gtk_widget_set_tooltip_text(leader_cycles, "Specify the number of loops for the leader turntable.");
 
-  label36 = gtk_label_new ("Loops of the master turntable:");
+  label36 = gtk_label_new ("Loops of the leader turntable:");
   gtk_widget_show (label36);
   gtk_grid_attach (GTK_GRID (grid7), label36, 0, 1, 1, 1);
 
@@ -110,7 +110,7 @@ create_tx_adjust (void)
   TX_UI_HOOKUP_OBJECT (tx_adjust, vbox1, "vbox1");
   TX_UI_HOOKUP_OBJECT (tx_adjust, label34, "label34");
   TX_UI_HOOKUP_OBJECT (tx_adjust, grid7, "grid7");
-  TX_UI_HOOKUP_OBJECT (tx_adjust, master_cycles, "master_cycles");
+  TX_UI_HOOKUP_OBJECT (tx_adjust, leader_cycles, "leader_cycles");
   TX_UI_HOOKUP_OBJECT (tx_adjust, label36, "label36");
   TX_UI_HOOKUP_OBJECT (tx_adjust, label35, "label35");
   TX_UI_HOOKUP_OBJECT (tx_adjust, cycles, "cycles");
index a37a20a72cd23941ff3ceabc958b00579d951606..5b8f44de2a8dfe69d30eb18e3e442dfc47403810 100644 (file)
@@ -58,7 +58,7 @@ extern void gui_set_color(vtt_class *vtt, GdkRGBA* rgba);
 extern void gui_set_filename(vtt_class *vtt, char *newname);
 extern void delete_gui(vtt_class *vtt);
 extern void gui_update_display(vtt_class *vtt);
-extern void gui_clear_master_button(vtt_class *vtt);
+extern void gui_clear_leader_button(vtt_class *vtt);
 extern void cleanup_vtt(vtt_class *vtt);
 extern int vg_get_current_page(vtt_class *vtt);
 extern f_prec gui_get_audio_x_zoom(vtt_class *vtt);
@@ -78,9 +78,9 @@ pthread_mutex_t vtt_class::render_lock=PTHREAD_MUTEX_INITIALIZER;
 f_prec vtt_class::main_volume=1.0;
 f_prec vtt_class::res_main_volume=1.0;
 
-vtt_class * vtt_class::sync_master=NULL;
-int vtt_class::master_triggered=0;
-int vtt_class::master_triggered_at=0;
+vtt_class * vtt_class::sync_leader=NULL;
+int vtt_class::leader_triggered=0;
+int vtt_class::leader_triggered_at=0;
 vtt_class * vtt_class::focused_vtt=NULL;
 f_prec vtt_class::mix_max_l=0;
 f_prec vtt_class::mix_max_r=0;
@@ -130,8 +130,8 @@ vtt_class :: vtt_class (int do_create_gui)
        loop=1;
        
        is_playing=0;
-       is_sync_master=0;
-       is_sync_client=0;
+       is_sync_leader=0;
+       is_sync_follower=0;
        sync_cycles=0,
        sync_countdown=0;
        
@@ -160,7 +160,7 @@ vtt_class :: vtt_class (int do_create_gui)
        sp_pan.set_vtt((void *) this);
        sp_trigger.set_vtt((void *) this);      
        sp_loop.set_vtt((void *) this); 
-       sp_sync_client.set_vtt((void *) this);  
+       sp_sync_follower.set_vtt((void *) this);        
        sp_sync_cycles.set_vtt((void *) this);  
        sp_lp_enable.set_vtt((void *) this);    
        sp_lp_gain.set_vtt((void *) this);      
@@ -243,8 +243,8 @@ vtt_class :: ~vtt_class()
                delete stereo_effect;
        }
        
-       if (sync_master==this) {
-               sync_master=NULL;
+       if (sync_leader==this) {
+               sync_leader=NULL;
        }
        
        delete_gui(this);
@@ -678,10 +678,10 @@ void vtt_class :: render_scratch()
                                pos_f-=maxpos;
                                if (res_pitch>0) {
                                        if (loop) {
-                                               if (is_sync_master)
+                                               if (is_sync_leader)
                                                {
-                                                       master_triggered=1;
-                                                       master_triggered_at=sample;
+                                                       leader_triggered=1;
+                                                       leader_triggered_at=sample;
                                                }
                                        } else {
                                                want_stop=1;
@@ -691,10 +691,10 @@ void vtt_class :: render_scratch()
                                pos_f+=maxpos;
                                if (res_pitch<0) {
                                        if (loop) {
-                                               if (is_sync_master)
+                                               if (is_sync_leader)
                                                {
-                                                       master_triggered=1;
-                                                       master_triggered_at=sample;
+                                                       leader_triggered=1;
+                                                       leader_triggered_at=sample;
                                                }
                                        } else {
                                                want_stop=1;
@@ -782,9 +782,9 @@ void vtt_class :: forward_turntable()
                        pos_f-=maxpos;
                        if (res_pitch>0) {
                                if (loop) {
-                                       if (is_sync_master) {
-                                               master_triggered=1;
-                                               master_triggered_at=sample;
+                                       if (is_sync_leader) {
+                                               leader_triggered=1;
+                                               leader_triggered_at=sample;
                                        }
                                } else {
                                        want_stop=1;
@@ -794,9 +794,9 @@ void vtt_class :: forward_turntable()
                        pos_f+=maxpos;
                        if (res_pitch<0) {
                                if (loop) {
-                                       if (is_sync_master) {
-                                               master_triggered=1;
-                                               master_triggered_at=sample;
+                                       if (is_sync_leader) {
+                                               leader_triggered=1;
+                                               leader_triggered_at=sample;
                                        }
                                } else {
                                        want_stop=1;
@@ -890,9 +890,9 @@ int16_t * vtt_class :: render_all_turntables()
                        mix_buffer[mix_sample++]=(*vtt)->output_buffer2[sample]*FL_SHRT_MAX;
                }
 
-               if (master_triggered) {
+               if (leader_triggered) {
                        for (vtt=main_list.begin(); vtt!=main_list.end(); vtt++) {
-                               if ((*vtt)->is_sync_client)     {
+                               if ((*vtt)->is_sync_follower)   {
                                        if ((*vtt)->sync_countdown)     {
                                                (*vtt)->sync_countdown--;
                                        } else {
@@ -936,7 +936,7 @@ int16_t * vtt_class :: render_all_turntables()
                        right=!right;
                }
        }
-       master_triggered=0;
+       leader_triggered=0;
                
        vtt=render_list.begin();
        while (vtt!=render_list.end()) {
@@ -959,9 +959,9 @@ void vtt_class :: forward_all_turntables()
                vtt=render_list.begin();
                (*vtt)->forward_turntable();                     
                
-               if (master_triggered) {
+               if (leader_triggered) {
                        for (vtt=main_list.begin(); vtt!=main_list.end(); vtt++) {
-                               if ((*vtt)->is_sync_client){
+                               if ((*vtt)->is_sync_follower){
                                        if ((*vtt)->sync_countdown) {
                                                (*vtt)->sync_countdown--;
                                        } else {
@@ -978,7 +978,7 @@ void vtt_class :: forward_all_turntables()
                }
        }
        
-       master_triggered=0;
+       leader_triggered=0;
        vtt=render_list.begin();
        while (vtt!=render_list.end()) {
                next=vtt;
@@ -1003,9 +1003,9 @@ void vtt_class :: retrigger()
        max_value=0;
        max_value2=0;
        
-       if (is_sync_master)     {
-               master_triggered=1;
-               master_triggered_at=0;
+       if (is_sync_leader)     {
+               leader_triggered=1;
+               leader_triggered_at=0;
        }
 }
 
@@ -1029,7 +1029,7 @@ int vtt_class :: trigger(bool need_lock)
                        (*effect)->activate();
                }
                
-               if (is_sync_master)  {
+               if (is_sync_leader)  {
                        render_list.push_front(this);           
                } else {
                        render_list.push_back(this);
@@ -1077,31 +1077,31 @@ int vtt_class :: stop()
        return res;
 }
 
-void vtt_class :: set_sync_master(int master)
+void vtt_class :: set_sync_leader(int leader)
 {
-       if (master) {
-               if (sync_master) sync_master->set_sync_master(0);
-               sync_master=this;
-               is_sync_master=1;
+       if (leader) {
+               if (sync_leader) sync_leader->set_sync_leader(0);
+               sync_leader=this;
+               is_sync_leader=1;
        } else {
-               if (sync_master==this) sync_master=0;
-               is_sync_master=0;
-               gui_clear_master_button(this);
+               if (sync_leader==this) sync_leader=0;
+               is_sync_leader=0;
+               gui_clear_leader_button(this);
        }
 }
 
-void vtt_class :: set_sync_client(int slave, int cycles)
+void vtt_class :: set_sync_follower(int slave, int cycles)
 {
-       tX_debug("vtt_class::set_sync_client() setting %i, %i.", slave, cycles);
-       is_sync_client=slave;
+       tX_debug("vtt_class::set_sync_follower() setting %i, %i.", slave, cycles);
+       is_sync_follower=slave;
        sync_cycles=cycles;
 //     sync_countdown=cycles; 
        sync_countdown=0;
 }
 
-void vtt_class :: set_sync_client_ug(int slave, int cycles)
+void vtt_class :: set_sync_follower_ug(int slave, int cycles)
 {
-       set_sync_client(slave, cycles);
+       set_sync_follower(slave, cycles);
 }
 
 void vtt_class :: set_main_volume(f_prec new_volume)
@@ -1242,11 +1242,11 @@ int  vtt_class :: save(FILE *rc, gzFile rz, char *indent) {
        } else {
                store_string("audiofile", "");
        }
-       store_bool("sync_master", is_sync_master);
+       store_bool("sync_leader", is_sync_leader);
        store_bool("autotrigger", autotrigger);
        store_bool_sp("loop", loop, sp_loop);
 
-       store_bool_sp("sync_client", is_sync_client, sp_sync_client);
+       store_bool_sp("sync_follower", is_sync_follower, sp_sync_follower);
        store_int_sp("sync_cycles", sync_cycles, sp_sync_cycles);
 
        store_float_sp("volume", rel_volume, sp_volume);
@@ -1363,11 +1363,13 @@ int vtt_class :: load(xmlDocPtr doc, xmlNodePtr node) {
                        gdk_rgba_parse(&color, buffer);
                        gui_set_color(this, &color);
                        restore_string("audiofile", filename);
-                       restore_bool("sync_master", is_sync_master);
+                       restore_bool("sync_leader", is_sync_leader);
+                       restore_bool("sync_master", is_sync_leader); // pre 4.1.0 compatibilty
                        restore_bool("autotrigger", autotrigger);
                        restore_bool_id("loop", loop, sp_loop, nop);
-                       restore_bool_id("sync_client", is_sync_client, sp_sync_client, set_sync_client(is_sync_client, sync_cycles));
-                       restore_int_id("sync_cycles", sync_cycles, sp_sync_cycles, set_sync_client(is_sync_client, sync_cycles));
+                       restore_bool_id("sync_client", is_sync_follower, sp_sync_follower, set_sync_follower(is_sync_follower, sync_cycles)); // pre 4.1.0 compatibilty
+                       restore_bool_id("sync_follower", is_sync_follower, sp_sync_follower, set_sync_follower(is_sync_follower, sync_cycles));
+                       restore_int_id("sync_cycles", sync_cycles, sp_sync_cycles, set_sync_follower(is_sync_follower, sync_cycles));
                        restore_float_id("volume", rel_volume, sp_volume, recalc_volume());
                        restore_float_id("pitch", rel_pitch, sp_pitch, recalc_pitch());
                        restore_bool_id("mute", mute, sp_mute, set_mute(mute));
@@ -1789,14 +1791,14 @@ void vtt_class :: set_sample_rate(int samplerate) {
        set_mix_buffer_size(no_samples);        
 }
 
-void vtt_class :: adjust_to_main_pitch(int master_cycles, int cycles, bool create_event) {
-       if (!sync_master) return;
-       if (this==sync_master) return;
-       if (!sync_master->audiofile) return;
+void vtt_class :: adjust_to_main_pitch(int leader_cycles, int cycles, bool create_event) {
+       if (!sync_leader) return;
+       if (this==sync_leader) return;
+       if (!sync_leader->audiofile) return;
        if (!audiofile) return;
        
-       double master_time=((double) master_cycles)/sync_master->rel_pitch*sync_master->audiofile->get_no_samples()/((double) sync_master->audiofile->get_sample_rate());
-       double my_rel_pitch=((audiofile->get_no_samples()/((double) audiofile->get_sample_rate()))*((double) cycles))/master_time;
+       double leader_time=((double) leader_cycles)/sync_leader->rel_pitch*sync_leader->audiofile->get_no_samples()/((double) sync_leader->audiofile->get_sample_rate());
+       double my_rel_pitch=((audiofile->get_no_samples()/((double) audiofile->get_sample_rate()))*((double) cycles))/leader_time;
        
        if (create_event) {
                sp_pitch.do_exec(my_rel_pitch);
@@ -1805,7 +1807,7 @@ void vtt_class :: adjust_to_main_pitch(int master_cycles, int cycles, bool creat
                sp_pitch.do_exec(my_rel_pitch);
        }
        
-       tX_debug("master_time: %lf, res_pitch: %lf - res time: %lf, (%lf, %lf)", master_time, my_rel_pitch, ((double) cycles)*my_rel_pitch*audiofile->get_no_samples()/((double) audiofile->get_sample_rate()), (double) sync_master->audiofile->get_sample_rate(),(double)  audiofile->get_sample_rate());
+       tX_debug("leader_time: %lf, res_pitch: %lf - res time: %lf, (%lf, %lf)", leader_time, my_rel_pitch, ((double) cycles)*my_rel_pitch*audiofile->get_no_samples()/((double) audiofile->get_sample_rate()), (double) sync_leader->audiofile->get_sample_rate(),(double)  audiofile->get_sample_rate());
        
        sp_pitch.update_graphics();
 }
index 8e9b5af78cb2bb053e8f5b0fa7613a462500e21f..aa4dbae5d1e42eb3200127436c66392eb05b4706 100644 (file)
@@ -70,9 +70,9 @@ class vtt_class
        static f_prec res_main_volume;
        static f_prec vol_channel_adjust;
 
-       static vtt_class * sync_master;
-       static int master_triggered;
-       static int master_triggered_at;
+       static vtt_class * sync_leader;
+       static int leader_triggered;
+       static int leader_triggered_at;
        static vtt_class * focused_vtt;
        static int solo_ctr;
        static int mix_buffer_size;
@@ -89,8 +89,8 @@ class vtt_class
        GdkRGBA color;
 
        int is_playing;
-       bool is_sync_master;
-       bool is_sync_client;
+       bool is_sync_leader;
+       bool is_sync_follower;
        int sync_cycles;
        int sync_countdown;
        bool want_stop;
@@ -194,7 +194,7 @@ class vtt_class
        tX_seqpar_vtt_pan sp_pan;
        tX_seqpar_vtt_trigger sp_trigger;
        tX_seqpar_vtt_loop sp_loop;
-       tX_seqpar_vtt_sync_client sp_sync_client;
+       tX_seqpar_vtt_sync_follower sp_sync_follower;
        tX_seqpar_vtt_sync_cycles sp_sync_cycles;
        tX_seqpar_vtt_lp_enable sp_lp_enable;
        tX_seqpar_vtt_lp_gain sp_lp_gain;
@@ -231,7 +231,7 @@ class vtt_class
        void recalc_volume();
        
        void set_pan(f_prec);
-       void adjust_to_main_pitch(int master_cycles, int cycles, bool create_event);
+       void adjust_to_main_pitch(int leader_cycles, int cycles, bool create_event);
        void set_pitch(f_prec);
        void recalc_pitch();
        
@@ -257,9 +257,9 @@ class vtt_class
        void ec_set_pan(f_prec);
        void ec_clear_buffer();
        
-       void set_sync_master(int);              
-       void set_sync_client(int, int);
-       void set_sync_client_ug(int, int); // and update gui
+       void set_sync_leader(int);              
+       void set_sync_follower(int, int);
+       void set_sync_follower_ug(int, int); // and update gui
        
        void set_scratch(int);
        void xy_input(f_prec, f_prec);
index 3e2df9f8c3a6d872057e3f78ef940e6e5cb13d3a..64160ea522445a9e3a4820cddfff7e0980c29654 100644 (file)
@@ -387,17 +387,17 @@ void ec_volume_changed(GtkWidget *wid, vtt_class *vtt)
        vtt->sp_ec_volume.receive_gui_value(gtk_adjustment_get_value(GTK_ADJUSTMENT(wid)));
 }
 
-void master_setup(GtkWidget *wid, vtt_class *vtt)
+void leader_setup(GtkWidget *wid, vtt_class *vtt)
 {
-       vtt->set_sync_master(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid)));
+       vtt->set_sync_leader(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid)));
 }
 
 void client_setup(GtkWidget *wid, vtt_class *vtt)
 {
        int client;
        
-       client=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(vtt->gui.sync_client));   
-       vtt->sp_sync_client.receive_gui_value(client);
+       client=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(vtt->gui.sync_follower)); 
+       vtt->sp_sync_follower.receive_gui_value(client);
 }
 
 void client_setup_number(GtkWidget *wid, vtt_class *vtt)
@@ -475,11 +475,11 @@ gboolean vg_delete_pitch_adjust (GtkWidget *wid, vtt_class *vtt) {
 }
 
 void vg_do_pitch_adjust (GtkWidget *wid, vtt_class *vtt) {
-       int master_cycles=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(lookup_widget(vtt->gui.adjust_dialog, "master_cycles")));
+       int leader_cycles=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(lookup_widget(vtt->gui.adjust_dialog, "leader_cycles")));
        int cycles=gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(lookup_widget(vtt->gui.adjust_dialog, "cycles")));
        bool create_event=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(vtt->gui.adjust_dialog, "create_event")));
 
-       vtt->adjust_to_main_pitch(master_cycles, cycles, create_event);
+       vtt->adjust_to_main_pitch(leader_cycles, cycles, create_event);
        
        gtk_widget_destroy(vtt->gui.adjust_dialog);
 }
@@ -494,13 +494,13 @@ void vg_adjust_pitch_vtt(GtkWidget *wid, vtt_class *vtt) {
                return;
        }
        
-       if (!vtt_class::sync_master) {
-               tx_note("No master turntable to adjust pitch to selected.", true);
+       if (!vtt_class::sync_leader) {
+               tx_note("No leader turntable to adjust pitch to selected.", true);
                return;
        }
        
-       if (vtt==vtt_class::sync_master) {
-               tx_note("This is the master turntable - cannot adjust a turntable to itself.", true);
+       if (vtt==vtt_class::sync_leader) {
+               tx_note("This is the leader turntable - cannot adjust a turntable to itself.", true);
                return;
        }
        
@@ -772,8 +772,8 @@ void gui_connect_signals(vtt_class *vtt)
        connect_button(stop, stop_vtt);
        connect_button(autotrigger, autotrigger_toggled);
        connect_button(loop, loop_toggled);
-       connect_button(sync_master, master_setup);
-       connect_button(sync_client, client_setup);
+       connect_button(sync_leader, leader_setup);
+       connect_button(sync_follower, client_setup);
        connect_button(adjust_button, vg_adjust_pitch_vtt);
        connect_adj(cycles, client_setup_number);
        connect_press_button(fx_button, fx_button_pressed);
@@ -981,7 +981,7 @@ void build_vtt_gui(vtt_class *vtt)
        p->add_client_widget(g->del);
        
        g->adjust_button=gtk_button_new_with_label("Pitch Adj.");
-       gui_set_tooltip(g->adjust_button, "Activate this button to adjust this turntable's speed to the master turntable's speed.");
+       gui_set_tooltip(g->adjust_button, "Activate this button to adjust this turntable's speed to the leader turntable's speed.");
        p->add_client_widget(g->adjust_button);
 
        gtk_list_box_insert(GTK_LIST_BOX(g->static_box), p->get_list_box_row(), -1);
@@ -1010,21 +1010,21 @@ void build_vtt_gui(vtt_class *vtt)
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g->loop), vtt->loop);
        g_signal_connect(G_OBJECT(g->loop), "button_press_event", (GCallback) tX_seqpar::tX_seqpar_press, &vtt->sp_loop);               
        
-       g->sync_master=gtk_check_button_new_with_label("Master");
-       p->add_client_widget(g->sync_master);
-       gui_set_tooltip(g->sync_master, "Click here to make this turntable the sync-master. All turntables marked as sync-clients will be (re-)triggered in relation to the sync-master. Note that only *one* turntable can be the sync-master.");
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g->sync_master), vtt->is_sync_master);
+       g->sync_leader=gtk_check_button_new_with_label("Lead");
+       p->add_client_widget(g->sync_leader);
+       gui_set_tooltip(g->sync_leader, "Click here to make this turntable the sync-leader. All turntables marked as sync-followers will be (re-)triggered in relation to the sync-leader. Note that only *one* turntable can be the sync-leader.");
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g->sync_leader), vtt->is_sync_leader);
        
-       g->sync_client=gtk_check_button_new_with_label("Client");
-       p->add_client_widget(g->sync_client);
-       gui_set_tooltip(g->sync_client, "If enabled this turntable will be (re-)triggerd in relation to the sync-master turntable.");
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g->sync_client), vtt->is_sync_client);
-       g_signal_connect(G_OBJECT(g->sync_client), "button_press_event", (GCallback) tX_seqpar::tX_seqpar_press, &vtt->sp_sync_client); 
+       g->sync_follower=gtk_check_button_new_with_label("Follow");
+       p->add_client_widget(g->sync_follower);
+       gui_set_tooltip(g->sync_follower, "If enabled this turntable will be (re-)triggerd in relation to the sync-leader turntable.");
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g->sync_follower), vtt->is_sync_follower);
+       g_signal_connect(G_OBJECT(g->sync_follower), "button_press_event", (GCallback) tX_seqpar::tX_seqpar_press, &vtt->sp_sync_follower);     
        
        g->cycles=GTK_ADJUSTMENT(gtk_adjustment_new(vtt->sync_cycles, 0, 10.0, 1,1,0));
        dummy=gtk_spin_button_new(g->cycles, 1.0, 0);
        p->add_client_widget(dummy);
-       gui_set_tooltip(dummy, "Determines how often a sync-client turntable gets triggered. 0 -> this turntable will be triggered with every trigger of the sync-master table, 1 -> the table will be triggered every 2nd master trigger and so on.");
+       gui_set_tooltip(dummy, "Determines how often a sync-follower turntable gets triggered. 0 -> this turntable will be triggered with every trigger of the sync-leader table, 1 -> the table will be triggered every 2nd leader trigger and so on.");
        g_signal_connect(G_OBJECT(dummy), "button_press_event", (GCallback) tX_seqpar::tX_seqpar_press, &vtt->sp_sync_cycles);  
 
        gtk_list_box_insert(GTK_LIST_BOX(g->static_box), p->get_list_box_row(), -1);
@@ -1452,9 +1452,9 @@ void cleanup_all_vtts()
        }
 }
 
-void gui_clear_master_button(vtt_class *vtt)
+void gui_clear_leader_button(vtt_class *vtt)
 {
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(vtt->gui.sync_master), 0);
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(vtt->gui.sync_leader), 0);
 }
 
 void gui_show_focus(vtt_class *vtt, int show)
@@ -1471,7 +1471,7 @@ void vg_enable_critical_buttons(int enable)
        for (vtt=vtt_class::main_list.begin(); vtt!=vtt_class::main_list.end(); vtt++)
        {
                gtk_widget_set_sensitive(vgui.del, enable);
-               gtk_widget_set_sensitive(vgui.sync_master, enable);
+               gtk_widget_set_sensitive(vgui.sync_leader, enable);
        }
 }
 
@@ -1482,7 +1482,7 @@ void vg_init_all_non_seqpars()
        for (vtt=vtt_class::main_list.begin(); vtt!=vtt_class::main_list.end(); vtt++)
        {
                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON((*vtt)->gui.autotrigger), (*vtt)->autotrigger);
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON((*vtt)->gui.sync_master), (*vtt)->is_sync_master);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON((*vtt)->gui.sync_leader), (*vtt)->is_sync_leader);
        }       
 }
 
index 86c9d5272afa9d1c8b35af4e88f3f28aa68b990a..9863b3542c8f1d503c9b27908f6da3e231dfc8cc 100644 (file)
@@ -65,8 +65,8 @@ struct vtt_gui
        GtkWidget *stop;
        GtkWidget *autotrigger;
        GtkWidget *loop;
-       GtkWidget *sync_master;
-       GtkWidget *sync_client;
+       GtkWidget *sync_leader;
+       GtkWidget *sync_follower;
        GtkAdjustment *cycles;
        
        /* Output Panel */