LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.08k stars 1.01k forks source link

Implement Sporth Editor as LMMS effect plugin #3368

Closed PaulBatchelor closed 7 years ago

PaulBatchelor commented 7 years ago

This is something of an idea I've had for a while, but I do intend to eventually get to it.

I have created a stack-based audio language called Sporth, which is currently my primary tool for composition and sound design.

Based on #3259, it seems possible to add a textbox to a native LMMS plugin or effect. I would very much like to do something similar, using the text editor to compile and run Sporth code.

To avoid adding more dependencies to the LMMS build, my thinking is that I could implement this as a third-party LMMS plugin, which could be built and run separately from LMMS (I may have already figured out a way to do this). If all goes to plan, this should have no direct impact on the LMMS codebase.

Not sure what my timeline is going to be for this, but I'm happy to hear any comments/questions/concerns that folks might have.

All the best,

-P

zonkmachine commented 7 years ago

for composition

I want Sporthling 001 as a plug-in 'singing' bot. ;)

PaulBatchelor commented 7 years ago

@zonkmachine Ha thanks! :)

You may be interested in a pretty good vowel formant filter implementation based on the HOWL synthesizer iPad app. You can stick anything resembling a glottal signal and produce a vowel sound. If you're not too worried about selecting specific vowel shapes, it works pretty well!

(Also possible to port to LMMS, if there is enthusiasm for a vowel filter)

AndiEcker commented 7 years ago

WOW - this sounds fantastic - looking forward to use Sporth within LMMS!!!

2017-02-18 22:48 GMT+00:00 Paul Batchelor notifications@github.com:

@zonkmachine https://github.com/zonkmachine Ha thanks! :)

You may be interested in a pretty good vowel formant filter https://github.com/PaulBatchelor/GROWL implementation based on the HOWL synthesizer iPad app. You can stick anything resembling a glottal signal and produce a vowel sound. If you're not too worried about selecting specific vowel shapes, it works pretty well!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LMMS/lmms/issues/3368#issuecomment-280881068, or mute the thread https://github.com/notifications/unsubscribe-auth/ADlPbvj_PcNvH_Fc0EXpxVjGK2b8MMrhks5rd3UpgaJpZM4MFQPm .

tresf commented 7 years ago

I want Sporthling 001 as a plug-in 'singing' bot. ;)

Off-topic, but reminds me of Singerbot. author @jasp00. Code mirror: singerbott.cpp, singerbot.h

zonkmachine commented 7 years ago

This is a very interesting project. I've got Sporth compiled over here and will try it out, hopefully soon.

If you're not too worried about selecting specific vowel shapes,

I'm probably a bit of a non-puritan when it comes to sound sources. I go primarily for what can be generated and not for a specific sound. My all time favourite sound source is the MS-20 style ring modulator based on driving a digital XOR gate with the square waves from the oscillators.

reminds me of Singerbot.

Which has reached mythical proportions in the LMMS forum.

Not sure what my timeline is going to be for this, but I'm happy to hear any comments/questions/concerns that folks might have.

@PaulBatchelor I haven't used any music programming languages yet, but here's some thoughts.

PaulBatchelor commented 7 years ago

My all time favourite sound source is the MS-20 style ring modulator based on driving a digital XOR gate with the square waves from the oscillators.

Sound example?

There's been mention of other language interpreters for LMMS like Csound and PD. I imagine this means one central script loading plugin to load a script into lmms and it could then be used for more than one language.

I've definitely rambled quite a bit about this very topic in #19. Csound has a very good API and is very capable as a sound engine. I'm less enthusiastic about PD (especially for audio DSP), but I can understand the appeal.

Csound has orchestra and score files. Do Sporth do this distinction?

Being almost entirely signal-based, Sporth has no real concept of a Csound score event. Instead, Sporth makes heavy use of triggers and envelope generators to create the concept of a note.

Sporth is roughly equivalent to an instrument in a Csound orchestra, so it is definitely conceivable to write a Csound-like scheduler around Sporth. There is one that is part of Sporth called PolySporth that uses scheme to do clock-based scheduling and true polyphony. I haven't found much use for it in my work yet though, so it's sadly collected a bit of dust.

PaulBatchelor commented 7 years ago

Created an empty repo for this project:

https://github.com/PaulBatchelor/LMMS-Sporth

The idea will be that this will be something you compile externally and load at runtime.

PaulBatchelor commented 7 years ago

Well, I've spent a large portion of the day procrastinating hacking up something that works. It's a hot mess, but a functional one.

Things it can do:

Things it can't do but will do:

PaulBatchelor commented 7 years ago

Okay, some updates.

The thing kinda works!

Here is what it looks like:

shot

It's a pretty minimal UI with 5 knobs and a text editor.

The leftmost knobs (p0, p1, etc....) are parametric hooks in Sporth. The "compile" knob is a hack. When the knob crosses a non-zero value, it will recompile. I went with this method so I could automate it recompilation and to reset with the clock. Right now they are in the range 0-1, and can be scaled inside the Sporth code.

Since this is technically an effects processor and not an instrument, it has the ability to read from the input signal.

In addition to giving input signal information, I am also giving it BPM information. It currently won't support tempo automation, but that's just an extra line of code to implement.

zonkmachine commented 7 years ago

Beautiful!

ps. in README.md sudo cp libreverbsc.so /usr/local/lib/lmms -> .. libsporthedit.so ...

PaulBatchelor commented 7 years ago

Here's an action shot running 3 instances of Sporth:

shot

For those feeling adventurous, here is that project file:

sporthlings.mmpz.zip

tresf commented 7 years ago

Cosmetic recommendation... A fixed font for the "code" font.

simonvanderveldt commented 7 years ago

Wouldn't an LV2 plugin make more sense? That way it can be used in LMMS (using Carla) and on other DAWs/setups as well.

Umcaruje commented 7 years ago

Wouldn't an LV2 plugin make more sense? That way it can be used in LMMS (using Carla) and on other DAWs/setups as well.

No, because carla can't do proper automation of LV2 plugins. When LMMS has proper LV2 support this might become redundant, but now I think it's pretty damn cool to have this as a native plugin.

simonvanderveldt commented 7 years ago

No, because carla can't do proper automation of LV2 plugins. When LMMS has proper LV2 support this might become redundant, but now I think it's pretty damn cool to have this as a native plugin.

Makes sense, didn't think of that :)

PaulBatchelor commented 7 years ago

Also, not sure if LV2 has support for a text editor widget.

tresf commented 7 years ago

We also don't have Carla available for Mac or Windows yet.

PaulBatchelor commented 7 years ago

Hey folks,

I am closing this issue, as I am effectively done making this Sporth editor. I have written about it in a blog post here. Things work pretty well, and it does everything I initial set out do accomplish.

At the moment, I have no intentions of merging this into the LMMS code base. It is able to be built and loaded separately from LMMS, so there isn't really a need to make a PR except for convenience reasons.

If anyone is interested in using it, they are free to shoot me a message at thisispaulbatchelor at gmail dot com.

All the best,

-P

simonvanderveldt commented 7 years ago

@PaulBatchelor Would be nice to somewhere reference it. Maybe an "external plugins" wiki page in this repo or something?

PaulBatchelor commented 7 years ago

@simonvanderveldt can do!

PaulBatchelor commented 7 years ago

@simonvanderveldt tada https://github.com/LMMS/lmms/wiki/External-Plugins