Karplus strong

yeah I noticed the mistake. So I placed the files in the ER-301/libs
but still can’t see it? The last unit is the Stress one.

Ok. I really should go to bed because I am making silly mistakes. You need to put the contents of the archive into ER-301/libs/testlib. Each user unit library needs to be in its own folder.

Also, are you running v0.3.18?

1 Like

Ah! no, 3.13!!! Thought I was up to date!

ok, now it’s all good! Thanks Brian! Have a great night! lol

I quite like it!

So you are saying that the ability for us to write this unit has been there since the release of the middle layer firmware? I’m now thinking there’s a bit more than can be done in the middle layer than I initially thought. Very interesting - will look forward to reviewing and understanding this code.

2 Likes

And of course the whole time, I meant to write Octave per Volt (not Volt per Octave) as the unit name, since it is the inverse of Volt per Octave which is what you need for scaling time periods.

1 Like

Aside from everything else, this example is SO good. I have never really been very interested in Karplus because it has never sounded as musical as this, to me, before!

2 Likes

Does the Oct per Volt allows us to have a perfect tracking playing ‘real’ notes?
I haven’t managed to do it in my first test. But will spend more time on it soon!

Yes.

  • use only the ABCDx inputs.
  • delay modulation gain must be 1.0
  • delay bias must be 0.0

I got this working, very fun. Then I wanted to build a version where I had more control over what was fed back into the delay, like filtering it, etc. So I setup a custom unit where the karplus system was located inside a linear control and was therefore able to create a feedback loop using a mixer unit instead of the Delay unit’s internal feedback parameter.

It works, but the ‘Octave to Volt’ no longer tracks pitch properly. Naturally, I’m guessing this has to do with the fact I’m that I’m using a feedback system external to the delay unit, therefore the timing is different. I tried playing with all the gain, offset and p0 (not sure what that parameter does exact in the OtoV) combos I could and wasn’t getting it.

Am I missing something or is it a situation where it would need to be adjusted in the lua of the OtoV unit? My next step was to grok that. And would each unit, such as a filter etc, added in the feedback path affect the timing and therefore the relationship of OtoV to the delay time?

Here’s the custom unit I made to try it out. Rez1 is the karplus chain I made with the feedback loop (it’s panned left) and Rez2 is the simple karplus chain supplied by Brian (panned right).

Rezo Nator 1.2.1.lua (49.2 KB)

This won’t work because your external feedback loop has a constant delay of one audio frame (128 samples) while the internal feedback loop has zero delay. This additional delay destroys the V/oct relationship.

The proper place to implement a comprehensive Karplus-Strong synthesis is in the C++ layer, unfortunately.

That was my suspicion, thanks for the confirmation! :slight_smile:

Oh and the answer to this question is mostly no. The number of units in the path does not affect propagation delay UNLESS a unit itself has delay (such as another delay unit or a filter with group delay).

1 Like

Ok it works now.
Didn’t work the first time because I did something similar @iiii
Thanks @odevices !

oh nice!!

Hey - this library is not working anymore it seems… :thinking:

How can I do proper Karplus Strong in tune in stable v0.4 firmare?

This might help

I’m trying to use @odevices’s OctavePerVolt.lua, but I get this message:

0001

—ERROR REPORT BEGIN
Time Since Boot: 266.411s
Firmware Version: 0.4.25 (stable)
Boot Count: 210
Mount Count: 2
Error Message: Failed to construct unit: OctavePerVolt
x:/startup/on-load-app-module.lua:135: attempt to index a number value (local ‘fromObject’)
stack traceback:
x:/startup/on-load-app-module.lua:135: in function ‘connect’
1:/ER-301/libs/testlib/OctavePerVolt.lua:25: in function ‘testlib.OctavePerVolt.onLoadGraph’
X:/Unit/init.lua:54: in function ‘Unit.init’
1:/ER-301/libs/testlib/OctavePerVolt.lua:14: in function ‘testlib.OctavePerVolt.init’
X:/Base/Class.lua:78: in function <X:/Base/Class.lua:76>
[C]: in function ‘xpcall’
X:/Unit/Factory/init.lua:100: in function <X:/Unit/Factory/init.lua:92>
(…tail calls…)
X:/Chain/Base.lua:405: in function ‘Chain.Branch.loadUnit’
X:/Unit/Chooser/init.lua:168: in function ‘Unit.Chooser.choose’
(…tail calls…)
X:/Unit/Chooser/Default.lua:45: in method ‘onReleased’
X:/MondrianMenu/AsWindow/init.lua:148: in function ‘MondrianMenu.AsWindow.mainReleased’
X:/Base/Widget.lua:178: in function ‘PinView.sendUpHelper’
X:/Base/Widget.lua:168: in function ‘PinView.sendUp’
X:/Base/Context.lua:231: in function ‘Base.Context.notify’
X:/Application.lua:121: in upvalue ‘notify’
X:/Application.lua:266: in upvalue ‘dispatch’
X:/Application.lua:369: in function ‘Application.loop’
x:/startup/start.lua:54: in function <x:/startup/start.lua:47>
[C]: in function ‘xpcall’
x:/startup/start.lua:57: in main chunk
[C]: in function ‘dofile’
[string “dofile(‘x:/startup/start.lua’)”]:1: in main chunk
—ERROR REPORT END

After searching through the forum, it seems there is no way to tune karplus strong properly at this point. Hope to see some way of doing this in the future! @odevices’s “Octave per Volt” unit seemed promising - would you be able to fix it for v0.4stable? :smiley:

@mopoco - I succesfully converted Brians preset, but it didn’t work. The “Octave per Volt” unit is nowhere to be found and no modulation of delay rate anywhere

In v0.4, the Octave per Volt unit has been renamed to V/oct to Seconds and is now a builtin unit (see the Measurement and Conversion section when browsing the units by category).

4 Likes