-
Notifications
You must be signed in to change notification settings - Fork 0
/
API.txt
144 lines (78 loc) · 2.67 KB
/
API.txt
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
The API
=======
There are only a few commands you'll need to know in order to use PBRocket:
RKT_create_audiocb()
--------------------
Description:
Creates the audio callback device.
Syntax:
RKT_create_audiocb(*device.audio_cb, audio.i, bpm.d, rpb.i)
Parameters:
*device.audio_cb : a pointer to a structure of type audio_cb.
audio.i : the identifier of your audio file.
bpm.d : the BPM of your audio file.
rpb.i : the number of Rows Per Beat you want to use.
RKT_create_device()
-------------------
Description:
Creates the sync device.
Syntax:
RKT_create_device(*device.sync_device [, prefix.s [, delay.i]])
Parameters:
*device.sync_device : a pointer to a structure of type sync_device.
prefix.s : the prefix used to name the exported track files.
Defaults to "sync"
delay.i : an initial delay in ms to let PBRocket load all keys.
Defaults to 1000
RKT_get_track()
---------------
Description:
Creates a track and loads existing keyframes for that track.
Syntax:
Result.sync_track = RKT_get_track(*device.sync_device, name.s)
Parameters:
*device.sync_device : a pointer to a structure of type sync_device
name.s : the name of the track to create
Return value:
Returns a pointer to the track
RKT_audio_get_row()
-------------------
Description:
Retrieves the current row value.
Syntax:
Result.d = RKT_audio_get_row(*device.audio_cb)
Parameters:
*device.audio_cb : a pointer to a structure of type audio_cb
Return value:
Returns the current row value as a double.
RKT_get_val()
-------------
Description:
Get the value of a track for the current row.
Syntax:
Result.d = RKT_get_val(*track.sync_track, row.d)
Parameters:
*track.sync_track : a pointer to a previously created track.
row.d : the value of the current row.
Return value:
Returns the value of the track for the current row as a double.
RKT_free_device(rocket)
-----------------------
Description:
Frees all allocated memory and destroys the device.
Syntax:
RKT_free_device(*device.sync_device)
Parameters:
*device.sync_device: a pointer to the structure of type sync_device
you want to deallocate.
PRKT_audio_rows()
-----------------
Description:
Returns the number of rows your sound file will span.
Use it to find how many rows you need to set in Sync Editor.
Syntax:
PRKT_audio_rows(*device.audio_cb)
Parameters:
*device.audio_cb): a pointer to a structure of type audio_cb
Return value:
Returns the number of rows needed to match the length of your tune.