Improved the logo a bit, changed the app icon to higher resolution one and replaced README.md with README.org

This commit is contained in:
apoorv569 2021-07-18 20:30:45 +05:30
parent f28072881b
commit 7bcf6f174a
17 changed files with 143 additions and 85 deletions

View File

@ -1,70 +0,0 @@
<p align="center">
<img src="assets/icons/icon-hive_200x200.png" alt="sample-hive-icon" width="200" height="200">
</p>
<h1 align="center">SampleHive</h1>
<p align="center">
A simple, modern audio sample browser/manager for GNU/Linux.
<img src="assets/logo/logo-hive_1920x1080.png" alt="sample-hive-logo">
<hr>
</p>
## What is SampleHive?
SampleHive let's you manage your audio samples in a nice and simple way, just add a directory where you store all your samples, or drag and drop a directory on it to add samples to it, and it will help sort, search, play and view some information about the sample. You can also drag and drop from SampleHive to other applications.
![Screenshot of SampleHive](assets/screenshots/screenshot-hive.png)
## Dependencies
On Arch based distributions,
```
sudo pacman -S wxgtk3 wxsvg sqlite taglib yaml-cpp
```
On Debian, Ubuntu and distributions based the on two,
```
sudo apt install libwxbase3.0-dev libwxgtk-media3.0-gtk3-dev libwxgtk3.0-gtk3-dev wx3.0-headers libwxsvg-dev libwxsvg3 libsqlite3-dev libyaml-cpp-dev libtagc0-dev libtag1-dev libtagc0 libexif-dev libpango1.0-dev
```
You might also need to install `git`, `meson` and `g++` as well, if you don't already have them installed in order to build SampleHive.
*NOTE:* On Debian and Debian based distributions you also have to install `libwxgtk-media3.0-dev`
## How to build SampleHive?
Download the source code from this repository or use a git clone:
```
git clone https://gitlab.com/samplehive/sample-hive
cd sample-hive
meson build -Dprefix=/tmp/SampleHive
ninja -C build install
```
This will install SampleHive under `/tmp/SampleHive`.
The configuration file will be placed under `~/.config/SampleHive/config.yaml` and the database file will be placed under `~/.local/share/SampleHive/sample.hive`
*NOTE:* If you don't provide the `-Dprefix=/tmp/SampleHive` by default it will be installed under `/usr/local`. You can set the prefix to anything you want.
## How to run SampleHive?
To run SampleHive:
If you provided a prefix, you can go the prefix directory then go to the `bin` directory and run the SampleHive binary, for example, assuming the prefix was set to `/tmp/SampleHive`
```
cd /tmp/SampleHive/bin
./SampleHive
```
If you didn't provide a prefix, you can find SampleHive in your menu system or run launcher and run SampleHive as you would run any other program on you system.
## Are there any keybindings for SampleHive?
// TODO
## Can I configure SampleHive?
SampleHive comes with a `config.yaml` file, that is placed under `~/.config/SampleHive/config.yaml`, that you can edit to change some settings for it.

107
README.org Normal file
View File

@ -0,0 +1,107 @@
#+TITLE: SampleHive
#+AUTHOR: Apoorv Singh
#+DESCRIPTION: A simple, modern audio sample browser/manager for GNU/Linux.
#+begin_html
<p align="center">
<img src="assets/icons/icon-hive_256x256.png" alt="samplehive-icon" width="256" height="256">
</p>
<h1 align="center">
SampleHive
</h1>
<p align="center">
<h3 align="center">
A simple, modern audio sample browser/manager for GNU/Linux.
</h3>
<img src="assets/logo/logo-samplehive_1920x1080.png" alt="samplehive-logo" width=890>
<hr>
</p>
#+end_html
* Table of contents :toc:
- [[#what-is-samplehive][What is SampleHive?]]
- [[#dependencies][Dependencies]]
- [[#how-to-build-samplehive][How to build SampleHive?]]
- [[#how-to-run-samplehive][How to run SampleHive?]]
- [[#are-there-any-keybindings-for-samplehive][Are there any keybindings for SampleHive?]]
- [[#can-i-configure-samplehive][Can I configure SampleHive?]]
** What is SampleHive?
:PROPERTIES:
:CUSTOM_ID: what-is-samplehive
:END:
SampleHive let's you manage your audio samples in a nice and simple way, just add a directory where you store all your samples, or drag and drop a directory on it to add samples to it, and it will help sort, search, play and view some information about the sample. You can also drag and drop from SampleHive to other applications.
- Dark
#+caption: Dark Screenshot of SampleHive
#+html: <img src="assets/screenshots/screenshot-samplehive-dark.png" alt="samplehive-screenshot-dark" width=890/>
- Light
#+caption: Light Screenshot of SampleHive
#+html: <img src="assets/screenshots/screenshot-samplehive-light.png" alt="samplehive-screenshot-light" width=890/>
** Dependencies
:PROPERTIES:
:CUSTOM_ID: dependencies
:END:
On Arch based distributions,
#+begin_example
sudo pacman -S wxgtk3 wxsvg sqlite taglib yaml-cpp
#+end_example
On Debian, Ubuntu and distributions based the on two,
#+begin_example
sudo apt install libwxbase3.0-dev libwxgtk-media3.0-gtk3-dev libwxgtk3.0-gtk3-dev wx3.0-headers libwxsvg-dev libwxsvg3 libsqlite3-dev libyaml-cpp-dev libtagc0-dev libtag1-dev libtagc0 libexif-dev libpango1.0-dev
#+end_example
You might also need to install =git=, =meson= and =g++= as well, if you don't already have them installed in order to build SampleHive.
/NOTE:/ On Debian and Debian based distributions you also have to install =libwxgtk-media3.0-dev=
** How to build SampleHive?
:PROPERTIES:
:CUSTOM_ID: how-to-build-samplehive
:END:
Download the source code from this repository or use a git clone:
#+begin_example
git clone https://gitlab.com/samplehive/sample-hive
cd sample-hive
meson build -Dprefix=/tmp/SampleHive
ninja -C build install
#+end_example
This will install SampleHive under =/tmp/SampleHive=.
The configuration file will be placed under =~/.config/SampleHive/config.yaml= and the database file will be placed under =~/.local/share/SampleHive/sample.hive=
/NOTE:/ If you don't provide the =-Dprefix=/tmp/SampleHive= by default it will be installed under =/usr/local=. You can set the prefix to anything you want.
** How to run SampleHive?
:PROPERTIES:
:CUSTOM_ID: how-to-run-samplehive
:END:
To run SampleHive:
If you provided a prefix, you can go the prefix directory then go to the =bin= directory and run the SampleHive binary, for example, assuming the prefix was set to =/tmp/SampleHive=
#+begin_example
cd /tmp/SampleHive/bin
./SampleHive
#+end_example
If you didn't provide a prefix, you can find SampleHive in your menu system or run launcher and run SampleHive as you would run any other program on you system.
** Are there any keybindings for SampleHive?
:PROPERTIES:
:CUSTOM_ID: are-there-any-keybindings-for-samplehive
:END:
// TODO
** Can I configure SampleHive?
:PROPERTIES:
:CUSTOM_ID: can-i-configure-samplehive
:END:
SampleHive comes with a =config.yaml= file, that is placed under =~/.config/SampleHive/config.yaml=, that you can edit to change some settings for it.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

View File

@ -26,7 +26,7 @@
#include <wx/gdicmn.h>
#include <wx/splash.h>
#define SPLASH_LOGO SAMPLEHIVE_DATADIR "/assets/logo/logo-hive_768x432.png"
#define SPLASH_LOGO SAMPLEHIVE_DATADIR "/assets/logo/logo-samplehive_768x432.png"
wxIMPLEMENT_APP(App);

View File

@ -890,6 +890,10 @@ Database::LoadSamplesDatabase(const std::string& dbPath, wxVector<wxVector<wxVar
int trashed = sqlite3_column_int(m_Stmt, 10);
wxString hive_name = std::string(reinterpret_cast<const char*>(sqlite3_column_text(m_Stmt, 11)));
wxLongLong llLength = length;
int total_min = static_cast<int>((llLength / 60000).GetValue());
int total_sec = static_cast<int>(((llLength % 60000) / 1000).GetValue());
wxVector<wxVariant> vec;
if (trashed == 1)
@ -977,7 +981,7 @@ Database::LoadSamplesDatabase(const std::string& dbPath, wxVector<wxVector<wxVar
vec.push_back(sample_pack);
vec.push_back(sample_type);
vec.push_back(wxString::Format("%d", channels));
vec.push_back(wxString::Format("%d", length));
vec.push_back(wxString::Format("%2i:%02i", total_min, total_sec));
vec.push_back(wxString::Format("%d", sample_rate));
vec.push_back(wxString::Format("%d", bitrate));
vec.push_back(path);
@ -1046,6 +1050,10 @@ Database::FilterDatabaseBySampleName(const std::string& dbPath, wxVector<wxVecto
int bitrate = sqlite3_column_int(m_Stmt, 7);
wxString path = wxString(std::string(reinterpret_cast<const char*>(sqlite3_column_text(m_Stmt, 8))));
wxLongLong llLength = length;
int total_min = static_cast<int>((llLength / 60000).GetValue());
int total_sec = static_cast<int>(((llLength % 60000) / 1000).GetValue());
wxVector<wxVariant> vec;
wxVariant icon_filled, icon_empty;
@ -1076,7 +1084,7 @@ Database::FilterDatabaseBySampleName(const std::string& dbPath, wxVector<wxVecto
vec.push_back(sample_pack);
vec.push_back(sample_type);
vec.push_back(wxString::Format("%d", channels));
vec.push_back(wxString::Format("%d", length));
vec.push_back(wxString::Format("%2i:%02i", total_min, total_sec));
vec.push_back(wxString::Format("%d", sample_rate));
vec.push_back(wxString::Format("%d", bitrate));
vec.push_back(path);
@ -1144,6 +1152,10 @@ Database::FilterDatabaseByHiveName(const std::string& dbPath, wxVector<wxVector<
int bitrate = sqlite3_column_int(m_Stmt, 7);
wxString path = wxString(std::string(reinterpret_cast<const char*>(sqlite3_column_text(m_Stmt, 8))));
wxLongLong llLength = length;
int total_min = static_cast<int>((llLength / 60000).GetValue());
int total_sec = static_cast<int>(((llLength % 60000) / 1000).GetValue());
wxVector<wxVariant> vec;
wxVariant icon_filled, icon_empty;
@ -1174,7 +1186,7 @@ Database::FilterDatabaseByHiveName(const std::string& dbPath, wxVector<wxVector<
vec.push_back(sample_pack);
vec.push_back(sample_type);
vec.push_back(wxString::Format("%d", channels));
vec.push_back(wxString::Format("%d", length));
vec.push_back(wxString::Format("%2i:%02i", total_min, total_sec));
vec.push_back(wxString::Format("%d", sample_rate));
vec.push_back(wxString::Format("%d", bitrate));
vec.push_back(path);
@ -1410,6 +1422,10 @@ Database::RestoreFromTrashByFilename(const std::string& dbPath, const std::strin
int trashed = sqlite3_column_int(m_Stmt, 10);
wxString hive_name = std::string(reinterpret_cast<const char*>(sqlite3_column_text(m_Stmt, 11)));
wxLongLong llLength = length;
int total_min = static_cast<int>((llLength / 60000).GetValue());
int total_sec = static_cast<int>(((llLength % 60000) / 1000).GetValue());
wxVector<wxVariant> vec;
wxVariant icon_filled, icon_empty;
@ -1431,7 +1447,7 @@ Database::RestoreFromTrashByFilename(const std::string& dbPath, const std::strin
vec.push_back(sample_pack);
vec.push_back(sample_type);
vec.push_back(wxString::Format("%d", channels));
vec.push_back(wxString::Format("%d", length));
vec.push_back(wxString::Format("%2i:%02i", total_min, total_sec));
vec.push_back(wxString::Format("%d", sample_rate));
vec.push_back(wxString::Format("%d", bitrate));
vec.push_back(path);

View File

@ -72,7 +72,8 @@
#define ICON_HIVE_24px SAMPLEHIVE_DATADIR "/assets/icons/icon-hive_24x24.png"
#define ICON_HIVE_32px SAMPLEHIVE_DATADIR "/assets/icons/icon-hive_32x32.png"
#define ICON_HIVE_64px SAMPLEHIVE_DATADIR "/assets/icons/icon-hive_64x64.png"
#define ICON_HIVE_200px SAMPLEHIVE_DATADIR "/assets/icons/icon-hive_200x200.png"
#define ICON_HIVE_128px SAMPLEHIVE_DATADIR "/assets/icons/icon-hive_128x128.png"
#define ICON_HIVE_256px SAMPLEHIVE_DATADIR "/assets/icons/icon-hive_256x256.png"
#define ICON_STAR_FILLED_16px SAMPLEHIVE_DATADIR "/assets/icons/icon-star_filled_16x16.png"
#define ICON_STAR_EMPTY_16px SAMPLEHIVE_DATADIR "/assets/icons/icon-star_empty_16x16.png"
#define WAVEFORM_SVG SAMPLEHIVE_DATADIR "/assets/waveform.svg"
@ -596,6 +597,10 @@ void MainFrame::AddSamples(wxArrayString& files)
sample.SetSampleRate(tags.GetAudioInfo().sample_rate);
sample.SetBitrate(tags.GetAudioInfo().bitrate);
wxLongLong llLength = sample.GetLength();
int total_min = static_cast<int>((llLength / 60000).GetValue());
int total_sec = static_cast<int>(((llLength % 60000) / 1000).GetValue());
wxVector<wxVariant> data;
wxVariant icon = wxVariant(wxBitmap(ICON_STAR_EMPTY_16px));
@ -608,7 +613,7 @@ void MainFrame::AddSamples(wxArrayString& files)
data.push_back(sample.GetSamplePack());
data.push_back("");
data.push_back(wxString::Format("%d", sample.GetChannels()));
data.push_back(wxString::Format("%d", sample.GetLength()));
data.push_back(wxString::Format("%2i:%02i", total_min, total_sec));
data.push_back(wxString::Format("%d", sample.GetSampleRate()));
data.push_back(wxString::Format("%d", sample.GetBitrate()));
data.push_back(path);
@ -972,12 +977,12 @@ void MainFrame::UpdateElapsedTime(wxTimerEvent& event)
wxLongLong llLength, llTell;
llLength = m_MediaCtrl->Length();
int total_min = (int) (llLength / 60000).GetValue();
int total_sec = (int) ((llLength % 60000)/1000).GetValue();
int total_min = static_cast<int>((llLength / 60000).GetValue());
int total_sec = static_cast<int>(((llLength % 60000) / 1000).GetValue());
llTell = m_MediaCtrl->Tell();
int current_min = (int) (llTell / 60000).GetValue();
int current_sec = (int) ((llTell % 60000)/1000).GetValue();
int current_min = static_cast<int>((llTell / 60000).GetValue());
int current_sec = static_cast<int>(((llTell % 60000) / 1000).GetValue());
duration.Printf(wxT("%2i:%02i"), total_min, total_sec);
position.Printf(wxT("%2i:%02i"), current_min, current_sec);
@ -2080,7 +2085,7 @@ void MainFrame::OnShowTrashContextMenu(wxTreeEvent& event)
selected_item_text = m_Trash->GetItemText(selected_item_ids[i]);
wxLogDebug("Count: %d :: Selected item text: %s",
(int)selected_item_ids.GetCount(), selected_item_text);
static_cast<int>(selected_item_ids.GetCount()), selected_item_text);
filename = GetFilenamePathAndExtension(selected_item_text).Filename;
@ -2435,7 +2440,7 @@ void MainFrame::OnClickRestoreTrashItem(wxCommandEvent& event)
selected_item_text = m_Trash->GetItemText(selected_item_ids[i]);
wxLogDebug("Count: %d :: Selected item text: %s",
(int)selected_item_ids.GetCount(), selected_item_text);
static_cast<int>(selected_item_ids.GetCount()), selected_item_text);
filename = GetFilenamePathAndExtension(selected_item_text).Filename;
@ -2561,7 +2566,7 @@ void MainFrame::LoadConfigFile()
this->SetSize(width, height);
this->SetMinSize(wxSize(width, height));
this->CenterOnScreen(wxBOTH);
this->SetIcon(wxIcon(ICON_HIVE_24px, wxICON_DEFAULT_TYPE, -1, -1));
this->SetIcon(wxIcon(ICON_HIVE_256px, wxICON_DEFAULT_TYPE, -1, -1));
this->SetTitle("SampleHive");
this->SetStatusText("SampleHive v0.8.4_alpha.1", 3);
this->SetStatusText(_("Stopped"), 1);