Commit Graph

71 Commits

Author SHA1 Message Date
Tim LaBerge
3a3017b46f Add support for linkable parameters.
These changes allow gdigi to link parameters to the expression pedal,
LFO1, and LFO2. The changes have been implemented only for RP355, but
should be easily extendible to other devices.

The design is as follows:

The effect group entries for the linkable effects have only a placeholder
entry "None" at startup.

During startup, we send an unsolicited REQUEST_MODIFIER_LINKABLE_LIST. When we
receive RECEIVE_MODIFIER_LINKABLE_LIST in response, we use it to construct the
ModifierLinkableList and update the combo boxes for the Pedal Assign and LFO
effects.

Whenever the selected chorus/fx effect changes, the list of linkable parameters
also changes, so the device will send us a NOTIFY_MODIFIER_GROUP_CHANGED. Again,
we send a REQUEST_MODIFIER_LINKABLE_LIST and use the response to rebuild
ModifierLinkableList. Then we tear down and rebuild the state associated with
the affected combo boxes.

The changes made are as follows:

1) Add settings for pedal1_assign. This is the min/max value returned
   by the pedal.

2) Add separate EffectGroup for both pedal assignment and the LFO's
   for the non-combo box settings.

3) Fix up a few more missing effects in the xml and modifier lists.
   There is additional work to do here, but that will be in future
   commits.

4) Fixed a missing break in the RECEIVE_DEVICE_NOTIFICATION case
   in push_message().

5) When we receive a NOTIFY_MODIFIER_GROUP_CHANGED message, free the exisiting
   modifier group and send a REQUEST_MODIFIER_LINKABLE_LIST so we can
   rebuild it.

6) When we receive a RECEIVE_MODIFIER_LINKABLE_LIST, protect the calls to
   create_modifier_group() with GDK_THREADS_ENTER() so we don't crash
   because of interactions with the event/gui threads.

7) Added a BUG assert to an error leg in get_message_list().

8) Fix memory leak in get_digitech_devices() found by valgrind.

9) Add a function to tear down the state associated with the entries of a
   pedal assign or LFO combo box.

10) Add a function to build up the entries of a pedal assign or LFO combo
    box from the modifier linkable list received from the device.

11) Use gtk_combo_box_text_append_text() throughout.

12) A few whitespace/readability changes and more comments.
2012-12-16 09:29:16 -08:00
Tim LaBerge
8b998c636f Replace deprecated API's gtk_vbox/hbox_new().
The API's gtk_vbox_new() and gtk_hbox_new() are deprecated and result
in compilation warnings. Replace these API's with calls to
gtk_box_new() with GTK_ORIENTATION_VERTICAL and GTK_ORIENTATION_HORIZONTAL,
respectively.
2012-12-03 19:25:53 -08:00
Tim LaBerge
4f40132742 Implement the LFO1 and LFO2 effects.
For now, this is just for rp355, though the code should work for other
devices with minimal modification.

1) The EffectValues for values_*_assign need to be VALUE_TYPE_POSID.

2) Disabmiguate "Delay Tape" for a couple of EffectSettings. This fixed
   some bugs in the creation of the global modifier group.

3) Remove #if 0's around the definition of the lfo2_settings.

4) Define proper lfo1 and lfo2 groups arrays.

5) Define the lfo2_effect[] array.

6) Add the lfo1 and lfo2 effects to the rp355_effects array.

7) Disambiguate "EQ B" from "Eq" for some effedts in the modifiers array.

8) In push_message(), after we receive the RECEIVE_MODIFIER_LINKABLE_LIST
   message, kick off the creation of the EXP, LFO1, and LFO2 effects.

9) Generalize the function used for the pedal1_assign effect and make it work
   for lfo1 and lfo2 as well. Convert printf's to debug_msg().

10) Since we're destroying the association of the grid with the placeholder
    combo box entry, steal the data so the child widget isn't destroyed.

11) Silence warning on exit about 0 unread messages in queue.
2012-12-02 21:59:26 -08:00
Tim LaBerge
cf239da94c Implement parameter linking to expression pedal. 2012-12-01 15:30:56 -08:00
Tim LaBerge
a073f5cde2 Refine logging infrastructure.
1) Make logging conditional on debug flags.

2) Add command line option for setting these flags.

3) Emit warnings with g_warning() instead of g_message().

4) Added note about how FX_LIB_LEVEL_MAX[1-3] is used.
2012-02-27 20:26:42 -08:00
Tim LaBerge
2253833105 Add retrieval of global settings. Start LFO. 2012-02-26 08:37:51 -08:00
Tim LaBerge
87e6dcbb9c Better message tracking and retrieve usb settings. 2012-02-26 08:29:43 -08:00
Tim LaBerge
2b27302166 1) Require libxml-2 and build new file preset_xml.c
2) In effects.c, some EffectsValues are changed to better reflect the
   strings used in the XML.

3) New EffectSettings are added for use when writing out effects to XML.

4) Added an XmlLabel structure for mapping a value to a string. Generally,
   these are the union of the set of all values over the set of supported
   devices.

5) There's a large array of XmlSettings used to derive the translation of
   a preset to XML.

6) Add an enum for product_id and use it to set a filter for file suffix.

7) Minor cleanup in push_message() that suppresses spurious error messages.

8) Fixed a bad memset in read_data_thread().

9) In gdigi.h, a few changes in names to be consistent with XML.

   There are some new definitions of LFO and VSWITCH parameters that
   need to be computed.

10) In gui.c, fixed up a compiler warning.

    Added a map from device id to file type and code to set a default filter
    in the read dialog.

    Wired up the 'save to XML' callback and reorganized the menue entries to
    better distinguish between 'save to file' and 'store to device'.

   In preset.c, sort the params so that what we write as XML more closely
   matches what is generated on the windows side.
2012-02-25 17:52:52 -08:00
Tomasz Moń
fd0369dc7c use GtkGrid instead of GtkTable 2011-10-15 16:24:57 +02:00
John Hammen
2c921df204 add RP150 support 2011-10-14 10:43:47 +02:00
Tomasz Moń
ee2fcd181e port to GTK+ 3 2011-09-28 15:32:30 +02:00
John Hammen
907a3d0ed9 add RP155 support 2011-08-29 09:16:25 +02:00
Tomasz Moń
0886ba00c1 add support for GNX4 and GNX3k patches 2010-06-17 19:20:58 +02:00
Jonathan A. Tice
e12de97fab add RP1000 support 2010-04-24 15:07:18 +02:00
Miklos Aubert
59753a61dc add RP255 support 2010-03-04 18:54:58 +01:00
Tomasz Moń
07cfd70941 display values correctly (offsets, correct steps, suffixes, labels) 2010-01-03 14:18:53 +01:00
Rafael Moreno
2523b27205 add rp355p to SupportedFileTypes 2009-09-20 20:06:27 +02:00
Tomasz Moń
530dd397c5 remove USB settings from effect list as they're not part of Preset 2009-09-20 19:57:39 +02:00
Andreas Karajannis
87bb59f43a don't use uninitialized value 2009-08-11 12:17:28 +02:00
Tomasz Moń
97b8c9fd6d add create_backup_file() 2009-07-19 14:03:55 +02:00
Tomasz Moń
ba04930133 display GNX3000 settings in tabs 2009-06-21 20:05:42 +02:00
Tomasz Moń
7a6e3b159c greatly reduce number of comparisions required to apply parameters to GUI 2009-05-15 20:59:28 +02:00
Tomasz Moń
4a7ab848e7 remove id and position fields from EffectGroup 2009-05-15 10:20:42 +02:00
Tomasz Moń
c74290d8e1 use gtk_dialog_get_content_area 2009-05-07 14:17:03 +02:00
Tomasz Moń
4509c14bbc make get_current_preset return list of messages describing preset rather than just one message with preset parameters 2009-05-06 13:10:46 +02:00
Tomasz Moń
2633bac5d8 update GUI on remote preset change 2009-05-04 17:04:32 +02:00
Tomasz Moń
06fd3eee66 apply asynchronous parameters changes to GUI 2009-05-03 22:17:41 +02:00
Tomasz Moń
6a1d1de390 fix compiler warning 2009-05-02 14:25:50 +02:00
Tomasz Moń
ba810bf4f8 reuse widget table if possible 2009-05-01 16:12:58 +02:00
Tomasz Moń
d7b3f7a3d6 add Device struct 2009-04-30 17:27:55 +02:00
Tomasz Moń
3a849de954 add RP250 pickup settings 2009-04-17 17:30:50 +02:00
Tomasz Moń
e93e6bd16b add compability mode dialog 2009-04-14 21:00:10 +02:00
Tomasz Moń
1abcc82829 add RP500 equalizer settings 2009-04-12 20:55:17 +02:00
Tomasz Moń
c964d38c17 add RP500 compressor and amp settings 2009-04-12 18:36:41 +02:00
Tomasz Moń
d24cc97f5d add error reporting to create_preset_from_xml_file 2009-03-17 12:54:46 +01:00
Tomasz Moń
cac7e74d71 display preset number in preset list 2009-03-15 20:12:58 +01:00
Tomasz Moń
74583e9a7c make GUI more compact 2009-03-15 20:06:18 +01:00
Tomasz Moń
aa2cc7bbb1 some Doxygen work 2009-03-14 18:51:08 +01:00
Tomasz Moń
71c3a1e66f use g_slice 2009-03-14 12:58:11 +01:00
Tomasz Moń
b7d2d7d1c5 introduce EffectValues 2009-03-13 22:42:46 +01:00
Tomasz Moń
de68d0449f some renames, no functional changes 2009-03-10 20:57:34 +01:00
Tomasz Moń
d280bf1ca6 add some comments 2009-03-10 19:45:16 +01:00
Tomasz Moń
8d7fffb6d1 atan2f requires C99 2009-03-09 20:58:03 +01:00
Tomasz Moń
3f717a51cd add gui_free 2009-03-09 18:49:29 +01:00
Tomasz Moń
90df427200 add knobs 2009-03-09 18:22:20 +01:00
Tomasz Moń
17b067f853 don't crash if query preset names fail 2009-03-04 19:00:32 +01:00
Tomasz Moń
157fba0380 make set_option wrapper to send_message 2009-03-03 22:31:25 +01:00
Tomasz Moń
904a30bb38 propertly apply xml patch 2009-03-03 21:57:47 +01:00
Tomasz Moń
8e445bb408 update gui on preset switch 2009-03-03 13:42:15 +01:00
Tomasz Moń
baa3829263 start gui with proper values 2009-03-03 11:39:25 +01:00