Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7

Merged
merged 2 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ Load Lattices in your DAW, alongside some compatible instrument of your choice.
By default, Lattices will tune your synths, to a Just Intonation scale known in many places in the world under different names, but which I'm calling [Duodene]( http://www.tonalsoft.com/enc/d/duodene.aspx).
The Lattices graphic you see represents the infinite pitch space of Just Intonation. The red sphere reading 1/1, represents the tonic (C, by default). Horizontal neighbors are a fifth apart, diagonally up-right is always a major third up, down-right a minor third up. (Octave-reduced... blablablabla, this text will be improved eventually)

You should see a pattern of twelve spheres near the middle which are lit up (while the rest are dimmed). That's the 12-note (octave-repeating) Duodene scale which currently will be sent to your synths.If you've never played in it before, you can quickly discover the (subjective) upside and downside it has over the common 12-equal tuning: Play a C major chord followed by a D major chord. Assuming everything has loaded and connected correctly, the C should sound extremely stable and the D should sound distinctly challenged.
You should see a pattern of twelve spheres near the middle which are lit up (while the rest are dimmed). That's the 12-note (octave-repeating) Duodene scale which currently will be sent to your synths.If you've never played in it before, you can quickly discover the (subjective) upside and downside it has over the common 12-equal tuning: Play a C major chord followed by a Bb major chord. Assuming everything has loaded and connected correctly, the C should sound extremely stable and the BB should sound distinctly challenged.

Send Lattices a momentary trigger message (max value for a short moment) at MIDI CC 5 on channel 1. The lit-up section on the lattice should move one step to the west. Now the D chord will sound stable! :)
Send Lattices a momentary trigger message (max value for a short moment) at MIDI CC 5 on channel 1. The lit-up section on the lattice should move one step to the east. Now the Bb chord will sound stable! :)

Some other chord will now sound out-of-tune instead, but that's ok! The point is, in anticipation of a sour chord, we can shift the mapping around. This way we can make perfectly in-tune music using more than 12-notes, but using common 12-note tools! This invites new ways to explore harmony. Etc etc blablabla. More to come. :)
Some other chord will now sound out-of-tune instead, but that's ok! The point is, in anticipation of a sour chord, we can shift the mapping around. This way we can make perfectly in-tune music with more than 12-notes, but using common 12-note tools! This invites new ways to explore harmony. Etc etc blablabla. More to come. :)

Other usage notes:

- "Origin" tab bottom right has controls to select which note is the 1/1, and which frequency it should have. (Changing root note also sets the frequency to that currently held by that note).
- "Tuning Settings" tab bottom right has controls to select which note is the 1/1, and which frequency it should have. (Changing root note also sets the frequency to that currently held by that note). It also has a mode switch which requires some more explanation... will get to it eventually.
- "Midi Settings" bottom left lets you choose which CCs trigger the tuning changes. "Home" here means "return to where we startred"
- "Mode" top left requires some more explanation... will get to it eventually.

For now it only does 5-limit tuning. But the default Duodene mode will eventually will allow interdimensional visitors. :) Pythagorean mode may even allow some tempered tunings eventually! Stay tuned!
For now it only does 5-limit tuning. But the default Duodene mode will eventually will allow interdimensional visitors. :) Stay tuned!


## Lattices is currently in Alpha.
Expand All @@ -40,15 +39,12 @@ Here's what that means in this case:
- The overall design is pretty finished, but almost every feature is still very half-baked.
- The process of baking them is still pretty volatile! Everything is subject to change!
- Streaming stability is a definite maybe. This is not as dangerous with an MTS-ESP plug as with a synth (and no current features will be outright removed), but still, know that stuff will change and loading an old project with a new version may not work.
- Many planned features are missing. I will make an issue list here soon with planned features. Check that before making feature requests (feature requests are welcome though).

This project may soon become a Surge Synth Team product (should the team consent). Otherwise will stay here.

- Many planned features are missing. The issue list here has the planned features mostly sketched out. Check that before making feature requests (feature requests are welcome though).


## Building

This works on Mac and Linux! No idea about Windows. Help appreciated!
This works on Mac and Linux. Probably on Windows. You can also grab a nightly build from releases.

```
git clone https://github.com/Andreya-Autumn/lattices.git
Expand Down
11 changes: 6 additions & 5 deletions src/LatticeComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,6 @@ struct LatticeComponent : juce::Component
x + ellipseRadius, y, false);
}

// Names or Ratios?
// auto [n,d] = calculateCell(w, v);
// auto s = std::to_string(n) + "/" + std::to_string(d);
std::string s = jim.nameNoteOnLattice(w, v);
// Spheres
juce::Path e{};
e.addEllipse(x - ellipseRadius, y - JIRadius, 2 * ellipseRadius, 2 * JIRadius);
Expand All @@ -194,6 +190,11 @@ struct LatticeComponent : juce::Component
b.addEllipse(x - ellipseRadius - 1.5, y - JIRadius - 1.5, 2 * ellipseRadius + 3,
2 * JIRadius + 3);

// Names or Ratios?
auto [n, d] = calculateCell(w, v);
auto s = std::to_string(n) + "/" + std::to_string(d);
// std::string s = jim.nameNoteOnLattice(w, v);

if (sphereLit)
{
whiteShadow.render(lS, e);
Expand Down Expand Up @@ -289,7 +290,7 @@ struct LatticeComponent : juce::Component
juce::ReferenceCountedObjectPtr<juce::Typeface> Stoke{juce::Typeface::createSystemTypefaceFor(
LatticesBinary::Stoke_otf, LatticesBinary::Stoke_otfSize)};

juce::Font stoke{juce::FontOptions(Stoke).withPointHeight(JIRadius)};
juce::Font stoke{juce::FontOptions(Stoke).withPointHeight(JIRadius - 3)};

juce::Colour com1{0.f, .84f, 1.f, 1.f};
juce::Colour com2{.961111f, .79f, .41f, .25f};
Expand Down
4 changes: 2 additions & 2 deletions src/LatticesEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <memory>

#include <juce_audio_processors/juce_audio_processors.h>
#include "melatonin_inspector/melatonin_inspector.h"
// #include "melatonin_inspector/melatonin_inspector.h"
#include "LatticesProcessor.h"
#include "LatticeComponent.h"
#include "ModeComponent.h"
Expand Down Expand Up @@ -49,7 +49,7 @@ class LatticesEditor : public juce::AudioProcessorEditor, juce::MultiTimer
static constexpr int width{900};
static constexpr int height{600};

melatonin::Inspector inspector{*this};
// melatonin::Inspector inspector{*this};

juce::Colour backgroundColour = juce::Colour{.5f, .5f, 0.f, 1.f};

Expand Down
Loading