forked from ReaTeam/Doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
State Chunk Definitions
776 lines (712 loc) · 56.1 KB
/
State Chunk Definitions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
Original by IXix
Cockos Wiki: http://wiki.cockos.com/wiki/index.php/State_Chunk_Definitions
This page details what is known about various state chunk definitions such as are returned by API functions.
There are still some question marks (gaps) in the definitions and several plugin formats are completely undocumented so please fill in any gaps you can. Thanks to all who have spent time poking around these things. It's a tedious business.
Please note that comments, empty lines and indentation are for illustration only.
For the sake of formatting, the following changes have been made:
Float values with fourteen decimal places have been condensed to three decimal places.
Float values with ten decimal places have been condensed to two decimal places.
Float values with six decimal places have been condensed to one decimal place.
The shorthand "int (bool)" has been used to denote "0 = False, 1 = True"
Contents:
1 Track
2 Audio Item
3 MIDI Item
4 Envelope
5 Track/Take FX
6 VST(i) Plugin
7 Jesusonic Plugin
--------------------------------------------------------------------------------------------------------------------
The Track state chunk contains all the settings for a track and all of it's items, envelopes, receives, plugins etc.
<TRACK // Start of Track definition
NAME "Track Name" // Track name
PEAKCOL 16576 // Peak colour (items and takes override?)
BEAT -1 // Track timebase (-1 = project default)
AUTOMODE 0 // Automation mode
// 0 = Trim/Read
// 1 = Read
// 2 = Touch
// 3 = Write
// 4 = Latch
VOLPAN 0.359 0.000 -1.000 // Volume/Pan
// field 1, float, track volume
// field 2, float, track pan
// field 3, float, track pan law
MUTESOLO 0 0 0 // Mute/solo
// field 1, int (bool), mute
// field 2, int, solo, 0= no solo, 1 = solo, 2 = solo-in-place
// field 3, int (bool), solo defeat
IPHASE 0 // Invert phase, int (bool)
ISBUS 0 0 // ??, Unknown but related to folder tracks
// 1 1 = is folder, 2 -1 = is folder end, 0 0 for others
BUSCOMP 0 0 0 41 8 // Collapse folder (bus compact?)
// field 1, int, collapse state in Arrange 0=not collapsed, 1=collapsed medium, 2=collapsed small
// field 2, int, collapse state in the Mixer 0=not collapsed, 1=collapsed
// field 3, int, collapse state in track wiring, 0=not-collapse, 1=collapse
// field 4, int, track wiring routing window x position
// field 5, int, track wiring routing window y position
SHOWINMIX 1 0.6 0.5 1 0.5 -1 -1 -1 // Show In Mixer
// field 1, int (bool), show in mixer
// field 2, float, ??
// field 3, float, ??
// field 4, int (bool), show in track list
// field 5, float, ??
// field 6, int, ??
// field 7, int, ??
// field 8, int, ??
FREEMODE 0 // Free Item Positioning Mode, int (bool)
REC 0 0 0 0 0 0 0 // Record settings
// field 1, int (bool), armed
// field 2. int, input,
// 0=mono left, 1=mono right, 1024=stereo left+right...
// device + channel(s) coded via unknown bitwise method
// field 3. int, monitor, 0=off, 1=on, 2=auto
// field 4. int, record mode,
// 0=input, 1=output (stereo), 2=disable(monitor),
// 3=output (stereo, latency comp), 4=Output (MIDI),
// 5=output (mono), 6=output (mono, latency comp),
// 7=MIDI overdub, 8=MIDI replace, 9=MIDI touch replace,
// 10=output (multichannel),
// 11=output (multichannel, latency comp)
// field 5. int (bool), monitor track media while recording
// field 6. int (bool), preserve PDC delayed monitoring
// field 7. int, record path, 0=primary, 1=secondary, 2=both
TRACKHEIGHT 0 0 // Height in TCP,
// field 1, int, height in pixels
// field 2, int (bool), folder override (collapsed)
INQ 0 0 0 0.50 100 0 0 100 // Input quantize settings
// field 1, int (bool), quantize midi
// field 2, int, quantize to pos (-1=prev, 0=nearest, 1=next)
// field 3, int (bool), quantize note-offs
// field 4, float, quantize to (fraction of beat)
// field 5, int (%), quantize strength
// field 6, int (%), swing strength
// field 7, int (%), quantize range min
// field 8, int (%), quantize range max
NCHAN 2 // Number of track channels, int
<RECCFG 1 // Recording format data. Not present if not changed.
dmdnbwAAAD8AgAAAAIAAAAAgAAAAAAEAAA== // binary data, leave it alone
> //
FX 1 // FX state, int, 0=bypassed, 1=active
TRACKID {5619EDC5-E743-4BE8-AE9F-3B3469A111B5} // REAPER track id, leave it alone
PERF 0 // Performance options, int (bitwise)
// val & 1 = prevent media buffering
// val & 2 = prevent anticipative fx
// --- Start of receive data ---
// One for each receive or not present if no receives
AUXRECV 2 1 1.000 0.000 0 0 0 2 0 1.000 80 1 // First receive
// field 1, int, source track index (zero based)
// field 2, int, mode
// 0 = Post Fader (Post Pan)
// 1 = Pre FX
// 3 = Pre Fader (Post FX)
// field 3, float, volume
// field 4, float, pan
// field 5, int (bool), mute
// field 6, int (bool), mono sum
// field 7, int (bool), invert phase
// field 8, int, source audio channels
// -1 = none, 0 = 1+2, 1 = 2+3, 2 = 3+4 etc.
// probably different if non-standard pairs aren't allowed
// field 9, int, dest audio channels (as source but no -1)
// field 10, float, panlaw
// field 11, int, midi channels
// source = val & 0x1F (0=None), dest = floor(val / 32)
// field 12, int, automation mode (-1 = use track mode)
// --- Start of envelope definitions for the above receive
// One definition block for each non-empty envelope.
// See GetSetEnvelopeState() for full envelope definition.
<AUXPANENV // Start of first receive envelope
(see chunk info below) // ...
> // End of first receive envelope
<AUXMUTEENV // Start of second receive envelope.
(see chunk info below) // ...
> // End of second receive envelope
// --- End of envelopes for first receive
AUXRECV 3 0 1.000 0.000 0 0 0 0 0 -1.000 0 -1 // Second track receive settings (as above but no envelopes)
// --- End of receive data ---
MIDIOUT -1 // MIDI hardware output settings. int (bitwise)
// device = floor(val / 32)
// index of device (inc. ignored devices)
// -1 for no MIDI hardware output
// channel = val & 0x1F
// channel number or 0 for 'use original'
// val = device * 32 + channel (device 2, ch 4 == 68)
MAINSEND 1 // Master/parent send, int (bool)
// --- Start of track envelopes ---
// One definition block for each non-empty envelope.
// See GetSetEnvelopeState() for full envelope definition.
<VOLENV2 // First track envelope.
(definition removed) // ...
> // End of first track envelope
// --- End of track envelopes
// --- Start of FX section ----
<FXCHAIN // Not present if track hasn't got/had FX ---
(see chunk info below)
> // --- End of FX section
// --- Start of FREEZE section ----
<FREEZE 0 // Not present if track wasn't frozen ---
(see chunk info below)
> // --- End of FREEZE section
// --- Start of Input FX section (irrelevant for the Master track) ----
<FXCHAIN_REC // Not present if track hasn't got/had Input FX ---
(see chunk info below)
> // --- End of Input FX section
// --- Start of item definitions ---
<ITEM // First item definition
(see chunk info below)
> // End of first item
// --- End of item definitions
> // End of Track definition
--------------------------------------------------------------------------------------------------------------------
Audio Item
<ITEM // Item section start
POSITION 0.000 // Position on the timeline, in seconds
SNAPOFFS 0.000 // Snap offset, in seconds
LENGTH 145.500 // Item length, in seconds
LOOP 0 // Loop source? int (bool)
ALLTAKES 0 // Play all takes? int (bool)
COLOR 22278759 // Item colour, int , Not present if not set.
BEAT 0 // Item timebase, int, Not present if not set. -1 = use track timebase
SEL 1 // Is the item selected? int (bool)
FADEIN 1 0.0 0.0 // Fade in settings
// field 1, int, fade in curve type (0 - linear, etc.)
// field 2, float, fade in time (in seconds)
// field 3, float, ??
FADEOUT 1 0.0 0.0 // Fade out settings (same as fade in above)
// ...
// ...
// ...
MUTE 0 // Is the item muted? int (bool)
FADEFLAG 1 // ??, int, may not be present
GROUP 2560 // A number of the group the item belongs to, if grouped
IGUID {98E8ECDE-FF4D-4E06-87ED-43A5E7E6A61A} // Item id. Leave it alone
// --- From this point, values mostly relate to the first take
// except for field 1 of VOLPAN which is the item trim
//
IID 424 // Deprecated since build 6.54
// Item ordinal number governing the order of overlapping items displayed in lanes and especially those with identical start
// and end coordinates, when 'Show overlapping media items in lanes (when room)' option is enabled. The greater
// the IID the lower the item's lane is. With the said option disabled or lanes fully collapsed the visible/outermost item
// is the latest one on the track out of all items it's overlapping, regardless of its IID
<NOTES // Notes block start
|-1 // Notes content
> // Notes block end
RESOURCEFN "filename.ext" // Name of the image file loaded in the notes, full path if located outside of the resource directory
IMGRESOURCEFLAGS 0 // ??
NAME "The first take" // First take name
VOLPAN 1.0 0.0 1.0 -1.0 // Volume and pan settings
// field 1, float, item trim
// 1.00 = 0 dB
// 16.00 = +24 dB
// 0.50 = -6 dB
// field 2, float, first take pan, -1.00 = left, 1.00 = right
// field 3, float, first take volume (other takes in TAKEVOLPAN below), if negative 'Invert phase' setting is enabled
// field 4, float, first take pan law
SOFFS 0.000 // First take slip offset (in seconds)
PLAYRATE 1.000 1 0.000 -1 // First take playrate settings
// field 1, float, playrate
// field 2, int (bool), preserve pitch while changing rate
// field 3, float, pitch adjust, in semitones.cents
// field 4, int, pitch shifting/time stretch mode and preset
// -1 - project default
// 0-2 - Sound Touch (3 presets)
// 65536-65567 - Dirac LE (32 presets)
// 131072-131119 - Low quality windowed (48 presets)
// 196608-196639 - élastique Pro (32 presets)
// 262144-262147 - élastique Efficient (4 presets)
// 327680-327683 - élastique SOLOIST (4 presets)
// 393216-393247 - élastique 2.1 Pro (32 presets)
// 458752-458755 - élastique 2.1 Efficient (4 presets)
// 524288-524291 - élastique 2.1 SOLOIST (4 presets)
CHANMODE 0 // First take channel mode, int
// 0 = normal, 1 = reverse stereo, 2 = mono (downmix)
// 3 = mono (left), 4 = mono (right)
GUID {4EB7779B-D570-4CCF-8739-161D2D32C154} // First take id. Leave it alone
<SOURCE SECTION // Source section start (only present when changed in Item properties)
LENGTH 0.000 // Section length
MODE 3 // Mode, 2 = Section and Reverse, 3 = Reverse
STARTPOS 0.000 // Section start offset (in seconds)
OVERLAP 0.010 // Section crossfade (in seconds)
<SOURCE WAVE // Source details. Appears alone if SOURCE SECTION not set
FILE "C:Path\To\AudioFile.wav" // Source file.
> // Source details end
> // Source section end
TKM 0.5 "TEST 123" 21036800 // Take marker data
// field 1 - float, position within take in sec
// field 2 - string, name Without quotes if consists of only one character or word
// field 3 - integer, OS native color code can be converted to RGB with: r, g, b = reaper.ColorFromNative(code)
SM 0 0 -0.149425287 + 0.574712644 0.5 + 1.348114004 // Stretch marker data
1.273401361
// Transient markers (guides) data
TMINFO 44100 // field 2 - item source sample rate
TM 104 671 6270 13233 678 676 673 19218 6385 677 // field 2 - distance in samples, at the above sample rate, of the first transient guide from the item start
680 6320 // returned by reaper.GetMediaItemInfo_Value(item, 'D_POSITION')
// fields 3 onwards - distance in samples at the above sample rate from previous transient guide
<TAKEFX // -- Take FX section start
(see chunk info below under Track/Take FX) //
> // -- Take FX section end
TAKE_FX_HAVE_NEW_PDC_AUTOMATION_BEHAVIOR 1
// -- Take envelopes section start, one block per envelope
<VOLENV // Envelope alias (VOLENV, PANENV, MUTEENV, PITCHENV)
EGUID {5CB63539-0B47-4094-97FA-C62230F23208} // Envelope ID
(see chunk info below under Envelope)
> // -- Take envelopes section end
TAKE SEL // Second take start. SEL only appears if this take is selected or was last selected
NAME "The second take" // Take name
TAKEVOLPAN 0.0 1.0 -1.0 // Take volume and pan settings
// field 1, float, take pan
// field 2, float, take volume, if negative 'Invert phase' setting is enabled
// field 3, float, take pan law
SOFFS 0.000 // Take slip offset (in seconds)
PLAYRATE 1.000 1 0.000 -1 // see PLAYRATE above
CHANMODE 1 // see CHANMODE above
GUID {4EB7779B-D570-4CCF-8739-161D2D32C154} // Take id. Leave it alone
<SOURCE WAVE // Take source details
FILE "C:\Full\Path\To\AudioFile reversed.wav" // Source filename
> // Source section end
> // Item section end
--------------------------------------------------------------------------------------------------------------------
MIDI Item
<ITEM // Item section start
POSITION 12.000 // see Audio item state chunk above
SNAPOFFS 0.000 // ...
LENGTH 8.815 // ...
LOOP 1 // ...
ALLTAKES 0 // ...
SEL 1 // ...
FADEIN 1 0.0 0.0 // ...
FADEOUT 1 0.0 0.0 // ...
MUTE 0 // ...
IGUID {967EE770-4144-472A-89D6-B72BB910A916} // ...
NAME "MIDI item" // ...
VOLPAN 1.0 0.0 1.0 -1.0 // ...
SOFFS 0.000 0.000 // Slip offset (in seconds; the second field is always twice the first field)
PLAYRATE 1.000 1 0.000 -65536 // ...
CHANMODE 0 // ...
GUID {9C93A652-09A2-4A46-9E1B-EF83EB7CED29} // ...
<SOURCE MIDI // Source section start
HASDATA 1 960 QN // Does the item have any data? PPQ resolution in ticks per quarter note
e 300 90 2b 60 // Standard MIDI message
// field 1, e - selected, E - not selected
// field 2, int, msg start offset
// field 3, MIDI status byte (message type + channel number)
// 0x80 = Note Off, channel 0
// 0x9F = Note On, channel 15
// 0xB4 = Control Change, channel 4
// field 4, Data1, depends on the message type (eg. note number)
// field 5, Data2, depends on the message type (eg. velocity)
e 60 80 2b 00 // selected msg, offset 60, note off, note 2b, velocity 0
<X 286306 0 // SysEx section start (SysEx midi message, variable length)
// field 1, x - selected, X - not selected
// field 2, ??
// field 3, ??
8AECAwQF9w== // (Base64 encoded)
> // SysEx section end
E 540 b0 7b 00 // unselected msg, offset 540, Control Change , all notes off (cc123)
GUID {9DAB52C8-6257-4A4E-9E60-323514C0DB9B} // Take id
IGNTEMPO 0 120.00000000 4 4 // Ignore project tempo, override with new settings
// field 1, int, ignore on/off
// field 2, float, tempo used to override project tempo
// field 3-4, int, time signature to override project time signature
VELLANE 128 97 0 // Velocity/CC lane settings
// field 1, int, lane type
// -1 = velocity
// 0-119 = CC #0 - CC #119
// 128 = pitch bend
// 129 = program
// 130 = channel pressure
// 131 = bank/program select
// 132 = text events
// 133 = sysex
// 166 = notaion events
// field 2, int, height of the lane in MIDI editor mode
// field 3, int, height of the lane in inline editor mode
BANKPROGRAMFILE "C:\Path\To\GM.reabank" // Path to ReaBank file used by the current item
CFGEDITVIEW 3787.8 0.1 0 48 0 0 0 // Somehow related to H/V zoom levels and scrollbar positions
CFGEDIT 1 1 0 1 1 16 1 1 1 1 1 0.06250000 0 0 // MIDI editor window configuration data
1024 768 0 2 0 0 0.00000000 0 0 // field 1, int, ??
// field 2, int (bool), sync editor transport to project transport
// field 3, int, ??
// field 4, int (bool), show velocity handles
// field 5, int (bool), show note names
// field 6, int, MIDI editor view mode
// 0 = piano roll, rectangle
// 1 = named notes, rectangle
// 5 = event list, rectangle
// 8 = piano roll, triangle
// 9 = named notes, triangle
// 13 = event list, triangle
// 16 = piano roll, diamond
// 17 = named notes, diamond
// 21 = event list, diamond
// field 7, int, ??
// field 8, int (bool), move CCs with notes
// field 9, int, channel for new events
// field 10, int (bool), snap to grid
// field 11, int (bool), show grid
// field 12, float, grid length, in quarter notes
// field 13, field 14, int, (last-used UNmaximized) X and Y coords of upper left corner of ME window
// field 15, field 16, int, (last-used UNmaximized) X and Y coords of bottom right corner of ME window
// field 17, int (bool), dock editor window
// field 18, int, note row view modes
// 0 = show all rows
// 1 = hide unused rows
// 2 = hide unused and unnamed rows
// field 19, int, state of Timebase setting
// 0 = project beats
// 1 = project sync
// 2 = project time
// 4 = source beats
// field 20, int, state of Color mode setting
// 0 = velocity
// 1 = channel
// 2 = pitch
// 4 = source
// field 21, float, length of last drawn note in beats.ticks
// field 22, int, re-use editor window
// 0 = off
// 1 = re-use MIDI editor window
// 2 = re-use MIDI editor window, keeping current item secondary
// field 23, int (bool), show velocity numbers
// field 24, int (bool), ME window maximized to full-screen
// field 25, int (bool), swing enabled
// field 26, float, swing % as fraction
EVTFILTER 0 -1 -1 -1 -1 0 1 // Event filter settings
// field 1, int (16-bit mask), state of channel checkboxes
// 0000000000000000 (0) - "All" is checked, 1-16 unchecked
// 1111111111111111 (65536) - "All" is checked along with 1-16
// 1000000000000001 (32769) - 1 (LSB) and 16 (MSB) are selected
// etc.
// field 2, int, Event type
// -1 = <all>
// 144 = Note
// 160 = Poly Aftertouch
// 176 = Control Change (CC)
// 192 = Program Change (PC)
// 208 = Channel Aftertouch
// 224 = Pitch
// 240 = Sysex/Meta
// field 3, int, parameter field (range: 0-127)
// field 4, int, value Low field (range: 0-127)
// field 5, int, value High field (range: 0-127)
// field 6, int, draw events on channel setting (range: 0-15)
// field 7, int (bool), enable filter
> // Source section end
> // Item section end
MIDI Event -> field 2 above... This is the number of ticks (it's ok, I'll tell you in a minute) since the last event or (if this is the first MIDI Event) the start of the Item.
Ticks then. A tick is a small slice of a beat, so the number of Ticks per second varies with the BPM (Beats Per Minute) of the music.
<wiki math markup> <math>1 beat = 2.6041666666666666666666666666667e-4 \times 240 \times 16</math> </wiki math markup>
1 beat = 2.6041666666666666666666666666667e-4 * 240 * 16
The MIDI format used in REAPER State Chunks and .rpp files is documented here State Chunk And RPP MIDI Format.
--------------------------------------------------------------------------------------------------------------------
Envelope
Envelopes appear to share most of their characteristics though there may be some differences in how point values are used. Needs more testing
Envelope types include:
VOLENV - Track (pre FX)/Take volume (0.0 to 2.0)
VOLENV2 - Track (post FX) volume (0.0 to 2.0)
VOLENV3 - Track trim volume (0 to 2)
PANENV - Track (pre FX)/Take pan (-1.0 to 1.0)
PANENV2 - Track (post FX) pan (-1.0 to 1.0)
DUALPANENVL - Track pan (left) (pre-FX) (-1 to 1) in 'Dual pan' pan mode
DUALPANENV - Track pan (right) (pre-FX) (-1 to 1) in 'Dual pan' pan mode
DUALPANENVL2 - Track pan (left) (-1 to 1) in 'Dual pan' pan mode
DUALPANENV2 - Track pan (right) (-1 to 1) in 'Dual pan' pan mode
WIDTHENV - Track (pre FX) stereo width (-1 to 1) in 'Stereo pan' pan mode
WIDTHENV2 - Track stereo width (-1 to 1) in 'Stereo pan' pan mode
MUTEENV - Track mute (0.0 to 1.0)
AUXVOLENV - Track send volume (0.0 to 2.0)
AUXPANENV - Track sendpan (-1.0 to 1.0)
AUXMUTEENV - Track send mute (0.0 to 1.0)
PARMENV - Plugin parameter (value range defined by additional parameters after type tag)
TEMPOENVEX - Master tempo
<VOLENV2 // Type. PARMENV has additional fields on this line (see below)
EGUID {1A24257D-0EE1-4D1C-8BF7-7D795608ED97} // Envelope GUID
ACT 1 -1 // field 1, int (bool) Active, field 2 ??
VIS 1 1 1.0 // Visibility
// field 1, int (bool), visible
// field 2, int (bool), show in lane
// field 3, float, ??
LANEHEIGHT 0 0 // Lane height
// field 1, int, height in pixels, corresponds to the value associated with 'I_TCPH' parameter of GetEnvelopeInfo_Value() function
// field 2, int, ??
ARM 1 // Armed, int (bool)
DEFSHAPE 0 -1 -1 // field 1 - Default point shape, int
// 0 = Linear
// 1 = Square
// 2 = Slow Start/End
// 3 = Fast Start
// 4 = Fast End
// 5 = Bezier
// field 2 - ??
// field 3 - ??
<EXT // Extension-specific persistent data which can be added with GetSetEnvelopeInfo_String() function using 'P_EXT' parameter
parmname string // field 1, string - parmname, set with the function namesake argument
> // field 2, string - string, set with the function stringNeedBig argument; to delete, pass this argument as an empty string
//
POOLEDENVINST 6 1.375 0.39917615841563 0.114936 0.354826 1 0.5 1 1 0 0 1280 0 0 0.012 0 // Automation item (AI) properties
// field 1, int, index (greater by 1 than the one displayed by default
// in the Name field of AI Properties window)
// field 2, float, Position (sec)
// field 3, float, Length (sec)
// field 4, float, Start offset (sec)
// field 5, float, Play rate
// field 6, int (bool), Baseline/amplitude affects pooled copies,
// (couldn't figure out which value is what because it's not updated consistently
// and seems to depend on the Loop (field 9) setting)
// field 7, float, Baseline, 0 = -100, 0.5 = 0, 1 = 100
// field 8, float, Amplitude, -2 = -200, 1 = 100, 2 = 200
// field 9, int (bool), Loop, 1 on, 0 off
// field 10, ??
// field 11, ??
// field 12, ??
// field 13, ??
// field 14, ??
// field 15, float, Transition time (sec)
// field 16, ??
PT 3.000000 -0.2 5 0 0 0 -0.7 // Envelope point definition
// field 1, float, position (seconds)
// field 2, float, value
// field 3, int, shape (-1 = envelope default?)
// field 4, int, optional, ?? (TEMPOENVEX time sig = 65536 * time signature denominator + time signature numerator)
// field 5, int (bool), selected (optional)
// field 6, int, ?? (optional)
// field 7, float, bezier tension (optional)
>
PARMENV contains extra data denoting which plugin parameter is controlled and what the minimum, maximum and default values are.
<PARMENV 1 0.0 1469.0 734.5 // Type
<PARMENV 5:_1__Feedback 0 2 1 // field 1, int, param index - zero based top to bottom.
<PARMENV 5:_Sample_start_offset 0 2 1 // Since build 6.52 names of ReaPlugs parameters are also specified in the format _paramname or _param_name
// Previously only plugin wrapper 'wet' and 'bypass' parameter names were displayed without being preceded by
// the underscore, e.g. 31:wet, 12:bypass
// REAPER tags additional bypass and wet params onto the end, in that order
// field 2, float, minimum value
// field 3, float, maximum value
// field 4, float, center/default value
/* snip */
>
--------------------------------------------------------------------------------------------------------------------
Track/Take FX
Plugin chains appear to be the same for both tracks and item takes, with the exception that the chunk name is different.
<FXCHAIN // FXCHAIN for track or TAKEFX for take
WNDRECT 0 42 716 227 // FX Window position
// field 1, int, top
// field 2, int, left
// field 3, int, width
// field 4, int, height
SHOW 0 // field 1, int, index of an FX currently open in the chain (NOT zero based)
LASTSEL 1 // Index of selected plugin (zero based), int
DOCKED 0 // FX window is docked, int (bool)
// --- Start of first plugin definition
BYPASS 0 0 // Plugin bypass state
// field 1, int (bool), bypassed
// field 2, int (bool), offline
<VST "VST: SomePlugin" "SomePlugin.dll" 0 "Sax offender" // Plugin data, see details below
(see VST(i) plugin info below) //
> //
WET 0.5 // Amount of plugin wet output set on the plugin UI wrapper, if not 100%
PRESETNAME "stock - Basic 11 band" // Name of current plugin preset selected in the preset drop-down list
FLOATPOS 0 0 0 0 // Plugin floating window pos, int
// FLOAT - plugin UI is open in a floating window; FLOATPOS - plugin UI is NOT open in a floating window
// field 1 - top; field 2 - left; field 3 - width; field 4 - height
// If at least field 3 or 4 is 0, plugin window doesn't float
PARMALIAS 3 "Compression" // Names and indices of renamed FX parameters
PARMALIAS 4 "DS Freq" //
PARMALIAS 6 "Delay" //
PARMALIAS 7 "Squeeze" //
FXID {1191A7FE-F583-477E-8416-D9F0F58226CD} // Plugin id, leave it alone
// -- Start of Parameter modulation settings
//
<PROGRAMENV 12:bypass 0 // One block per each parameter with engaged parameter modulation
// field 1, int, parameter index (zero based)
// Plugin wrapper parameters, such as Bypass here, are named, plugin native parameters
// are only referenced by their indices
// field 2, bool, 0 - enabled, 1 - bypassed (set by (un)ticking checkbox 'Enable parameter modulation'
// in Parameter modulation dialogue)
PARAMBASE 0.5 //
LFO 1 //
LFOWT 1 0 //
AUDIOCTL 0 //
AUDIOCTLWT 1 1 //
LFOSHAPE 0 //
LFOSYNC 0 0 0 //
LFOSPEED 0.124573 0 //
MODWND 0 204 147 552 506 //
> //
// --- Start of parameter envelopes for this plugin.
// One block for each non-empty envelope.
<PARMENV 2 0.0 1.0 0.5 // First parameter envelope
(see envelope chunk info) // (irrelevant for Input and Monitor FX)
> //
// --- End of parameter envelopes
// NOTE: If both envelope (PARMENV) and parameter modulation (PROGRAMENV) are enabled for the same plugin parameter
// the PARMENV data are followed by PROGRAMENV data.
// -- Start of MIDI/OSC controller assignments
PARMLEARN 0 1968 2 // field 1, int, parameter idx
PARMLEARN 1 2736 2 // field 2, int, a number assigned by REAPER to a MIDI controller e.g. (CC0 = 176, CC1 = 432, 944 = CC3,
PARMLEARN 2 944 2 // 1968 = CC7, 2736 = CC10), the step equals 256
// In CC Mode: Absolute - CC0 = 176, Relative 1 - CC0 = 65712, Relative 2 - CC0 = 131248, Relative 3 - CC0 = 196784,
// Toggle - CC0 = 262320
// field 3, int, 2 - Soft takeover (absolute mode only) or 2+0, 1 - Enable only when track or item is selected,
// 3 - 1+2, 4 - Enable only when effect configuration is focused, 20 - Enable only when effect
// configuration is visible, 0 - Arm envelope for selected parameter
// -- End of MIDI/OSC controller assignments
PARM_TCP 12:bypass 13:wet 4 2 0 // Show in track controls (FX params visible on TCP/MCP), irrelevant for Input, Take and Monitor FX
// Plugin wrapper parameters format is index:name, plugin own params are referenced by their indices only
WAK 0 0 // WAK = Want All Keys (https://forums.cockos.com/showthread.php?p=2420594)
// field 1, bool, 1 - 'Send all keyboard input to plug-in' option is enabled in the FX instance RMB context menu
// or FX chain 'FX' menu
// field 2, int, 1 - show embedded FX UI on TCP, 2 - show on MCP
<COMMENT // Plugin comment. Not present if no comment.
Y29tbWVudA== // Binary data, probably best to leave it alone
> //
// --- Start of second plugin definition
BYPASS 0 0 // ...
<JS "Guitar/tremolo" "" // Start of JS plugin data
(see Jesusonic plugin info below) //
> //
JS_DIMS 489 305 // Dimensions of JS plugin UI
FLOATPOS 0 0 0 0 // ...
FXID {BE5D3334-6675-4DAD-AFDD-F4489878D82A} // ...
WAK 0 0 // ...
<COMMENT // ...
Y29tbWVudA== // ...
> // ...
> // --- End of FX section
--------------------------------------------------------------------------------------------------------------------
VST/AU/DX(i) Plugins
<VST "VST: SomePlugin" "SomePlugin.dll" 0 "Sax offender" // Start of VST/AU/DX plugin data
// field 1, str, default name
// field 2, str, filename
// field 3, int, ??
// field 4, str, display name (default used if empty), if no name is set by the user then "" is displayed, custom
// names are only encolsed within quotes if they have spaces, so one word names don't have quotes
RmFkbe9e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAA== // Binary data, leave it alone (variable number of lines)
AgAAAAAAAAAwAAAAAAAAAAAAEADvvq3eDfCt3sP1qD4zMzM/AAAAPw== //
mplZPwAAAAAAAAA/MzMzP83MzD4AAAAAAABAP1Jlc29uYW50IEZpbA== //
dGVyAA== //
> // End of VST plugin data
--------------------------------------------------------------------------------------------------------------------
Jesusonic Plugin
For the sake of formatting, the plugin data has been truncated.
<JS "Guitar/tremolo" "" // Start of JS plugin data
// field 1, str, the format is "folder name/file name"
// field 2, str, display name (if empty the name from reaper-jsfx.ini is used), "" is displayed if no name is set
// by the user, custom names are only encolsed within quotes if they have spaces, so one word names don't have quotes
4.0 -6.0 0.0 - - - - - - - - - - - - - - - - - - - - // Data, 64 fields of float or '-' separated by spaces
> // End of JS plugin data
--------------------------------------------------------------------------------------------------------------------
Video Processor plugin
<VIDEO_EFFECT "Video processor" "" // Start of Video Processor plugin data
<CODE // Stores the entire preset code
|// Screensaver (Monitoring FX only - blanks screen after no change) //
|//@param 1:sec 'Timeout (seconds)' 10 1 240 120.5 1 //
|//@param 2:r 'Color Red' 0 0 1 .5 .01 //
|//@param 3:g 'Color Green' 0 0 1 .5 .01 //
|//@param 4:b 'Color Blue' 0 0 1 .5 .01 //
| //
|now = time_precise(); //
|input_info(0) && (!held || gfx_img_getptr(held) != gfx_img_getptr(0)) ? ( //
| gfx_img_free(held); //
| held = gfx_img_hold(0); //
| timeout = now; //
|); //
| //
|timeout > 0 ? ( //
| now > timeout+sec ? ( //
| gfx_set(r,g,b); //
| gfx_fillrect(0,0,project_w,project_h); //
| gfx_img_free(held); //
| timeout = held = 0; //
| ) : ui_get_state(0,0,0, 0.1+now - (timeout+sec)); //
|); //
> //
CODEPARM 10.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 // Control parameters
0.0000000000 1.0000000000 0.5000000000 0.0000000000 0.0000000000 0.1000000000 //
0.5000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 //
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 //
0.0000000000 //
> // End of Video Processor plugin data
--------------------------------------------------------------------------------------------------------------------
Freeze data chunk, storing data for unfreezing
<FXCHAIN // Start of track regular FXCHAIN chunk
WNDRECT 32 60 745 420 //
SHOW 0 //
LASTSEL 0 //
DOCKED 0 //
> //
// -------Start of FREEZE chunk
<FREEZE 0 // field 1, ??
<FXCHAIN // A regular FXCHAIN chunk storing track FX, if any, which
WNDRECT 32 60 745 420 // are removed on freezing.
SHOW 0 // If FX have never been inserted on the track FXCHAIN chunk
LASTSEL 0 // is not added.
DOCKED 0 // Last line of FXCHAIN chunk before closure if FX existed
// on the track at some point in the past but were absent
// at the moment of last freezing.
//
BYPASS 0 0 0 //
<VST "VST: ReaDelay (Cockos)" readelay.dll 0 "" 1919247468<5653547265646C72656164656C617900> "" //
bGRlcu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAATAAAAAEAAAAAABAA //
AAAAAAAAAAABAAAALAAAAAIAAAAAAAAAAACAPwAAgD8AAAAAAACAPwAAAAAAAIA8nNEHMwAAgD8AAAAAAACAPwAAgD8AAIA/ //
AAAAPw==AAAQAAAA //
> //
FLOATPOS 0 0 0 0 //
FXID {FF92D48D-1B63-44E6-A44F-EF996F9E2228} //
WAK 0 0 //
> //
<ITEM {26E45913-BFEA-417E-8F96-1C61EE6E3FE4} // Original ITEM chunk (before freezing), looks the same as
POSITION 0.5 // any item chunk.
SNAPOFFS 0 //
LENGTH 1.27340136054422 //
LOOP 0 //
ALLTAKES 0 //
FADEIN 1 0 0 1 0 0 0 //
FADEOUT 1 0 0 1 0 0 0 //
MUTE 0 0 //
COLOR 31464893 R //
SEL 1 //
IGUID {26E45913-BFEA-417E-8F96-1C61EE6E3FE4} //
IID 1 //
NAME THREE //
VOLPAN 1 0 1 -1 //
SOFFS 0 //
PLAYRATE 1 0 0 -1 0 0.0025 //
CHANMODE 0 //
GUID {7A1C7B3D-7FB6-4FA1-9F0B-1FC41AAEA61D} //
<SOURCE WAVE //
FILE "C:\Users\Admin\Documents\REAPER Media\reaper.wav" //
> //
<TAKEFX // A regular TAKEFX chunk if original item had FX before
WNDRECT 32 60 745 420 // freezing.
SHOW 0 //
LASTSEL 0 //
DOCKED 0 //
BYPASS 0 0 0 //
<VST "VST: ReaDelay (Cockos)" readelay.dll 0 "" 1919247468<5653547265646C72656164656C617900> "" //
bGRlcu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAATAAAAAEAAAAAABAA //
AAAAAAAAAAABAAAALAAAAAIAAAAAAAAAAACAPwAAgD8AAAAAAACAPwAAAAAAAIA8nNEHMwAAgD8AAAAAAACAPw //
AAgD8AAIA/AAAAPw==AAAQAAAA //
> //
FLOATPOS 0 0 0 0 //
FXID {63C343BD-C1AF-4CB0-9668-EA07D62D32A0} //
WAK 0 0 //
> //
<PITCHENV // Envelope chunk data if before freezing item had active
EGUID {8955C719-553C-4494-879E-286ECE31C437} // take envelopes.
ACT 0 -1 //
VIS 0 1 1 //
LANEHEIGHT 0 0 //
ARM 0 //
DEFSHAPE 0 -1 -1 //
PT 2.58540135 9 0 //
> //
> //
> // -------End of FREEZE chunk
<ITEM // Frozen item chunk, part of the TRACK chunk
POSITION 0.5 //
......... //
<SOURCE WAVE //
FILE "C:\Users\Admin\Documents\REAPER Media\reaper_freeze.wav" //
> //
> //