On Mon, 4 Jul 2022 02:53:20 +0200 Ichthyostega <p...@ichthyostega.de> wrote:
>>> Ichthyostega <p...@ichthyostega.de> wrote: >>>> Regarding such a transition, I'd propose we should consider to create a >>>> *parameter object*. > >Am 03.07.22 um 15:13 schrieb Kristian Amlie: >> Good idea. I don't think it will be any less work, but it makes it more >> organized for later. And switching between float and double for testing >> purposes will be much easier. > >Am 02.07.22 um 20:12 schrieb Will Godfrey: >> At the moment we use chars for all sorts of things that have nothing to do >> with chars - in particular menus, spinboxes and buttons. None of these >> actually use the 0-127 range. Also range checking is sometimes split across >> I/O and the synth, so where should all of this go? > > >Hi Yoshimi-devs, > >yes, indeed I'd expect that we'll discover some oddities along the road. >But that's the whole Idea: use this concept to pick up the regular cases, >i.e. those which are just chars, using the 0-127 range, and ideally are >converted to 0.0 to 1.0 in the Synth prior to usage. > >And the good thing is, we can do that incrementally. >That is, I would propose to start with just wrapping those char values >as a first step, and allow for the most simple and common conversions, >and then try to push that into the code base and see what happens. >The already converted code can coexist with the unconverted code, >and on the assembly level there should be no difference (as Kristian >pointed out, it is important to make such a wrapper 100% inline). > >Range checking is an interesting question. >Ideally it should move out of the synth code and to the "input side", >i.e. that point, where a such a ParamVal is actually changed. But, >on the other hand, I always prefer to do refactorings the defensive >way, as equivalence transformations, thus I'd expect that to require >some reasoning and analysis of existing code. > >-- Hermann I have a hazy recollection that I had to fiddle the conversions in MIDI learn because I couldn't *quite* get exactly both 0 and 127. This is important as some of the controls use 0 as an off switch and some others use 127 for the same purpose. As an aside I'll be off grid again from Wednesday till next Monday - New Forest Folk Festival :D -- Will J Godfrey https://willgodfrey.bandcamp.com/ http://yoshimi.github.io Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song. _______________________________________________ Yoshimi-devel mailing list Yoshimi-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/yoshimi-devel