Skip to content

Commit

Permalink
Xpressive plugin (LMMS#3259)
Browse files Browse the repository at this point in the history
* First Preview of the X-Pressive Plugin
(exprtk.hpp is not included, get it from my exprtk fork in the branch
internal_data_functions)
available keys:
f- note's frequency. available only in the output expressions
t- time in seconds. in the Waves (W1,W2,W3) it's in the range [0,1)
key- the note's keyboard key. available only in the output expressions.
v- the note's velocity (divided by 255.0 so it is in the range [0,1]).
available only in the output expressions.
rel- gives 0 while the key is holded, and 1 after the key release.
available only in the output expressions.
A1,A2,A3- general purpose knobs (you can control them with the
automations). available only in the output expressions.
W1,W2,W3- precalculated wave forms. can be also load from file. you can
use them only in the output expressions
available functions:
cent(x)- gives pow(2,x/1200)
rand()- random number generator. in range [-1,1). each call gives other
value.
randv(i)- random vector (with pseudo infinite integer cells). the values
are in range [-1,1). it's stays consistent only across the note
playback. so each note playback will get other vector (even on the same
key).
sinew- sine wave with period of 1.
saww- saw wave with period of 1.
squarew- square wave with period of 1.
trianglew- triangle wave with period of 1.
expw- exponent wave with period of 1.
expnw- another exponent wave with period of 1.
moogw- moog wave with period of 1.
moogsaww- moog-saw wave with period of 1.
you can use * % ^ / + - pow sin log pi etc.

* Xpressive Plug-In:
Added Release transition knob that control the "rel" variable. (the
duration of transit from 0 to 1)
Fixed some problems in the displays. (update display when changing
A1,A2,A3, clear display with invalid expression.

* X-Pressive Plug-In: Few more fixes
Changed the callbacks in exprfront.cpp to be templated.
Added help.
Added ExprTk.hpp.
some bug fixes (inf issues).
Added integrate function.

* Special version of ExprTk with modified license (BSL) for the LMMS project https:/LMMS/lmms

* Xpressive Plug-In- fixed some building errors.
Added the "e" euler's constant.

* Xpressive Plug-In - fix mingw64 issues

* X-Pressive Plug-in:
Added "trel" (time since release) variable.
The integrate function can now have unlimited usage.
Added selective interpolation per wave.
Improved a little the random vector function.
Some other improvements, code cleaning, etc...

* Xpressive Plug-In:
move clearGraph definition into Graph.cpp.
fixed compilation errors. (oops..)

* X-Pressive plug-in: updated presets names

* X-Pressive plug-in
added semitone function, added sample-rate variable

* X-Pressive plug-in, code cleaning, changed the rendering function to
achieve performace gain.

* X-Pressive plug-in - fix the string counting function

* X-Pressive plug-in - until somebody will find a better solution,
exprtk.hpp is patched under the name exprtk.patched.hpp ...

* X-Pressive plug-in - fix compiling errors.

* X-Pressive plug-in - added patch file for exprtk.hpp,
added last function that gives last calculated samples.
moved ExprSynth to be with ExprFront for performance reasons.

* X-Pressive plugin - moved the patched file back to the source tree, added .gitignore file..

* X-Pressive plugin - fix compilation error. (isnan isinf)

* X-Pressive plugin - tried to fix embed.cpp problem,
added new variable to the parser (tempo)

* X-Pressive plugin - fixed cmake script

* X-Pressive plugin - updated the license and the diff file.

* Updates to ExprTk

* Added return statement enable/disable via parser settings

Added exprtk_disable_return_statement macro for disabling return statements and associated exceptions at the source code level.

* X-Pressive plugin - updated CMakeLists.txt to use the correct flags on each platform.
also added exprtk.hpp as a dependency for the patch command.
Updated the exprtk diff file.

* X-Pressive plugin - moved the enhanced features flag to the WIN64 installation.

* X-Pressive plugin - another fix for CMakeLists.txt

* Minor updates to ExprTk

Updated multi-sub expression operator to return final sub-expression type.
Updates to exprtk_disable_return_statement macro for disabling return statements and associated exceptions at the source code level.

* X-Pressive plug-in - added try-block around exprtk calls and enabled the
-fexceptions flag, so patch file is no longer needed.

* X-Pressive plug-in - small fix in CMakeLists.txt

* Update ExprTk to tip of branch.

* X-Pressive plugin - added graph drawing feature..

* Updating exprtk.hpp to the latest upstream version
  • Loading branch information
gnudles authored and PhysSong committed Jul 7, 2017
1 parent f55e4dc commit 8dcd3dd
Show file tree
Hide file tree
Showing 48 changed files with 40,571 additions and 24 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/BuildPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
CMAKE_PARSE_ARGUMENTS(PLUGIN "" "" "MOCFILES;EMBEDDED_RESOURCES;UICFILES;LINK" ${ARGN})
SET(PLUGIN_SOURCES ${PLUGIN_UNPARSED_ARGUMENTS})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src/gui)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include)

ADD_DEFINITIONS(-DPLUGIN_NAME=${PLUGIN_NAME})

Expand Down
21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Accordion.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Ambition.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Baby Violin.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Bad Singer.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Cloud Bass.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Creature.xpf

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions data/presets/X-Pressive/Dream.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Electric Shock.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Faded Colors.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Fat Flute.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Frog.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Horn.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Low Battery.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Piano-Gong.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Rubber Bass.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Space Echoes.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Speaker Swapper.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Toss.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Untuned Bell.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/Vibrato.xpf

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions data/presets/X-Pressive/X-Distorted.xpf

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion include/Graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class EXPORT Graph : public QWidget, public ModelView
update();
}


signals:
void drawn();
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void dropEvent( QDropEvent * _de );
Expand Down Expand Up @@ -145,6 +146,8 @@ class EXPORT graphModel : public Model
return( m_samples.data() );
}

void convolve(const float *convolution, const int convolutionLength, const int centerOffset);

public slots:
void setRange( float _min, float _max );

Expand All @@ -165,6 +168,7 @@ public slots:
void normalize();
void invert();
void shiftPhase( int _deg );
void clear();

signals:
void lengthChanged();
Expand Down
1 change: 1 addition & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ IF("${PLUGIN_LIST}" STREQUAL "")
watsyn
waveshaper
vibed
xpressive
zynaddsubfx
)

Expand Down
2 changes: 2 additions & 0 deletions plugins/xpressive/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#ignore the patched file
exprtk.patched.hpp
10 changes: 10 additions & 0 deletions plugins/xpressive/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
INCLUDE(BuildPlugin)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_sc_andor -Dexprtk_disable_return_statement -Dexprtk_disable_break_continue -Dexprtk_disable_comments -Dexprtk_disable_string_capabilities -Dexprtk_disable_rtl_io_file -Dexprtk_disable_rtl_vecops ${WERROR_FLAGS} -fexceptions")

IF(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -Dexprtk_disable_enhanced_features")
ENDIF()

BUILD_PLUGIN(xpressive expressive_plugin.cpp exprsynth.cpp expressive_plugin.h exprtk.hpp MOCFILES expressive_plugin.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")

17 changes: 17 additions & 0 deletions plugins/xpressive/MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Copyrights for exprtk.hpp

Permission is hereby granted, free of charge,
to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file added plugins/xpressive/artwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8dcd3dd

Please sign in to comment.