-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microtonality #1387
Comments
@fundamental, does Zyn support some kind of MIDI tuning messages? |
@softrabbit all of those look like SysEx messages which zyn does not support |
:( it says no one is assigned... i will do it then! What programming must i know is it in python? And is this something hard or simple for a beginner. |
no c++
hard |
Ok i will develop this, i am determined :) just little guidance , do i needto learn C ? or c++ will simply do, and do i use eclipse or something like code blocks... sorry to be such a noob i dont even know how to build from a source code at the moment. |
@BreeBree LMMS is mainly C++. An ide like eclipse or at the very least a
better text editor than notepad (like notepad++) is helpful. A guide to
compiling LMMS is available in the github wiki. Atm I think it's only
possible on linux but windows building is being worked on.
|
Ok thank you, i have been taking many tutorials on c++ this past week i have already been making allot of small programs so i am on my way to helping you guys :) |
Ok guys i think im ready to start. I looked into the code already and i think i need to make the switch statements in the midi controller cpp for different selected temperments and asign the mathmatical pitch bend for very individual note on a 12 scale ratio. Can someone help me identify how to reference a an individual note and if its possibke to build lmms on windows yet.. im using codeblocks and default compiler. |
@BreeBree windows building is described in the wiki on github. I had some
issues but got it working. Good luck!
|
👍
I'll tag @softrabbit on this question. 👍
Not easily yet as it requires msys2 (terminal emulator) to build properly due to the mixing and matching of Windows and POSIX style paths... i.e. I've never setup a proper IDE with LMMS personally, but @curlymorphic has put some time into a QtCreator tutorial here: https://www.youtube.com/watch?t=3&v=XTWnQPGL9xs And some tips here: https://www.youtube.com/watch?v=3OzGXfm6fqE @curlymorphic I hope you're ok with me posting these (I say this because these videos were intentionally marked as private). Also, I'm not sure how much they will apply to Windows and/or codeblocks, but if you do get a proper IDE working in Windows, please (please!) write a GitHub wiki article and we'll publish it to our repository, we need to engage more developers and if getting more Windows tutorials published helps, we'll do it. |
@tresf IDE's on windows. I have only tried to use QtCreator but have had mixed success. There are 2 main issues I have been having.
|
@breebee Are you referring to the file There is a controller factory method There is also a class Does anyone know whether these classes are still used? Otherwise we should remove them so that they don't create any confusion. |
they are fine and extremely informative |
Off topic, but the build process should take 5-20 minutes on most relatively modern hardware. The major factor is the |
Agreed. A good IDE can help coding even if it can't help building. |
It has never taken hours to build, but the whole process of setting up the build environment takes some time, with a slow net connection, but this only needs to be done once. When I am building using msys2, I am using windows in a virtual machine. I am guessing each build takes ~10 mins. It is not fair to compare that time against a natively running linux box. |
For fast builds I can recommend the following:
Using this a full Linux debug build only takes 1:36 minutes on my machine. 😃 |
With MIDI, you can have only one pitch bend value in effect per channel, so you can't e.g. have an unbent C and a bent E playing at the same time without using multiple channels. I have no idea what the implications are when you throw VSTs in the mix, do they in general listen to one channel or all of them ("omni" mode)? For the instruments not using MIDI, these 2 lines calculate the pitch: lmms/src/core/NotePlayHandle.cpp Lines 518 to 519 in 3136869
Turning that into a table lookup should be a good starting step IMO. |
Thanks a lot for clearing that mistake up Dave! |
You'll need to be running the 64-bit build of Windows 7 to follow our build tutorial, but I still wouldn't recommend it for a first-timer. Our Linux builds are much (much!) quicker and easier to follow. Install VirtualBox and Ubuntu 14.04 in a virtual machine and you can keep XP for a bit longer. 👍 |
@softrabbit Where is the Just for a clearer picture, here is how it works with VSTs: A VST instrument receives the stream of MIDI data that is directed to the instrument. It is then up to the instrument to decide what to do with the note on and note off events. A simple instrument might just calculate the frequency from the note number using a rather simple formula (that I currently don't have in my head 😄). Another VST might be able to read Scala files and will then map the note numbers to the tuning that's stored in the Scala file. Using this approach gives maximum flexibility to the user. |
|
@breebee There is no need to manipulate MIDI data or MIDI pitch modulations. The MIDI data will only provide you with the information which key/note was played (in the form of a number between 0 and 127). This note number is then used by a simple lookup table to find out the corresponding frequency that the instrument should play. This means that the simplest implementation would be an look up table (array) of length 128 which directly maps the note numbers to the corresponding frequencies of the scale. The array would be initialized according to the used scala file and and a potential keyboard mapping described in a The scala documentation can be found here: I guess it makes sense to break down the task into several steps so that it does not seem to overwhelming. Example:
As was already mentioned by @softrabbit you may also have a look at the ZynAddSubFX implementation. |
Multiple tunings, stored globally, each can be shared by multiple instruments? |
Maybe a toggle button on the actual instruments gui would resolve the drum issue being effected by the tuning. Using a virtual box might be the solution to build on windows but i am going to try multiple solutions i have found for building blender on windows first with cmake this week and have an update for building LMMS on windows if successful. Btw i think apples "logic pro" daw is the only one ive seen with global microtuning. It might be easier to impliment something like http://www.vst4free.com/free_vst.php?id=1430 |
I found zynaddsubfx microtanal cpp and header https://github.com/LMMS/zynaddsubfx/tree/master/src/Misc |
A drop down box on the "Misc" tab?
Well, that's the part that should be built into some suitable spot when dealing with MIDI-based instruments (VSTs, Zyn...). Probably with the options to send a bulk tuning dump, single-note tuning messages or pitch bends on up to 16 channels. Any one of those would be preferrable to manually loading a scale file in the plugin, but as a last resort that's usable, too.
Or implement an easy toggle to set A at 432 Hz to satisfy some trolls. |
Sounds like a good option to me. This way there would also be one central place where the data is stored when the file is saved. @breebee I think the problem with implementing this on the MIDI side is that if you need to use the pitch modulation to describe the final pitch you never know how a VST is going to interpret this. If the plugin is set to interpret full pitch modulation as two semitones (or even an octave) this approach will likely give wrong results. I assume that this is also the cause of the complaint found on the site you have linked:
|
So llms is built with qt? Sorry i just noticed the q's in the ui, this means i have to have qtcreator to build llms right? |
@breebee No, you don't need Qt Creator to build LMMS. Qt Creator is just an IDE that uses Qt and that is developed by the Qt developers. You can configure CMake to create several type of builds, e.g. for LMMS needs Qt because the GUI is implemented with Qt (and some of the core classes are also used throughout the code). So you will need to install Qt and the development packages but you won't need to install Qt Creator. I suggest that you install Ubuntu in a virtual machine and follow the build instructions in the GUI. This might give you a good overview of what is needed and how things play together. Once you can build everything you can get your feet wet by playing with the code. |
So, how is the implementation going? Just stumbled on his issue and I am very interested in microtonal music. I seems that there has been no activity for a long time, though. |
@algorev |
Hi, It seems like a relatively complex issue, so I would probably cut it up into more digestible pieces like this:
I'm not sure if I'll be able to address all of this, but I'll have some free time in the second half of this month so I could at least try to get this moving again after 4 years. :) |
Any xenharmonic scale editor in LMMS should be modeled after ZynAddSubFX's in my opinion, there aren't any scales that aren't possible in that scale editor and it's very easy to use. That does introduce a good question though, how will LMMS and ZynAddSubFX microtonality mix? ZynAddSubFX has those abilities built in, so which takes priority? Or will the LMMS scale overwrite the ZynAddSubFX one? |
Well, that's basically why I put Zyn on the list as the last item: with native plugins and VSTs the way to approach it seems clear, but with Zyn it will likely require some custom solution which I'm not yet sure about. I agree that the Zyn scale editor seems fine (although it seems to suffer from a severe case of amnesia) so the LMMS microtuner dialog would probably look just the same. So compatibility should not be problem as it would be a 1:1 mapping. As for how to get it to re-tune: on the LMMS side it could behave like the other instruments -- if the combo box in Misc tab changes, a re-tune message would be emitted. That would allow the scale to be set and saved / stored in the same way for all instruments, and to be even easily automated. The re-tune message would just need to be "custom made" for Zyn, or Zyn would have to get the MIDI re-tune message support. This is the part which I'm not sure about. It could also be a simple file name to load + execute the required load function in Zyn, in case LMMS wants to only support .scl and .kbm. Unless the Scales dialog is disabled in Zyn, there is probably no way to prevent the user from overwriting it with something else, so the priority would be on the LMMS settings -- any changes in Zyn would not be saved (as is the case now) and would be overwritten by any newly generated retune event. |
Oh, dear.. I think the MIDI specification is going to give me a stroke, and I haven't even started yet. First you have to register before you can even open any specs (because it's free! why wouldn't you?), then you get one massive document + about two pages worth of links to various individual amendments and a notice that anything in the main document can be outdated. The main document is a mixture of half-decently typeset original document, various additions and modifications (made clearly using a different font and a different editor which places letters in headings with randomized x axis offset), and -- wait for it -- actual pasted images of scanned sheets of paper. And the amendments are, based on the one I downloaded, written in another toy word processor that typesets MIDI as "MI DI" etc.. Whew. I imagined the MIDI Association would have at least some standards, given that producing the specification is what they do. But it looks like as if after 1996 they fired the writers and all subsequent revisions were typed by first-year kindergarten students. Pretty embarrassing. Well, anyways: the good news that there is an official standard called MIDI Tuning Messages, and it seems pretty flexible -- basically allowing you to specify the frequency for all keys separately. The microtuner class could simply generate a mapping array and send it all in one batch to re-tune the instrument, or "inject" the mapping for each note separately in the "single-note" mode. The second mode has an advantage in that it does not require the target to keep any state, allowing us to side-step the problem of potentially inconsistent / overwritten settings of a plugin. The bad news are that the support is not exactly universal, and some VSTs either don't support alternative tunings at all (probably most cases) or they only offer tuning file support like Zyn. So while adding the support for MIDI Tuning Messages is probably a good idea overall, it is questionable whether it will be actually useful for anything in the near future and if we should go with the batch mode or the single-note mode. I.e. working on Zyn first could be more beneficial, and depending on the implementation perhaps even easier, as communication with proprietary VST plugins could be hard to debug. But that's well down on the list in any case; the initial implementation for native LMMS instruments should not require any complicated messaging, they could just read the active mapping array directly at any time. |
@he29-net I tried to have midi in a as2 game, but i failed |
@musikBear Thanks for the offer, but there is no need to search for anything -- what I was talking about is about MIDI messages, not about MIDI files. I'm not really interested in the storage format, what I need to figure out is the sequence of MIDI commands required to retune the target MIDI synthesizer, be it a plugin, or even a physical device (since LMMS supports MIDI out). The specification is a bit painful to read, but it should have all the required information, so no worries. :) |
After digging through the code a bit, I realized that not everything would work as I originally intended, so here is little update and a modified ToDo list. Most of all, I thought it would be a good idea to have a scale manager tab in the Settings dialog, which could be used to load or make new scales. These would then become available to individual instruments in a ComboBox in the Misc tab. Saving and loading of this scale database would be quite problematic, though. Project opened on another computer could sound completely broken if a given scale wasn't available or had a different ID. Ensuring the consistency of various scales and their associated ComboBox IDs would be pretty messy even within one project, not to mention trying to ensure consistency when opening the project on another computer, where another set of scales (or the same scales in different order) may be loaded.
EDIT: After trying to cram all the required controls into the tiny, tiny instrument window, I changed my mind once again. Having project-wide scale and keymap definitions seems to lead to a much better workflow and cleaner UI. It will be more difficult to implement (save / load of multiple scales per project, handling ID updates in all instruments when a scale in the middle gets deleted, ...), but it is at least better than my original "install-wide" Settings dialog idea. Automation is easy this way (just switch between available scales and mappings) and the user could set a default scale that is applied to all new instruments instead of loading it manually for each one, or they could edit an existing scale and have it update on all instruments that use it etc... Scale management will still reside in the Microtuner class, but instead of being a global "scale manager" that is queried for note→frequency conversions for a given scale ID etc., it will be a part of each instrument and will operate on its currently active / loaded scale. Apart from translating notes to frequencies, it will also contain
Also, it would be nice to have something like |
The first PR will be only for native, non-MIDI-based instruments (to keep the PR size reasonable and to gather some feedback first, before building more stuff on top of it). What's left to do is saving / loading (both .scl / .kbm and in project) and some GUI-related functionality and polish. |
Implemented in #5522. |
Thank you |
I cant seem to find the microtuner anywhere :( |
Thank you! Must be windows build missing it on 1.3.0-alpha.1.102g89fc6c960 lol I looked for hours before asking :) |
Like @diizy said over at #1381:
Let's make this a separate issue, mmkay? A few points to get things rolling:
The text was updated successfully, but these errors were encountered: