Files
lmms/plugins/lb302
Levin Oehlmann f742710758 Macro cleanup (#6095)
Summary:

* `NULL` -> `nullptr`
* `gui` -> Function `getGUI()`
* `pluginFactory` -> Function `getPluginFactory()`
* `assert` (redefinition) -> using `NDEBUG` instead, which standard `assert` respects.
* `powf` (C stdlib symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `exp10` (nonstandard function symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `PATH_DEV_DSP` -> File-scope QString of identical name and value.
* `VST_SNC_SHM_KEY_FILE` -> constexpr char* with identical name and value.
* `MM_ALLOC` and `MM_FREE` -> Functions with identical name and implementation.
* `INVAL`, `OUTVAL`, etc. for automation nodes -> Functions with identical names and implementations.
* BandLimitedWave.h: All integer constant macros replaced with constexpr ints of same name and value.
* `FAST_RAND_MAX` -> constexpr int of same name and value.
* `QSTR_TO_STDSTR` -> Function with identical name and equivalent implementation.
* `CCONST` -> constexpr function template with identical name and implementation.
* `F_OPEN_UTF8` -> Function with identical name and equivalent implementation.
* `LADSPA_PATH_SEPARATOR` -> constexpr char with identical name and value.
* `UI_CTRL_KEY` -> constexpr char* with identical name and value.
* `ALIGN_SIZE` -> Renamed to `LMMS_ALIGN_SIZE` and converted from a macro to a constexpr size_t.
* `JACK_MIDI_BUFFER_MAX` -> constexpr size_t with identical name and value.
* versioninfo.h: `PLATFORM`, `MACHINE` and `COMPILER_VERSION` -> prefixed with `LMMS_BUILDCONF_` and converted from macros to constexpr char* literals.
* Header guard _OSCILLOSCOPE -> renamed to OSCILLOSCOPE_H
* Header guard _TIME_DISPLAY_WIDGET -> renamed to TIME_DISPLAY_WIDGET_H
* C-style typecasts in DrumSynth.cpp have been replaced with `static_cast`.
* constexpr numerical constants are initialized with assignment notation instead of curly brace intializers.
* In portsmf, `Alg_seq::operator[]` will throw an exception instead of returning null if the operator index is out of range.

Additionally, in many places, global constants that were declared as `const T foo = bar;` were changed from const to constexpr, leaving them const and making them potentially evaluable at compile time.

Some macros that only appeared in single source files and were unused in those files have been removed entirely.
2021-09-30 18:01:27 +02:00
..
2021-09-30 18:01:27 +02:00
2014-03-12 10:32:19 +02:00
2021-09-12 01:00:21 +02:00

LB303 Bass Synth - Known bugs, issues, and missing features
-----------------------------------------------------------

2007.02.03 - First release
--------------------------

Important note, in the current incarnation there are many behaviors,
constants, and other items that will be changed.  This will result
in a change of the instrument's timbre and functionality. Therefore,
it would be wise to not make any masterpieces with the synth at 
this point in time.

BUG: 
  Fix the awful clicking cause by adjacent notes.  This problem seems
  to be caused by 'unexhausted buffers' That is, the problem manifests
  itself to a greater degree when the user "buffer size" configuration
  is increased to over 1024 frames or so.  The problem is much less
  noticeable when the buffer size is set to 64 frames.

BUG:
  The synth does not make accomodations for sampling rates other than
  44100. This should be easy to fix, but I haven't gotten around to
  it; nor do I have the means to test it.

BUG:
  I get segfaults now and then.  Granted, I've rarely used LMMS 
  without also using LB302, so I do not know if the problem is actually 
  in the Bass Synth. I have gotten the backtraces a few times:
    ...
    audioEngine::renderNextBuffer()
    audioEngine::nextAudioBuffer()
    QOBject::activate_signal()
    ??()

    and

    ...
    instrumentTrack::play()
    notePlayHandle()
    instrumentTrack::processOutEvent()
    fadeButton::activate()
    QSingleShotTimer::start()
    qStartTimer()
    qKillTimer()
    QGList::insertAt()

TODO:
  Add accent feature.  This isn't as bad as it sounds, but will require
  some tweaking to get right.

TODO:
  LB302 contains code for a short fixed-length default decay.  If a 
  released note is using a user-defined VCA from the instrument
  panel, then LB302 should not do anything special.  However, if no
  envelope is specified, then LB302 should request enough release-frames
  in order to apply the built-in exponential decay.

TODO:
  The original TB303's square wave is not 50% duty cycle.  The peaks are
  supposed to slope down slightly.  It would be nice to be able to 
  configure this.  In fact, each waveform could have a parameter knob to
  change some aspect of the wave.  See lb302.cpp:643 for more info.

TODO:
  Must decide on proper action to take when a slide note is interrupted
  by another slide note.  Right now, the slide-from frequency is always
  replaced with the prior note.  However, we may wish to maintain the
  current frequency in order to make the sound more continuous.

TODO:
  The default filter's distortion could use some work.
  effectLib::distortion<> gets the job done, but the coefficients need
  to more closely match that of lb302Filter3Pole's tanh distortion.

TODO:
  Slide decay needs a better knob mapping.  sqrt()? lb302.cpp:588

TODO:
  Consider making the slide trigger set the note to slide TO as opposed
  to the note to slide FROM.  I originally did FROM in order to match
  the real 303. However, TO may be more intuitive.

TODO:
  Various code refactoring, as well as precomputing some values.

TODO:
  Remove one of the sawtooth waveforms in favor of the other?