Midi in simple sequencer

midi

#1

Hi
I'm looking into making a simple midi rec looper gate sequencer running over 2 bars.
fonctions would be really basic:
midi sync from DIN input
Rec on via midi switch on/off
Erase real time via midi switch held during playback.
recording of gate events (no different midi notes)
recording of 2 or three midi parameters continuously via knobs.
Anyone has some intel regarding this.

I would start here


How to record knob modulation into a table and play it back?
#2

Hi,

I've made a patch showing the approach I use. It's pretty basic, records one midi note gate and one midi cc. Hopefully it'll get you started!

basic midi recording.axp (11.4 KB)


#3

Thanks a lot for this!
I started to work on it and found this post


that might be more effective to use that, even though I'm not sure it will work with notes getting recorded.


#4

Hi MattilynMattroe, Hi Krikor,

I'm new to this (tables ) so I 'd need some advice concerning this topic :
- do you think possible to make any recorded midi sequence going out automaticaly using the same midi channel as recorded? Even listening all channels, triggering when notes are played on any channel, then playing the result loop in the same channel as the notes were initialy played?
- Do you think it possible to make "several midi tracks" that could listen, record on trigger then play along, using the same table length ?

In fact, this project made me think about what the Future Artist Midi Looper does. I then wondered if it was possible to do the same using the Axoloti board... ( 4 tracks really clever midi looper : https://www.youtube.com/watch?v=LyR8zlP5rLk )


#5

Possible, I think. Up to a point. But maybe not with existing objects.
I've done that with CCs at some point. Having quantized notes would be tricky.

In my setup I have one axoloti running a 4 track midi Looper, each recording a different channel, each with 7 'slots'. It records notes, CCs, bend and touch. Notes can be quantized but only to 16ths. All synced, you can have different bar lengths, but recording is quantized to the bar. You can also trigger all tracks at the same time so it works like one Looper recording 4 channels... But that's with specified channels. The way my objects work makes it hard to have one Looper record any channel.

My set up uses an expanded version of the midi Looper patch I uploaded, this is a one track version with patcher controls (I use a launchpad mini to control the 4 track version):


#6

Did you check out @SirSickSik's polymidiXL object?
Does most things, except for CC's...


#7

I haven't had time to get back to it.
my needs were more simple.
just one midi loop, with overdub, replace, erase, 16th quantize and no quantize, but always linked to a 1 bar, 2 bar or 4 bar loop.
thanks @AndrewChi, I'm gonna get back to it soon and look at the polymidiXL by @SirSickSik


#8

I'ld just use the 8bit table write/play modules as a template for modifying.
eg.
if you have an 8bit array like, you can make a "multitrack" of it by doing:
int8_t array[4][4][64];
in which case you have 4 arrays of 64 length for note, velocity, aftertouch and bend(8bit) (first is track, second is type, third is value).
to write it you could do:
if(inlet_rec1>0){
attr_table.array[0][0][writepos]=inlet_vel1>>20;
attr_table.array[0][1][writepos]=(inlet_note1>>20)+64;
attr_table.array[0][2][writepos]=inlet_after1>>20;
attr_table.array[0][3][writepos]=inlet_bend1>>20;
}
if(inlet_rec2>0){
attr_table.array[1][0][writepos]=inlet_vel2>>20;
attr_table.array[1][1][writepos]=(inlet_note2>>20)+64;
attr_table.array[1][2][writepos]=inlet_after2>>20;
attr_table.array[1][3][writepos]=inlet_bend2>>20;
}
etc..

to read it you could do:
vel1=attr_table.array[0][0][readpos]; (whenever velocity goes high, it means gate goes on and the first high value is held, 0 is off)
pitch1=attr_table.array[0][1][readpos];
after1=attr_table.array[0][2][readpos];
bend1=attr_table.array[0][3][readpos];

vel2=attr_table.array[1][0][readpos];
pitch2=attr_table.array[1][1][readpos];
after2=attr_table.array[1][2][readpos];
bend=attr_table.array[1][3][readpos];
etc.

you could also combine this with the code of the midi note module to make the recording polyphonic by keeping track of which notes are (still) open/closed and whether an array is already playing a note (forcing it to record to the next empty one).

oh, and I just noticed that I already done something like this, check my midi folder for:
"QuneoPoly4Rec_1"
"poly8ARecorder_1"