-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Xpressive plugin #3259
Xpressive plugin #3259
Conversation
+1 - WOW - looks like another interesting instrument
2017-01-14 19:53 GMT+00:00 gnudles <notifications@github.com>:
… Xpressive plugin allows you to write your own expressions for sound
creation.
------------------------------
You can view, comment on, or merge this pull request online at:
#3259
Commit Summary
- Small fixes:
- First Preview of the X-Pressive Plugin
- Xpressive Plug-In:
- X-Pressive Plug-In: Few more fixes
- Special version of ExprTk with modified license (BSL) for the LMMS
project https://github.com/LMMS/lmms
- Merge pull request #1 from ArashPartow/xpressive_plugin
File Changes
- *A* data/presets/X-Pressive/X-Pressive1.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-0> (21)
- *A* data/presets/X-Pressive/X-Pressive10.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-1> (21)
- *A* data/presets/X-Pressive/X-Pressive11.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-2> (21)
- *A* data/presets/X-Pressive/X-Pressive12.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-3> (21)
- *A* data/presets/X-Pressive/X-Pressive13.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-4> (21)
- *A* data/presets/X-Pressive/X-Pressive14.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-5> (21)
- *A* data/presets/X-Pressive/X-Pressive2.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-6> (21)
- *A* data/presets/X-Pressive/X-Pressive3.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-7> (21)
- *A* data/presets/X-Pressive/X-Pressive4.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-8> (21)
- *A* data/presets/X-Pressive/X-Pressive5.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-9> (21)
- *A* data/presets/X-Pressive/X-Pressive6.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-10> (21)
- *A* data/presets/X-Pressive/X-Pressive7.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-11> (21)
- *A* data/presets/X-Pressive/X-Pressive8.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-12> (21)
- *A* data/presets/X-Pressive/X-Pressive9.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-13> (21)
- *A* data/presets/X-Pressive/watsyn_like.xpf
<https://github.com/LMMS/lmms/pull/3259/files#diff-14> (21)
- *M* include/Graph.h
<https://github.com/LMMS/lmms/pull/3259/files#diff-15> (1)
- *M* plugins/CMakeLists.txt
<https://github.com/LMMS/lmms/pull/3259/files#diff-16> (1)
- *A* plugins/xpressive/CMakeLists.txt
<https://github.com/LMMS/lmms/pull/3259/files#diff-17> (4)
- *A* plugins/xpressive/artwork.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-18> (0)
- *A* plugins/xpressive/expressive_plugin.cpp
<https://github.com/LMMS/lmms/pull/3259/files#diff-19> (885)
- *A* plugins/xpressive/expressive_plugin.h
<https://github.com/LMMS/lmms/pull/3259/files#diff-20> (0)
- *M* plugins/xpressive/exprfront.cpp
<https://github.com/LMMS/lmms/pull/3259/files#diff-21> (0)
- *M* plugins/xpressive/exprfront.h
<https://github.com/LMMS/lmms/pull/3259/files#diff-22> (0)
- *M* plugins/xpressive/exprtk.hpp
<https://github.com/LMMS/lmms/pull/3259/files#diff-23> (0)
- *M* plugins/xpressive/help_active.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-24> (0)
- *M* plugins/xpressive/help_inactive.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-25> (0)
- *M* plugins/xpressive/logo.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-26> (0)
- *M* plugins/xpressive/o1_active.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-27> (0)
- *M* plugins/xpressive/o1_inactive.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-28> (0)
- *M* plugins/xpressive/o2_active.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-29> (0)
- *M* plugins/xpressive/o2_inactive.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-30> (0)
- *M* plugins/xpressive/w1_active.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-31> (0)
- *M* plugins/xpressive/w1_inactive.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-32> (0)
- *M* plugins/xpressive/w2_active.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-33> (0)
- *M* plugins/xpressive/w2_inactive.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-34> (0)
- *M* plugins/xpressive/w3_active.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-35> (0)
- *M* plugins/xpressive/w3_inactive.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-36> (0)
- *M* plugins/xpressive/wavegraph.png
<https://github.com/LMMS/lmms/pull/3259/files#diff-37> (0)
- *M* src/gui/PianoView.cpp
<https://github.com/LMMS/lmms/pull/3259/files#diff-38> (0)
- *M* src/gui/TrackContainerView.cpp
<https://github.com/LMMS/lmms/pull/3259/files#diff-39> (0)
- *M* src/gui/editors/AutomationEditor.cpp
<https://github.com/LMMS/lmms/pull/3259/files#diff-40> (0)
- *M* src/gui/widgets/Graph.cpp
<https://github.com/LMMS/lmms/pull/3259/files#diff-41> (0)
Patch Links:
- https://github.com/LMMS/lmms/pull/3259.patch
- https://github.com/LMMS/lmms/pull/3259.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3259>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADlPbl76fEXaRN1LIu-LmwDd1v8B7wR9ks5rSSfPgaJpZM4LjuVX>
.
|
What should be done with this error? : |
The version of ld shipped with mingw64 is Literally Broken - last good version was circa GCC4.3. In short to get rid of the build error you need to do the following two things: Step 1.
Step 2.
Or #ifdef on mingw64 just prior to the #include "exprtk.hpp" and define
I'd also review [Section 19 - Enabling & Disabling Features] of the documentation - specifically 19.2 Disabling Control-Flow Structures such as for-loop, while-loop etc. I'm guessing you don't want users invoking such functionality in their expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've applied the defines to all compiler settings which is not what I suggested. It should only be applied to the mingw64 build
Furthermore you've applied the -Wa,-mbig-obj option to all mingw compilers it should only be the mingw64 compiler.
oops, I'll replace
So I don't understand why these defines should be used only in a certain build. Furthermore, I added them to reduce build time. |
@ArashPartow Thanks for such specific insight into this issue. From what I'm reading, we can set Step 1 globally, right? https://github.com/LMMS/lmms/blob/master/cmake/modules/MinGWCrossCompile.cmake#L17-L22 , and https://github.com/LMMS/lmms/blob/master/cmake/modules/MinGWCrossCompile.cmake#L61-L67 |
I think it should be something like:
As WIN64 probably implies ALL windows 64 builds, perhaps including MSVC Perhaps only assignment and loop control_structures as you might want if-statements/ternary-statements with logical operators to be made available:
It's explained in my post above.
Yeah get rid of it from the build line. It wont save much for section size issues and it is probably better off to have it available/present. |
@tresf Nothing should be global. All of this is related to a broken version of mingw64 - So all the changes must only be specific to 64-bit builds using mingw64 and no other compilers or architectures. The build changes presented are a hack/kludge to reduce the section size of the TU so as to allow the broken ld that is shipped with mingw64 to build the final executable binary. In short the defines disable certain features such as expression optimizations so as to reduce the section size, hence it is not an option one would want to add to all builds as it drastically retards the performance of the expression engine. |
Please look at the lines that are linked. #3259 (comment) |
@tresf ooh yeah I missed this line: https://github.com/LMMS/lmms/blob/master/cmake/modules/MinGWCrossCompile.cmake#L10 Should be all good if it is only within that IF(LMMS_BUILD_MSYS) scope. |
Great but to be precise, I believe it needs to be for both scopes linked or moved into a separate conditional. |
@tresf Now I'm confused. According to the build artifacts the 32-bit mingw build was successful however the 64-bit mingw build failed. On line: https://github.com/LMMS/lmms/blob/master/cmake/modules/MinGWCrossCompile.cmake#L18 The "IF(WIN64)" seems to suggest 64-bit but the comments around and in the scope and the "COMPILER32" stuff seem to suggest 32-bit. I'll let you guys figure it out. However you end up doing it my recommendation is that it should only apply to 64-bit builds using mingw64. |
Correct, we explicitly build the 32-bit host wrapper on 64-bit. Naturally, the description would have to change if this were added. |
Actually, this shouldn't be (just) a plugin. @gnudles, could you get the expression evalution worked into the standard oscillator class(es)? That way it could be used in at least TripleOscillator or Organic as well, maybe some other plugin too. (I haven't tried this plugin yet, but I like the idea.) |
@softrabbit , I think that the next step is to create a sound scripting language, compile it with llvm (or some other jit engine) on runtime, and make a generic plug-in infrastructure... But then you need to add llvm to the dependency list... |
src/gui/widgets/Graph.cpp
Outdated
{ | ||
// store values in temporary array | ||
QVector<float> temp = m_samples; | ||
int graph_length = length(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const int graph_length = length();
plugins/xpressive/exprfront.cpp
Outdated
} | ||
int m_rseed; | ||
}; | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment to explain why this is commented would be better I guess.
plugins/xpressive/exprfront.cpp
Outdated
const int data_size=sizeof(random_data)/sizeof(int); | ||
int xi=(int)index; | ||
int si=m_rseed%data_size; | ||
int sa=m_rseed/data_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const int xi = [...];
const int si = [...];
const int sa = [...];
plugins/xpressive/exprfront.cpp
Outdated
{ | ||
return vec[ix]; | ||
} | ||
int ixnext=(ix+1)%size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const int ixnext=(ix+1)%size;
plugins/xpressive/exprfront.cpp
Outdated
//to disable interpolation uncomment: | ||
//return static_cast<WaveSample*>(w)->samples[ix]; | ||
|
||
float xfrc=fraction(x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const float xfrc=fraction(x);
ExprFront expr(text.constData()); | ||
float t,f=10,key=2,rel=0,v=0.5; | ||
unsigned int i; | ||
unsigned int sample_rate=m_raw_graph->length(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float t;
const float f=10,key=2,rel=0,v=0.5;
unsigned int i;
const unsigned int sample_rate=m_raw_graph->length();
float t,f=10,key=2,rel=0,v=0.5; | ||
unsigned int i; | ||
unsigned int sample_rate=m_raw_graph->length(); | ||
expr.add_variable("t", t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t
not initialized ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works, but I'll initialize it for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, the value is set before it's evaluated...
|
||
static void clearGraph(graphModel * g) | ||
{ | ||
int length = g->length(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const int length = g->length();
m_panning2.loadSettings(_this,"PAN2"); | ||
m_relTransition.loadSettings(_this,"RELTRANS"); | ||
|
||
int size = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure for this one, as I don't know the effect of the next function calls, but:
const int size = 0;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it that way...
|
||
float o1,o2,pn1,pn2; | ||
float new_freq=nph->frequency(); | ||
float freq_inc=(new_freq-frequency)/_frames; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const float new_freq=nph->frequency();
const float freq_inc=(new_freq-frequency)/_frames;
Is this ready for merge? |
I think it is. I've seen a very minor issue. The presets are not saved with unique names. It's not obvious when you save a preset that the file name and the preset name isn't necessarily the same. One could argue that this is something we could change actually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please re-save the pre-sets with their chosen names and not the default name="X-Pressive"
<!DOCTYPE lmms-project> | ||
<lmms-project version="1.0" creator="LMMS" creatorversion="1.2.0-rc2.6" type="instrumenttracksettings"> | ||
<head/> | ||
<instrumenttracksettings muted="0" type="0" name="X-Pressive" solo="0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name="X-Pressive"
The preset name that shows up when you load an instrument isn't the name of the .xpf
but this setting. You need to edit the name in the rename dialogue on the top of the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tell you the truth, I'm not sure that those presets should be merge. And even if they do, I think they should have more meaningful naming... I'm not so good at naming sounds so... if someone volunteers...
Also if someone made nice presets which he wants them to be merged...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user will want to have some good presets to look at for this one. In any case I don't think this should hold back a merge. You or someone else can tweak the names later and it's easier for people to try it out and make presets if it's merged anyway.
Oh BTW, what's the best way for a plugin to deallocate memory on shut-down? Because I need to deallocate the help window. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this is work in progress, you should start following the coding conventions.
It is required to include the Boost Software License.
{ | ||
Q_OBJECT | ||
public: | ||
static expressiveHelpView *getInstance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the best way for a plugin to deallocate memory on shut-down?
We should add some construction and destruction methods for plug-ins. In the meantime, you may try implementing __attribute__((destructor)) static void module_destroy()
in your class.
include/Graph.h
Outdated
@@ -145,6 +145,8 @@ class EXPORT graphModel : public Model | |||
return( m_samples.data() ); | |||
} | |||
|
|||
void convolve(const float *_convolution, const int _conv_length, const int _center_offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding conventions: Parameters are not prefixed with underscore.
plugins/CMakeLists.txt
Outdated
@@ -79,6 +79,7 @@ IF("${PLUGIN_LIST}" STREQUAL "") | |||
waveshaper | |||
vibed | |||
zynaddsubfx | |||
xpressive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should sort by name. I know it is not sorted.
plugins/xpressive/CMakeLists.txt
Outdated
@@ -0,0 +1,7 @@ | |||
INCLUDE(BuildPlugin) | |||
|
|||
SET(CMAKE_CXX_FLAGS "-Dexprtk_disable_sc_andor -Dexprtk_disable_enhanced_features -Dexprtk_disable_break_continue -Dexprtk_disable_comments -Dexprtk_disable_string_capabilities -Dexprtk_disable_rtl_io_file -Dexprtk_disable_rtl_vecops ${WERROR_FLAGS}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include previous value of CMAKE_CXX_FLAGS
. You should apply all these definitions only for the MinGW-w64 build, as recommended at #3259 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I want to disable those features on any platform...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... now it's not compiling because exprtk.hpp still throws exception in line 2733
@ArashPartow, do you have any idea?
@tresf do I have to follow that -fno-exception flag?
????
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnudles which plaform are you building where you see that exception being thrown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exception is not being thrown. But I can't compile it with the flag -fno-exceptions
/* | ||
* expressive_plugin.cpp - instrument which uses a mathematical formula parser | ||
* | ||
* Copyright (c) 2016-2017 Orr Dvori |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention is to add an email address, but it is not strictly necessary.
|
||
BoolModel m_exprValid; | ||
|
||
friend class expressiveView; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be aware this is not a clean model/view separation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw it in bitInvader (I started by copying bitInvader)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have some spare time, please use inline getters and setters instead of friend
.
static QString HelpText; | ||
|
||
}; | ||
class SubWindow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these declarations to the top.
delete exprO2; | ||
} | ||
float saw_wave(float); | ||
float sin_wave(float); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these functions used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftovers...
plugins/xpressive/exprfront.cpp
Outdated
{ | ||
static inline float process() | ||
{ | ||
return 1.0f - rand() * 2.0f / RAND_MAX; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rand
is not thread-safe. It should be replaced later.
plugins/xpressive/exprfront.cpp
Outdated
size_t last_pos=0; | ||
size_t count = 0; | ||
size_t len=strlen(needle); | ||
while (1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use the standard true constant.
I fixed everything that @jasp00 noted,
but unfortunately when I added the previous value, it couldn't be compiled, because there is still another throw statement in exprTk that slipped through all those disabling defines. |
Cool stuff! |
@gnudles Awesome! Push the changes.
Is there an upstream issue about this we can keep track of?
#2831 Is concerning the native effect plugins specifically. |
@zonkmachine yeah, I always forget there's a distinction between instruments and effects :x |
But if I do, it won't compile
What do you mean? |
Edit: apart from the backed up original... |
@zonkmachine, you can always get the newest exprtk.hpp from upstream. Thanks for the fixes BTW. |
Aight, upated! 😉 |
👍 |
@tresf This is a big one. Does anything get squashed or just merge it as it is? |
@zonkmachine if we wanted we could isolate the Graph additions and plugin cmake cleanup, but they're actually relatively small, I vote squash 'em all. |
I'm fine with that but how about keeping the two main contributors apart and squashing the exprtk.hpp commits by Arash (amended by my update) separately so it gets recognized on the contributors list. I'm a bit sentimental that way. I tested it in a separate branch and the rebase comes out with no bugs and there is no diff against It would look something like:
|
In my experience squash maintains the contributors. |
Ah, OK! Then just a Squash and merge. |
It doesn't look like it. |
What is the concern? It gives him credit? (Edit: If you're concerned about @ArashPartow I understand. I would have expected him to be in there as well.) |
Yes, gnudles but not Arash. It's not a big concern though, I'm more trying to get to grips with git and github. |
@zonkmachine - Gnudles did all the heavy lifting, so I'm all good with that. :D |
Maybe we should credit Arash in the plugin itself in the help window. |
* 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://github.com/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
* 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://github.com/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
* 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://github.com/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
* 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://github.com/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
* 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://github.com/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
I agree. In the works here: #3845 |
You know, I think it can be nice to have a JavaScript version of this plugin. It can use the built-in JS support in Qt via QtScript. The performance issue should be considered, but it seems a very nice idea. |
How to add external sample to W? |
you have the load button |
I tried to load sample and it became distorted. Is that how supposed to be? |
the wave is loaded to a buffer with 4096 samples or so (4096 floats or shorts, can't recall). 4096 is a huge buffer compared to other plugins in lmms. but if you load a long sample it will become distorted (resampled). it is not a bug, it's a feature :) |
* 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://github.com/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
tresf
added screenshot Feb 5 '17Xpressive plugin allows you to write your own expressions for sound creation.