Skip to content

Commit

Permalink
Laser Trem (#341)
Browse files Browse the repository at this point in the history
* Starting on Frequency Shifter module

* Add frequency shifter tremolo module

* Apply clang-format

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jatinchowdhury18 and github-actions[bot] authored Jan 8, 2024
1 parent bfe6139 commit de934aa
Show file tree
Hide file tree
Showing 9 changed files with 429 additions and 3 deletions.
41 changes: 41 additions & 0 deletions res/presets/Laser Cave.chowpreset
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>

<Preset name="Laser Cave" plugin="BYOD" vendor="CHOW" category="Modulation"
version="1.2.1">
<proc_chain state_plugin_version="1.2.1">
<Smooth_Reverb>
<Parameters x_pos="0.521841824054718" y_pos="0.3168880343437195">
<PARAM id="decay" value="1999.518432617188"/>
<PARAM id="high_cut" value="8000.0"/>
<PARAM id="low_cut" value="199.9999847412109"/>
<PARAM id="mix" value="0.3300000131130219"/>
<PARAM id="on_off" value="1.0"/>
<PARAM id="relax" value="0.3079999983310699"/>
</Parameters>
<port_0 connection_0="-1" connection_end_0="0"/>
</Smooth_Reverb>
<Laser_Trem>
<Parameters x_pos="0.1841794550418854" y_pos="0.3168880343437195">
<PARAM id="feedback" value="0.800000011920929"/>
<PARAM id="mix" value="1.0"/>
<PARAM id="mode" value="2.0"/>
<PARAM id="on_off" value="1.0"/>
<PARAM id="shift" value="6.25"/>
<PARAM id="spread" value="1.0"/>
</Parameters>
<port_0 connection_0="0" connection_end_0="0"/>
</Laser_Trem>
<Input>
<Parameters x_pos="0.005020080134272575" y_pos="0.3221343755722046">
<PARAM id="on_off" value="1.0"/>
</Parameters>
<port_0 connection_0="1" connection_end_0="0"/>
</Input>
<Output>
<Parameters x_pos="0.859919011592865" y_pos="0.3186582922935486">
<PARAM id="on_off" value="1.0"/>
</Parameters>
</Output>
</proc_chain>
<extra_info/>
</Preset>
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ target_sources(BYOD PRIVATE
processors/modulation/Panner.cpp
processors/modulation/Rotary.cpp
processors/modulation/Tremolo.cpp
processors/modulation/FrequencyShifter.cpp
processors/modulation/Flanger.cpp
processors/modulation/MIDIModulator.cpp
processors/modulation/ParamModulator.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/processors/BaseProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void BaseProcessor::addToPopupMenu (PopupMenu& menu)
PopupMenu::Item paramItem;
paramItem.itemID = ++itemID;
paramItem.text = paramChoice;
paramItem.action = [attachment, newParamVal = param->convertTo0to1 ((float) index)]
paramItem.action = [attachment, newParamVal = (float) index]
{
attachment->setValueAsCompleteGesture (newParamVal);
};
Expand Down
2 changes: 2 additions & 0 deletions src/processors/ProcessorStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include "modulation/Chorus.h"
#include "modulation/Flanger.h"
#include "modulation/FrequencyShifter.h"
#include "modulation/MIDIModulator.h"
#include "modulation/Panner.h"
#include "modulation/ParamModulator.h"
Expand Down Expand Up @@ -133,6 +134,7 @@ ProcessorStore::StoreMap ProcessorStore::store = {
{ "Scanner Vibrato", { &processorFactory<ScannerVibrato>, { ProcessorType::Modulation, ScannerVibrato::numInputs, ScannerVibrato::numOutputs } } },
{ "Solo-Vibe", { &processorFactory<UniVibe>, { ProcessorType::Modulation, UniVibe::numInputs, UniVibe::numOutputs } } },
{ "Tremolo", { &processorFactory<Tremolo>, { ProcessorType::Modulation, Tremolo::numInputs, Tremolo::numOutputs } } },
{ "Laser Trem", { &processorFactory<FrequencyShifter>, { ProcessorType::Modulation, 1, 1 } } },

{ "Clean Gain", { &processorFactory<CleanGain>, { ProcessorType::Utility, 1, 1 } } },
{ "DC Bias", { &processorFactory<DCBias>, { ProcessorType::Utility, 1, 1 } } },
Expand Down
3 changes: 2 additions & 1 deletion src/processors/chain/ProcessorChainStateHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ void ProcessorChainStateHelper::loadProcChainInternal (const XmlElement* xml,
const auto& connections = connectionMap.at (portIdx);
for (auto [cIdx, endPort] : connections)
{
if (auto* procToConnect = cIdx >= 0 ? chain.procs[cIdx] : &chain.outputProcessor; procToConnect != nullptr && procToConnect != proc)
if (auto* procToConnect = cIdx >= 0 ? chain.procs[cIdx] : &chain.outputProcessor;
procToConnect != nullptr && procToConnect != proc && proc->getNumOutputs() > portIdx && procToConnect->getNumInputs() > endPort)
{
ConnectionInfo info { proc, portIdx, procToConnect, endPort };
um->perform (new AddOrRemoveConnection (chain, std::move (info)));
Expand Down
Loading

0 comments on commit de934aa

Please sign in to comment.