- Controlling/Tweaking Generators and Effects
---------------------------------------------

	Tweaking a machine from the pattern is changing the value of its knobs to
	another one.
	This way, you can control the machine in realtime (playback).

	To do so, you use the TWEAK command. You see it like "twk" in the note Row.
	You can also use the TWEAK SMOOTH command.  It is displayed as "tws" in the
	note Row.

	"tws" differs from "twk" in the manner that "tws" smoothly alters the parameter
	from it's CURRENT position to the position during the time of one line in the
	pattern; "twk" happens instantaneously.  "twk" is useful for parameter changes
	and initializing knobs at the beginning of your songs, and uses very little
	overhead; "tws" is usefull for smooth filter sweeps, fades, swells, etc, as it
	essentially sends an interpolated twk command every 64 samples.


- How to insert the TWEAK or TWEAK SMOOTH command in the Pattern
------------------------------------------------

	If the following is a pattern Row,

	Description:   (1) (2)(3) (4)
	Pattern Row : ---- .. .. ....

	then, on (1) , you insert the TWEAK command. To do so, you should press the TWK key.
	When doing so, the word "twk" will appear.  There is a separate key for "tws".

	\\\	The twk key differs from different keyboard languages, but you can Configure
	///	it in the Keyboard Settings DialogBox (Configuration-Settings, and there the
		"Keyboard and Misc." tab)


	On (2) , you define the Controller/Parameter you want to change. Later in this
 	document it is explained how you can know this number.

	On (3) , you specify the number of the Machine, just like you do to enter notes.
		This number is the one shown in the combobox, or in the machine's dialog.


	Finally, on (4), you specify the Value that the parameter will take. There are
	little differences between tweaking a Native Plugin and a VST plugin. Look further on
	this document to know them.

	Example:

		twk 05 42 0067  05 Indicates Parameter 05
				42 Indicates Effect Number 2
				0067 Indicates the value

	--> Psycle can fill tweaks for you, using its interpolate option. Put the start value at
	the start line, the end value in the end line, select all the rows between them plus them both
	and select Interpolate in the rightclick popup menu. This is very handy for smooth
	sweeps with tws.

	--> You can also make psycle record your tweaks live, either with mouse or MIDI:

	1) Go to the config/keyboard dialog, and make sure you have either tws checked if that
	is the mode you would like to record.  If you want to record twk commands instead,
	uncheck it.

	2) Make sure you have "record tweaks" checked in the right under the sequencer.

	3.1) To record tweaks with mouse:

	* Open the gui for the machine you want to record tweaks from.

	3.2) To record tweaks with midi:

	*) Go to the Midi Controllers menu, and set up the controller and range of information
	that you want to record.  You will need to know the parameter number for the machine
	you are recording.
	If the (VST) machine allows it, you might preffer to use "Record RAW MIDI Commands".

	4) Go to the pattern editor and arm the track you want to record in. (Select the record button
	   on the track header)

	5) Make sure you're in edit mode (See the record button in the playback toolbar, or the word "Edit"
	    down right in the status bar).

	6) Press play and start tweaking.


- Knowing the Parameter number of a Machine
-------------------------------------------

	You have different ways to know the parameter number of one plugin.

	* The easiest one is selecting "Params" in the "Params/Instrum", combobox.
	  This way, the next combobox will be updated with the parameter list of the current
	  selected machine.
	  The selected number will automatically be added to the pattern when doing twk.

	You could also know it by:
	* With Native Machines:
	  Opening the parameters' windows and right clicking over the parameter you want to
	  change.This will pop up the "Tweaking" dialog.
	  On the titlebar of this dialog, you will see a number in HEX. This is the number
	  of the parameter.
	  Also, in this dialog, now you have a complete "twk" line that shows you the value
	  that you'd use to set this parameter to the current value.
	  There's also the parameters View, like with VSTs.

	* With VST plugins:
	  Opening the parameters' View, you have the option to show the parameters list
	  via the "View" Menu. This will popup a window with a list of the parameters
	  numbered in HEX. This is the number you need.


- Knowing the Right Value
-------------------------

	There are differences between VST plugins, Psycle plugins and internal plugins:

	* VST Plugins:

	  They have a fixed range. 0 is the smallest value, and FFFF is the biggest.

	* Psycle Native Plugins:

	  They have a range defined by the knob. You need to move the knob to the
	  desired position and right click over it to open the "Tweaking" dialog, which shows
	  you an editbox to put a value manually, and also a complete "twk" line that
	  you'd use to set this parameter to this value.

	  Advise: As you'd see, if the knob's minimum value is not zero (Like, with the VCF Envmod),
	  0 = min value

	* Psycle Internal machines:
	  Use the same procedure than with Native plugins.


- Mcm Command 1. Send MIDI commands (like Control commands) to control Plugins (80 to FF)
--------------------------------------------------------------------------

	The Mcm command works in a similar way than the Twk Command:

	If the following is a pattern Row,

	Description:   (1) (2)(3) (4)
	Pattern Row : --- .. .. ....

	then, on (1) , you insert the Mcm command.
	To do so, you should press Mcm key. Check and/or change its value in the Keyboard
	Configuration dialog (Configuration-settings).

	On (2) , you define the Midi command number that you want to send.
	You might need to check some MIDI documents and/or the Plugin's help to know what
	to write in here.

	On (3) , you specify the number of the Machine, just like you do with tweaks.
		This number is the one shown in the combobox, or in the machine's dialog.

	Finally, on (4), you specify the Value to send for this midi command.

	(4) is divided in two groups of two values AABB.
	Some commands might only need AA.

	Usually, you'll use it to send midi CC's. CC Command is "B0".
	Example, this sets the machine volume to half of it:

		Mcm B0 01 0740
				B0 Send a midi CC (Control Change) command (MIDI channel 1)
				01 to the Generator number 1
				07 in order to change CC7 (channel volume on most synths)
				40 to 40 (in a scale of 0 to 7F, HEX)


- Mcm Command 2. Send a command to a desired track. (00 to 7F)
-------------------------------------------------------------------

	The Mcm command can also be used for another purpose with both, Native and VST plugins.
	It allows to send a command to another track. This way, you can workaround
	the limitation where you can only put one of them per track.

	Syntax is as follows:

	If the following is a pattern Row,

	Description:   (1) (2)(3) (4)
	Pattern Row : ---- .. .. ....

	on (1) , you insert the Mcm command.
	on (2), insert the channel (track) number where the command will be sent to.
	on (3), insert the machine number
	on (4), insert the command that you want to send.

	Example: Send command 0C50 to channel 02 of machine 06:

		mcm 02 06 0C50


- Pattern Commands
------------------

	Psycle also allows to use some "old school" commands in the command row.
	The currently supported ones are:


	* Global/Tracker Commands:

	  FFxx	-	Change BPM
	  FExx	-	Extended command:
	  	FE0x
	  	FE1x 	Change Lines Per Beat. Resets Song Extraticks (FEEx)
	  	FE2x	Set Bypass ( 0 off, else on).
	  	FE3x	Set Mute (0 off, else on).
	  	FEBx	Set Pattern Loop ( FEB0 set loop start, FEBx number of loops)
	  	FEDx	Set Pattern Delay. ( x = number of lines+1 ). It is added upon song extraticks.
		FEEx    Set Song ExtraTicks per line ( x = number of ticks to add to each line. )
                Used in conjunction with LPB (FExx), can emulate the speed command of classic trackers.
				(I.e. FE06 FEE1 =  speed 5 )
	  	FEFx	Set Pattern Fine delay in ticks ( lines = 1+((ticks*linesperbeat)/ticksperbeat) ).  It is added upon song extraticks.

	  FDxx  -	Delay Trigger (xx/256 row duration) (works with noteoffs too)
	  FCxx	-	Change Global/Wire Volume.
			Examples:
			--- .. .. FC80	Sets Global Volume to the half.
			--- 01 05 FC40	Sets Wire 1 of GENERATOR 5 to volume 40 (1/4th)
			--- 01 45 FC30	Sets Wire 1 of EFFECT 5 to volume 30.

			Aux column indicates the wire number.
			It is shown in the _title_ of the wire Dialog.

	  FBxx	-	Retrigger (xx/256 row duration per trigger)
	  FAxy  -	Retrigger Continue (x/16 = row duration per trigger,
				0 = use current) (y = acceleration, 1-8 positive, 9-f negative
				f is the slowest negative acceleration, 1 is slowest
				positive acceleration) * does not trigger on new line, rather
				continues from previous retrigger position
	  F8xx	-	Sets the indicated Machine's Panning.
			Example:
			--- .. 05 F880 Sets the panning of Generator 5 to 80 (Middle) .
	  F3xx 	-	Jump to sequence order number xx (in hex).
	  F2xx	-	Jump to next sequence order, and to the line xx (in hex).

	* VST Commands:

	  0Cxx	-	Set volume ( Velocity on noteon, Expression otherwise )

	  C1xx 	-	Set pitch bend range of the VST.
	  C2xx 	-	Panning position for the midi channel.
	  C3xx	- 	Slide to note with speed xx.
	  Dxyy	-	Pitch slide down x number of semis, yy speed.
	  Exyy	-	Pitch slide up x number of semis, yy speed.

	  10xx	-	_OLD_ MIDI Command. Not documented anymore. Use the "Mcm" command.

	  NOTE : 	If your VST supports legato, this effect can be triggered leaving the machine index empty:

	  		Example:

	  		C-5 00 02 ....
	  		... .. .. ....
	  		E-5 00 .. ....	<- this note legates (does not stop previous)


	* Sampler Commands:

	  01xx	-	Portamento Up  	value FA = increases the speed in 1/4th of the original (wave) speed each PerformFx call (256 samples. 5ms at 44Khz).
				Command does not have memory (no special meaning for 00)
	  02xx	-	Portamento Down  value FA = decreases the speed in 1/4th of the original (wave) speed each PerformFx call (256 samples. 5ms at 44Khz).
				Command does not have memory (no special meaning for 00)
	  03xx	-	Portamento to note.  value FA = increases or decreases the speed in 1/4th of the original (wave) speed each PerformFx call (256 samples.
				5ms at 44Khz), until the corresponding note speed is reached. Command does not have memory (no special meaning for 00)
				All three portamento commands aren't really song samplerate aware, since at higher song samplerates, it will slide faster.
	  08xx	-	Set panning position  0 full left, FF full right. 80 center
	  09xx	-	Set sample offset  x = 1/256th of the sample length.
	  0Cxx	-	Set volume  0 = silent. FF = max volume.
				If using virtual instruments, the aux column can be used for the set volume command.
	  0ECx	-	Note cut in x frames  (fixed 6 frames per line)
	  0EDx	-	Note delay in x frames  (fixed 6 frames per line)
	  15xy	-	Retrig Command. y = Number of retrigs to do in one line (1 = do one retrig).
			-	x changes the volume in the following way:
				0 or 8 : No change
				1: +1		9:  -1
				2: +2		A: -2
				3: +4		B: -4
				4: +8		C: -8
				5: +16		D: -16
				6: *2/3		E: *3/2
				7: *1/2		F: *2
				Note: Due to the way it is implemented, the last retrig happens almost at the next line.

	* Sampulse Commands:  (They are also shown in the Miscellaneus and help tab of the machine)
			Track Commands:
				01xx: Portamento Up ( Fx: fine, Ex: Extra fine)
				02xx: Portamento Down (Fx: fine, Ex: Extra fine)
				03xx: Tone Portamento
				04xy: Vibrato with speed y and depth x
				05xx: Continue Portamento and Volume Slide with speed xx
				06xx: Continue Vibrato and Volume Slide with speed xx
				07xy: Tremolo with speed y and depth x
				08xx: Pan. 0800 Left 08FF right
				09xx: Panning slide x0 Left, 0x Right
				0Axx: Channel Volume, 00 = Min, 40 = Max
				0Bxx: Channel VolSlide x0 Up (xF fine), 0x Down (Fx Fine)
				0Cxx: Volume (0C80 : 100%)
				0Dxx: Volume Slide x0 Up (xF fine), 0x Down (Fx Fine)
				0Exy: Extended (see below).
				0Fxx: Filter. Depends on filter mode. See 0EFx
				10xy: Arpeggio with note, note+x and note+y
				11xy: Retrig note after y ticks y = Number of retrigs (1 = do one retrig)
					-	x changes the volume in the following way:
						0 or 8 : No change
						1: +1		9:  -1
						2: +2		A: -2
						3: +4		B: -4
						4: +8		C: -8
						5: +16		D: -16
						6: *2/3		E: *3/2
						7: *1/2		F: *2
				14xx: Fine Vibrato with speed y and depth x
				17xy: Tremor Effect ( ontime x, offtime y )
				18xx: Panbrello
				19xx: Set Envelope position (in ticks)
				1Cxx: Global Volume, 00 = Min, 80 = Max
				1Dxx: Global Volume Slide x0 Up (xF fine), 0x Down (Fx Fine)
				1Exx: Send xx to volume colum (see below)
				9xxx: Sample Offset x*256

			Extended Commands:
				30/1: Glissando mode Off/on
				4x: Vibrato Wave
				5x: Panbrello Wave
				7x: Tremolo Wave
						Waves: 0:Sinus, 1:Square
						2:Ramp Up, 3:Ramp Down, 4: Random
				8x: Panning
				90: Surround Off
				91: Surround On
				9E: Play Forward
				9F: Play Backward
				Cx: Delay NoteCut by x ticks
				Dx: Delay New Note by x ticks
				E0: Notecut background notes
				E1: Noteoff background notes
				E2: NoteFade background notes
				E3: Set NNA NoteCut for this voice
				E4: Set NNA NoteContinue for this voice
				E5: Set NNA Noteoff for this voice
				E6: Set NNA NoteFade for this channel
				E7/8: Disable/Enable Volume Envelope
				E9/A: Disable/Enable Pan Envelope
				EB/C: Disable/Enable Pitch/Filter Envelope
				Fx : Set Filter Mode.

			Volume Column  (Used with the 1Exx command, or in the aux column, when using virtual instruments):
				00..3F: Set volume to x*2
				4x: Volume slide up
				5x: Volume slide down
				6x: Fine Volslide up
				7x: Fine Volslide down
				8x: Panning (0:Left, F:Right)
				9x: PanSlide Left
				Ax: PanSlide Right
				Bx: Vibrato
				Cx: TonePorta
				Dx: Pitch slide up
				Ex: Pitch slide down

		Note: With Sampulse machine, indicating or not the instrument in the pattern has a special meaning, like it does in classic trackers, so these four entries have four different meanings (in fact, five)
			C-4 01 00   -> Play note with this instrument, and reset panning and volume (and reapply random volume if needed)
			C-4 .. 00   -> Play note with the previously indicated sample, but do not reset panning and volume.
			... 01 00   -> If the note is stopped, play it again with the previously indicated note. If the note is playing, reset panning and volume.
			... .. 00	-> Do nothing.
			When using virtual instruments, the instrument index will only be sent with a note. I.e. A virtual instrument can only do:
			C-4 .. 80  ->  C-4 01 00
			... .. 80  ->  ... .. 00
			... .. ..  ->  ... .. ..

	* Arguru Synth 2.5:

	  01xx	-	Pitch slide-up
	  02xx	-	Pitch slide-down
	  03xx	-	Pitch glide
	  04xx	-	Vibrato [x=depth, y=speed]
	  06xy  -   Change vca sustain
	  07xx	-	Change VCF ENV modulation [00=-128,FF=128]
	  08xx	-	Change VCF Cutoff frequency
	  09xx	-	Change VCF Resonance amount
	  0Axx  -   Synth volume
	  0Bxx  -   Change vca attack (*22 millis)
	  0Cxx  -   Note volume
	  0Exx	-	Note Cut in x frames (Only AS2.xx)
	  0Fxx  -  Change Glide
	  11xx	-	VCF Cutoff slide-up
	  12xx	-	VCF Cutoff slide-down

	* JMDrum Synth:

	  0Cxx	-	Set volume