Questions about MIDIpal LFOs

Hello -
I’m working on some stuff and have some questions about the MIDIpal LFOs.


In the manual it says: "Center value of the Nth LFO. For example, if the modulation amount is 40 and the center value 70, the LFO will oscillate between 70 – 40 = 30 and 70 + 40 = 110."
What values would I use for center value and modulation amount if I wanted to go from zero to 127?
Would it be: center value 63 and modulation amount 64?
I guess I’m wondering if -1 wraps around to 127.
( 63 - 64 = -1 )

During the period of the LFO, does the square waveform send 2 CCs only
(at the beginning of the cycle,
center value minus modulation amount
and then, halfway through the cycle,
center value plus modulation amount)?
Or does it send several CCs along the way?

Where in the waveshape/CC-values do the sine and triangle shapes start?
because I was wondering if I could approximate a quadrature LFO (like a Doepfer A-143-9, but MIDI CCs instead of CVs).
It would be 2 different waveshapes, but still could be useful.
I can get an LFO and an exact opposite LFOout of the MIDIpal.
I think if one shape starts at zero and the other shape starts at the center value, then a quadrature could be roughly approximated.


well, while I was typing it, it looked neater. Some of the spacing is jammed together, but the words are all there.

Just realized modulation amount only goes to 63. . . .
0 - 126
it is. That answers my first questions?

  • Values are clipped (If you set center to 100 and amplitude to 30, values above 127 will be clipped to 127, they won’t wrap around).
  • Data is sent at each MIDI clock tick, even if the waveform has stayed at the same level as at the previous tick (so there will be more than 2 messages per period for a square).
  • Do you want me to make the amount go to 64?

Clipped, not wrapped. . . got it.
The modulation amount’s fine as long as I know what it is, so I can work with it accordingly.

You say “at each midi clock tick”.
Is that affected by the “resolution of the LFO clock”?
For example,
if the resolution is set at “/96”, will that send 96 CCs per quarter note (4 times the actual midi clock)?
If the resolution is set at “/24”, will it send 24 CCs per quarter note?

If that is the case. . . .
Let’s see. . .
a triangle wave goes up and down
full range would be 128x2=256 (disregarding that the mod amt only goes to 63)
The longest LFO is 4 bars (or 16 quarter notes)
So you’d need a resolution of "/16"
to get a four bar triangle LFO with all CC values sending and without too many duplicates

Also - where in the wave shape (or what value) does the sine and triangle start at
the center value?
center value minus modulation amount?
do they all start at the center value?

thanks again

I’m pretty sure data is sent per specific midi clock tick, not by the internal division of said clock, so one gulp of data per incoming midi clock tick is all you get, otherwise you could overload synths that don’t deal properly with “tick floods” … I don’t think that this has ever been a problem, but I remember some newer synths put out a ton of midi messages, which sometimes confuse/hang/disable/overflow older synths… Something I am sure Olivier has avoided… :slight_smile:

So CCs are always sent at 24 ppq; cool.
I am using some older stuff and some of it gets bogged down and/or weird.
But I am routing things to avoid some of that.
My main set-up is getting MIDI involved,
and I just get curious to know what’s coming and going through the wires,
and it’s good to have some specificity to go by when doing odd experiments like “this”: (which I did get to work just knowing there’s an LFO coming via MIDI CC).

Anyhow, now I’m not sure I get the resolution setting.
I suppose that creates stepped LFOs from the various shapes, but still sends them at 24 ppq.
Makes me wonder why you might ever use resolutions “/32”, “/48” and "/96"
since the CCs will never get sent at that high of a resolution.

well that link is formatted wrong. damnit

Yes sometimes textile ins’t handy…

When entering links or pictures, preview is your friend…

I have nothing against making theories about how code works, but it’s a pointless exercise because the code is there for you to see.

The data is sent at the subdivision of the MIDI clock tick you have chosen in the “resolution” parameter. So if you chose a slow subdivision (for example /4), the data will be very sparse… This feature is primarily there to prevent older synths from being overload by a very dense data stream, but it can also be used to create stepped modulations.

This setting is expressed in musical units. /4 = a CC per quarter note. /16 = a CC per sixteenth note. /96 = six CC per sixteenth note = twenty four CC per quarter note, that is to say, the maximum MIDI resolution (one CC per clock tick).

Triangle starts at the negative value ; sine-wave starts at mid-level.

Oooh, so it is possible to overload old synths using a midipal? In that case, disregard anything I’ve said >_>

The MIDIpal has no way of knowing if the synth it is connected to is resilient to “dense” CC streams. If you observe glitches, reduce the resolution.

Here’s the link I was attempting.
Apparently, only the quick reference for Textile is correct.

@pichenettes, you’re the best.
What language is the code written in?
I should learn that.

slaps forehead now I get what I did with the Textile code. ha