Giter Club home page Giter Club logo

freeze's Introduction

Freeze

Version 0.2.1

Freeze is an LV2 plugin for freezing tracks in a digital audio workstation—that is, temporarily rendering a track as audio to reduce CPU/DSP load, as tracks with large chains of CPU-heavy effects can make buffer underruns (xruns) quite common. Some DAWs like Ardour support track freezing to a certain extent, but Ardour, for example, cannot freeze MIDI tracks.

Screenshot of Freeze in Ardour

Freeze running in Ardour

Usage

To use Freeze, insert an instance of the plugin somewhere in a track’s chain of effects. Plugins occurring before the Freeze instance can be turned off to reduce CPU/DSP time once the audio is frozen, but they also won’t be configurable without having to re-freeze the track.

After inserting the Freeze instance, open the GUI and click the Record button. Then, in your project, play all sections where the track emits audio. This ensures that Freeze can actually capture the audio that needs to be frozen. It is not necessary to play sections where the track is silent, even if other tracks aren’t. It’s okay if you experience xruns during this process—they should disappear or be reduced once completing the steps below, and the recorded audio itself should be perfectly intact (if you find that this isn’t the case, please file an issue with details about your audio setup).

After all sections have been played back, click the Stop button in the GUI. The “Memory Used” text at the bottom of the GUI will show you how much memory is being used to store the recorded audio. This amount of memory is present both in RAM and on disk.

Then, disable or deactivate all plugins that occur before Freeze in the track’s effect chain. This ensures that the plugins no longer consume CPU/DSP time. The track will then be frozen and should behave as if the entire effect chain were active, while being much less resource intensive.

If you change something in the track and need to re-freeze, enable all of the plugins that occur before Freeze and play back the sections of the project that have changed. If many sections have now become silent, it may be more convenient to click the Clear button in the GUI, which clears all recorded audio.

Note: Currently, copying/cloning instances of Freeze in Ardour (and perhaps other DAWs) causes issues—until this is fixed, as a workaround, add each instance of Freeze individually instead of copying/cloning.

Real-time safety

Freeze is hard-real-time-safe while in playback mode, but not while recording audio. Thus, you may experience (more) xruns while Freeze is recording, but they should disappear once Freeze is put back into playback mode and plugins that appear earlier in the effect chain are disabled (and, as mentioned earlier, Freeze can (and should!) be used on tracks that are already causing xruns).

What’s new

Version 0.2.0:

  • No large changes, but 0.2.0, unlike 0.1.x, indicates a non-development version according to the LV2 specification.

Version 0.1.8:

  • Important: Fixed an issue that could cause the plugin to crash when initialized.
  • Important: Fixed an issue with broken database saving. If the plugin keeps crashing or working improperly after updating, try deleting and re-adding each instance of the plugin.

Version 0.1.7:

  • The displayed memory usage in the GUI now updates continuously while recording.
  • Samples with a small amplitude are no longer flushed to zero (but long sections of audio that consist entirely of small (< 1e−6) samples are still treated as silence).

Version 0.1.5:

  • Fixed compilation errors due to deprecation warnings within GTK 2.

Dependencies

  • LV2 development files
  • GTK 2 development files
  • GCC
  • GNU Make

On Debian GNU/Linux (and many derivatives), these can be installed by running the following command as root (e.g., with sudo):

apt-get install lv2-dev libgtk2.0-dev gcc make

Installation

Run the following commands (you will need to have Git installed):

git clone https://github.com/taylordotfish/freeze ~/.lv2/freeze.lv2/
cd ~/.lv2/freeze.lv2/
make

Development notes

Freeze uses autoheaders to generate header files from the corresponding .c files. If you make changes to a .c file, use autoheaders (or the wrapper script scripts/makeheader.sh) to update the corresponding .h file.

License

Freeze is licensed under the GNU General Public License, version 3 or any later version. See LICENSE.

This README file has been released to the public domain using CC0.

freeze's People

Contributors

taylordotfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

freeze's Issues

Move away from using GTK?

There is a problem in using GTK directly from an LV2 plugin. Would it be possible to migrate to an alternative widget toolkit or framework like DPF? See here for more.

build fail: GTypeDebugFlags/GTimeVal deprecated

mkdir -p build
mkdir -p build/src/gui/lv2/
mkdir -p build/src/gui/models/app/
mkdir -p build/src/gui/pmods/app/
mkdir -p build/src/gui/pmods/db_path/
mkdir -p build/src/gui/pmods/record_buttons/
mkdir -p build/src/gui/views/app/
mkdir -p build/src/gui/views/db_path/
mkdir -p build/src/gui/views/record_buttons/
mkdir -p build/src/gui/views/widgets/icon_button/
mkdir -p build/src/plugin/lv2/
mkdir -p build/src/plugin/plugin/
mkdir -p build/src/plugin/recording/
mkdir -p build/src/shared/client/callbacks/
mkdir -p build/src/shared/client/client/
mkdir -p build/src/shared/logger/logger/
mkdir -p build/src/shared/logger/lv2/
mkdir -p build/src/shared/uris/
mkdir -p build/src/utils/array_list/
mkdir -p build/src/utils/callback/
mkdir -p build/src/utils/memory/
mkdir -p build/src/utils/string/
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/shared/client/callbacks/callbacks.o src/shared/client/callbacks/callbacks.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/shared/client/client/client.o src/shared/client/client/client.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/shared/uris/uris.o src/shared/uris/uris.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/shared/logger/lv2/lv2.o src/shared/logger/lv2/lv2.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/shared/logger/logger/logger.o src/shared/logger/logger/logger.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/utils/string/string.o src/utils/string/string.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/utils/callback/callback.o src/utils/callback/callback.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/utils/array_list/array_list.o src/utils/array_list/array_list.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/utils/memory/memory.o src/utils/memory/memory.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/plugin/plugin/plugin.o src/plugin/plugin/plugin.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/plugin/lv2/lv2.o src/plugin/lv2/lv2.c
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -c -o build/src/plugin/recording/recording.o src/plugin/recording/recording.c
gcc -shared -Wl,--no-undefined,--no-allow-shlib-undefined -Ofast -flto -o build/freeze.so build/src/shared/client/callbacks/callbacks.o build/src/shared/client/client/client.o build/src/shared/uris/uris.o build/src/shared/logger/lv2/lv2.o build/src/shared/logger/logger/logger.o build/src/utils/string/string.o build/src/utils/callback/callback.o build/src/utils/array_list/array_list.o build/src/utils/memory/memory.o build/src/plugin/plugin/plugin.o build/src/plugin/lv2/lv2.o build/src/plugin/recording/recording.o 
gcc -Wall -Wextra -Werror -pedantic -std=c11 -fpic -MMD -MP -Isrc -fvisibility=hidden -Ofast -flto -fwhole-program -DNDEBUG -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi-3.2.1/include -I/usr/include/harfbuzz -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -pthread  -c -o build/src/gui/views/app/app.o src/gui/views/app/app.c
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from src/gui/pmods/app/../db_path/db_path.h:4,
                 from src/gui/pmods/app/app.h:6,
                 from src/gui/pmods/pmods.h:1,
                 from src/gui/views/app/../db_path/db_path.h:4,
                 from src/gui/views/app/app.h:4,
                 from src/gui/views/app/app.c:22:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: error: ‘GTypeDebugFlags’ is deprecated [-Werror=deprecated-declarations]
  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);
      | ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
                 from /usr/include/glib-2.0/gobject/gbinding.h:29,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from src/gui/pmods/app/../db_path/db_path.h:4,
                 from src/gui/pmods/app/app.h:6,
                 from src/gui/pmods/pmods.h:1,
                 from src/gui/views/app/../db_path/db_path.h:4,
                 from src/gui/views/app/app.h:4,
                 from src/gui/views/app/app.c:22:
/usr/include/glib-2.0/gobject/gtype.h:679:1: note: declared here
  679 | {
      | ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
                 from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:126,
                 from src/gui/pmods/app/../db_path/db_path.h:4,
                 from src/gui/pmods/app/app.h:6,
                 from src/gui/pmods/pmods.h:1,
                 from src/gui/views/app/../db_path/db_path.h:4,
                 from src/gui/views/app/app.h:4,
                 from src/gui/views/app/app.c:22:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Werror=deprecated-declarations]
   73 |   GTimeVal last_popdown;
      |   ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from src/gui/pmods/app/../db_path/db_path.h:4,
                 from src/gui/pmods/app/app.h:6,
                 from src/gui/pmods/pmods.h:1,
                 from src/gui/views/app/../db_path/db_path.h:4,
                 from src/gui/views/app/app.h:4,
                 from src/gui/views/app/app.c:22:
/usr/include/glib-2.0/glib/gtypes.h:547:8: note: declared here
  547 | struct _GTimeVal
      |        ^~~~~~~~~
cc1: all warnings being treated as errors
make: *** [GNUmakefile:91: build/src/gui/views/app/app.o] Error 1

Copying/cloning instances of Freeze in Ardour causes issues

When instances of Freeze are cloned in Ardour, the FreezeDB paths for each plugin are all symlinked to the same file, so all of the instances end up sharing the same database.

As a workaround, individually adding each instance of Freeze avoids this problem, but this should be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.