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
Patch-PolyMono-functionality #158
Comments
|
This Patch supersedes previous patch:PatchFluidPolyMono-0001
Please see PatchFluidPolyMono-0002.pdf Original comment by: jjceresa |
|
This Patch supersedes previous patch (PatchFluidPolyMono-0002) Original comment by: jjceresa |
|
I had a first look into this patch and stumbled over some issues:
Also I had trouble applying the patch. Was it really done against 1.1.6 release or against some recent git at that time? Anyway, I appreciate this feature and your commitment for it, and I would like to integrate it. However this feature is a bit too complex to integrate and polish it on my own. |
|
The lastest patch in the original ticket has a very strage format, with mixed Windows and Unix path separators. Below is a fixed patch file which applies without errors to the latest version from the SourceForge git repository. Still needs a lot of cleanup and separation into separate commits IMHO, but at least there is a working baseline now. Apply with |
start of poly/mono implementation, addressing #158
|
Great Job! I had trouble applying it against upstream 1.1.6 release, but this worked smoothly. Thanks! Created a new branch from commit f52597b (latest SourceForge git) and applied his patch as one single commit... well, at least further steps will be tracked with commits. I think the best strategy now would be to merge master into polymono and then do the polishing. Will try that in the next days, but first need to find time looking into #205 again so this gets finished. BTW: Do you have/need commit access? |
You mean to the polymono branch? I'm not sure I'll have time to really get into that. It's huge and touches so many different and partly unrelated things. Ideally, I would love for JJC to split it into smaller, more manageable chunks. But he said before that he doesn't think it could be done. |
|
Hello Tom and Marcus, i am coming step by step. Tom>Also I had trouble applying the patch. Was it really done against 1.1.6 release or against some recent git at that time? Tom > I had trouble applying it against upstream 1.1.6 release I don't know which trouble, but In this case it seems that "upstream 1.1.6 release" is different than v1.1.6 fluidsynth-code-git-f52597be038a5a045fc74b6f96d5f9b0bbbbc044.zip . mawe42 > It's huge and touches so many different and partly unrelated things. It is true that the patch is huge. But it is 90% not complicated to understand for a developer ( and i am ready to help) (but 'Legato' is a bit more complex to understand for the developer). mawe42 >Ideally, I would love for JJC to split it into smaller, more manageable chunks. But he said before that he doesn't think it could be done. I think it could be done on a step by step basis. Taking the time we need.
|
|
Hi jjc, good to have you here. I gave you commit access and applied your patch on the polymono branch as one commit. And if you ask me I would also leave it as one single commit. There are a few conflicts I could not resolve so far. One of them is this: fluidsynth/src/synth/fluid_synth.c Lines 3530 to 3561 in 96034eb
The replacement of the default Another issue that come to my mind:
I understand why you have done it and I currently can't offer a better alternative, but still I think this is a bad idea. Is it necessary to have that I dont like the fact that |
I don't yet really know how to work with this things. I don't see the usual strategy .
The breathToAtten replacement of the default velToAtten is necessary when keyboardist wants to control dynamic with only a breath controller (but not with both key velocity + breath controller).
Theses Marcus' API is useful to define a default modulator list at synth instance level (i.e a list for all channels) (please, correct me if i am wrong) .
Therefore this collide is easy to solve like this:
Can you help me to point the others conflicts ?
I understand that you don't want any developer to worry about any change in this existing public API. So the only solution, i see is to supply an equivalent function (i.e named fluid_synth_mono_alloc_voice() ) called by fluid_defpreset_noteon() dedicacced to the need a channel actually in mono mode.
Both structure have different meaning. In others word basic_channel_infos informations are set and get by the application into a different codage in fluid_channel_t via Poly Mono API. struct _fluid_basic_channel_infos_t information can be saved by the application in permanent storage if needed.
Good things. Thanks for the hint. |
|
Ok thanks so far.
Already resolved them. |
|
Hi, tom
I propose a straightforward solution:
Your opinion ? I can do that and send you the result or |
|
I still dont quite like the idea of requiring a whole instrument zone just for creating a single voice. Let's postpone this to later, I need time thinking about that. What you could do for now is revising and cleaning up the API documentation so it is usable with doxygen, at least for those parts not likely to be changed. This means:
So for example the doc of Should become this: This would be enormously helpful.
The web interface might be a good point to start doing this. However I highly recommend doing it sooner or later via command line. |
Yes, cleaning is necessary i will do that. The same is true for the pdf documentation. Writing in english is "un tour de force" for me ;)
Yes, the whole instrument zone isn't required to create the voice !. For creation , only sample field is sufficient. But Playing legato is more complex. Please read. Anyway, good Instruments are rarely composed of only one voice (Instrument Zone are often layered).
So, on noteOn, the legato logic must do two things:
So, for legato playing, each simultaneous created voice needs also to remember the KeyRange,VelRange and also need a flag to mark each instrument zone corresponding to all voices already revived by the legato logic. Actually this remembering is done in each Instrument Zone concerned. |
|
Hi, Tom
Good evening. |
|
Sorry, i have clicked the wrong button :( |
start of poly/mono implementation, addressing #158
|
Thank you, that looks better now. I made a hacky change to the git history of the polymono branch (you became author of badddc5 in hindsight). Not sure if a simple In some public synth functions I've seen that you're doing custom checks to ensure chan is within range. E.g. here: fluidsynth/src/synth/fluid_synth_polymono.c Lines 382 to 383 in d5b9523
Meanwhile I'll try to find a time slot reading through your pdf, so we can get into more technical discussion before doing too much potentially unnecessary code related cleanup. @mawe42 In case it gets too annoying: You know how to unsubscribe from this thread? I wouldnt mind :) |
I've seen that
Thanks for the hint ! (Hey! what is the format you have used in your previous comment:
Good for me. |
|
I consider replacing |
|
Ok, I will replace |
|
Thanks. After having read the pdf now: Do we really need |
|
Ok. So we need it. My main problem is that this patch adds huge complexity to the code base, which I think is at the brink of being unmaintainable. E.g.:
Frankly speaking, looking at the code as it currently is often makes me wanting to run away. If there's anything not really necessary, perhaps consider removing it. Hopefully this gets clearer after it will have been shaped. |
Yes please.
No need to strip that away. The often I see it the more likely it is I'll understand it. Back to the monolist: So you use it to store any pending noteon event which can then be used by fluidsynth/src/synth/fluid_synth_mono.c Lines 398 to 405 in 71f7c35
Couldnt you have also used |
|
When the musician intends to play On
On
On
Now the musician intends to play a legato passage in the reverse way
Note:When playing in the reverse order, the monolist keeps trace of the note value (the Notes:
|
I dont see any noteoffs here, though I was expecting them. So a basic question: Does playing legato require the musician to keep the keys depressed?
I'm mostly concerned about code reusability. Btw: you missed a few things here on github. Please pay attention to the little bell sign on the top right, that informs you about any new activity related to you. |
On monophonic instrument.
But, in the case the musician intends playing legato in ascendant order (example above the line in my previous comment) followed by descendant order (the example continues below the line) he need to keep the keys depressed. Imagine a flutist (a flute with holes) player who wants to play the whole passage in legato playing: n1,n2,n3,n2,n1
Thanks, to advise me. |
|
Ok thanks, now it gets clearer to me. So since you never know how many keys may still be depressed, wouldnt it be more appropriate to use |
|
Sorry, i don't see the little bell ! |
The number of keys is still limited by the numbers of fingers on both hands. 10 entries are usually sufficient (20 max if 2 musicians play on the same keyboard) . Each entry are fast linked (forward and backward) as circular buffer. Does entries in fluid_list_t can be linked forward and backward ?. |
|
Sorry, even after reloading the page there is still no bell. This is Curious ?!. |
|
Then please pay attention to your emailbox: |
I have assumed that you are waiting for comment on this subject ?. This has be done. There is still no little Bell at the top right !. I assume this is a notification device. Any idea on this issue ?. May be i need to be registered somewhere ?.
It is a fixed array (i.e 10 entries) that works like a circular buffer. So when the musician play legato n1On,n2On,n3On,....n10,n11,n12.... Any notes will be always played. The only risk is that when the legato passage is longer than the fixed size (i.e 10) most ancient notes will be n3,n4, notes n1,n2 are lost and will be never able to sound when the musician will continue playing legato on the reverse order. During this the reverse order, only notes n12,n11,n10,n9,n8, to n4,n3 will be hear (10 most recent notes).
This is the most reasonable approche i see. |
I wanted to say that any github activity is also sent as mail.
You only need to be signed in at github. Perhaps update your browser? I dont think introducing a setting is a way to go. Even with documentation most users would not know how to use it correctly. Avoiding allocs on noteon is reasonable ofc. Currently cant think of any better solution. |
In fact, only Now about FluidSynth In fact, one major difficulty is to write good documentation because this is a hard task. For example |
Oh dear, they must have changed the default behaviour of that...
To a user all that matters is "I want to play legato... oops it doesnt work. Reporting bug upstream." The idea of having a setting that would just need to be slightly increased in order to fix this "bug" is what I would consider to be quite unconventional. So I'm afraid most users wouldnt simply pay attention to this setting or being able to draw a connection between the setting and buggy legato playing.
Good to know... I'm to blame ;) |
It is not truly the case "legato playing" always continue working even when the monolist overflows (because it works circular).
Anyway, i understand and agree you argue |
|
Just for information. |
|
Yes, that flow chart is nice, thanks. However it brings up something else that strikes me. In fluidsynth/src/synth/fluid_synth.c Lines 1050 to 1062 in 2efbfa9
However you're calling BTW: The build of the polymono branch currently fails, indicated by a red cross next to the commits in the commit history view: https://github.com/FluidSynth/fluidsynth/commits/polymono |
Calling
Yes you are right ,actually the function naming is incorrect and should be now called
I don't understand what has happened ?. |
We use Travis as continuous integration system. For every commit it tries to automatically build fluidsynth with different configurations on linux and macosx. The polymono branch currently fails to build. Just click on that red cross of the most recent commit in the commit history to get to Travis and select one of the build configurations that fails (currently all) to view the build log. |
Interesting feature. Could we tell to Travis to stop the build or restart a build after it has failed ?
Thanks for the tip, but now the red cross has automatically disappeared. May i suppose that Travis have retried and now the build is success ?. |
At least I can cancel a build, not sure if you have privileges, dont know how to grant them either. But why would you want to restart a failed build? New commits will be built automatically. Perhaps you mean an errored build, like in #269, indicated by a red exclamation mark in the travis view? Errored builds have a problem with the build process itself. Often travis itself is to blame, you can ignore that, they'll fix it... or I do.
They were replaced with a yellow dot, because travis is currently building. When clicking it you will also be redirected to the travis build status page for that commit and see that it still fails. You can also see that on the branches overview page: https://travis-ci.org/FluidSynth/fluidsynth/branches |


This patch add Poly Mono functionality to Fluidsynth v 1.1.6
Part 1
This part describes Poly/Mono mode:
Part 2
This part describes mainly the monophonic behavior:
CC legato(68d) On/Off
CC portamento(65d) On/Off
CC portamento time (msb,lsb) (5, 37d)
New API, shell commands to handle default breath to Attenuation modulator.
New API, shell commands to handle legato mode.
Please see PatchFluidPolyMono-0001.pdf
Reported by: jjceresa
Original Ticket: fluidsynth/tickets/160
The text was updated successfully, but these errors were encountered: