Skip to content

Commit

Permalink
Feature/bpm automation (#92)
Browse files Browse the repository at this point in the history
New features:
* `load_midi` and `add_midi_note` now take `convert_to_sec` as a kwarg, which is True by default. This maintains backwards compatibility. When `convert_to_sec` is False, the notes are added according to their beats, so changes to the Engine's BPM will affect the timing.
* `load_midi` has a kwarg for `clear_previous`, which defaults to True, maintaining backwards compatibility.
* RenderEngine has `remove_processor(name: str)`. If you really want to remove a processor (and break existing Python references to it), use this.
* RenderEngine's `set_bpm` can now take a numpy array and an integer PPQN. For example, if the values in the array change every PPQN samples, then the tempo change will be "on the beat."
* Any parameter's `set_automation` now works with optional second PPQN rate argument.

Bug fixes:
* Fix int cast overflow bug with playback warp processor
  • Loading branch information
DBraun authored May 18, 2022
1 parent e3762e1 commit 53f853c
Show file tree
Hide file tree
Showing 37 changed files with 1,351 additions and 842 deletions.
16 changes: 14 additions & 2 deletions Builds/LinuxMakefile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Debug)
TARGET_ARCH :=
endif

JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DPIP_JUCE_EXAMPLES_DIRECTORY=QzpcdG9vbHNcSlVDRVxleGFtcGxlcw==" "-DSAMPLER_SKIP_UI" "-DJUCE_MODAL_LOOPS_PERMITTED" "-DHAVE_LIBSAMPLERATE" "-DUSE_BUILTIN_FFT" "-DUSE_PTHREADS" "-DBUILD_DAWDREAMER_FAUST" "-DBUILD_DAWDREAMER_RUBBERBAND" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=0.6.5" "-DJUCE_APP_VERSION_HEX=0x605" $(shell pkg-config --cflags alsa freetype2) -pthread -I../../JuceLibraryCode/modules/juce_audio_processors/format_types/VST3_SDK -I../../thirdparty/JUCE/modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../JuceLibraryCode/modules -I../../thirdparty/pybind11/include -I../../thirdparty/faust/architecture -I../../thirdparty/faust/compiler -I../../thirdparty/faust/compiler/utils -I../../thirdparty/libsamplerate/src -I../../thirdparty/libsamplerate/include -I../../thirdparty/rubberband -I../../thirdparty/rubberband/rubberband -I../../thirdparty/rubberband/src/kissfft -I../../thirdparty/rubberband/src -I../../thirdparty/portable_endian/include $(CPPFLAGS)
JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DPIP_JUCE_EXAMPLES_DIRECTORY=QzpcdG9vbHNcSlVDRVxleGFtcGxlcw==" "-DSAMPLER_SKIP_UI" "-DJUCE_MODAL_LOOPS_PERMITTED" "-DHAVE_LIBSAMPLERATE" "-DUSE_BUILTIN_FFT" "-DUSE_PTHREADS" "-DBUILD_DAWDREAMER_FAUST" "-DBUILD_DAWDREAMER_RUBBERBAND" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=0.6.6" "-DJUCE_APP_VERSION_HEX=0x606" $(shell pkg-config --cflags alsa freetype2) -pthread -I../../JuceLibraryCode/modules/juce_audio_processors/format_types/VST3_SDK -I../../thirdparty/JUCE/modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../JuceLibraryCode/modules -I../../thirdparty/pybind11/include -I../../thirdparty/faust/architecture -I../../thirdparty/faust/compiler -I../../thirdparty/faust/compiler/utils -I../../thirdparty/libsamplerate/src -I../../thirdparty/libsamplerate/include -I../../thirdparty/rubberband -I../../thirdparty/rubberband/rubberband -I../../thirdparty/rubberband/src/kissfft -I../../thirdparty/rubberband/src -I../../thirdparty/portable_endian/include $(CPPFLAGS)
JUCE_CPPFLAGS_DYNAMIC_LIBRARY := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0"
JUCE_CFLAGS_DYNAMIC_LIBRARY := -fPIC -fvisibility=hidden
JUCE_LDFLAGS_DYNAMIC_LIBRARY := -shared
Expand All @@ -58,7 +58,7 @@ ifeq ($(CONFIG),Release)
TARGET_ARCH :=
endif

JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DPIP_JUCE_EXAMPLES_DIRECTORY=QzpcdG9vbHNcSlVDRVxleGFtcGxlcw==" "-DSAMPLER_SKIP_UI" "-DJUCE_MODAL_LOOPS_PERMITTED" "-DHAVE_LIBSAMPLERATE" "-DUSE_BUILTIN_FFT" "-DUSE_PTHREADS" "-DBUILD_DAWDREAMER_FAUST" "-DBUILD_DAWDREAMER_RUBBERBAND" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=0.6.5" "-DJUCE_APP_VERSION_HEX=0x605" $(shell pkg-config --cflags alsa freetype2) -pthread -I../../JuceLibraryCode/modules/juce_audio_processors/format_types/VST3_SDK -I../../thirdparty/JUCE/modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../JuceLibraryCode/modules -I../../thirdparty/pybind11/include -I../../thirdparty/faust/architecture -I../../thirdparty/faust/compiler -I../../thirdparty/faust/compiler/utils -I../../thirdparty/libsamplerate/src -I../../thirdparty/libsamplerate/include -I../../thirdparty/rubberband -I../../thirdparty/rubberband/rubberband -I../../thirdparty/rubberband/src/kissfft -I../../thirdparty/rubberband/src -I../../thirdparty/portable_endian/include $(CPPFLAGS)
JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DPIP_JUCE_EXAMPLES_DIRECTORY=QzpcdG9vbHNcSlVDRVxleGFtcGxlcw==" "-DSAMPLER_SKIP_UI" "-DJUCE_MODAL_LOOPS_PERMITTED" "-DHAVE_LIBSAMPLERATE" "-DUSE_BUILTIN_FFT" "-DUSE_PTHREADS" "-DBUILD_DAWDREAMER_FAUST" "-DBUILD_DAWDREAMER_RUBBERBAND" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=0.6.6" "-DJUCE_APP_VERSION_HEX=0x606" $(shell pkg-config --cflags alsa freetype2) -pthread -I../../JuceLibraryCode/modules/juce_audio_processors/format_types/VST3_SDK -I../../thirdparty/JUCE/modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../JuceLibraryCode/modules -I../../thirdparty/pybind11/include -I../../thirdparty/faust/architecture -I../../thirdparty/faust/compiler -I../../thirdparty/faust/compiler/utils -I../../thirdparty/libsamplerate/src -I../../thirdparty/libsamplerate/include -I../../thirdparty/rubberband -I../../thirdparty/rubberband/rubberband -I../../thirdparty/rubberband/src/kissfft -I../../thirdparty/rubberband/src -I../../thirdparty/portable_endian/include $(CPPFLAGS)
JUCE_CPPFLAGS_DYNAMIC_LIBRARY := "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0"
JUCE_CFLAGS_DYNAMIC_LIBRARY := -fPIC -fvisibility=hidden
JUCE_LDFLAGS_DYNAMIC_LIBRARY := -shared
Expand Down Expand Up @@ -101,8 +101,10 @@ OBJECTS_DYNAMIC_LIBRARY := \
$(JUCE_OBJDIR)/SamplerAudioProcessorEditor_39db550d.o \
$(JUCE_OBJDIR)/FaustProcessor_2056a3e0.o \
$(JUCE_OBJDIR)/FilterProcessor_8755f5b.o \
$(JUCE_OBJDIR)/PlaybackWarpProcessor_eedba470.o \
$(JUCE_OBJDIR)/PluginProcessor_a059e380.o \
$(JUCE_OBJDIR)/ProcessorBase_65bf9464.o \
$(JUCE_OBJDIR)/CustomParameters_5970e144.o \
$(JUCE_OBJDIR)/custom_pybind_wrappers_ac32b5b4.o \
$(JUCE_OBJDIR)/RenderEngine_d1c4d401.o \
$(JUCE_OBJDIR)/RenderEngineWrapper_9b21dedc.o \
Expand Down Expand Up @@ -281,6 +283,11 @@ $(JUCE_OBJDIR)/FilterProcessor_8755f5b.o: ../../Source/FilterProcessor.cpp
@echo "Compiling FilterProcessor.cpp"
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_DYNAMIC_LIBRARY) $(JUCE_CFLAGS_DYNAMIC_LIBRARY) -o "$@" -c "$<"

$(JUCE_OBJDIR)/PlaybackWarpProcessor_eedba470.o: ../../Source/PlaybackWarpProcessor.cpp
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
@echo "Compiling PlaybackWarpProcessor.cpp"
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_DYNAMIC_LIBRARY) $(JUCE_CFLAGS_DYNAMIC_LIBRARY) -o "$@" -c "$<"

$(JUCE_OBJDIR)/PluginProcessor_a059e380.o: ../../Source/PluginProcessor.cpp
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
@echo "Compiling PluginProcessor.cpp"
Expand All @@ -291,6 +298,11 @@ $(JUCE_OBJDIR)/ProcessorBase_65bf9464.o: ../../Source/ProcessorBase.cpp
@echo "Compiling ProcessorBase.cpp"
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_DYNAMIC_LIBRARY) $(JUCE_CFLAGS_DYNAMIC_LIBRARY) -o "$@" -c "$<"

$(JUCE_OBJDIR)/CustomParameters_5970e144.o: ../../Source/CustomParameters.cpp
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
@echo "Compiling CustomParameters.cpp"
$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_DYNAMIC_LIBRARY) $(JUCE_CFLAGS_DYNAMIC_LIBRARY) -o "$@" -c "$<"

$(JUCE_OBJDIR)/custom_pybind_wrappers_ac32b5b4.o: ../../Source/custom_pybind_wrappers.cpp
-$(V_AT)mkdir -p $(JUCE_OBJDIR)
@echo "Compiling custom_pybind_wrappers.cpp"
Expand Down
18 changes: 12 additions & 6 deletions Builds/MacOSX/DawDreamer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
03E7579908465C2C4C83596E /* include_juce_dsp.mm */ = {isa = PBXBuildFile; fileRef = 2AA8CBD57F5CC5B7912A192F; };
0C01D9069A27A2ECB0B24253 /* StretcherChannelData.cpp */ = {isa = PBXBuildFile; fileRef = 5558FF156E977213C6DE9C14; };
158D137D07F738CDB6AD2028 /* Accelerate.framework */ = {isa = PBXBuildFile; fileRef = 553C0A3501582EE95328719B; };
1B14253412716097BBB38A9B /* CustomParameters.cpp */ = {isa = PBXBuildFile; fileRef = C5A12760CCD5CE6DD270F92F; };
210F38443F9D77354A4B28EB /* PlaybackWarpProcessor.cpp */ = {isa = PBXBuildFile; fileRef = AB39C0017B2EE44B9E510D89; };
21FB7BCF683F51D403A7475D /* StretcherProcess.cpp */ = {isa = PBXBuildFile; fileRef = 1B00487B34E2B8C9A26AFA49; };
24E83A217028D2AEF88FF90E /* include_juce_data_structures.mm */ = {isa = PBXBuildFile; fileRef = DE2959972547E114EB1E1FCD; };
2706724BA659554B6F4EE85E /* include_juce_audio_formats.mm */ = {isa = PBXBuildFile; fileRef = 03BD258F06159505E43073E1; };
Expand Down Expand Up @@ -172,7 +174,6 @@
8A778A5F6395BCBDE3BE5982 /* Scavenger.h */ /* Scavenger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Scavenger.h; path = ../../thirdparty/rubberband/src/base/Scavenger.h; sourceTree = SOURCE_ROOT; };
8B852E83502C66F8B990F051 /* SilentAudioCurve.h */ /* SilentAudioCurve.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SilentAudioCurve.h; path = ../../thirdparty/rubberband/src/audiocurves/SilentAudioCurve.h; sourceTree = SOURCE_ROOT; };
8D80555F3F275D566655DEC2 /* getopt.c */ /* getopt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = getopt.c; path = ../../thirdparty/rubberband/src/getopt/getopt.c; sourceTree = SOURCE_ROOT; };
8D88F06BD34407D802DFB597 /* AllProcessors.h */ /* AllProcessors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AllProcessors.h; path = ../../Source/AllProcessors.h; sourceTree = SOURCE_ROOT; };
8F78B14DAA164DE1331AD3FD /* Main.cpp */ /* Main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../Source/Sampler/Source/Main.cpp; sourceTree = SOURCE_ROOT; };
8F7B057EB4717EDC7E8E8048 /* StretcherImpl.h */ /* StretcherImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StretcherImpl.h; path = ../../thirdparty/rubberband/src/StretcherImpl.h; sourceTree = SOURCE_ROOT; };
94091A9630E5C9649E958A16 /* kiss_fftr.h */ /* kiss_fftr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = kiss_fftr.h; path = ../../thirdparty/rubberband/src/kissfft/kiss_fftr.h; sourceTree = SOURCE_ROOT; };
Expand All @@ -195,6 +196,7 @@
A64A3D2EF69F5E968839751A /* sysutils.h */ /* sysutils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = sysutils.h; path = ../../thirdparty/rubberband/src/system/sysutils.h; sourceTree = SOURCE_ROOT; };
A997E92A77CDFA70A6536BBD /* MPESettingsDataModel.cpp */ /* MPESettingsDataModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MPESettingsDataModel.cpp; path = ../../Source/Sampler/Source/DataModels/MPESettingsDataModel.cpp; sourceTree = SOURCE_ROOT; };
AA2C7D7E9590EB6623631A35 /* CommandFifo.h */ /* CommandFifo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandFifo.h; path = ../../Source/Sampler/Source/CommandFifo.h; sourceTree = SOURCE_ROOT; };
AB39C0017B2EE44B9E510D89 /* PlaybackWarpProcessor.cpp */ /* PlaybackWarpProcessor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = PlaybackWarpProcessor.cpp; path = ../../Source/PlaybackWarpProcessor.cpp; sourceTree = SOURCE_ROOT; };
AD248A6B37034D215326CB7F /* juce_audio_processors */ /* juce_audio_processors */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_processors; path = ../../JuceLibraryCode/modules/juce_audio_processors; sourceTree = SOURCE_ROOT; };
B1FAEBBC0B8073BAE84C5665 /* PlaybackProcessor.h */ /* PlaybackProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PlaybackProcessor.h; path = ../../Source/PlaybackProcessor.h; sourceTree = SOURCE_ROOT; };
B2CCBF7C3614EE8B865D41C0 /* include_juce_graphics.mm */ /* include_juce_graphics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_graphics.mm; path = ../../JuceLibraryCode/include_juce_graphics.mm; sourceTree = SOURCE_ROOT; };
Expand All @@ -208,6 +210,7 @@
C379050966C094B7C05FEED8 /* Resampler.h */ /* Resampler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Resampler.h; path = ../../thirdparty/rubberband/src/dsp/Resampler.h; sourceTree = SOURCE_ROOT; };
C503A9D9F3009D679DBFC556 /* FilterProcessor.h */ /* FilterProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FilterProcessor.h; path = ../../Source/FilterProcessor.h; sourceTree = SOURCE_ROOT; };
C519012CDDE2CA92FF58903A /* include_juce_video.mm */ /* include_juce_video.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_video.mm; path = ../../JuceLibraryCode/include_juce_video.mm; sourceTree = SOURCE_ROOT; };
C5A12760CCD5CE6DD270F92F /* CustomParameters.cpp */ /* CustomParameters.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CustomParameters.cpp; path = ../../Source/CustomParameters.cpp; sourceTree = SOURCE_ROOT; };
C5E04D72E37F04C0663E5EA6 /* CoreMIDI.framework */ /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
C6695EB398FC46133B7FAC70 /* PlaybackPositionOverlay.h */ /* PlaybackPositionOverlay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PlaybackPositionOverlay.h; path = ../../Source/Sampler/Source/Components/PlaybackPositionOverlay.h; sourceTree = SOURCE_ROOT; };
C713F7F77E549E8C08771E49 /* AbletonClipInfo.h */ /* AbletonClipInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AbletonClipInfo.h; path = ../../Source/AbletonClipInfo.h; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -410,6 +413,7 @@
561257822B09113041A6909C,
E553BE5C53ED6D87F71CC515,
7C90363A6D8BA8EA0D91A985,
C5A12760CCD5CE6DD270F92F,
3319047264FBD43706A45A08,
A2CE988FDEA16DA46477FB4B,
094BECA334087BBDDA1CA022,
Expand Down Expand Up @@ -570,13 +574,13 @@
C20139B2E8CF4DC6B19AC0A6,
8038F1D9B3CEBD503DE7AD1F,
4915A3C580F0DAA69FAAED98,
8D88F06BD34407D802DFB597,
9ABCCF2DBAA01DE762D8BD60,
BFD142EBB8AFBADC8AB04A8A,
7332613820553661C4FA3CD8,
C503A9D9F3009D679DBFC556,
1799B9631459052DD116F71A,
F7EDC034912036BE18A95734,
AB39C0017B2EE44B9E510D89,
B1FAEBBC0B8073BAE84C5665,
EE65D34C5FCFBF1D5F6C12D8,
2F962B6F6EA479E59F083A16,
Expand Down Expand Up @@ -736,8 +740,10 @@
B942805B7846AE297800EF37,
E358C00D8D92D35AFBC9944C,
7C6656C8A61187E3C9113001,
210F38443F9D77354A4B28EB,
92F6A21BA484A258A4EF5F23,
BD1166D575CE2FE6886E0DFC,
1B14253412716097BBB38A9B,
9D34C1F40CAD6A7617F1B60B,
48CA111A7776D753A8BFF02E,
F69DC2F3034023CA38AFFC92,
Expand Down Expand Up @@ -788,8 +794,8 @@
"BUILD_DAWDREAMER_FAUST",
"BUILD_DAWDREAMER_RUBBERBAND",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=0.6.5",
"JUCE_APP_VERSION_HEX=0x605",
"JUCE_APP_VERSION=0.6.6",
"JUCE_APP_VERSION_HEX=0x606",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
Expand Down Expand Up @@ -914,8 +920,8 @@
"BUILD_DAWDREAMER_FAUST",
"BUILD_DAWDREAMER_RUBBERBAND",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=0.6.5",
"JUCE_APP_VERSION_HEX=0x605",
"JUCE_APP_VERSION=0.6.6",
"JUCE_APP_VERSION_HEX=0x606",
"JucePlugin_Build_VST=0",
"JucePlugin_Build_VST3=0",
"JucePlugin_Build_AU=0",
Expand Down
Loading

0 comments on commit 53f853c

Please sign in to comment.