[SCM] gsequencer/master: New upstream version 0.4.2-75
jkraehemann-guest at users.alioth.debian.org
jkraehemann-guest at users.alioth.debian.org
Tue Jun 23 00:47:44 UTC 2015
The following commit has been merged in the master branch:
commit 5583f46af72317c2e257918b0e45c24694ee1d41
Author: Joël Krähemann <jkraehemann-guest at users.alioth.debian.org>
Date: Tue Jun 23 02:43:27 2015 +0200
New upstream version 0.4.2-75
diff --git a/ChangeLog b/ChangeLog
index 1d55161..643b619 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+ags (0.4.2-75-1)
+
+ [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
+ * fixed deactivate led in AgsDrum and AgsMatrix
+ * fixed multi-output
+ * fixed adjusting audio channels for tabs of editor
+ * implemented shift piano thereby fixed piano allocation
+
ags (0.4.2-74-1)
[ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
diff --git a/configure b/configure
index 7414c9a..4f5f0ff 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ags 0.4.2-74.
+# Generated by GNU Autoconf 2.69 for ags 0.4.2-75.
#
# Report bugs to <jkraehemann-guest at users.alioth.debian.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ags'
PACKAGE_TARNAME='ags'
-PACKAGE_VERSION='0.4.2-74'
-PACKAGE_STRING='ags 0.4.2-74'
+PACKAGE_VERSION='0.4.2-75'
+PACKAGE_STRING='ags 0.4.2-75'
PACKAGE_BUGREPORT='jkraehemann-guest at users.alioth.debian.org'
PACKAGE_URL=''
@@ -1317,7 +1317,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ags 0.4.2-74 to adapt to many kinds of systems.
+\`configure' configures ags 0.4.2-75 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1387,7 +1387,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ags 0.4.2-74:";;
+ short | recursive ) echo "Configuration of ags 0.4.2-75:";;
esac
cat <<\_ACEOF
@@ -1523,7 +1523,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ags configure 0.4.2-74
+ags configure 0.4.2-75
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2000,7 +2000,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ags $as_me 0.4.2-74, which was
+It was created by ags $as_me 0.4.2-75, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2866,7 +2866,7 @@ fi
# Define the identity of the package.
PACKAGE='ags'
- VERSION='0.4.2-74'
+ VERSION='0.4.2-75'
cat >>confdefs.h <<_ACEOF
@@ -7161,7 +7161,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ags $as_me 0.4.2-74, which was
+This file was extended by ags $as_me 0.4.2-75, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7227,7 +7227,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ags config.status 0.4.2-74
+ags config.status 0.4.2-75
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 85f1c4e..ef96979 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([ags],[0.4.2-74],[jkraehemann-guest at users.alioth.debian.org])
+AC_INIT([ags],[0.4.2-75],[jkraehemann-guest at users.alioth.debian.org])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
diff --git a/src/ags/X/ags_editor.c b/src/ags/X/ags_editor.c
index 880c346..0dbb0b3 100644
--- a/src/ags/X/ags_editor.c
+++ b/src/ags/X/ags_editor.c
@@ -226,15 +226,8 @@ ags_editor_init(AgsEditor *editor)
editor->table = (GtkTable *) gtk_table_new(4, 3, FALSE);
gtk_paned_pack2((GtkPaned *) paned, (GtkWidget *) editor->table, TRUE, FALSE);
- editor->notebook = g_object_new(AGS_TYPE_NOTEBOOK,
- "homogeneous\0", FALSE,
- "spacing\0", 0,
- NULL);
- gtk_table_attach(editor->table, (GtkWidget *) editor->notebook,
- 0, 3, 0, 1,
- GTK_FILL|GTK_EXPAND, GTK_FILL,
- 0, 0);
-
+ editor->notebook = NULL;
+
editor->meter = NULL;
editor->edit_widget = NULL;
@@ -356,7 +349,8 @@ ags_editor_real_machine_changed(AgsEditor *editor, AgsMachine *machine)
AgsMachine *machine_old;
AgsNotebook *notebook;
GtkTable *table;
-
+ GList *list, *list_start;
+
guint pads;
guint i, stop;
@@ -383,47 +377,44 @@ ags_editor_real_machine_changed(AgsEditor *editor, AgsMachine *machine)
machine_old = editor->selected_machine;
editor->selected_machine = machine;
-
- /* resize notebook */
- notebook = editor->notebook;
-
- if(machine == NULL){
- if(machine_old != NULL){
- i = 0;
- stop = machine_old->audio->audio_channels;
- ags_editor_notebook_change_machine_shrink();
- }
- }else{
- if(machine_old == NULL){
- i = 0;
- stop = machine->audio->audio_channels;
-
- ags_editor_notebook_change_machine_grow();
- }else{
- if(machine->audio->audio_channels > machine_old->audio->audio_channels){
- i = machine_old->audio->audio_channels;
- stop = machine->audio->audio_channels;
-
- ags_editor_notebook_change_machine_grow();
- }else if(machine->audio->audio_channels < machine_old->audio->audio_channels){
- i = machine->audio->audio_channels;
- stop = machine_old->audio->audio_channels;
+ if(machine_old != NULL){
+ g_signal_handler_disconnect(machine_old->audio,
+ editor->set_audio_channels_handler);
+ g_signal_handler_disconnect(machine_old->audio,
+ editor->set_pads_handler);
+
+ gtk_widget_destroy(editor->meter);
+ gtk_widget_destroy(editor->edit_widget);
+ gtk_widget_destroy(editor->notebook);
- ags_editor_notebook_change_machine_shrink();
- }
- }
+ editor->meter = NULL;
+ editor->edit_widget = NULL;
+ editor->notebook = NULL;
}
-
- gtk_widget_show_all((GtkWidget *) notebook);
-
+
/* instantiate note edit or pattern edit */
if(machine == NULL){
return;
}
-
+
table = editor->table;
+ notebook =
+ editor->notebook = g_object_new(AGS_TYPE_NOTEBOOK,
+ "homogeneous\0", FALSE,
+ "spacing\0", 0,
+ NULL);
+ gtk_table_attach(editor->table, (GtkWidget *) editor->notebook,
+ 0, 3, 0, 1,
+ GTK_FILL|GTK_EXPAND, GTK_FILL,
+ 0, 0);
+
+ i = 0;
+ stop = machine->audio->audio_channels;
+
+ ags_editor_notebook_change_machine_grow();
+
editor->set_audio_channels_handler = g_signal_connect(machine->audio, "set-audio-channels\0",
G_CALLBACK(ags_editor_set_audio_channels_callback), editor);
editor->set_pads_handler = g_signal_connect(machine->audio, "set-pads\0",
@@ -450,18 +441,6 @@ ags_editor_real_machine_changed(AgsEditor *editor, AgsMachine *machine)
GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND,
0, 0);
- // ags_connectable_connect(AGS_CONNECTABLE(editor->edit_widget));
- gtk_widget_show_all(editor->edit_widget);
-
- ags_note_edit_set_map_height(editor->edit_widget,
- pads * AGS_NOTE_EDIT(editor->edit_widget)->control_height);
-
- editor->edit_widget = ags_note_edit_new();
- gtk_table_attach(table, (GtkWidget *) editor->edit_widget,
- 1, 2, 1, 2,
- GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND,
- 0, 0);
-
ags_connectable_connect(AGS_CONNECTABLE(editor->edit_widget));
gtk_widget_show_all(editor->edit_widget);
diff --git a/src/ags/X/ags_editor_callbacks.c b/src/ags/X/ags_editor_callbacks.c
index ecd0b8e..4ee8c96 100644
--- a/src/ags/X/ags_editor_callbacks.c
+++ b/src/ags/X/ags_editor_callbacks.c
@@ -69,19 +69,20 @@ ags_editor_set_audio_channels_callback(AgsAudio *audio,
guint i;
if(audio_channels_old < audio_channels){
- tabs = g_list_nth(editor->notebook->tabs,
- audio_channels_old);
notation = g_list_nth(audio->notation,
- audio_channels_old);
+ audio_channels_old - 1);
for(i = audio_channels_old; i < audio_channels; i++){
ags_notebook_insert_tab(editor->notebook,
i);
- AGS_NOTEBOOK_TAB(tabs->data)->notation = notation->data;
-
- tabs = tabs->next;
+ tabs = editor->notebook->tabs;
notation = notation->next;
+ AGS_NOTEBOOK_TAB(tabs->data)->notation = notation->data;
+ gtk_toggle_button_set_active(AGS_NOTEBOOK_TAB(tabs->data)->toggle,
+ TRUE);
}
+
+ gtk_widget_show_all(editor->notebook);
}else{
for(i = audio_channels; i < audio_channels_old; i++){
ags_notebook_remove_tab(editor->notebook,
diff --git a/src/ags/X/editor/ags_machine_selector.c b/src/ags/X/editor/ags_machine_selector.c
index c71cbd1..5ad470a 100644
--- a/src/ags/X/editor/ags_machine_selector.c
+++ b/src/ags/X/editor/ags_machine_selector.c
@@ -21,6 +21,8 @@
#include <ags-lib/object/ags_connectable.h>
+#include <ags/audio/ags_notation.h>
+
void ags_machine_selector_class_init(AgsMachineSelectorClass *machine_selector);
void ags_machine_selector_connectable_interface_init(AgsConnectableInterface *connectable);
void ags_machine_selector_init(AgsMachineSelector *machine_selector);
@@ -134,6 +136,7 @@ ags_machine_selector_init(AgsMachineSelector *machine_selector)
FALSE, FALSE,
0);
+ machine_selector->current = NULL;
machine_selector->popup = ags_machine_selector_popup_new(machine_selector);
menu_button = g_object_new(GTK_TYPE_MENU_TOOL_BUTTON,
@@ -205,7 +208,7 @@ ags_machine_selector_new()
GtkMenu*
ags_machine_selector_popup_new(AgsMachineSelector *machine_selector)
{
- GtkMenu *popup;
+ GtkMenu *popup, *keys;
GtkMenuItem *item;
GList *list, *list_start;
@@ -229,6 +232,53 @@ ags_machine_selector_popup_new(AgsMachineSelector *machine_selector)
item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("link index\0"));
gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item);
+ // item = (GtkMenuItem *) gtk_check_menu_item_new_with_label(g_strdup("invert mapping\0"));
+ // gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("shift piano\0"));
+ gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item);
+
+ keys = (GtkMenu *) gtk_menu_new();
+ gtk_menu_item_set_submenu(item,
+ keys);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("A\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("A#\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("H\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("C\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("C#\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("D\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("D#\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("E\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("F\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("F#\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("G\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("G#\0"));
+ gtk_menu_shell_append((GtkMenuShell*) keys, (GtkWidget*) item);
+
+ /* connect */
list_start =
list = gtk_container_get_children((GtkContainer *) popup);
@@ -242,6 +292,7 @@ ags_machine_selector_popup_new(AgsMachineSelector *machine_selector)
list = list->next;
*/
+
g_signal_connect(G_OBJECT(list->data), "activate\0",
G_CALLBACK(ags_machine_selector_popup_add_index_callback), (gpointer) machine_selector);
@@ -253,7 +304,27 @@ ags_machine_selector_popup_new(AgsMachineSelector *machine_selector)
g_signal_connect(G_OBJECT(list->data), "activate\0",
G_CALLBACK(ags_machine_selector_popup_link_index_callback), (gpointer) machine_selector);
+ // list = list->next;
+ // g_signal_connect_after(G_OBJECT(list->data), "activate\0",
+ // G_CALLBACK(ags_machine_selector_popup_invert_mapping_callback), (gpointer) machine_selector);
+
g_list_free(list_start);
+
+ /* keys */
+ list_start =
+ list = gtk_container_get_children((GtkContainer *) keys);
+
+ while(list != NULL){
+ g_signal_connect(G_OBJECT(list->data), "activate\0",
+ G_CALLBACK(ags_machine_selector_popup_shift_piano_callback), (gpointer) machine_selector);
+
+ list = list->next;
+ }
+
+ g_list_free(list_start);
+
+ /* show */
+ gtk_widget_show_all((GtkWidget *) keys);
gtk_widget_show_all((GtkWidget *) popup);
return(popup);
diff --git a/src/ags/X/editor/ags_machine_selector.h b/src/ags/X/editor/ags_machine_selector.h
index e3e6718..466946e 100644
--- a/src/ags/X/editor/ags_machine_selector.h
+++ b/src/ags/X/editor/ags_machine_selector.h
@@ -40,6 +40,8 @@ struct _AgsMachineSelector
{
GtkVBox vbox;
+ GtkWidget *current;
+
GtkMenu *popup;
};
diff --git a/src/ags/X/editor/ags_machine_selector_callbacks.c b/src/ags/X/editor/ags_machine_selector_callbacks.c
index 988bef4..cf90aa0 100644
--- a/src/ags/X/editor/ags_machine_selector_callbacks.c
+++ b/src/ags/X/editor/ags_machine_selector_callbacks.c
@@ -105,6 +105,57 @@ ags_machine_selector_popup_link_index_callback(GtkWidget *menu_item, AgsMachineS
}
void
+ags_machine_selector_popup_invert_mapping_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector)
+{
+ AgsEditor *editor;
+
+ editor = gtk_widget_get_ancestor(machine_selector,
+ AGS_TYPE_EDITOR);
+
+ if(editor->selected_machine != NULL){
+ GList *notation;
+
+ notation = editor->selected_machine->audio->notation;
+
+ while(notation != NULL){
+ if(gtk_check_menu_item_get_active(menu_item)){
+ AGS_NOTATION(notation->data)->flags |= AGS_NOTATION_INVERTED_MAPPING;
+ }else{
+ AGS_NOTATION(notation->data)->flags &= (~AGS_NOTATION_INVERTED_MAPPING);
+ }
+
+ notation = notation->next;
+ }
+
+ gtk_widget_queue_draw(editor->edit_widget);
+ }
+}
+
+void
+ags_machine_selector_popup_shift_piano_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector)
+{
+ AgsEditor *editor;
+
+ editor = gtk_widget_get_ancestor(machine_selector,
+ AGS_TYPE_EDITOR);
+
+ if(editor->selected_machine != NULL){
+ GList *notation;
+
+ notation = editor->selected_machine->audio->notation;
+
+ while(notation != NULL){
+ g_free(AGS_NOTATION(notation->data)->base_note);
+ AGS_NOTATION(notation->data)->base_note = g_strdup(gtk_menu_item_get_label(menu_item));
+
+ notation = notation->next;
+ }
+
+ ags_meter_paint(editor->meter);
+ }
+}
+
+void
ags_machine_selector_selection_response(GtkWidget *machine_selection,
gint response,
AgsMachineSelector *machine_selector)
diff --git a/src/ags/X/editor/ags_machine_selector_callbacks.h b/src/ags/X/editor/ags_machine_selector_callbacks.h
index e86aa6a..313a725 100644
--- a/src/ags/X/editor/ags_machine_selector_callbacks.h
+++ b/src/ags/X/editor/ags_machine_selector_callbacks.h
@@ -8,6 +8,8 @@ void ags_machine_selector_popup_remove_tab_callback(GtkWidget *menu_item, AgsMac
void ags_machine_selector_popup_add_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector);
void ags_machine_selector_popup_remove_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector);
void ags_machine_selector_popup_link_index_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector);
+void ags_machine_selector_popup_invert_mapping_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector);
+void ags_machine_selector_popup_shift_piano_callback(GtkWidget *menu_item, AgsMachineSelector *machine_selector);
void ags_machine_selector_radio_changed(GtkWidget *radio_button, AgsMachineSelector *machine_selector);
diff --git a/src/ags/X/editor/ags_meter.c b/src/ags/X/editor/ags_meter.c
index cf3b1a9..b82fdfc 100644
--- a/src/ags/X/editor/ags_meter.c
+++ b/src/ags/X/editor/ags_meter.c
@@ -154,6 +154,7 @@ ags_meter_paint(AgsMeter *meter)
AgsEditor *editor;
GtkWidget *widget;
cairo_t *cr;
+ gchar *base_note;
guint bitmap;
guint y[2];
guint i, i_stop, j, j0;
@@ -181,6 +182,59 @@ ags_meter_paint(AgsMeter *meter)
y[0] = (guint) round(GTK_RANGE(AGS_PATTERN_EDIT(editor->edit_widget)->vscrollbar)->adjustment->value) % control_height;
}
+ base_note = AGS_NOTATION(editor->selected_machine->audio->notation->data)->base_note;
+
+ /* apply base note */
+ if(!g_ascii_strncasecmp(base_note,
+ "A\0",
+ 2)){
+ j = (editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "A#\0",
+ 3)){
+ j = (1 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "H\0",
+ 2)){
+ j = (2 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "C\0",
+ 2)){
+ j = (3 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "C#\0",
+ 3)){
+ j = (4 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "D\0",
+ 2)){
+ j = (5 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "D#\0",
+ 3)){
+ j = (6 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "E\0",
+ 2)){
+ j = (7 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "F\0",
+ 2)){
+ j = (8 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "F#\0",
+ 3)){
+ j = (9 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "G\0",
+ 2)){
+ j = (10 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }else if(!g_ascii_strncasecmp(base_note,
+ "G#\0",
+ 3)){
+ j = (11 + editor->selected_machine->audio->input_pads - j - 1) + ((editor->selected_machine->audio->input_pads % 12));
+ }
+
j = j % 12;
if(y[0] != 0){
diff --git a/src/ags/X/editor/ags_note_edit_callbacks.c b/src/ags/X/editor/ags_note_edit_callbacks.c
index 220685a..a9e9d80 100644
--- a/src/ags/X/editor/ags_note_edit_callbacks.c
+++ b/src/ags/X/editor/ags_note_edit_callbacks.c
@@ -91,19 +91,15 @@ ags_note_edit_drawing_area_expose_event(GtkWidget *widget, GdkEventExpose *event
if(AGS_IS_PANEL(machine)){
}else if(AGS_IS_MIXER(machine)){
}else if(AGS_IS_DRUM(machine)){
- ags_meter_paint(editor->meter);
ags_note_edit_draw_segment(note_edit, cr);
ags_note_edit_draw_notation(note_edit, cr);
}else if(AGS_IS_MATRIX(machine)){
- ags_meter_paint(editor->meter);
ags_note_edit_draw_segment(note_edit, cr);
ags_note_edit_draw_notation(note_edit, cr);
}else if(AGS_IS_SYNTH(machine)){
- ags_meter_paint(editor->meter);
ags_note_edit_draw_segment(note_edit, cr);
ags_note_edit_draw_notation(note_edit, cr);
}else if(AGS_IS_FFPLAYER(machine)){
- ags_meter_paint(editor->meter);
ags_note_edit_draw_segment(note_edit, cr);
ags_note_edit_draw_notation(note_edit, cr);
}
@@ -820,10 +816,17 @@ ags_note_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *eve
void
ags_note_edit_vscrollbar_value_changed(GtkRange *range, AgsNoteEdit *note_edit)
{
+ AgsEditor *editor;
+
if((AGS_NOTE_EDIT_RESETING_VERTICALLY & note_edit->flags) != 0){
return;
}
+ editor = (AgsEditor *) gtk_widget_get_ancestor(GTK_WIDGET(note_edit),
+ AGS_TYPE_EDITOR);
+
+ ags_meter_paint(editor->meter);
+
note_edit->flags |= AGS_NOTE_EDIT_RESETING_VERTICALLY;
ags_note_edit_reset_vertically(note_edit, 0);
note_edit->flags &= (~AGS_NOTE_EDIT_RESETING_VERTICALLY);
diff --git a/src/ags/X/editor/ags_notebook.c b/src/ags/X/editor/ags_notebook.c
index 5d3cc10..dca0d4c 100644
--- a/src/ags/X/editor/ags_notebook.c
+++ b/src/ags/X/editor/ags_notebook.c
@@ -224,7 +224,7 @@ ags_notebook_insert_tab(AgsNotebook *notebook,
length - position);
tab->toggle = (GtkToggleButton *) gtk_toggle_button_new_with_label(g_strdup_printf("channel %d\0",
- position));
+ position + 1));
gtk_box_pack_start(GTK_BOX(notebook->hbox),
GTK_WIDGET(tab->toggle),
FALSE, FALSE,
diff --git a/src/ags/X/editor/ags_pattern_edit.c b/src/ags/X/editor/ags_pattern_edit.c
index cf267c7..a58ee84 100644
--- a/src/ags/X/editor/ags_pattern_edit.c
+++ b/src/ags/X/editor/ags_pattern_edit.c
@@ -100,6 +100,8 @@ ags_pattern_edit_init(AgsPatternEdit *pattern_edit)
{
GtkAdjustment *adjustment;
+ pattern_edit->key_mask = 0;
+
adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
pattern_edit->ruler = ags_ruler_new();
@@ -173,7 +175,7 @@ ags_pattern_edit_init(AgsPatternEdit *pattern_edit)
pattern_edit->selected_y = 0;
/* GtkScrollbars */
- adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
+ adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, 16.0, 1.0);
pattern_edit->vscrollbar = (GtkVScrollbar *) gtk_vscrollbar_new(adjustment);
gtk_table_attach(GTK_TABLE(pattern_edit), (GtkWidget *) pattern_edit->vscrollbar,
1, 2, 1, 2,
@@ -325,6 +327,8 @@ ags_pattern_edit_reset_vertically(AgsPatternEdit *pattern_edit, guint flags)
cairo_pop_group_to_source(cr);
cairo_paint(cr);
}
+
+ // ags_meter_paint(editor->meter);
}
}
diff --git a/src/ags/X/editor/ags_pattern_edit_callbacks.c b/src/ags/X/editor/ags_pattern_edit_callbacks.c
index 1e27d2d..936ba53 100644
--- a/src/ags/X/editor/ags_pattern_edit_callbacks.c
+++ b/src/ags/X/editor/ags_pattern_edit_callbacks.c
@@ -873,10 +873,17 @@ ags_pattern_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *
void
ags_pattern_edit_vscrollbar_value_changed(GtkRange *range, AgsPatternEdit *pattern_edit)
{
+ AgsEditor *editor;
+
if((AGS_PATTERN_EDIT_RESETING_VERTICALLY & pattern_edit->flags) != 0){
return;
}
+ editor = (AgsEditor *) gtk_widget_get_ancestor(GTK_WIDGET(pattern_edit),
+ AGS_TYPE_EDITOR);
+
+ ags_meter_paint(editor->meter);
+
pattern_edit->flags |= AGS_PATTERN_EDIT_RESETING_VERTICALLY;
ags_pattern_edit_reset_vertically(pattern_edit, 0);
pattern_edit->flags &= (~AGS_PATTERN_EDIT_RESETING_VERTICALLY);
diff --git a/src/ags/X/editor/ags_toolbar.c b/src/ags/X/editor/ags_toolbar.c
index f7be4b6..18a0a3f 100644
--- a/src/ags/X/editor/ags_toolbar.c
+++ b/src/ags/X/editor/ags_toolbar.c
@@ -47,7 +47,7 @@ void ags_toolbar_show(GtkWidget *widget);
* @short_description: edit tool
* @title: AgsToolbar
* @section_id:
- * @include: ags/X/editor/ags_note_edit.h
+ * @include: ags/X/editor/ags_toolbar.h
*
* The #AgsToolbar lets you choose edit tool.
*/
diff --git a/src/ags/X/machine/ags_drum_callbacks.c b/src/ags/X/machine/ags_drum_callbacks.c
index fbf22ce..30d4644 100644
--- a/src/ags/X/machine/ags_drum_callbacks.c
+++ b/src/ags/X/machine/ags_drum_callbacks.c
@@ -559,36 +559,18 @@ ags_drum_done_callback(AgsAudio *audio,
}
if(all_done){
- GList *list;
- guint active_led;
+ GList *list, *list_start;
- /* get active led */
- if(drum->active_led == 0){
- AgsCountBeatsAudio *play_count_beats_audio;
- GValue value = {0,};
+ /* unset led */
+ list_start =
+ list = gtk_container_get_children(GTK_CONTAINER(drum->led));
- /* get some recalls */
- list = ags_recall_find_type(audio->play,
- AGS_TYPE_COUNT_BEATS_AUDIO);
-
- if(list != NULL){
- play_count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data);
- }
-
- g_value_init(&value, G_TYPE_DOUBLE);
- ags_port_safe_read(play_count_beats_audio->sequencer_loop_end,
- &value);
-
- active_led = g_value_get_double(&value) - 1.0;
- }else{
- active_led = drum->active_led - 1;
+ while(list != NULL){
+ ags_led_unset_active(AGS_LED(list->data));
+
+ list = list->next;
}
- /* unset led */
- list = gtk_container_get_children(GTK_CONTAINER(drum->led));
- ags_led_unset_active(AGS_LED(g_list_nth(list,
- active_led)->data));
-
- g_list_free(list);
+ g_list_free(list_start);
}
}
diff --git a/src/ags/X/machine/ags_drum_input_line.c b/src/ags/X/machine/ags_drum_input_line.c
index 6c35bbd..92fea16 100644
--- a/src/ags/X/machine/ags_drum_input_line.c
+++ b/src/ags/X/machine/ags_drum_input_line.c
@@ -400,7 +400,7 @@ ags_drum_input_line_map_recall(AgsLine *line,
AgsAudio *audio;
AgsChannel *source;
- AgsChannel *current, *destination;
+ AgsChannel *current;
AgsPattern *pattern;
AgsRecallHandler *recall_handler;
@@ -435,39 +435,6 @@ ags_drum_input_line_map_recall(AgsLine *line,
AGS_RECALL_FACTORY_ADD),
0);
- current = source;
- destination = ags_channel_nth(audio->output,
- current->audio_channel);
-
- while(destination != NULL){
- /* recall */
- list = current->recall;
-
- while((list = ags_recall_find_type(list, AGS_TYPE_BUFFER_CHANNEL)) != NULL){
- buffer_channel = AGS_BUFFER_CHANNEL(list->data);
-
- g_object_set(G_OBJECT(buffer_channel),
- "destination\0", destination,
- NULL);
-
- list = list->next;
- }
-
- list = current->recall;
-
- while((list = ags_recall_find_type(list, AGS_TYPE_BUFFER_CHANNEL_RUN)) != NULL){
- buffer_channel_run = AGS_BUFFER_CHANNEL_RUN(list->data);
-
- g_object_set(G_OBJECT(buffer_channel_run),
- "destination\0", destination,
- NULL);
-
- list = list->next;
- }
-
- destination = destination->next_pad;
- }
-
/* ags-peak */
ags_recall_factory_create(audio,
NULL, NULL,
diff --git a/src/ags/X/machine/ags_drum_input_line_callbacks.c b/src/ags/X/machine/ags_drum_input_line_callbacks.c
index 50fd0a9..a6e9bdb 100644
--- a/src/ags/X/machine/ags_drum_input_line_callbacks.c
+++ b/src/ags/X/machine/ags_drum_input_line_callbacks.c
@@ -64,49 +64,5 @@ ags_drum_input_line_audio_set_pads_callback(AgsAudio *audio, GType type,
guint pads, guint pads_old,
AgsDrumInputLine *drum_input_line)
{
- if(type == AGS_TYPE_OUTPUT){
- if(pads > pads_old){
- AgsChannel *current, *output;
- GList *recall;
-
- output = audio->output;
-
- while(output != NULL){
- current = ags_channel_nth(audio->input,
- output->audio_channel);
-
- while(current != NULL){
- recall = current->play;
-
- while(recall != NULL){
- if(AGS_IS_RECALL_CHANNEL_RUN(recall->data)){
- g_object_set(G_OBJECT(recall->data),
- "destination\0", output,
- NULL);
- }
-
- recall = recall->next;
- }
-
- recall = current->recall;
-
- while(recall != NULL){
- if(AGS_IS_RECALL_CHANNEL_RUN(recall->data)){
- g_object_set(G_OBJECT(recall->data),
- "destination\0", output,
- NULL);
- }
-
- recall = recall->next;
- }
-
- current = current->next_pad;
- }
-
- output = output->next;
- }
- }else{
- /* empty */
- }
- }
+ /* empty */
}
diff --git a/src/ags/X/machine/ags_ffplayer.c b/src/ags/X/machine/ags_ffplayer.c
index 0af0d62..4e8e75b 100644
--- a/src/ags/X/machine/ags_ffplayer.c
+++ b/src/ags/X/machine/ags_ffplayer.c
@@ -917,7 +917,7 @@ void
ags_ffplayer_input_map_recall(AgsFFPlayer *ffplayer, guint input_pad_start)
{
AgsAudio *audio;
- AgsChannel *source, *current, *destination;
+ AgsChannel *source, *current;
AgsBufferChannel *buffer_channel;
AgsBufferChannelRun *buffer_channel_run;
@@ -948,38 +948,6 @@ ags_ffplayer_input_map_recall(AgsFFPlayer *ffplayer, guint input_pad_start)
AGS_RECALL_FACTORY_ADD),
0);
- destination = ags_channel_nth(audio->output,
- current->audio_channel);
-
- while(destination != NULL){
- /* recall */
- list = current->recall;
-
- while((list = ags_recall_find_type(list, AGS_TYPE_BUFFER_CHANNEL)) != NULL){
- buffer_channel = AGS_BUFFER_CHANNEL(list->data);
-
- g_object_set(G_OBJECT(buffer_channel),
- "destination\0", destination,
- NULL);
-
- list = list->next;
- }
-
- list = current->recall;
-
- while((list = ags_recall_find_type(list, AGS_TYPE_BUFFER_CHANNEL_RUN)) != NULL){
- buffer_channel_run = AGS_BUFFER_CHANNEL_RUN(list->data);
-
- g_object_set(G_OBJECT(buffer_channel_run),
- "destination\0", destination,
- NULL);
-
- list = list->next;
- }
-
- destination = destination->next_pad;
- }
-
/* ags-stream */
ags_recall_factory_create(audio,
NULL, NULL,
diff --git a/src/ags/X/machine/ags_matrix.c b/src/ags/X/machine/ags_matrix.c
index 081c5f4..39ecbf2 100644
--- a/src/ags/X/machine/ags_matrix.c
+++ b/src/ags/X/machine/ags_matrix.c
@@ -558,10 +558,8 @@ ags_matrix_set_pads(AgsAudio *audio, GType type,
ags_recycling_add_audio_signal(source->first_recycling,
audio_signal);
- if((AGS_MACHINE_MAPPED_RECALL & (machine->flags)) != 0){
- ags_matrix_output_map_recall(matrix,
- pads_old);
- }
+ ags_matrix_output_map_recall(matrix,
+ pads_old);
}
}else{
}
@@ -758,7 +756,7 @@ void
ags_matrix_input_map_recall(AgsMatrix *matrix, guint input_pad_start)
{
AgsAudio *audio;
- AgsChannel *source, *current, *destination;
+ AgsChannel *source, *current;
AgsBufferChannel *buffer_channel;
AgsBufferChannelRun *buffer_channel_run;
@@ -788,38 +786,6 @@ ags_matrix_input_map_recall(AgsMatrix *matrix, guint input_pad_start)
AGS_RECALL_FACTORY_ADD),
0);
- destination = ags_channel_nth(audio->output,
- current->audio_channel);
-
- while(destination != NULL){
- /* recall */
- list = current->recall;
-
- while((list = ags_recall_find_type(list, AGS_TYPE_BUFFER_CHANNEL)) != NULL){
- buffer_channel = AGS_BUFFER_CHANNEL(list->data);
-
- g_object_set(G_OBJECT(buffer_channel),
- "destination\0", destination,
- NULL);
-
- list = list->next;
- }
-
- list = current->recall;
-
- while((list = ags_recall_find_type(list, AGS_TYPE_BUFFER_CHANNEL_RUN)) != NULL){
- buffer_channel_run = AGS_BUFFER_CHANNEL_RUN(list->data);
-
- g_object_set(G_OBJECT(buffer_channel_run),
- "destination\0", destination,
- NULL);
-
- list = list->next;
- }
-
- destination = destination->next_pad;
- }
-
/* ags-stream */
ags_recall_factory_create(audio,
NULL, NULL,
diff --git a/src/ags/X/machine/ags_matrix_callbacks.c b/src/ags/X/machine/ags_matrix_callbacks.c
index 9989bb6..36e2da5 100644
--- a/src/ags/X/machine/ags_matrix_callbacks.c
+++ b/src/ags/X/machine/ags_matrix_callbacks.c
@@ -310,36 +310,18 @@ ags_matrix_done_callback(AgsAudio *audio,
}
if(all_done){
- GList *list;
- guint active_led;
-
- /* get active led */
- if(matrix->active_led == 0){
- AgsCountBeatsAudio *play_count_beats_audio;
- GValue value = {0,};
+ GList *list, *list_start;
+
+ /* unset led */
+ list_start =
+ list = gtk_container_get_children(GTK_CONTAINER(matrix->led));
- /* get some recalls */
- list = ags_recall_find_type(audio->play,
- AGS_TYPE_COUNT_BEATS_AUDIO);
-
- if(list != NULL){
- play_count_beats_audio = AGS_COUNT_BEATS_AUDIO(list->data);
- }
-
- g_value_init(&value, G_TYPE_DOUBLE);
- ags_port_safe_read(play_count_beats_audio->sequencer_loop_end,
- &value);
-
- active_led = g_value_get_double(&value) - 1.0;
- }else{
- active_led = matrix->active_led - 1;
+ while(list != NULL){
+ ags_led_unset_active(AGS_LED(list->data));
+
+ list = list->next;
}
- /* unset led */
- list = gtk_container_get_children(GTK_CONTAINER(matrix->led));
- ags_led_unset_active(AGS_LED(g_list_nth(list,
- active_led)->data));
-
- g_list_free(list);
+ g_list_free(list_start);
}
}
diff --git a/src/ags/X/machine/ags_oscillator.c b/src/ags/X/machine/ags_oscillator.c
index ff8390f..d9959ff 100644
--- a/src/ags/X/machine/ags_oscillator.c
+++ b/src/ags/X/machine/ags_oscillator.c
@@ -191,6 +191,8 @@ ags_oscillator_init(AgsOscillator *oscillator)
(GtkWidget *) gtk_label_new("frequency\0"),
2, 3, 1, 2);
oscillator->frequency = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 100000.0, 1.0);
+ gtk_spin_button_set_digits(oscillator->frequency,
+ 3);
oscillator->frequency->adjustment->value = 27.5;
gtk_table_attach_defaults(table, (GtkWidget *) oscillator->frequency, 3, 4, 1, 2);
diff --git a/src/ags/X/machine/ags_synth.c b/src/ags/X/machine/ags_synth.c
index 9725727..1f7030a 100644
--- a/src/ags/X/machine/ags_synth.c
+++ b/src/ags/X/machine/ags_synth.c
@@ -601,7 +601,6 @@ ags_synth_update(AgsSynth *synth)
while(input_pad != NULL){
input_line = gtk_container_get_children((GtkContainer *) AGS_PAD(input_pad->data)->expander_set);
oscillator = AGS_OSCILLATOR(gtk_container_get_children((GtkContainer *) AGS_LINE(input_line->data)->expander->table)->data);
-
wave = (guint) gtk_combo_box_get_active(oscillator->wave) + 1;
attack = (guint) gtk_spin_button_get_value_as_int(oscillator->attack);
frame_count = (guint) gtk_spin_button_get_value_as_int(oscillator->frame_count);
diff --git a/src/ags/audio/ags_audio.c b/src/ags/audio/ags_audio.c
index b88d833..c724c9a 100644
--- a/src/ags/audio/ags_audio.c
+++ b/src/ags/audio/ags_audio.c
@@ -1441,18 +1441,23 @@ ags_audio_real_set_audio_channels(AgsAudio *audio,
/* alloc devout play domain */
devout_play_domain = AGS_DEVOUT_PLAY_DOMAIN(audio->devout_play_domain);
- current = ags_channel_nth(audio->output,
- pads - audio->output_pads);
-
- for(i = 0; i < audio_channels - audio_channels_old; i++){
- devout_play_domain->devout_play = g_list_append(devout_play_domain->devout_play,
- current->devout_play);
+ current = audio->output;
+
+ for(j = 0; j < audio->output_pads; j++){
+ current = ags_channel_nth(current,
+ audio_channels_old);
- current = current->next;
+ for(i = 0; i < audio_channels - audio_channels_old; i++){
+ devout_play_domain->devout_play = g_list_append(devout_play_domain->devout_play,
+ current->devout_play);
+
+ current = current->next;
+ }
}
}else if(audio_channels < audio->audio_channels){
AgsDevoutPlayDomain *devout_play_domain;
+ AgsDevoutPlay *devout_play;
AgsChannel *current;
/* shrink audio channels */
@@ -1468,13 +1473,15 @@ ags_audio_real_set_audio_channels(AgsAudio *audio,
audio->input_lines = audio_channels * audio->input_pads;
devout_play_domain = AGS_DEVOUT_PLAY_DOMAIN(audio->devout_play_domain);
-
- for(i = 0; i < audio->audio_channels - audio_channels; i++){
- AgsDevoutPlay *devout_play;
-
- devout_play = g_list_last(devout_play_domain->devout_play)->data;
- devout_play_domain->devout_play = g_list_remove(devout_play_domain->devout_play,
- devout_play);
+ list = devout_play_domain->devout_play;
+
+ for(j = 0; j < audio->output_pads; j++){
+ for(i = 0; i < audio->audio_channels - audio_channels; i++){
+ devout_play = g_list_nth_prev(g_list_last(list),
+ (audio->output_pads - j - 1) * audio_channels)->data;
+ devout_play_domain->devout_play = g_list_remove(devout_play_domain->devout_play,
+ devout_play);
+ }
}
}
@@ -1966,6 +1973,22 @@ ags_audio_real_set_pads(AgsAudio *audio,
AgsChannel *current;
ags_audio_set_pads_grow();
+
+ /* alloc devout play domain */
+ devout_play_domain = AGS_DEVOUT_PLAY_DOMAIN(audio->devout_play_domain);
+ current = audio->output;
+
+ current = ags_channel_pad_nth(current,
+ audio->output_pads);
+
+ for(j = audio->output_pads; j < pads; j++){
+ for(i = 0; i < audio->audio_channels; i++){
+ devout_play_domain->devout_play = g_list_append(devout_play_domain->devout_play,
+ current->devout_play);
+
+ current = current->next;
+ }
+ }
}else if(pads == 0){
if((AGS_AUDIO_HAS_NOTATION & (audio->flags)) != 0 &&
audio->notation != NULL){
@@ -1984,7 +2007,8 @@ ags_audio_real_set_pads(AgsAudio *audio,
AGS_DEVOUT_PLAY_DOMAIN(audio->devout_play_domain)->devout_play = NULL;
}else if(pads < audio->output_pads){
AgsDevoutPlayDomain *devout_play_domain;
-
+ GList *list;
+
ags_audio_set_pads_remove_notes();
ags_audio_set_pads_unlink();
@@ -1992,13 +2016,14 @@ ags_audio_real_set_pads(AgsAudio *audio,
ags_audio_set_pads_shrink();
devout_play_domain = AGS_DEVOUT_PLAY_DOMAIN(audio->devout_play_domain);
-
- for(i = 0; i < audio->output_pads - pads; i++){
- AgsDevoutPlay *devout_play;
-
- devout_play = g_list_last(devout_play_domain->devout_play);
- devout_play_domain->devout_play = g_list_remove(devout_play_domain->devout_play,
- devout_play);
+ list = devout_play_domain->devout_play;
+
+ for(j = pads; j < audio->output_pads; j++){
+ for(i = 0; i < audio->audio_channels; i++){
+ devout_play = g_list_last(list)->data;
+ devout_play_domain->devout_play = g_list_remove(devout_play_domain->devout_play,
+ devout_play);
+ }
}
}
diff --git a/src/ags/audio/ags_notation.c b/src/ags/audio/ags_notation.c
index 6bd4190..fdf5970 100644
--- a/src/ags/audio/ags_notation.c
+++ b/src/ags/audio/ags_notation.c
@@ -238,6 +238,7 @@ ags_notation_init(AgsNotation *notation)
notation->audio = NULL;
notation->key = g_strdup("violine\0");
+ notation->base_note = g_strdup("A");
notation->base_frequency = 440.0;
notation->tact = AGS_NOTATION_MINIMUM_NOTE_LENGTH;
diff --git a/src/ags/audio/ags_notation.h b/src/ags/audio/ags_notation.h
index 7127b9c..6368d65 100644
--- a/src/ags/audio/ags_notation.h
+++ b/src/ags/audio/ags_notation.h
@@ -53,6 +53,7 @@ typedef struct _AgsNotationClass AgsNotationClass;
typedef enum{
AGS_NOTATION_STICKY = 1,
AGS_NOTATION_INDICATED_LENGTH = 1 << 1,
+ AGS_NOTATION_INVERTED_MAPPING = 1 << 2,
}AgsNotationFlags;
struct _AgsNotation
@@ -67,6 +68,7 @@ struct _AgsNotation
GObject *audio;
gchar *key;
+ gchar *base_note;
gdouble base_frequency;
gdouble tact;
diff --git a/src/ags/audio/ags_recall_channel_run.c b/src/ags/audio/ags_recall_channel_run.c
index 0fd99f6..1e66ebe 100644
--- a/src/ags/audio/ags_recall_channel_run.c
+++ b/src/ags/audio/ags_recall_channel_run.c
@@ -769,19 +769,29 @@ ags_recall_channel_run_duplicate(AgsRecall *recall,
guint *n_params, GParameter *parameter)
{
AgsAudio *audio;
- AgsChannel *output;
+ AgsChannel *output, *destination;;
AgsRecallChannelRun *recall_channel_run, *copy;
AgsRecallID *output_recall_id;
recall_channel_run = AGS_RECALL_CHANNEL_RUN(recall);
+ if(g_type_is_a(G_OBJECT_TYPE(recall_channel_run->source), AGS_TYPE_OUTPUT)){
+ destination = NULL;
+ }else{
+ if(recall_id->recycling_container->parent != NULL){
+ destination = AGS_RECYCLING(AGS_RECALL_ID(recall_id->recycling_container->parent->recall_id)->recycling)->channel;
+ }else{
+ destination = NULL;
+ }
+ }
+
parameter = ags_parameter_grow(G_OBJECT_TYPE(recall),
parameter, n_params,
"devout\0", AGS_RECALL(recall_channel_run)->devout,
"recall_channel\0", recall_channel_run->recall_channel,
"audio_channel\0", recall_channel_run->audio_channel,
"source\0", recall_channel_run->source,
- "destination\0", recall_channel_run->destination,
+ "destination\0", destination,
NULL);
copy = AGS_RECALL_CHANNEL_RUN(AGS_RECALL_CLASS(ags_recall_channel_run_parent_class)->duplicate(recall,
recall_id,
diff --git a/src/ags/audio/task/ags_resize_audio.c b/src/ags/audio/task/ags_resize_audio.c
index 61a9e22..d79e6ab 100644
--- a/src/ags/audio/task/ags_resize_audio.c
+++ b/src/ags/audio/task/ags_resize_audio.c
@@ -253,7 +253,6 @@ ags_resize_audio_launch(AgsTask *task)
while(line != NULL){
ags_connectable_connect(AGS_CONNECTABLE(line->data));
gtk_widget_show_all(line->data);
- g_message("sho");
line = line->next;
}
@@ -276,7 +275,6 @@ ags_resize_audio_launch(AgsTask *task)
while(line != NULL){
ags_connectable_connect(AGS_CONNECTABLE(line->data));
gtk_widget_show_all(line->data);
- g_message("sho");
line = line->next;
}
diff --git a/src/ags/file/ags_file.dtd b/src/ags/file/ags_file.dtd
index df4834b..aebc1af 100644
--- a/src/ags/file/ags_file.dtd
+++ b/src/ags/file/ags_file.dtd
@@ -389,6 +389,7 @@
flags PCDATA #REQUIRED
audio-channel NMTOKEN #REQUIRED
key CDATA "violine"
+ base-note NMTOKEN "A"
base-frequency NMTOKEN #IMPLIED
bpm NMTOKEN #IMPLIED
max-note-length NMTOKEN 16.0
diff --git a/src/ags/file/ags_file_sound.c b/src/ags/file/ags_file_sound.c
index 28d9a04..5c7da8f 100644
--- a/src/ags/file/ags_file_sound.c
+++ b/src/ags/file/ags_file_sound.c
@@ -4432,9 +4432,21 @@ ags_file_read_notation(AgsFile *file, xmlNode *node, AgsNotation **notation)
if(str == NULL){
str = "violine\0";
}
-
+
+ g_free(gobject->key);
gobject->key = g_strdup(str);
+
+ str = xmlGetProp(node,
+ "base-note\0");
+
+ if(str == NULL){
+ str = "A";
+ }
+
+ g_free(gobject->base_note);
+ gobject->base_note = g_strdup(str);
+
str = xmlGetProp(node,
"base-frequency\0");
@@ -4572,6 +4584,10 @@ ags_file_write_notation(AgsFile *file, xmlNode *parent, AgsNotation *notation)
notation->key);
xmlNewProp(node,
+ "base-note\0",
+ notation->base_note);
+
+ xmlNewProp(node,
"audio-channel\0",
g_strdup_printf("%d\0", notation->audio_channel));
--
gsequencer packaging
More information about the pkg-multimedia-commits
mailing list