On 08/22/2014 04:30 PM, Ian Sannar wrote:
> Alright. So I think I'd like to try and write a port for LMMS. What
> are the steps to this?
> I know C# and C++ really isn't that much different.

Eh...

Just a heads up... actually, C++ is completely different from C# - it
follows a fundamentally different paradigm in almost every aspect. Yes,
the syntax is similar, but that's the least important part of a language...

I'm not saying it's impossible or hard to move from C# to C++, just that
you'll have to completely change the way you think - especially when you
have to consider things like RT and thread-safety.

> I've never worked on LMMS code.

Take a look at some existing synth such as BitInvader, see how it's
built, then adapt it to your needs.

Note also that most LMMS synths work very differently from VSTi's. Most
LMMS synths work by rendering each note separately in their own buffers,
with each note getting rendered in its own thread.

Also, do take note of what I said before:

>
>                     > Osc 2 is generated dynamically. A knob controls
>                     the wavetable position.
>                     >
>                     > This psuedo-code generates Osc 2.
>                     >
>                     > float[] GenerateOsc2(int wavetableQuality, int
>                     sampleRate, float mouth)
>                     > {
>                     >      step = 1.0 / sampleRate;
>                     >      wavetable = new float[wavetableQuality];
>                     >      for (int i = 0; i < 1; i += step)
>                     >      {
>                     >           position = 1 - i;
>                     >           ampEnv = (float)(1 /
>                     Math.Pow(position, 2));
>                     >           wavetable[i * SampleRate] =
>                     -(float)Math.Sin((position *
>                     > Math.PI * (2 * mouth))) / ampEnv;
>                     >      }
>                     >      return wavetable;
>                     > }
>
>                     *If this is only called once when the synth is
>                     initialized, then it's**
>                     **probably fine. Otherwise there will be problems...**
>                     *
>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
LMMS-devel mailing list
LMMS-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lmms-devel

Reply via email to