Psycle MIDI

Controlling Psycle using MIDI input
written by Mark McComack and updated by Josep Maria Antolín
(mark_jj_mccormak@yahoo.co.uk / ICQ #115046014)
Internal MIDI Implementation v2.3 (Psycle Release 1.8.8)

Contents

  1. Introduction
  2. How do I control Psycle from my MIDI keyboard/controller?
  3. How do I control Psycle from my MIDI sequencer?
  4. Can I use a sequencer instead of the internal Psycle tracker?
  5. Can I mix using Psycle MIDI sounds and other synth/MIDI modules all controlled by my sequencer?
  6. Can I mix using a sequencer with the internal tracker?
  7. How do I see what is going on with Psycle's MIDI interface?
  8. Can I record MIDI triggered Psycle audio using the internal Psycle WAV recording facility?
  9. What can I do if my MIDI sequencer does not support a MIDI sync clock?
  10. Tips & Tricks
  11. Known Bugs
  12. Limitations
  13. Instructions on using special MIDI events

Introduction

Psycle has support for MIDI input events, which provides two features: enter data into the patterns and control Psycle in realtime. MIDI messages can come from other software using a virtual MIDI device or from a MIDI keyboard or controller.
MIDI note on/off messages can be mapped to any generator and instrument across all 16 MIDI channels. Selecting the instrument allows to use it with the Sampler or other machines that use the auxiliary column.
The parameters of Psycle Plug-ins and VST instruments and effects can be controlled by using MIDI continous controller (CC) messages.

How do I control Psycle from my MIDI keyboard/controller?

This is the basic configuration. Select your midi device as the input into Psycle (find this in Psycle settings -> Input/Output tab). Sometimes there will be more than one port for your hardware, such as a MIDI through port and/or a data port.
Also, set the input method as Immediate, so that you don't need to worry about clocks and configuration.
Finally, set the options to select the generator and instrument to the way that better fits your usage. (find this in Psycle settings -> MIDI Controllers tab).
Note: Psycle does not autorefresh the list, so when you connect an USB MIDI device, you will need to reopen Psycle.

Psycle output configuration dialog

How do I control Psycle from my MIDI sequencer?

This is fairly easy once you understand the concept behind. You will need to setup what is known as a Virtual MIDI port. This is a software emulated MIDI input/output port (yes, a port which does both!).
You will need software such as LoopBe or MIDI Yoke to create this virtual port. If using Vista or Windows 7, I recommend using LoopBe, since it is more up-to-date. MIDI Yoke should work fine in Windows XP and offers more ports for free.

Once you have setup this virtual MIDI port you simply select this port as the output of your MIDI sequencer and also select this port as the input into Psycle (find this in Psycle Settings -> Input/Output tab). Depending on the software you use, it can have several ports. It is important to use the same index for input and output.
Note: Psycle does not autorefresh the list, so when you connect an USB MIDI device, you will need to reopen Psycle.
[MIDI Sequencer Out] -> [Virtual MIDI Output Port]
 and
[Virtual MIDI Input Port] -> [Psycle MIDI In]
Psycle output configuration dialog

Select the main input device from one of those available in the Input device listbox. It should match the output MIDI device of your MIDI sequencer.
Then, select the input method Synchronized with MIDI clock.
If you are using a separate device for MIDI Sync (see later for details) then you can select this from the Sync Device listbox, although if you plan to send a MIDI sync clock through the same device as the main input device then you can leave this as Same as Input device.
If you wish to alter the MIDI headroom available for MIDI input (see later for details) then you can do so by entering a value directly or by using the spin buttons to quickly increment/decrement the current value.

Finally, don't forget to setup the way to select the generator and instrument (find this in Psycle settings -> MIDI controllers tab)

Can I use a sequencer instead of the internal Psycle tracker?

Yes, in sequenced mode, the MIDI input can replace the pattern in sending the data. This data is buffered and played relative to the timestamp that it belongs to.

Can I mix using Psycle MIDI sounds and other synth/MIDI modules all controlled by my sequencer?

Yes. Psycle's MIDI support includes time syncronisation code. This allows fairly stable and usable syncronisation between Psycle generated audio and that generated by other synth/MIDI modules. You will need to set the latencies properly, or offset your non-Psycle MIDI/Audio tracks (in your sequencer) to align with the Psycle generator audio, but as long as you send some MIDI sync codes (or emulated sync) to Psycle you should keep the sync between the sequencer and Psycle. This is usually referred to as Transmit MIDI Start/Continue/Stop clock

Some sequencers (CakeWalk included) allow you to send a MIDI Sync Start code when playback is start from any point in the song (not just the very beginning). This is usually referred to as Use Start, never Continue or similar. If your sequencer has this facility it is recommed that you enable this in order to force Psycle to resync with the audio engine every time sequencer playback is initiated.

Can I mix using a sequencer with the internal tracker?

For the most part, the answer is No.
When the pattern view is active, MIDI input is always inmediate instead of synchronized. Also, there is no synchronization between the midi clock and the tracker position (nor does it listen to the BPM, if present)
Said that, MIDI does work while Psycle is playing, so it can be used for live playback to play notes and control parameters with a MIDI keyboard and or controller.

How do I see what is going on with Psycle's MIDI interface?

A MIDI monitor is provided which allows to see the current state of Psycle's MIDI interface. The dialog is shown below with a short explanation of all values:

Psycle MIDI Monitor Dialog
Buffer Used
- The amount of MIDI events currently waiting in the internal MIDI buffer
Buffer Capacity
- The maximum number of MIDI events the internal MIDI buffer can hold (currently fixed at 1024)
Events Lost
- The number of MIDI events purged (not played) from the internal MIDI buffer.
This usually happens when there is a "drop-out" in the audio pipe-line and the MIDI interface decides that the events should be discarded rather than played (because they probably have been delayed too much)
MIDI Headroon
- How much "MIDI slack" is being allowed to account for delayed MIDI messages getting to Psycle (set in the configuration dialog).
Internal MIDI Version
- The descriptor of the currently running Psycle MIDI interface code.
Sync Event Latency
- The amount of milliseconds the MIDI Sync Start message was delayed.
Sync Adjust
- The amount of samples Psycle has accounted for to bring its audio engine in line with the incomming MIDI data.
A negative value here means that some notes may have been purged from the MIDI buffer to regain sync (not too good).
A positive value here means that Psycle had time to wait until it needed to start playing the received MIDI data (good).
Sync Offset
- The current amount of milliseconds that the Psycle audio engine has "lagged" behind the incomming MIDI. This typically should start around 0 and then being greater (negative) if the audio engine "drops-out" at any point. This value is used internally to keep the audio engine in sync with an external MIDI sequencer.
Psycle MIDI active?
- Is Psycle using the MIDI input?
Receiving MIDI data?
- Is Psycle receiving any MIDI data, either on the main device or the sync device?
Syncronising
- Is Psycle currently syncronising the audio engine with the incomming MIDI?
Resync Triggered?
- Has a resync been triggered because the audio engine has been restarted?
Emulated Track Tick?
- Has Psycle received a tracker tick? (CC 123, DATA 1-127). simulates a tracker line change
MIDI Sync Start/Clock/Stop
- Has Psycle received one of these MIDI sync messages?
Emulated Sync Start/Clock/Stop
- Has Psycle received one of the emulated sync messages? (CC 121, 122 & 124)
Ch 1-16
- Shows that data has been received for that MIDI channel (included ALL types of data)
(The channel-mapping table is self-explanatory)

Can I record MIDI triggered Psycle audio using the internal Psycle WAV recording facility?

Yes, it is possible using the record in realtime button in the toolbar. This button will start recording when pressed, and will stop when pressed again. It records all the audio that Psycle itself outputs.
Alternatively, there is also the possibility to use a virtual soundcard or use the feature to record what is playing if the soundcard supports it.

What can I do if my MIDI sequencer does not support a MIDI sync clock?

If your sequencer does not support outputing a MIDI clock, then you can use three controllers to simulate a clock using a standard MIDI track. Place a CC 121 as the first event in the song (preferably leaving a bar gap between it and the next midi event). Then every regular interval (say 1/16th of a bar) place a CC 122. You can send these events through any channel and setting a generator/instrument map is not required. Finally, to stop all sound, place a CC 124 right at the end of your song.

Tips & Tricks

Do not forget to send a midi clock start if using the Synchronized mode. No message will be played until this is done.

The different audiodrivers have different implementations to get MIDI synchronization. Wasapi is sample accurate, Waveout and Directsound depend on drivers and ASIO is block accurate.
Directsound and Waveout accuracy depend on the Operating System and soundcard drivers, and ASIO accuracy is not better because the position is only updated when producing audio.

Set the midi headroom and number of audio buffers/size to the lowest bearable value when working on a particular song (to make things easier to work with). If you experience the occasional glitch then this is not a problem - you are only working on the tune - sync should still be regained within a few milliseconds.
Once you are ready to mix down your song then set the midi headroom and audio settings to larger values (adjust midi sequencer time offsets to take account of this with regards to the other non-Psycle tracks) for this final mix - in order to reduce the probability of rogue system MIDI latency or Psycle audio "drop-outs" during this mix down.

If you mute a Psycle-controlling track in your sequencer and the current generator does not accept note-off messages, then you can (sometimes) press the main Psycle STOP button in to stop all notes and then let the MIDI restart all the others (appart from the track you wanted to mute of course).

For more interesting ways of setting controllers, get a program called CC-Mouse. This little application lets you control two parameters at a time using the mouse. Feed the output of this program into a virtual MIDI port and then through into your sequencer. You can then make smooth sweeps (of say a cut-off) using the mouse and record them in your sequencer!

Limitations

Currently the main limitations of the MIDI input offered by Psycle are relating to the delay in the MIDI getting into Psycle (through Microsoft Windows) and, in a way, any audio engine drop-outs. Audio engine drop-outs are nothing to do with the MIDI interface, and can usually be rectified (or made much better) by increasing the number of audio buffers and/or the size of these buffers.
To account for delays in MIDI messages getting to Psycle the amount of midi headroom (in milliseconds) is user-configurable. If you are experiencing a lot of lost messages and/or poor syncronisation then try increasing this value. The default is 0 milliseconds, but on slower systems or systems that are running a lot of heavy-duty applications concurrently with Psycle, it may be wise to increase this value. This will increase the audio latency, but MIDI will be more stable and predictable.

Instructions on using special MIDI events

PsycleMIDIChart.TXT(raw text)

The parameters of Psycle Plug-ins & VST machines (both Generators and effects) can be mapped via MIDI using the Controllers 126 & 127. They are used together as a "compound controller" to set up a link between any free controller (CC 1-120) and a generator parameter on the channel. For example, to map CC 32 to the channel's generator parameter 15 use:
CC 126, DATA 32 (followed by)
CC 127, DATA 15

It is usually not wise to map recognised MIDI controllers (e.g. Volume is CC 7) to generator parameters, although mapping CC 7 to a generator's Master Volume parameter does make perfect sense!
Note 1: The values of Psycle generators are displayed in Hexadecimal (e.g. 0F in hex is 15 in decimal/sequencer).
Note 2: This only works in synchronized mode.
Note 3: These mappings take precedence to the ones setup in the MIDI Controllers tab in Psycle settings.

'Note Off' messages in synchronized mode can be disabled per MIDI channel using Controller 125, (a value different than zero enables it).

To use effects such as the GoaSlicer you will need to have a track sending tick-sync controllers to give the sync usually provided by the tracker. This is very easy, simply send (any channel, any patch, ...) a Controller 123, DATA 127 on every 1/16th note to simulate the typical required sync. In sequencers such as CakeWalk, you can simply create one bar of this sync pattern and then set the Loop parameter to some high value to ensure this pattern is sent every bar.

Make sure the internal tempo of Psycle matches that of your MIDI sequencer.


Last updated: 21 august 2011