mdsp / Livecut

Other
27 stars 8 forks source link

Livecut 64bit #1

Open mrbfrank opened 3 years ago

mrbfrank commented 3 years ago

Hello I think the world needs a 64bit version of Livecut. I know my way around TypeScript, JS, Python, & C# but am relatively new to C++ & JUCE. I am willing to do any of the tedious refactoring tasks if you point me in the right direction, how can I help?

roadrunner21 commented 2 years ago

hey man, I tried fiddling around with it in JUCE a bit more than a year ago but it's quite tedious if you try to convert it to 64 bit because there are a lot of breaking changes that requires refactoring

As far as I remember there is a setting for the target platform. If you set that to 64bit it should highlight you the errors. I had some error very early on that I couldn't get rid off. I believe it was because of a dependency to a 32bit library but I'm not sure anymore.

However, if you want to give it a shot the correct way to do it is to get JUCE, import the project, set it to 64bit and go from there

eventual-recluse commented 2 years ago

Hi - I've been trying to compile this using JUCE version 6.1.5 (in my case on Linux). This plugin was written for a much older version of JUCE so a few updates are necessary to get it to compile. The below changes allowed it to compile and work, but the GUI is not complete - it's missing some controls, the controls are generic and the background is gone.

However, in a DAW with the VST GUI turned off (in my case using generic controls in Ardour), it seems to work perfectly.

In addition to the below changes, I had to remove the juce_gui_audio module.

I'll keep working on it 'cos I love this plugin. It's fantastic! I guess it might need a new GUI for the JUCE of today.

These are the changes to the code (9 lines in total):


In Control.cpp line 52 WAS void Control::audioProcessorChanged (AudioProcessor processor) NOW void Control::audioProcessorChanged (AudioProcessor processor, const ChangeDetails &details)

In Control.h line 40 WAS virtual void audioProcessorChanged (AudioProcessor processor); NOW virtual void audioProcessorChanged (AudioProcessor processor, const ChangeDetails &details);

In LivecutProcessor.cpp line 254 WAS return String::empty; NOW return String();

In LivecutProcessor.cpp line 262 WAS return String::empty; NOW return String();

In LivecutProcessor.cpp line 254 WAS return String::empty; NOW return String();

In LivecutProcessor.cpp line 324 WAS return String::empty; NOW return String();

In LivecutProcessor.cpp line 352 WAS Process(buffer.getArrayOfChannels(), NOW Process(buffer.getArrayOfWritePointers(),

In LivecutProcessor.cpp line 353 WAS buffer.getArrayOfChannels(), NOW buffer.getArrayOfWritePointers(),

In LivecutLookAndFeel.cpp line 99 WAS static const int standardColours[] = NOW static const unsigned int standardColours[] =

mrbfrank commented 2 years ago

@roadrunner21 thank you for sharing your experience & @eventual-recluse wow thats amazing to hear you got it working! I'll try & setup a JUCE dev environment on my M1 Mac tomorrow morning & see if I can compile an Audio Unit. I'm a decent front-end UI developer so I'll look into remaking the UI in a modern JUCE project. 🤘

eventual-recluse commented 2 years ago

Excellent! Good luck - let us know how it goes. I built it as a VST3 plugin using the Linux Makefile exporter in Projucer if that's any help.

Andreya-Autumn commented 2 years ago

Hey everyone! Excited to see there's activity here. I always loved this plug and still feel like it did some things just right that none of the alternatives I've tried do.

@eventual-recluse @mrbfrank If any of y'all actually got a 64-bit mac version of this to compile, I'd love to try it out! I'm not a programmer at all, but I'm happy to test things, the lack of GUI is fine by me. Did you ever get an AU to run?

eventual-recluse commented 2 years ago

@Andreya-Autumn I don't know anything about compiling AUs but if anyone wants to try, slightly updated source code is here:

https://github.com/eventual-recluse/Livecut-GUI

That includes the changes mentioned above and a GUI with access to all parameters (it's not the original Livecut GUI though.) If anyone wanted to try compile an AU that might be a good place to start... However, it may not work completely with some plugin formats. e.g. with a VST3 build parameters won't save in the host application.

PS I haven't tried the other formats that can be built with JUCE, but I eventually got it working properly on Linux as an LV2 plugin, built with the DISTRHO-Ports libs and scripts at https://github.com/DISTRHO/DISTRHO-Ports. I've been using that on Linux and it seems to work fine. That can be found here if anyone's interested:

https://github.com/eventual-recluse/Livecut-LV2

PPS yes I agree this plugin is fantastic & is worth the effort to get it up and running. If I was able to build on a mac I would definitely be giving it a go

eventual-recluse commented 2 years ago

@Andreya-Autumn @mrbfrank There's another fork of Livecut with updates that seem much more thorough than my attempt. It has removed all the JUCE dependencies and can build a native mac VST3 (as well as windows and linux I think). That might be worth a look if VST3 is an option:

https://github.com/scheffle/Livecut

Andreya-Autumn commented 2 years ago

Hey there. Thanks for the replies. I did manage to build an AU with your changes using JUCE. It loads and does its thing, although the GUI is indeed missing as you said.

Also, it outputs lots of random periods of silence, which is a problem I remember also having when bridging the 32-bit version some years ago.

I see that scheffles repo has a note about fixing something to do with silence. No idea if it's the same issue, but I'll look into that one. :)

mrbfrank commented 2 years ago

Hi I'm back after some distractions. FYI I just compiled an arm64 VST3 of scheffle's fork on M1 Apple Silicon this morning.. so far it's working with generic UI. I'm working on a repo to build, test, & provide releases of these 64-bit Livecut forks. Right now I've only figured out how build for arm64 but I'm working on a universal binary to support Intel macs too. I'll reply again when I've got a release ready to share.

mrbfrank commented 2 years ago

Quick update, after using scheffle's VST3 for a while it wasn't sounding right. Something about the tempo matching was off.. the beat chops were always fast regardless of settings & I was getting audio dropouts here on the M1 mac. I do remember those dropouts happening in the original Livecut & nudging the DAW tempo would sometimes fix it. I'm sure there are great enhancements in scheffle's fork, I probably need more experience with VST_SDK to get it working properly.

So, I went on to build @eventual-recluse's Livecut-GUI fork and yeah.. it sounds great and looks great! Here it is running as an arch64 Audio Unit on M1:

image

I'll try to share this as a Universal Binary Audio Unit as soon as I figure out how to build one with JUCE & Xcode.

Andreya-Autumn commented 2 years ago

Hey thanks for letting everyone know! I built @eventual-recluse 's GUI fork again now too, and it works way better than last time I tried it! Good job on the GUI update.

The intermittent audio drop-outs have been a thing for a long time. I was using the 32-bit version bridged on an intel mac until a few years back, and I remember the same thing happening sometimes. It seems like occassionally the plugin starts forgetting to output audio in every other bar. I'd hazard a guess that there's something off in the BBCutters Phrase-Block-Cut logic somewhere, maybe the "listener" function. Figuring out what it might be is beyond me though.

Whichever way you cut it (pun intended lol), this version does work well now! I'm getting the same results I remember getting from the bridged 32-bit version so far. Big thanks for your work Recluse! :)

mrbfrank commented 2 years ago

I built a Universal Binary 2 AU & it works on both M1 Apple Silicon & my Intel hackintosh running High Sierra 🤘

The remaining bug is that settings are not saved/restored in Ableton, Reaper, & likely all other hosts. @eventual-recluse I'm reading up on AudioProcessorValueTreeState in the JUCE docs. Let me know your thoughts if that's the right direction or otherwise.

Andreya-Autumn commented 2 years ago

Another one too: At least on my end I'm getting no sound at all when host time signature is something other than 4/4, bit of a bummer. I remember it used to struggle at other time sigs also previously, but not going completely silent. Not sure what's up with that.

Sergenity commented 1 year ago

hi where is link to new version?

Andreya-Autumn commented 1 year ago

@Sergenity You'll need to build it locally, no one distributes binaries right now I think. The most solid source for it today is here: https://github.com/eventual-recluse/LiveCut