MIDI Input Histogram Capture / Random Play

Builds a histogram of notes played and creates partial scales based on a random probability test of the histogram. Each bin (one for each tone of the 12-tone chromatic scale) stores the velocity and the octave. Playback is controlled by the Arpeggiator Box, designed to control two histogram players.

This patch hooks up two Histogram players and an Arpeggiator Box to my White Key Scale MIDI Converter, so I can easily put interesting scales into the player with the convenience of using the black keys as controls: C# and Eb to put the histogram players into record mode, F# to clear, Ab to pause, and Bb to re-sync channels or set a delay on one channel. (All black keys map the same way in the white key scale player.)

New in this version is the ability to play progressions.

You choose a scale to play through by selecting it and pressing the flashing button.

The white key thing just makes it easy for non-piano players to play in-scale.

The same flashing button feature is used on the clock source module so that you can set up a new clock frequency and launch it only after it’s all dialed in.

The big patch features a resonant bell synthesizer and a “windy” or “whistling” bandpass biquad filter-based synthesizer.

The Allpass Ring Reverb (from the standard library, but squished down to fit in my packed patch) gives a mellow background vibe.

You can set up interesting and more natural-sounding rhythms by re-syncing one channel that’s recording relative to the other that’s not. If both channels are recording, then the sync process restarts the pair’s master clock without affecting channel-to-channel delay. Delay can be set by either turning a knob (knob delay) or by tapping a note or reset pulse while the patch is playing (live delay.) A zero button sets the channel-to-channel delay to zero.

A major addition is progressions. The histogram distribution display rotates the scale to put the current degree of the progression into slot one.

Histogram Player Progression-2 voice 26.10.26.01.audulus4 (1.6 MB)

A much simpler DEMO is here:

Random Tones by Histogram DEMO 26.09.26.01.audulus4 (1.2 MB)

A movie of it working, “black keys” scale in C-sharp (this on google photos: a discord version was uploaded directly):

Histogram Player:
Screenshot
The Histogram Player modules create scales
with 1 to 12 tones, each tone represented by
a bin in the histogram. By “rolling the dice,”
the player module creates new scale subsets
to play by sampling play history stored in the
histogram, producing a custom scale at each roll.”
Arpeggiator Box:
Screenshot
This module controls two Histogram Player modules, enabling recording and immediate
looping playback of arpeggios or random
tones produced by sampling the play-history
histogram.

The arpeggiator box module issues the “roll!”
pulses and uses the scale length returned,
along with user input, to determine tones/beats
per measure.

Various timing choices are possible. The custom
scale returned by the histogram player determines
what notes will play. That scale’s length (number
of tones) can set the number of beats per loop, or
a fixed value can be chosen. The mix of fixed or
scale-derived beats is set by the %Fixed knob.

Tempo can be increased for either channel,
allowing a fixed number of loops per measure
from 1 to 17 by adjusting the pace knob.

Trigger pulses from the “trig” outputs pass through the velocity (amplitude) of the gate pulse from the MIDI keyboard. Triggers can be randomly output or muted with a 0% to 100% range. Gate width/sustain can be set from minimal to the full note duration by adjusting the “hang time” knob, the original velocity value setting the height of the gate pulse.

Channel-to-channel Delay

Knob Delay
To allow a little “feel,” a channel-to-channel delay can be set for one channel by setting a knob (endless knob module) to the amount of delay desired. Top dead center gives no delay. Rotation to the left delays channel A and rotation to the right delays channel B. Delay set by the knob is displayed inside the knob in red, in 32nds of a measure. The knob pointer remains at that set position. The delay in seconds is displayed below the knob.

Live Delay
As an alternative to “knob delay,” you can set delay by feel by hitting a note or pulse the sync input at the time you want the channel to play. I’m calling this “live delay.” With the desired channel only in REC(ord) mode, you apply the sync pulse at the time you want that channel to play, or you can do it at the keyboard by tapping the “gate” button, then hitting any note at the time you want that channel to play. The live delay is displayed in blue over the delay knob, and the knob pointer is set to the ”knob delay” equivalent position. The delay in seconds is displayed below the knob.

Channel-to-channel delay can be reset by tapping the “zero” button directly below the delay knob.

Again, this applies only when one channel is in REC mode. For all other cases, doing the above steps will reset the master clock time, leaving any channel-to-channel delay intact.

Roll Hold
The “Roll!” pulse for a channel can be held for an integer number of loops, rather than once every loop, keeping patterns over multiple measures.

Arpeggiation styles
Scale tones can arpeggiate starting with the root, heading up, or with the last tone, heading down, or starting at a random tone, up or down. It can also run with random tones. These five arpeggiator modes can randomly switch when the channel performs a “roll” or can be set manually.

Progression section:
Screenshot
Steps through up to 16 progression steps
over three octaves, with one high tonic. Knob sets
the number of steps.

The knob values are fed in from a separate knob
array module, via a 16-channel poly connection.

The number of tones used in calculating
degree of scale are set at the #scale length input.

(note: Only degree 1 is available at octave 2)

Display colors:
red for -1 octave
green for middle octave
blue for +1 full octave
violet for +2 octaves

Progression progresses with each clock cycle.
Pause: stop at the current step.
Reset: move progression to before step 1.

This is the array of knobs. Separate so you can save favorites.

Scale Selector:

This is a rework of my older selector, this time with a “mode” knob that allows scale rotation so you can create modes on any scale. Displayed are preliminary, output at “p#,” and final, output at “#f.” The button sets the final to match the preliminary. A canvas lookup is used to name the scales, with standard mode names for diatonic scales and a rotation number for non-diatonic scales, such as the major pentatonic. The length of the current scale, used for the progression feature of the histogram players, is output at “L#.”

4 Likes

Here’s an improved demo, with a button to latch in a new key, and with the red/green theme on the midi histo sampler (green means green light to soloing over a pattern. Red means we’re sampling the pattern).

Scale by Histogram polyoctave.audulus (677.1 KB)

I tried adding polyphonic soloing, but I obviously need to relook at that functionality in Audulus. Things were getting overloaded when I tried adding a midi keyboard in a poly mode to the soloing synth.

2 Likes

This is awesome and wild as usual! Thanks for sharing @dcLargo! :slight_smile:

1 Like

Thanks! The gauntlet was kind of thrown with the marble thing. I just couldn’t leave it alone until I got the multi-octave part done.

2 Likes

We have an amazing user community! It’s really all the dedicated Audulus users that make this such an exciting product. It seems that no matter what area of musical synthesis you choose, someone is working on an Audulus patch. We all owe a debt to @Taylor for such a wonderful toolkit. I’m really looking forward to all the improvements in the pipeline.

6 Likes

I’ll say! Audulus is a lovely sandbox!

4 Likes

Audulus be praised!

3 Likes

Awesome! I’m happy this tool has it’s own thread. Thanks for posting this awesome module :slight_smile:

1 Like

I’m having fun playing with this thing! Here’s a two-voice demo, with all the messy counters grouped into neat little boxes. I was looking at effects, but these little synths are so awesome I settled on a little reverb instead.

Scale by Histogram polyoctave–2 voice.audulus (1.4 MB)

2 Likes

Exploring some possibilities. I added a clock divider for sampler #2 and tried clocking the playback on the 180 degree output. Gives a bit of a lilt to it. Alse added octave adjusters for each sampler output.

Scale by Histogram polyoctave–2 voice.audulus (1.5 MB)

3 Likes

Wow, I have no words.

2 Likes

I’m working on a version of this which sets a maximum count for any one bin and once that point is hit on a bin, subsequent hits on that bin instead toss hits from all other bins. This should make the sampler more responsive as you pile on hits. First hunch is that 25 hits should be the cutoff, giving a minimum change of like 4%.

3 Likes

This version of the module introduces a limit on bin size to maintain responsiveness as you play. Maximum bin size is set by applying an integer at binMax. Default is 100.

Random Tones by Histogram v12.12.18.1.audulus (425.3 KB)

When the count of hits in a bin reaches the value binMax, its count stops at binMax. If a bin sitting at that max number of hits receives another hit, the other bins are decreased by one, giving the bin just hit more prominence.

Here’s the demo:
Scale by Histogram polyoctave–2 voice.audulus (1.6 MB)

This demo used a minor mod to my tap tempo module, which sets the g output to zero initially, to avoid triggering playback before the tempo has established.

Don’s Tap Tempo v12.12.18.1.audulus (70.8 KB)

2 Likes

I just posted my latest “Autoplay by Histogram” work at the top of this topic. I fixed a lot of little mistakes and made an arpeggiator module to run two of 'em. Several arpeggiation options in there. The modules have pretty detailed writeups in their patch description fields.

The topic is years old but I got this wild desire to finish it.

I uploaded a simpler demo and a more complicated-looking (but easier to use) patch:

Everything is working pretty smoothly now. Kind of soothing sound if run at slow tempos.

Okay, I put in my wishlist item: Dancing lights! White means it’s in the current scale. Blue means it’s playing.

Same major internal and external changes as the upload yesterday.

Big one:

Scale by Histogram polyoctave–2 voice 25112301.audulus4 (775.4 KB)

Demo:


Random Tones by Histogram v25.11.23.1 DEMO.audulus (528.9 KB)

I just uploaded the initial post for these modules to the very latest version, with a big patch and a demo. This movie is there, too.

This is the same patch I put on discord.