Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CsRic committed Dec 30, 2024
1 parent 69fb986 commit 4cde883
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 17 deletions.
37 changes: 27 additions & 10 deletions Akasha/Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ AkashaAudioProcessorEditor::AkashaAudioProcessorEditor(AkashaAudioProcessor& p,
saveButton(std::make_unique<juce::TextButton>("Save")),
loadButton(std::make_unique<juce::TextButton>("Load")),
viewDependencyButton(std::make_unique<juce::TextButton>("View dependency files")),
adsrWidgetPointer(std::make_unique<Akasha::ADSRWidget>(audioProcessor.adsrKernel))
adsrWidgetPointer(std::make_unique<Akasha::ADSRWidget>(audioProcessor.adsrKernel)),
creditLabelPointer(std::make_unique<juce::TextEditor>("credit"))
{
// juce::LookAndFeel::setDefaultLookAndFeel(&customLookAndFeel);
setLookAndFeel(&customLookAndFeel);
Expand All @@ -39,6 +40,13 @@ AkashaAudioProcessorEditor::AkashaAudioProcessorEditor(AkashaAudioProcessor& p,
viewDependencyButton->addListener(this);
// adsr
addAndMakeVisible(adsrWidgetPointer.get());
// credit
creditLabelPointer->setReadOnly(true);
creditLabelPointer->setMultiLine(true, true);
creditLabelPointer->setColour(juce::TextEditor::textColourId, juce::Colour(0xFFC53939));
creditLabelPointer->setColour(juce::TextEditor::backgroundColourId, juce::Colour(0x00000000));
creditLabelPointer->setText("Akasha by Cracking Sciences v0.2.0", false);
addAndMakeVisible(creditLabelPointer.get());
// macros
addAndMakeVisible(macroSliderGroupPointer.get());
// console.
Expand Down Expand Up @@ -98,18 +106,22 @@ void AkashaAudioProcessorEditor::resized() {
juce::FlexBox controlsBoxRight;
juce::FlexBox textEditorBox;
juce::FlexBox buttomWidgetsBox;
juce::FlexBox buttomEidgetsMiscBox;

mainFlexBox.flexDirection = juce::FlexBox::Direction::column;

{
controlsBox.flexDirection = juce::FlexBox::Direction::row;
controlsBox.justifyContent = juce::FlexBox::JustifyContent::spaceBetween;
controlsBoxLeft.flexDirection = juce::FlexBox::Direction::row;
controlsBoxLeft.items.add(juce::FlexItem(*saveButton).withMinWidth(50.0f));
controlsBoxLeft.items.add(juce::FlexItem(*loadButton).withMinWidth(50.0f));
controlsBoxRight.flexDirection = juce::FlexBox::Direction::row;
controlsBoxRight.justifyContent = juce::FlexBox::JustifyContent::flexEnd;
controlsBoxRight.items.add(juce::FlexItem(*viewDependencyButton).withMinWidth(150.0f));
{
controlsBoxLeft.flexDirection = juce::FlexBox::Direction::row;
controlsBoxLeft.items.add(juce::FlexItem(*saveButton).withMinWidth(50.0f));
controlsBoxLeft.items.add(juce::FlexItem(*loadButton).withMinWidth(50.0f));
}
{
controlsBoxRight.flexDirection = juce::FlexBox::Direction::row;
controlsBoxRight.justifyContent = juce::FlexBox::JustifyContent::flexEnd;
controlsBoxRight.items.add(juce::FlexItem(*viewDependencyButton).withMinWidth(150.0f));
}
controlsBox.items.add(juce::FlexItem(controlsBoxLeft).withFlex(1.0f));
controlsBox.items.add(juce::FlexItem(controlsBoxRight).withMinWidth(250.0f));
}
Expand All @@ -125,9 +137,14 @@ void AkashaAudioProcessorEditor::resized() {
buttomWidgetsBox.justifyContent = juce::FlexBox::JustifyContent::flexStart;
buttomWidgetsBox.items.add(juce::FlexItem(*macroSliderGroupPointer).withMinWidth(400.0f));
buttomWidgetsBox.items.add(juce::FlexItem(*adsrWidgetPointer).withFlex(1.0f));
buttomWidgetsBox.items.add(juce::FlexItem(*oversamplingBoxPointer).withMinWidth(180.0f).withMaxHeight(20.0f));
{
buttomEidgetsMiscBox.flexDirection = juce::FlexBox::Direction::column;
buttomEidgetsMiscBox.justifyContent = juce::FlexBox::JustifyContent::flexStart;
buttomEidgetsMiscBox.items.add(juce::FlexItem(*oversamplingBoxPointer).withMinHeight(20.0f));
buttomEidgetsMiscBox.items.add(juce::FlexItem(*creditLabelPointer).withMinHeight(40.0f));
}
buttomWidgetsBox.items.add(juce::FlexItem(buttomEidgetsMiscBox).withMinWidth(180.0f));
}

mainFlexBox.items.add(juce::FlexItem(controlsBox).withMinHeight(25.0f));
mainFlexBox.items.add(juce::FlexItem(textEditorBox).withFlex(1.0f));
mainFlexBox.items.add(juce::FlexItem(buttomWidgetsBox).withMinHeight(180.0f));
Expand Down
2 changes: 2 additions & 0 deletions Akasha/Source/PluginEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class AkashaAudioProcessorEditor : public juce::AudioProcessorEditor, public juc

// adsr
std::unique_ptr<Akasha::ADSRWidget> adsrWidgetPointer;
// credit
std::unique_ptr<juce::TextEditor> creditLabelPointer;

// custom look and feel.
Akasha::CustomLookAndFeel customLookAndFeel;
Expand Down
Binary file added Assets/snapshot_v0.2.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file modified Presets/tutorials/00saw_wave.aks
Binary file not shown.
Binary file modified Presets/tutorials/01saw_wave_velocity.aks
Binary file not shown.
Binary file modified Presets/tutorials/02oversampling.aks
Binary file not shown.
Binary file modified Presets/tutorials/03dc_blocker.aks
Binary file not shown.
Binary file modified Presets/tutorials/04macros.aks
Binary file not shown.
Binary file modified Presets/tutorials/05supersaw.aks
Binary file not shown.
Binary file modified Presets/tutorials/06sinewave.aks
Binary file not shown.
Binary file modified Presets/tutorials/07stereo.aks
Binary file not shown.
Binary file modified Presets/tutorials/07supersaw_stereo.aks
Binary file not shown.
Binary file modified Presets/tutorials/08bit_synth.aks
Binary file not shown.
Binary file added Presets/tutorials/09adsr_pad.aks
Binary file not shown.
Binary file added Presets/tutorials/10beat_control.aks
Binary file not shown.
Binary file added Presets/tutorials/11one_line_music.aks
Binary file not shown.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

The ultimate answer to audio tools.

![snapshot](/Assets/snapshot_v0.1.0.png)
**v0.1.0**
![snapshot](/Assets/snapshot_v0.2.0.png)
**v0.2.0**
## Overview

Focus on the dsp kernel to design your sounds (or patterns, or even tracks) directly in your DAW. Write down your idea in the handy javascrpit.
Expand All @@ -28,10 +28,10 @@ The entry function of `Voice` is `main`, called for each sample point whenever a
|m0~m7|Macro knobs' values in float|
|tempo|Current tempo in bpm provided by your DAW |
|beat|Current beat (the xxx th beat in float) provided by your DAW |
|sampleRate|Sample Rate in float|
|bufferLen|Advanced feature. Ignore it if you don't know.|
|numSamples|Advanced feature. Ignore it if you don't know.|
|bufferPos|Advanced feature. Ignore it if you don't know.|
|time|The time elapsed since your have pressed down the note|
|delta|The time elapsed since last main call (normally = 1/sampleRate)|
|note|The midi ID of the note you just pressed. 0~127|
|velocity|The velocity of the note you just pressed. 0.0~1.0 in float|
|justPressed|Whether this main call is the trigger frame of the note. 0 or 1|
Expand All @@ -42,21 +42,27 @@ The entry function of `Voice` is `main`, called for each sample point whenever a

`main` is called for each sample point at the sample rate. Other functions, classes, and global variables stay there, memorizing their states.

**Hard-coded global constant:**
`sampleRate`: current sample rate. If the sample rate changes, the code will be recompiled.


Check `Presets/tutorials/*` for more tricks.

### Interact


To compile your code, defocus the editor.
Once your code is compiled, up to 16 notes can be pressed simutaneously, each with its own `Voice` instance.

Macro Knobs can be automatically controlled by your DAW.

Please note that all the numbers in the code can be adjusted by right-clicking
and dragging the mouse. The position you click to determines the precision of the change.

### TODO

- 🔥Drawable LFO functions and their UI. Can be used as oscilator shape, modulation source, etc.
- 🔥Support note-off sound by adsr envelope.
- (DONE!✅)🔥Support note-off sound by the adsr envelope.
- 🔥MPE.
- 🔥Legato and glide.
- 🤓Inspector functions and their UI to track variables or arrays.
- (DONE!✅)🤔Oversampling .
- (DONE!✅)🤔Oversampling .

0 comments on commit 4cde883

Please sign in to comment.