Looking for two modules

Hello! I’m wondering if these modules are hiding from me somewhere. Here’s what I’m looking for:

  1. A stummer module with longer strum times than the Nysthi’s strummer module.

  2. A module that takes two or more CV inputs, quantizes them to some scale, then decides if they would sound dissonant or not. Sort of … a harmony identifier? Ever better would be if the module could output a variation of the inputs that are in harmony.

I’m probably talking musical gibberish because I’m not really a trained composer. Essentially what I’m looking for is a module to help keep my algorithmic compositions, which are often pretty random, from souring. You would take the output of, say, two sequencers, feed them into this aesthetics enforcer, and the output of the aesthetics enforcer, into two different VCOs.

Like in this patch:

Thanks!
Bret

Something similar is hiding in my drawer!

You could say it is avoiding to be seen.

It is called avoider and your post made me decide to share the prototype in my dev-builds in hopes of getting feedback and a general pressure to finally finish it :slight_smile:

It’s a kind of application of the ‘avoid notes’ idea from music theory.

EDIT : moved explanation to my thread so a possible discussion on it won’t clutter this topic.

Btw “aesthetics enforcer” sounds pretty cool! :slight_smile:

This might be not exactly what you are looking for but could be still interesting: One of @Omri_Cohen‘s tutorials.

1 Like

Not really what you are looking for, but the Frozen Wasteland’s Probably Not(e) - Math Nerd can generate scales, then let’s you quantize notes in that scale based on their perceived dissonance.

1 Like

Thank you so much for the responses! I’ll try out your suggestions, and I’m looking forward to the avoid notes module as well. @unlessgames I’m definitely looking forward to Avoider!

1 Like

I read your thread and love your idea. It might be a little bit different than I have in mind, but I was having a little trouble understanding if the single note was avoiding dissonance with the chord, or if the chord itself was being quantized. I suppose that the former would be more likely.

I was imagining something more like this:

(key/scale control borrowed from Aria just for illustration. Of course the final design would be unique.)

The aesthetic knob would select from an internal bank of common intervals to avoid. The tricky part would be that all inputs would need to avoid “bad” intervals with each other input. Maybe it would start from input #1, which would be free to quantize to any note in the sale, then subsequent inputs would have to be adjusted based on the values of the previous notes.

:slight_smile:

1 Like

Yeah, my module is certainly not the exact thing you have in mind, it does the first thing you said btw, a melodic input (sequence of notes coming in) gets corrected based on allowed intervals in relation to the chord input (a set of notes being inputted over polyphony).

My main motivation was to do something that doesn’t require users to set specific scales (or me to include a database of scales in the module :), but to still have an aesthethic enforcing effect by applying the avoidance rule. If you wanted to lock into a scale, you can always do that later/before with other modules.

Not entirely sure where you are going with this idea of note-by-note application, but I think you can try to prototype similar things with a combination of quantizers that deal with scales and avoider(s), the chord input works with single notes as well if that’s what is missing. Maybe this will lead you to a “whole-package” idea that could be convenient to pack into a single module, but with avoider I want to keep the avoiding logic on its own to create a simple building block for generative stuff.

Folding the separate interval knobs into a single knob that maps various combinations of intervals into one parameter is a good idea, but I’m still not sure, it might make the module more cryptic than it has to be, but it would also make it more playable.

Totally agreed with all your points. And I see a home for both flexible modules and the “whole package” idea. Maybe I’ll try using the Prototype module to play around with my idea. But I’ll certainly explore your module as well if you complete it. Keep up the awesome work!!

1 Like

I don’t have time to implement it anytime real soon, but I am interested in creating something along the lines you have sketched. My interest was more for creating counterpoint-like lines of melody, but I would not try to implement the formal rules of counterpoint per se.

Thanks! I’ll keep you posted. I’ve built a few modules too, so I might be able to build it if you don’t have time.

LOL I got it, the mod use just recognizes diminished 5ths & 1/2 steps. Pretty much everything else is fine.

If you talk about the vid I’ve posted yes, that is how it’s set up by default, but it is also interesting to turn the knobs to avoid more consonant intervals like major 3rds or perfect 5ths :slight_smile:

If a new module comes out with an AESTHETICS knob and doesn’t end up used to make vaporwave music, i’m gonna be very sad :sweat_smile:

2 Likes

dissonance, as you might expect, isn’t very narrowly defined. Within well tempered scales, the only intervals that could described as intrinsically dissonant would probably be a minor second (1 semitone) and a tritone/diminished fifth (6 semitones). However, it’s very much context dependent since, for example, a dominant seventh chord (e.g. C E G Bflat) has a tritone in it. A minor second are often found in jazz chords, e.g. 11th or 13th chords. A major 7th is a minor second where the lower note is an octave up. A major fifth may seem dissonant if it’s placed are placed between two chords (sequence dependence), but the sequence of playing a major scale includes two minor seconds.

This is all just to say that the thing you’re discussing doesn’t have any one way to implement it. Excluding minor 2nds and tritones is certainly possible and would probably make for some cool patches.

This is why I’ve gone with the “chord is the context” way with avoider: It will leave in the chosen intervals if they are in the current chord and avoid them only if they aren’t.

If you think the exclusion of m2 and TT might make for cool patches and are willing to try stuff that isn’t polished yet, I’d love to hear your feedback on it! details and downloads here

1 Like

This might be helpful to people. I used JW’s quantizer code to create a super stripped down quantizer in Javascript for use in the Prototype module. It seems to be working. I’ll be experimenting with ideas using this code and report back. :slight_smile: I wonder if there are other types of rules that might be helpful for note selections over time. Please forgive my ignorance about music theory. I probably won’t be able to keep up if the conversation gets much deeper.

// Simple quantizer using the Aeolian scale and excepts from JW Module's
// QuantizeUtils closestVoltageInScale() function, but ported from C++ to
// Javascript.
//
// Disclaimer: I'm not a javascript programmer
// Using code from: https://github.com/jeremywen/JW-Modules/blob/master/src/QuantizeUtils.cpp

config.frameDivider = 1
config.bufferSize = 1

// rootNote
//
// This is hard coded just for simplicity, but in any real applilcation, you'll
// want a way to set this.  in JW's original code, it's set using an input like:
// int rootNote = params[ROOT_NOTE_PARAM].getValue() + rescalefjw(inputs[NOTE_INPUT].getVoltage(), 0, 10, 0, QuantizeUtils::NUM_NOTES-1);
// Where NUM_NOTES == 13

var rootNote = 0

// Since this is just a proof of concept, I'm only implementing the Aeolian scale
const SCALE_AEOLIAN = [0, 2, 3, 5, 7, 8, 10, 12];

// This is the main loop
function process(block) {

  // Get the 1/v input
  let input_1 = block.inputs[0][0]

  // Quantize the input
  input_1 = closestVoltageInScale(input_1, rootNote)

  // Output the quantized input
  block.outputs[0][0] = input_1
}


function closestVoltageInScale(voltsIn, rootNote)
{
  // In JW's original code, this was derived from the selected scale.  Since
  // I'm only focuse on Aeolean for this example, I have a luxury of hard-coding
  // the notesInScale to 8.

  let notesInScale = 8;  // 8 notes in the AEOLIAN scale

  //C1 == -2.00, C2 == -1.00, C3 == 0.00, C4 == 1.00
  //B1 == -1.08, B2 == -0.08, B3 == 0.92, B4 == 1.92
  let closestVal = 10.0;
  let closestDist = 10.0;
  let scaleNoteInVolts = 0;
  let distAway = 0;

  let octaveInVolts = Math.floor(voltsIn);
  let voltMinusOct = voltsIn - octaveInVolts;

  for (let i=0; i < notesInScale; i++)
  {
    scaleNoteInVolts = SCALE_AEOLIAN[i] / 12.0;
    distAway = Math.abs(voltMinusOct - scaleNoteInVolts);

    if(distAway < closestDist)
    {
      closestVal = scaleNoteInVolts;
      closestDist = distAway;
    }
  }

  var voltsOut = octaveInVolts + rootNote/12.0 + closestVal;

  return voltsOut;
}

1 Like

Cool, good luck!

And don’t worry about your knowledge in music theory! “Modulifying” concepts is a good way to help your understanding! It certainly does it for me! In case something that is being said is not clear though, feel free to ask, but I might not know the answer :slight_smile:

Another concept that relates to “notes over time” is embellishing notes, basically notes that can go between two other, more important notes (like those of the main melody etc), here is a nice little reference for variations.

A module that inserts stuff like these between an incoming melody could definitely be interesting imo.

1 Like