From 558938498b5f31ae16de379239153824be76559a Mon Sep 17 00:00:00 2001 From: Mika Date: Tue, 20 May 2014 23:26:25 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20main=20et=20interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/boutonsdemerde.c | 1663 ++++++++++++++++++++++++ sources/mainTest/maintest.c | 261 +++- sources/mainTest/ponytrackertest.glade | 164 +-- 3 files changed, 1902 insertions(+), 186 deletions(-) create mode 100644 sources/boutonsdemerde.c diff --git a/sources/boutonsdemerde.c b/sources/boutonsdemerde.c new file mode 100644 index 0000000..8ee87ed --- /dev/null +++ b/sources/boutonsdemerde.c @@ -0,0 +1,1663 @@ +void fenetreNote0_0 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_0), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_0 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,5); +} + +void fenetreNote0_1 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_1), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_1 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,1,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,1,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,1,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,1,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,1,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,1,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,1,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,1,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,1,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,1,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,1,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,1,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,1,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,1,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,1,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,1,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,1,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,1,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,1,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,1,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,1,5); +} + +void fenetreNote0_2 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_2), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_2 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,2,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,2,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,2,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,2,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,2,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,2,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,2,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,2,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,2,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,2,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,2,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,2,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,2,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,2,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,2,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,2,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,2,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,2,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,2,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,2,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,2,5); +} + +void fenetreNote0_3 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_3), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_3 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,3,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,3,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,3,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,3,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,3,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,3,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,3,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,3,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,3,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,3,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,3,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,3,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,3,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,3,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,3,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,3,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,3,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,3,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,3,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,3,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,3,5); +} + +void fenetreNote0_4 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_4), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_4 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,4,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,4,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,4,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,4,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,4,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,4,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,4,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,4,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,4,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,4,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,4,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,4,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,4,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,4,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,4,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,4,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,4,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,4,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,4,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,4,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,4,5); +} + +void fenetreNote0_5 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_5), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_5 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,5,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,5,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,5,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,5,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,5,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,5,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,5,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,5,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,5,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,5,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,5,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,5,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,5,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,5,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,5,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,5,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,5,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,5,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,5,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,5,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,5,5); +} + +void fenetreNote0_6 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_6), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_6 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,6,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,6,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,6,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,6,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,6,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,6,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,6,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,6,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,6,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,6,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,6,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,6,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,6,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,6,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,6,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,6,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,6,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,6,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,6,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,6,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,6,5); +} + +void fenetreNote0_7 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_7), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_7 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,7,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,7,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,7,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,7,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,7,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,7,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,7,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,7,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,7,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,7,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,7,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,7,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,7,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,7,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,7,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,7,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,7,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,7,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,7,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,7,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,7,5); +} + +void fenetreNote0_8 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_8), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_8 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,8,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,8,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,8,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,8,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,8,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,8,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,8,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,8,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,8,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,8,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,8,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,8,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,8,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,8,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,8,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,8,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,8,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,8,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,8,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,8,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,8,5); +} + +void fenetreNote0_9 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_9), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_9 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,9,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,9,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,9,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,9,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,9,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,9,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,9,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,9,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,9,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,9,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,9,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,9,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,9,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,9,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,9,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,9,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,9,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,9,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,9,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,9,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,9,5); +} + +void fenetreNote0_10 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_10), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_10 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,10,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,10,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,10,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,10,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,10,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,10,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,10,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,10,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,10,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,10,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,10,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,10,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,10,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,10,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,10,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,10,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,10,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,10,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,10,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,10,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,10,5); +} + +void fenetreNote0_11 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_11), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_11 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,11,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,11,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,11,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,11,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,11,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,11,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,11,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,11,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,11,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,11,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,11,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,11,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,11,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,11,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,11,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,11,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,11,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,11,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,11,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,11,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,11,5); +} + +void fenetreNote0_12 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_12), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_12 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,12,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,12,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,12,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,12,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,12,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,12,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,12,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,12,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,12,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,12,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,12,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,12,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,12,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,12,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,12,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,12,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,12,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,12,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,12,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,12,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,12,5); +} + +void fenetreNote0_13 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_13), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_13 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,13,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,13,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,13,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,13,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,13,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,13,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,13,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,13,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,13,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,13,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,13,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,13,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,13,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,13,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,13,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,13,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,13,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,13,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,13,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,13,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,13,5); +} + +void fenetreNote0_14 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_14), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_14 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,14,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,14,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,14,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,14,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,14,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,14,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,14,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,14,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,14,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,14,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,14,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,14,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,14,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,14,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,14,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,14,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,14,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,14,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,14,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,14,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,14,5); +} + +void fenetreNote0_15 ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote0_15), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + +void remplissageNote0_15 (GtkWidget *widget, gpointer *data){ + + GtkBuilder *monBuilderNote; + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); + GtkEntry *entryOctave = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisiroctave"); + GtkEntry *entryInstrument = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirinstrument"); + GtkEntry *entryVolume = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryvolume"); + GtkEntry *entryEffet = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"entryeffet"); + + if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,1); + else + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,2); + else + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,15,13); + + if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,15,1); + else + if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,15,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,15,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,15,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,15,5); + + if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,15,1); + else + if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,15,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,15,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,15,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,15,5); + + if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,15,1); + else + if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,15,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,15,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,15,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,15,5); + + if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,15,1); + else + if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,15,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,15,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,15,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,15,5); +} diff --git a/sources/mainTest/maintest.c b/sources/mainTest/maintest.c index e94445a..dd31c5a 100644 --- a/sources/mainTest/maintest.c +++ b/sources/mainTest/maintest.c @@ -23,9 +23,9 @@ #include #include -#include "../motifs/motifs.h" -#include "../melodie/melodie.h" -#include "../lecture/lecture.h" +#include "motifs/motifs.h" +#include "melodie/melodie.h" +#include "lecture/lecture.h" //#include //#include //#include @@ -34,6 +34,24 @@ #define MAX_PATTERNS 256 Motif* m; +char *Do="Do"; +char *DoD="Do#"; +char *Re="Re"; +char *ReD="Re#"; +char *Mi="Mi"; +char *Fa="Fa"; +char *FaD="Fa#"; +char *Sol="Sol"; +char *SolD="Sol#"; +char *La="La"; +char *LaD="La#"; +char *Si="Si"; +char *SiD="Si#"; +char *N1="1"; +char *N2="2"; +char *N3="3"; +char *N4="4"; +char *N5="5"; void remplissageNote (GtkWidget *widget, gpointer *data); @@ -141,39 +159,178 @@ int main( int argc, char *argv[] ){ // insérer code GTK ici GtkBuilder *monBuilder; GtkWidget *maFenetre; - char *str; + char *str=NULL; gtk_init( &argc, &argv ); monBuilder = gtk_builder_new(); - gtk_builder_add_from_file( monBuilder, "ponytrackertest.glade", NULL); + gtk_builder_add_from_file( monBuilder, "GUI/ponytrackertest.glade", NULL); gtk_builder_connect_signals( monBuilder, NULL); maFenetre = GTK_WIDGET( gtk_builder_get_object( monBuilder, "fenetreprincipale")); GtkLabel *labelNote = (GtkLabel*) gtk_builder_get_object(monBuilder,"button16"); - if (getNote(m,0,0)==0) str="Do"; - else if (getNote(m,0,0)==1) str="Re"; - gtk_label_set_text(labelNote, str); + switch (getNote(m,0,0)) { + case 0 : + str="Do "; + break; + case 1 : + str="Do# "; + break; + case 2 : + str="Re "; + break; + case 3 : + str="Re# "; + break; + case 4 : + str="Mi "; + break; + case 5 : + str="Fa "; + break; + case 6 : + str="Fa# "; + break; + case 7 : + str="Sol "; + break; + case 8 : + str="Sol# "; + break; + case 9 : + str="La "; + break; + case 10 : + str="La# "; + break; + case 11 : + str="Si "; + break; + case 12 : + str="Si# "; + break; + default : + break; + } + + switch (getOctave(m,0,0)) { + case 0 : + strcat(str, "1 "); + break; + case 1 : + strcat(str, "2 "); + break; + case 2 : + strcat(str, "3 "); + break; + case 3 : + strcat(str, "4 "); + break; + case 4 : + strcat(str, "5 "); + break; + default : + break; + } + + switch (getInstrument(m,0,0)) { + case 0 : + strcat(str, "1 "); + break; + case 1 : + strcat(str, "2 "); + break; + case 2 : + strcat(str, "3 "); + break; + case 3 : + strcat(str, "4 "); + break; + case 4 : + strcat(str, "5 "); + break; + default : + break; + } + + switch (getVolume(m,0,0)) { + case 0 : + strcat(str, "1 "); + break; + case 1 : + strcat(str, "2 "); + break; + case 2 : + strcat(str, "3 "); + break; + case 3 : + strcat(str, "4 "); + break; + case 4 : + strcat(str, "5 "); + break; + default : + break; + } + + switch (getEffet(m,0,0)) { + case 0 : + strcat(str, "1 "); + break; + case 1 : + strcat(str, "2 "); + break; + case 2 : + strcat(str, "3 "); + break; + case 3 : + strcat(str, "4 "); + break; + case 4 : + strcat(str, "5 "); + break; + default : + break; + } + + gtk_label_set_text(labelNote, str); gtk_widget_show_all (maFenetre); gtk_main(); return EXIT_SUCCESS; } +void fenetreNote ( int argc, char *argv[] ) +{ + GtkBuilder *monBuilderNote; + GtkWidget *maFenetreNote; + + gtk_init( &argc, &argv ); + + monBuilderNote = gtk_builder_new(); + + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); + gtk_builder_connect_signals( monBuilderNote, NULL); + + maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); + + GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); + + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(remplissageNote), + GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); + + gtk_widget_show_all (maFenetreNote); +} + void remplissageNote (GtkWidget *widget, gpointer *data){ - char *Do="Do"; - char *Re="Re"; - char *Mi="Mi"; - char *N1="1"; - char *N2="2"; GtkBuilder *monBuilderNote; monBuilderNote = gtk_builder_new(); - gtk_builder_add_from_file( monBuilderNote, "ponytrackertest.glade", NULL); + gtk_builder_add_from_file( monBuilderNote, "GUI/ponytrackertest.glade", NULL); gtk_builder_connect_signals( monBuilderNote, NULL); GtkEntry *entryNote = (GtkEntry*) gtk_builder_get_object(monBuilderNote,"choisirnote"); @@ -184,25 +341,69 @@ void remplissageNote (GtkWidget *widget, gpointer *data){ if (strcmp(Do,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,1); else - if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,2); + if (strcmp(DoD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,2); else - if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,3); + if (strcmp(Re,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,3); + else + if (strcmp(ReD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,4); + else + if (strcmp(Mi,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,5); + else + if (strcmp(Fa,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,6); + else + if (strcmp(FaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,7); + else + if (strcmp(Sol,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,8); + else + if (strcmp(SolD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,9); + else + if (strcmp(La,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,10); + else + if (strcmp(LaD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,11); + else + if (strcmp(Si,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,12); + else + if (strcmp(SiD,gtk_entry_get_text(entryNote))==0) definirNote(m,0,0,13); if (strcmp(N1,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,1); else if (strcmp(N2,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryOctave))==0) definirOctave(m,0,0,5); if (strcmp(N1,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,1); else if (strcmp(N2,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryInstrument))==0) definirInstrument(m,0,0,5); if (strcmp(N1,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,1); else if (strcmp(N2,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryVolume))==0) definirVolume(m,0,0,5); if (strcmp(N1,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,1); else if (strcmp(N2,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,2); + else + if (strcmp(N3,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,3); + else + if (strcmp(N4,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,4); + else + if (strcmp(N5,gtk_entry_get_text(entryEffet))==0) definirEffet(m,0,0,5); } void fenetreSample ( int argc, char *argv[] ) @@ -214,7 +415,7 @@ void fenetreSample ( int argc, char *argv[] ) monBuilderSample = gtk_builder_new(); - gtk_builder_add_from_file( monBuilderSample, "ponytrackertest.glade", NULL); + gtk_builder_add_from_file( monBuilderSample, "GUI/ponytrackertest.glade", NULL); gtk_builder_connect_signals( monBuilderSample, NULL); maFenetreSample = GTK_WIDGET( gtk_builder_get_object( monBuilderSample, "ajoutsample")); @@ -231,7 +432,7 @@ void fenetreInstrument ( int argc, char *argv[] ) monBuilderInstrument = gtk_builder_new(); - gtk_builder_add_from_file( monBuilderInstrument, "ponytrackertest.glade", NULL); + gtk_builder_add_from_file( monBuilderInstrument, "GUI/ponytrackertest.glade", NULL); gtk_builder_connect_signals( monBuilderInstrument, NULL); maFenetreInstrument = GTK_WIDGET( gtk_builder_get_object( monBuilderInstrument, "ajoutinstrument")); @@ -248,7 +449,7 @@ void fenetreMotif ( int argc, char *argv[] ) monBuilderMotif = gtk_builder_new(); - gtk_builder_add_from_file( monBuilderMotif, "ponytrackertest.glade", NULL); + gtk_builder_add_from_file( monBuilderMotif, "GUI/ponytrackertest.glade", NULL); gtk_builder_connect_signals( monBuilderMotif, NULL); maFenetreMotif = GTK_WIDGET( gtk_builder_get_object( monBuilderMotif, "ajoutmotif")); @@ -256,28 +457,6 @@ void fenetreMotif ( int argc, char *argv[] ) gtk_widget_show_all (maFenetreMotif); } -void fenetreNote ( int argc, char *argv[] ) -{ - GtkBuilder *monBuilderNote; - GtkWidget *maFenetreNote; - - gtk_init( &argc, &argv ); - - monBuilderNote = gtk_builder_new(); - - gtk_builder_add_from_file( monBuilderNote, "ponytrackertest.glade", NULL); - gtk_builder_connect_signals( monBuilderNote, NULL); - - maFenetreNote = GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote")); - - GtkButton *button = (GtkButton*) gtk_builder_get_object(monBuilderNote, "buttonok"); - - g_signal_connect(G_OBJECT(button),"changed",G_CALLBACK(remplissageNote), - GTK_WIDGET( gtk_builder_get_object( monBuilderNote, "ajoutnote"))); - - gtk_widget_show_all (maFenetreNote); -} - void lancerLecture () { Motif* melodie[MAX_PATTERNS] = {NULL}; diff --git a/sources/mainTest/ponytrackertest.glade b/sources/mainTest/ponytrackertest.glade index d49a40f..a1e8472 100644 --- a/sources/mainTest/ponytrackertest.glade +++ b/sources/mainTest/ponytrackertest.glade @@ -957,10 +957,19 @@ 0 1 - Choisissez une note Do + Do# Re + Re# Mi + Fa + Fa# + Sol + Sol# + La + La# + Si + Si# @@ -976,7 +985,6 @@ 0 1 - Choisissez une octave 1 2 @@ -994,9 +1002,11 @@ 0 1 - Choisissez un instrument 1 2 + 3 + 4 + 5 @@ -1012,9 +1022,11 @@ 0 1 - Choisissez un volume 1 2 + 3 + 4 + 5 @@ -1030,9 +1042,11 @@ 0 1 - Choisissez un effet 1 2 + 3 + 4 + 5 @@ -2443,34 +2457,6 @@ 1 - - - button - True - True - True - - - 0 - 16 - 1 - 1 - - - - - button - True - True - True - - - 0 - 17 - 1 - 1 - - button @@ -2667,34 +2653,6 @@ 1 - - - button - True - True - True - - - 1 - 16 - 1 - 1 - - - - - button - True - True - True - - - 1 - 17 - 1 - 1 - - button @@ -3031,34 +2989,6 @@ 1 - - - button - True - True - True - - - 2 - 16 - 1 - 1 - - - - - button - True - True - True - - - 2 - 17 - 1 - 1 - - button @@ -3171,34 +3101,6 @@ 1 - - - button - True - True - True - - - 3 - 16 - 1 - 1 - - - - - button - True - True - True - - - 3 - 17 - 1 - 1 - - button @@ -3423,34 +3325,6 @@ 1 - - - button - True - True - True - - - 4 - 16 - 1 - 1 - - - - - button - True - True - True - - - 4 - 17 - 1 - 1 - - False