Skip to content

Commit 919627f

Browse files
committed
Add multibus output option.
1 parent c43f7d2 commit 919627f

File tree

7 files changed

+78
-26
lines changed

7 files changed

+78
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode
12
build
23
Builds
34
JuceLibraryCode

CMakeLists.txt

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ endif()
2626

2727
option(WITH_ASIO "Enable ASIO audio interface" ON)
2828

29+
option(WITH_MULTIBUS_OUTPUT "Enable multibus output" OFF)
30+
2931
add_subdirectory(JUCE)
3032

3133
set(plugin_formats
@@ -37,12 +39,25 @@ if(APPLE)
3739
list(APPEND plugin_formats AU)
3840
endif()
3941

40-
juce_add_plugin(${PROJECT_NAME}
42+
if(WITH_MULTIBUS_OUTPUT)
43+
set(TARGET "${PROJECT_NAME}-multibus")
44+
set(PRODUCT_NAME "${PROJECT_NAME}-multibus")
45+
set(PLUGIN_DESCRIPTION "${PRODUCT_NAME} multibus")
46+
set(PLUGIN_CODE "E6hf")
47+
else()
48+
set(TARGET "${PROJECT_NAME}")
49+
set(PRODUCT_NAME "${PROJECT_NAME}")
50+
set(PLUGIN_DESCRIPTION "${PRODUCT_NAME} stereo")
51+
set(PLUGIN_CODE "E6he")
52+
endif()
53+
54+
55+
juce_add_plugin(${TARGET}
4156
VERSION "0.1.13"
4257
PLUGIN_MANUFACTURER_CODE "Arbe"
43-
PLUGIN_CODE "E6he"
44-
PLUGIN_DESCRIPTION "Aeolus"
45-
PRODUCT_NAME "Aeolus"
58+
PLUGIN_CODE ${PLUGIN_CODE}
59+
PLUGIN_DESCRIPTION ${PLUGIN_DESCRIPTION}
60+
PRODUCT_NAME ${PRODUCT_NAME}
4661
COMPANY_NAME "Arthur Benilov"
4762
IS_SYNTH TRUE
4863
IS_MIDI_EFFECT FALSE
@@ -52,7 +67,7 @@ juce_add_plugin(${PROJECT_NAME}
5267
ICON_SMALL "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icons/icon64.png"
5368
)
5469

55-
target_link_libraries(${PROJECT_NAME}
70+
target_link_libraries(${TARGET}
5671
PRIVATE
5772
juce::juce_core
5873
juce::juce_data_structures
@@ -65,9 +80,9 @@ target_link_libraries(${PROJECT_NAME}
6580
juce::juce_recommended_config_flags
6681
)
6782

68-
juce_generate_juce_header(${PROJECT_NAME})
83+
juce_generate_juce_header(${TARGET})
6984

70-
target_include_directories(${PROJECT_NAME}
85+
target_include_directories(${TARGET}
7186
PRIVATE
7287
"${CMAKE_CURRENT_SOURCE_DIR}/Source"
7388
)
@@ -79,12 +94,12 @@ file(GLOB_RECURSE src
7994

8095
file(GLOB_RECURSE res "${CMAKE_CURRENT_SOURCE_DIR}/Resources/*.*")
8196

82-
juce_add_binary_data(${PROJECT_NAME}_res SOURCES ${res})
83-
target_link_libraries(${PROJECT_NAME} PUBLIC ${PROJECT_NAME}_res)
97+
juce_add_binary_data(${TARGET}_res SOURCES ${res})
98+
target_link_libraries(${TARGET} PUBLIC ${TARGET}_res)
8499

85-
target_sources(${PROJECT_NAME} PRIVATE ${src})
100+
target_sources(${TARGET} PRIVATE ${src})
86101

87-
target_compile_definitions(${PROJECT_NAME}
102+
target_compile_definitions(${TARGET}
88103
PUBLIC
89104
JUCE_WEB_BROWSER=0
90105
JUCE_USE_CURL=0
@@ -93,17 +108,23 @@ target_compile_definitions(${PROJECT_NAME}
93108
)
94109

95110
if(WITH_ASIO)
96-
target_include_directories(${PROJECT_NAME}
111+
target_include_directories(${TARGET}
97112
PRIVATE
98113
"${CMAKE_CURRENT_SOURCE_DIR}/asiosdk_2.3.3_2019-06-14/common"
99114
)
100115

101-
target_compile_definitions(${PROJECT_NAME} PUBLIC JUCE_ASIO=1)
116+
target_compile_definitions(${TARGET} PUBLIC JUCE_ASIO=1)
117+
else()
118+
target_compile_definitions(${TARGET} PUBLIC JUCE_ASIO=0)
119+
endif()
120+
121+
if(WITH_MULTIBUS_OUTPUT)
122+
target_compile_definitions(${TARGET} PUBLIC AEOLUS_MULTIBUS_OUTPUT=1)
102123
else()
103-
target_compile_definitions(${PROJECT_NAME} PUBLIC JUCE_ASIO=0)
124+
target_compile_definitions(${TARGET} PUBLIC AEOLUS_MULTIBUS_OUTPUT=0)
104125
endif()
105126

106127
if(APPLE)
107-
target_compile_definitions(${PROJECT_NAME} PUBLIC JUCE_AU=1)
108-
target_compile_options(${PROJECT_NAME} PRIVATE "-mfma")
128+
target_compile_definitions(${TARGET} PUBLIC JUCE_AU=1)
129+
target_compile_options(${TARGET} PRIVATE "-mfma")
109130
endif()

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![build](https://github.com/Archie3d/aeolus_plugin/actions/workflows/build.yml/badge.svg)
22

33
# ![aeolus](Resources/icons/icon64.png) Aeolus
4-
Pipe organ emulator using additive synthesis as a VST plugin (or a stand-alone executable).
4+
Pipe organ emulator using additive synthesis as a **VST or AU plugin** (or a stand-alone executable).
55

66
Aeolus was originally developed by Fons Adriaensen and presented in 2004. The original implementation is Linux only and can be found [here](https://kokkinizita.linuxaudio.org/linuxaudio/aeolus/) (or across Linux distribution packages). At present it looks like Aeolus development has been mostly abandoned (but [Organnery](https://organnery.com/) picked up the original Aeolus project to make it run on a Raspberry Pi).
77

@@ -16,7 +16,7 @@ The original binary format for the pipe models and the organ configuration has b
1616

1717
## Implementation notes
1818

19-
This project takes only `addsynth` and `rankwave` modules from the original implementation. These modules describe the 64-harmonics additive synth and organ pipes wavetables generation. Plus this repo includes the original `ae0` files that contain the harmonics tables for various pipes in binary format (these are embedded into the plugin's resources). All the new pipe models are encoded in equivalent JSON format.
19+
This project takes only `addsynth` and `rankwave` modules from the original implementation (the source's been modified though). These modules describe the 64-harmonics additive synth and organ pipes wavetables generation. Plus this repo includes the original `ae0` files that contain the harmonics tables for various pipes in binary format (these are embedded into the plugin's resources). All the new pipe models are encoded in equivalent JSON format.
2020

2121
The rest and the most of the code (including voicing, spatialisation, reverb, etc.) is all new, and it is not based on the original Aeolus, so the sound this plugin produces is different.
2222

@@ -37,3 +37,18 @@ Custom organ configuration will be loaded by the plugin if found at `Documents/A
3737
> :point_right: The `Documents` folder's exact location depends on the operating system.
3838
3939
To create the `organ_config.json` start with [default one embedded into the plugin](Resources/configs/default_organ.json) by copying it to `Documents/Aeolus` folder and renaming to `organ_config.json`.
40+
41+
## Multibus output
42+
:warning: _Since version 0.1.13_
43+
44+
When compiled with the `WITH_MULTIBUS_OUTPUT` CMake option enabled, the generated plugin will ouput to the `8` separate _monofonic_ buses. Each bus corresponds to the pipes groups placement in space according to the internal horizontal arrangement of the pipes.
45+
46+
In multibus configuration there is no reverb applied, and there is no spatialization performed.
47+
48+
> :point_right: The multibus mode is indended for the object based mixing, where you could place individual pipe groups in space yourself and apply a reverb of your preference.
49+
50+
Pipes are arranged starting from the lowest key from the sides (buses 0 and 7) to the center in the middle of the range (buses 3, 4), and then going back from the centre towards the sides. For the pedal pipes, they go from the outside towards the centre only.
51+
52+
Corresponding pipe position jumps between left and right following the keys (C will be on the left, C# on the right, D of the left, D# on the right and so on).
53+
54+
> :point_right: This very same pipes spatial arrangement is used in the stereo version of the plugin to perform spatialized rendering followed by a stereo convolutional reverb.

Source/PluginEditor.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ AeolusAudioProcessorEditor::AeolusAudioProcessorEditor (AeolusAudioProcessor& p)
7575
_voiceCountValueLabel.setColour(Label::textColourId, Colours::lightyellow);
7676
addAndMakeVisible(_voiceCountValueLabel);
7777

78+
#if !AEOLUS_MULTIBUS_OUTPUT
79+
80+
// Mutlibus configuration does not have a reverb
81+
7882
addAndMakeVisible(_reverbLabel);
7983

8084
addAndMakeVisible(_reverbComboBox);
@@ -98,6 +102,8 @@ AeolusAudioProcessorEditor::AeolusAudioProcessorEditor (AeolusAudioProcessor& p)
98102

99103
addAndMakeVisible(_reverbSlider);
100104

105+
#endif // !AEOLUS_MULTIBUS_OUTPUT
106+
101107
_volumeLevelL.setSkew(0.5f);
102108
addAndMakeVisible(_volumeLevelL);
103109
_volumeLevelR.setSkew(0.5f);
@@ -233,11 +239,19 @@ void AeolusAudioProcessorEditor::resized()
233239
_voiceCountLabel.setBounds(150, margin, 56, 20);
234240
_voiceCountValueLabel.setBounds(_voiceCountLabel.getRight() + margin, margin, 30, 20);
235241

242+
#if !AEOLUS_MULTIBUS_OUTPUT
236243
_reverbLabel.setBounds(_voiceCountValueLabel.getRight() + 40, margin, 60, 20);
237244
_reverbComboBox.setBounds(_reverbLabel.getRight() + margin, margin, 220, 20);
238245
_reverbSlider.setBounds(_reverbComboBox.getRight() + margin, margin, 100, 20);
239246

240247
_volumeLabel.setBounds(_reverbSlider.getRight() + 40, margin, 60, 20);
248+
249+
#else
250+
251+
_volumeLabel.setBounds(_voiceCountValueLabel.getRight() + 430, margin, 60, 20);
252+
253+
#endif
254+
241255
_volumeSlider.setBounds(_volumeLabel.getRight() + margin, margin, 100, 20);
242256

243257
_volumeLevelL.setBounds(_volumeSlider.getX() + 5, _volumeSlider.getY() + 2, _volumeSlider.getWidth() - 10, 2);

Source/PluginProcessor.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ bool AeolusAudioProcessor::canApplyBusCountChange(bool isInput, bool isAdding, B
173173
#endif
174174
}
175175

176-
bool AeolusAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
176+
bool AeolusAudioProcessor::isBusesLayoutSupported(const BusesLayout& layouts) const
177177
{
178178
static_assert(!JucePlugin_IsMidiEffect, "This plugin is not a MIDI effect");
179179
static_assert(JucePlugin_IsSynth, "This plugin is a synthesizer");
@@ -207,7 +207,7 @@ void AeolusAudioProcessor::processorLayoutsChanged()
207207

208208
#endif // JucePlugin_PreferredChannelConfigurations
209209

210-
void AeolusAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, juce::MidiBuffer& midiMessages)
210+
void AeolusAudioProcessor::processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBuffer& midiMessages)
211211
{
212212
using namespace std::chrono;
213213

@@ -274,7 +274,7 @@ void AeolusAudioProcessor::processMidi(juce::MidiBuffer& midiMessages)
274274

275275
if ((ch == 0 || _engine.getMIDIControlChannel() == 0 || ch == _engine.getMIDIControlChannel())
276276
&& msg.isController()) {
277-
277+
278278
int cc = msg.getControllerNumber();
279279
const float value = float(msg.getControllerValue()) / 127.0f;
280280

@@ -306,7 +306,7 @@ juce::AudioProcessorEditor* AeolusAudioProcessor::createEditor()
306306
}
307307

308308
//==============================================================================
309-
void AeolusAudioProcessor::getStateInformation (juce::MemoryBlock& destData)
309+
void AeolusAudioProcessor::getStateInformation(juce::MemoryBlock& destData)
310310
{
311311
auto state = _engine.getPersistentState();
312312

@@ -318,7 +318,7 @@ void AeolusAudioProcessor::getStateInformation (juce::MemoryBlock& destData)
318318
JSON::writeToStream(stream, state);
319319
}
320320

321-
void AeolusAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
321+
void AeolusAudioProcessor::setStateInformation(const void* data, int sizeInBytes)
322322
{
323323
MemoryInputStream stream(data, sizeInBytes, false);
324324

Source/aeolus/engine.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,10 @@ void Engine::process(AudioBuffer<float>& out, bool isNonRealtime)
498498
while (_remainedSamples > 0 && _interpolator.canWrite()) {
499499
for (int ch = 0; ch < numChannels; ++ch)
500500
_interpolator.writeUnchecked(_subFrameBuffer.getReadPointer(ch)[idx], (size_t) ch);
501+
501502
_interpolator.writeIncrement();
502503

503-
--_remainedSamples;
504+
_remainedSamples -= 1;
504505
idx += 1;
505506
}
506507

Source/aeolus/engine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ class Engine
219219
Level& getVolumeLevel() noexcept { return _volumeLevel; }
220220

221221
/**
222-
* Assign MIDI channel to be used to control the organ stops and sequencer.
222+
* Returns currently set MIDI control channel.
223223
*/
224224
int getMIDIControlChannel() const noexcept { return _midiControlChannel; }
225225

226226
/**
227-
* Returns currently set MIDI control channel.
227+
* Assign MIDI channel to be used to control the organ stops and sequencer.
228228
*/
229229
void setMIDIControlChannel(int c) noexcept { _midiControlChannel = c; }
230230

0 commit comments

Comments
 (0)