Name Midi Controller2
Created At 2024-11-17 6:31pm
Submitted By Menno0
Description

DESCRIPTION:

This is a Midi Controller data recorder and player. Midi Controller1 records and plays Midi Controller Data. You can set the resolution of this device in Device Data Range, this is 128 as Midi 1.x has a resolution of 128.
CC number and start/initialization values should be given.
A name should be entered; this name is used to send the Midi data globally, i.e. as gkxxxx signal.
Other, higher numbered Instruments can pick this Global data up. In that particular Instrument, the range of the Midi data (0-127) can be scaled at will and, if needed, interpolated.

When recording the midi controller data, set the length of the SoundObject and the resolution you want to record in; both are in seconds. Length and resultion go hand in hand. These values are needed so that, on playback,
the SoundObject's length and resolution can be used to scale.
Be sure to have the Midi Controller on the Timeline above the ScoreObjects of the Instruments you want to influence with the Midi Controller.

Midi CC data are global: they have an influence on ALL notes of that Instrument as they are used to control the parameters of the Instrument.

Most of the time, Midi Controller and the ScoreObject make up a pair; moving and scaling them together ensures the expected behavior.

When setting a name as outputfile for recording, the format of the name is as follows:
NAME + LENGTH OF SOUNDOBJECT JOYSTICK CONTROLLER + RESOLUTION
length of SoundObject and resolution are in seconds.

In the Instrument you want to influence with controller data, here is basic example to add to the Instrument:

imiditotal = 1/128 ; midi rsolution
kmass_scl scale gkxxxx, 2*imiditotal, .02*imiditotal ; scale midi values to usable range and let it influence the .02-2 range
kPortTime linseg 0,0.001,i() ; if needed, create a value that quickly ramps up to .01 for better response and interpolate the controller values
kmassscl portk kmass_scl, kPortTime ; range 0.02 - 2

a1 poscil3 1, kmassscl*200 ; make some noise

First set the switch to 'write'. Run Blue. Then set switch to 'play' and the controller data are played back. There is an optional printing to see what is happening.
Plotting the controller data can be used if you have GNUPLOT installed.

Portamento can be set in your instrument but is optional. It does help to smooth out the poor resolution of the Midi Controller and avoid sudden jumps between controller data values.

CONTROLLERS:

see the help balloon when hovering over the controllers in the instrument. Help can be turned off by pressing the 'I' button next to the play bar.

---

version 1, November 2024
- initial version