mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-12-22 10:02:24 +02:00
lingot: not only guitar tuner using GTK
This commit is contained in:
parent
2447082dbd
commit
a1b9d110f0
48
lingot/Makefile
Normal file
48
lingot/Makefile
Normal file
@ -0,0 +1,48 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lingot
|
||||
PKG_VERSION:=0.9.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/lingot/
|
||||
PKG_MD5SUM:=363612bd55d3dc204d23cd26e25ef1f5
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/lingot
|
||||
TITLE:=LINGOT Is Not a Guitar-Only Tuner
|
||||
SECTION:=utilities
|
||||
CATEGORY:=Utilities
|
||||
URL:=http://www.nongnu.org/lingot/
|
||||
DEPENDS:=+alsa-lib +gtk2 +libglade
|
||||
endef
|
||||
|
||||
define Package/lingot/description
|
||||
LINGOT is a musical instrument tuner. It's accurate, easy to use, and highly configurable. Originally conceived to tune electric guitars, it can now be used to tune other instruments.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-alsa \
|
||||
--disable-jack
|
||||
|
||||
TARGET_CFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(ICONV_CFLAGS) $(INTL_CFLAGS)
|
||||
|
||||
define Package/lingot/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/lingot/glade
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lingot $(1)/usr/bin/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/glade/*.glade $(1)/usr/share/lingot/glade/
|
||||
$(CP) $(FILES_DIR)/lingot.conf $(1)/usr/share/lingot/
|
||||
endef
|
||||
|
||||
define Package/lingot/postinst
|
||||
#!/bin/sh
|
||||
mkdir $${IPKG_INSTROOT}/root/.lingot && cp $${IPKG_INSTROOT}/usr/share/lingot/lingot.conf $${IPKG_INSTROOT}/root/.lingot/lingot.conf
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,lingot))
|
40
lingot/files/lingot.conf
Normal file
40
lingot/files/lingot.conf
Normal file
@ -0,0 +1,40 @@
|
||||
# Config file automatically created by lingot 0.9.0
|
||||
|
||||
AUDIO_SYSTEM = ALSA
|
||||
AUDIO_DEV = /dev/dsp
|
||||
AUDIO_DEV_ALSA = plughw:0
|
||||
SAMPLE_RATE = 8000
|
||||
OVERSAMPLING = 25
|
||||
ROOT_FREQUENCY_ERROR = 0.000
|
||||
MIN_FREQUENCY = 20.000
|
||||
FFT_SIZE = 256
|
||||
TEMPORAL_WINDOW = 0.800
|
||||
NOISE_THRESHOLD = 20.000
|
||||
CALCULATION_RATE = 4.000
|
||||
VISUALIZATION_RATE = 1.000
|
||||
PEAK_NUMBER = 3
|
||||
PEAK_HALF_WIDTH = 1
|
||||
PEAK_REJECTION_RELATION = 20.000
|
||||
DFT_NUMBER = 2
|
||||
DFT_SIZE = 15
|
||||
GAIN = 0.000
|
||||
|
||||
SCALE = {
|
||||
NAME = Default equal-tempered scale
|
||||
BASE_FREQUENCY = 261.625565
|
||||
NOTE_COUNT = 12
|
||||
NOTES = {
|
||||
C 1/1
|
||||
C# 100.0000
|
||||
D 200.0000
|
||||
D# 300.0000
|
||||
E 400.0000
|
||||
F 500.0000
|
||||
F# 600.0000
|
||||
G 700.0000
|
||||
G# 800.0000
|
||||
A 900.0000
|
||||
A# 1000.0000
|
||||
B 1100.0000
|
||||
}
|
||||
}
|
18
lingot/patches/001-gtk_widget_set_visible.patch
Normal file
18
lingot/patches/001-gtk_widget_set_visible.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/src/lingot-gui-mainframe.c b/src/lingot-gui-mainframe.c
|
||||
index 30c1b69..a6b35f5 100644
|
||||
--- a/src/lingot-gui-mainframe.c
|
||||
+++ b/src/lingot-gui-mainframe.c
|
||||
@@ -107,9 +107,10 @@ void lingot_gui_mainframe_callback_about(GtkWidget* w, LingotMainFrame* frame) {
|
||||
|
||||
void lingot_gui_mainframe_callback_view_spectrum(GtkWidget* w,
|
||||
LingotMainFrame* frame) {
|
||||
- gtk_widget_set_visible(frame->spectrum_frame,
|
||||
- gtk_check_menu_item_get_active(
|
||||
- GTK_CHECK_MENU_ITEM(frame->view_spectrum_item)));
|
||||
+ if (gtk_check_menu_item_get_active(
|
||||
+ GTK_CHECK_MENU_ITEM(frame->view_spectrum_item))) {
|
||||
+ gtk_widget_show(frame->spectrum_frame);
|
||||
+ }
|
||||
}
|
||||
|
||||
void lingot_gui_mainframe_callback_config_dialog(GtkWidget* w,
|
53
lingot/patches/002-320x240.patch
Normal file
53
lingot/patches/002-320x240.patch
Normal file
@ -0,0 +1,53 @@
|
||||
diff --git a/src/glade/lingot-mainframe.glade b/src/glade/lingot-mainframe.glade
|
||||
index ce76be9..e0cf586 100644
|
||||
--- a/src/glade/lingot-mainframe.glade
|
||||
+++ b/src/glade/lingot-mainframe.glade
|
||||
@@ -136,7 +136,7 @@
|
||||
<child>
|
||||
<widget class="GtkDrawingArea" id="gauge_area">
|
||||
<property name="width_request">160</property>
|
||||
- <property name="height_request">100</property>
|
||||
+ <property name="height_request">85</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Shows the error in cents in a visual way. The range will depend on the maximum distance between each two notes in the scale defined in the Lingot settings (try to provide scales with low maximum distance, i.e. with many notes, to have a higher resolution in this gauge),</property>
|
||||
</widget>
|
||||
@@ -168,7 +168,7 @@
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox2">
|
||||
<property name="width_request">110</property>
|
||||
- <property name="height_request">100</property>
|
||||
+ <property name="height_request">85</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
@@ -233,7 +233,7 @@
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="width_request">290</property>
|
||||
- <property name="height_request">96</property>
|
||||
+ <property name="height_request">82</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">automatic</property>
|
||||
diff --git a/src/lingot b/src/lingot
|
||||
index 7c9a89c..87bb47e 100755
|
||||
Binary files a/src/lingot and b/src/lingot differ
|
||||
diff --git a/src/lingot-gui-mainframe.c b/src/lingot-gui-mainframe.c
|
||||
index 30c1b69..05d374a 100644
|
||||
--- a/src/lingot-gui-mainframe.c
|
||||
+++ b/src/lingot-gui-mainframe.c
|
||||
@@ -57,9 +57,9 @@ GdkColor freq_color;
|
||||
// sizes
|
||||
|
||||
int gauge_size_x = 160;
|
||||
-int gauge_size_y = 100;
|
||||
+int gauge_size_y = 85;
|
||||
|
||||
-int spectrum_size_y = 64;
|
||||
+int spectrum_size_y = 50;
|
||||
|
||||
// spectrum area margins
|
||||
int spectrum_bottom_margin = 16;
|
||||
diff --git a/src/lingot-gui-mainframe.o b/src/lingot-gui-mainframe.o
|
||||
index b36ff35..54b8c6c 100644
|
||||
Binary files a/src/lingot-gui-mainframe.o and b/src/lingot-gui-mainframe.o differ
|
Loading…
Reference in New Issue
Block a user