Investigo per Internet
----------------------
m'ha costat molt fer funcionar l'exemple v1: mostrar per pantalla el valor que he seleccionat amb el slider, i passar el paràmetre data. Aquí està el que he anat pescant de diferents tutorials:

The function specified in the third argument is called a "callback function", and should generally be of the form

void callback_func( GtkWidget *widget,
                    ... /* other signal arguments */
                    gpointer   callback_data );

where the first argument will be a pointer to the widget that emitted the signal, and the last a pointer to the data given as the last argument to the g_signal_connect() function as shown above.

Note that the above form for a signal callback function declaration is only a general guide, as some widget specific signals generate different calling parameters.

Jerarquia del widget Scale: (http://library.gnome.org/devel/gtk-tutorial/2.20/x477.html)
GtkObject
   +GtkWidget
      +GtkRange
         +GtkScale



*http://library.gnome.org/devel/gtk-tutorial/2.20/c489.html

/* Our usual callback function */
static void callback( GtkWidget *widget,
                      gpointer   data )
{
    g_print ("Hello again - %s was pressed\n", (char *) data);
}

...
    /* Connect the "clicked" signal of the button to our callback */
    g_signal_connect (button, "clicked",
              G_CALLBACK (callback), (gpointer) "cool button");


Adjustements
------------
http://library.gnome.org/devel/gtk-tutorial/2.20/c563.html
struct _GtkAdjustment
{
  GtkObject parent_instance;
 
  gdouble lower;
  gdouble upper;
  gdouble value;
  gdouble step_increment;
  gdouble page_increment;
  gdouble page_size;
};

gdouble    gtk_adjustment_get_value( GtkAdjustment *adjustment);

void cb_rotate_picture (GtkAdjustment *adj, GtkWidget *picture)
{
  set_picture_rotation (picture, gtk_adjustment_get_value (adj));
...

g_signal_connect (adj, "value_changed",
              G_CALLBACK (cb_rotate_picture), picture);

Range Widgets
-------------
http://library.gnome.org/devel/gtk-tutorial/2.20/c633.html

Scale i scrollbar són els dos Range widgets més comuns.

As mentioned in Adjustments above, all range widgets are associated with an adjustment object, from which they calculate the length of the slider and its position within the trough. When the user manipulates the slider, the range widget will change the value of the adjustment.


Puc convertir el scale a range, i mostrar el valor del range:
*http://zetcode.com/tutorials/gtktutorial/customwidget/
  GtkRange *range = (GtkRange *) widget;
  int valor = gtk_range_get_value(range);

una altra possibilitat seria utilitzar les funcions pròpies de scale per recuperar el value:
*http://www.gnu.org/software/guile-gnome/docs/gtk/html/GtkScale.html
return g_strdup_printf ("-->%0.*g<--", gtk_scale_get_digits (scale), value);

gtk-scale-get-digits: Gets the number of decimal places that are displayed in the value.

Per tant, no és això. Miro les funcions que hi ha en aquest link i no n'hi ha cap que em retorni el valor pròpiament dit. Són funcions específiques del widget scale. Per tant, si vull trobar el valor, me n'he d'anar a la funció pare de la qual s'hereda: gtk_range_get_value(range);

gtk_scale deriva de gtk_range

GTKRange
--------
*http://www.gnu.org/software/guile-gnome/docs/gtk/html/GtkRange.html

— Function: gtk-range-get-value (self <gtk-range>)   (ret double)
— Method: get-value

    Gets the current value of the range.

    range
        a <gtk-range>
    ret
        current value of the range.



v1. widget scale, sense res d'audio
-----------------------------------
gcc -g -Wall -O3 -o main_v1 main_v1.c `pkg-config --cflags --libs gtk+-2.0`

v2. afegim al widget scale la funcionalitat Hola Món Àudio
----------------------------------------------------------
*Hola Món Audio (enviar un sinusoide a la targeta de so)
http://dis-dot-dat.net/index.cgi?item=jacktuts/starting/playing_a_note 

$gcc -std=c99 -o playc `pkg-config --cflags --libs jack` playc.c
$ ./playc tocar_do

$ gcc -std=c99 -o main_v2 `pkg-config --cflags --libs gtk+-2.0 jack` main_v2.c
$ ./main_v2 prova_slider

v3. Utilitzem un controlador midi (Axiom 25) per moure el slider del widget
---------------------------------------------------------------------------
hem de crear un port midi en la nostra aplicació, que connectarem amb el axiom. Per tal que l'Axiom 25 aparequi en la pestanya MIDI del JACK he d'utilitzar l'opció -e del a2jmidid:
$ a2jmidid -e

$ gcc -std=c99 -o main_v3 `pkg-config --cflags --libs gtk+-2.0 jack` main_v3.c
$ ./main_v3 prova_slider

