Open bboboedov opened 8 months ago
if the selection of waves was carried out not through the file opening dialog box
it is not In 3OC there is a click-able representation of waveforms: It is intuitive and easy -or? are you thinking on Filters..?
If I understand correctly this issue is about improving the loading of custom waveforms into the oscillators so that it becomes easier to experiment with them. The current workflow is as follows:
So if you want to try out different waveforms you must repeat the steps above which is rather cumbersome.
While checking this I also noticed that having to double click the "+" sign is not very discoverable. All other waves can be selected with a single click and if you single click the "+" there is no sound because no wave is loaded into the oscillator yet. You must first double click and select a wave. It's not very obvious that the "+" can be double clicked in the first place.
This proposal seems to be the following:
I think ideally it should also be possible to go from one waveform to the next, e.g. with some arrow keys.
Even if this was implemented there are some technical questions:
I am interested in developing something similar for Audio File Processor.
What I had intended was to save the directory where the audio file is inside the instrument if it is (not already), then with up down buttons or key presses load all the files of the correct type in the same diredctory (not recursive) into an array and then iterate that, updating the instrument with the file each time.
Would that help?
For example I have a bunch of different samples from professional sample packs that are already organized by directory. I want up diown burttons to flip throught the current directory. To change directory just use the + symbol as before.
I think same approach would work for other instruments?
Hi @teknopaul, I think this could be a valuable feature.
What do you mean by "load the files" though? Do you mean to load the meta data of the files so that you can load the actual data once it is requested or would you intend to load the actual content of all files? I would advise against doing the latter as it might take a very long time and would be wasteful with regards to resources, especially if you have thousands of samples in the directory.
For AFP GUI would be like this...
/somedire/current.wav [dir icon] [<] [>]
flick the file icon and it loads a file as normal
click < n.b. first time we need to find m_index then cache just that int for each subsequent click
QString DirectoryScroller::findNext(bool upDown)
{
QStringList files = m_dir.entryList(QStringList(m_suffix), QDir::NoFilter, QDir::Name);
if (upDown)
{
if (m_index < files.length())
{
m_index++;
}
}
else if (m_index > 0)
{
m_index--;
}
return files.at(m_index);
}
It could be faster but I don't think that can be slower than opening up the file chooser each time.
I've written this as a util class so we can iterate on better implementations, supporting nested directories etc
There is a QWidget called LeftRightNav
Created this on a feature branch if you want to try it out
/home/teknopaul/github_workspace/lmms feature/directory-scroller
Same widget would look like this in the triple oscillator
So thats a screen shot of it working in feature/directory-scroller branch, works on my machine.
@bboboedov can you try that out, I have only Linux to try things out on and this code has weird paths. LMMS internally users.
double click [+] to select a file, only after having done that once prev and next will work: you need to select a directory of files.
loading of custom waveforms @michaelgregorius vrote
: p Now i get it. Thanks mic. And already implemented ! Impressive work @teknopaul 👍
Итак, вот снимок экрана, на котором он работает в ветке feature / directory-scroller, работает на моем компьютере.
@bboboedov не могли бы вы попробовать это, у меня есть только Linux для тестирования, и в этом коде есть странные пути. LMMS поддерживает внутренних пользователей.
дважды щелкните [+], чтобы выбрать файл, только после того, как вы сделали это один раз, предыдущие и следующие будут работать: вам нужно выбрать каталог файлов.
Hello! Thank you for your responsiveness! I would try, but I need instructions on how to do it.
on Linux you clone the source from gitub git switch to the branch mkdir build cd build cmake make ./lmms
But Linux always has build tool available in other Platforms I have not done QT dev
@musikBear
Any idea how to go about getting pull requests tested and merged?
Hi @teknopaul,
I think it should work as follows:
Enhancement Summary
In TripleOscillator, it would be more convenient to experiment with different waveforms if the selection of waves was carried out not through the file opening dialog box, but using a list that leaves when you click "+" to the right of the window and remains there. Clicking on the list item should have the same effect as when opening the file, and the focus should go to the window in such a way that you can hear the sound by pressing the keys on the keyboard. The list should contain: 1) the selection of the folder whose files will be the items of the list and 2) the search field by name (possibly by other criteria). Thus, it will take less clicks to try different waveforms.
Justification
Mockup