diff options
Diffstat (limited to 'doc/DEVELOPING.txt')
-rw-r--r-- | doc/DEVELOPING.txt | 270 |
1 files changed, 270 insertions, 0 deletions
diff --git a/doc/DEVELOPING.txt b/doc/DEVELOPING.txt new file mode 100644 index 0000000..6c91747 --- /dev/null +++ b/doc/DEVELOPING.txt | |||
@@ -0,0 +1,270 @@ | |||
1 | Developing HD24tools | ||
2 | ==================== | ||
3 | |||
4 | To start on development of hd24tools, here are a few tips to get you started. | ||
5 | |||
6 | Development environment | ||
7 | ======================= | ||
8 | You will want libsndfile, libportaudio and the Fast Light Toolkit FLTK to be | ||
9 | present on your system. On Linux you will also want the Jack Audio Connection | ||
10 | Kit (optionally on Mac as well). The targeted compiler is gcc. | ||
11 | |||
12 | On Windows, development is based on a MSYS/MinGW environment. | ||
13 | |||
14 | On Mac, XCode is needed, as well as portaudio, libsndfile and FLTK. | ||
15 | |||
16 | Configuring and building | ||
17 | ======================== | ||
18 | Configuration is auto-detected by running | ||
19 | |||
20 | ./configure | ||
21 | |||
22 | Building is done with | ||
23 | |||
24 | make | ||
25 | |||
26 | Installing is optional. You may want to run the following as root: | ||
27 | |||
28 | make install | ||
29 | |||
30 | which will install common binaries to /usr/bin. More interestingly, | ||
31 | you can run | ||
32 | |||
33 | make installer | ||
34 | |||
35 | to create the installer for the current platform. Finally, with | ||
36 | |||
37 | make clean | ||
38 | |||
39 | you can work from a clean configuration. The configure script also | ||
40 | calls make clean. | ||
41 | |||
42 | Cross-compiling | ||
43 | =============== | ||
44 | Cross compiling is highly experimental and will probably fail for | ||
45 | most purposes. On linux, you can say | ||
46 | |||
47 | ./configure os=win32 | ||
48 | |||
49 | which will attempt to create windows .exe files. However, until | ||
50 | now only hd24hexview.exe has been successfully built on Linux. | ||
51 | |||
52 | |||
53 | |||
54 | ./configure | ||
55 | make | ||
56 | |||
57 | Setup | ||
58 | ===== | ||
59 | During configuration, the set of libraries, make files etc to | ||
60 | use is decided by the files in the setup directory. The file | ||
61 | Makefile.in which is located there contains the release number | ||
62 | which must be bumped up for every version. Unless you build | ||
63 | official releases, please add your name to the release number | ||
64 | or make your personal releases otherwise distinguishable from | ||
65 | official releases. | ||
66 | |||
67 | To perform library detection etc, there are files called | ||
68 | Makefile.setup.<platform> in the setup directory. These are | ||
69 | called with various targets to figure out if libraries exist. | ||
70 | |||
71 | Unless porting to a new platform or adding external libraries, | ||
72 | you will probably rarely need to change most of the setup | ||
73 | scripts. | ||
74 | |||
75 | File system documentation | ||
76 | ========================= | ||
77 | Reverse-engineered information about the ADAT FST file system | ||
78 | can be found in doc/ADATFS.txt. Probably this file contains | ||
79 | enough info to not only allow reading ADAT drives but also to | ||
80 | write them. The biggest obstacle in writing ADAT drives so | ||
81 | far has been to get an accurate LBA sector count of non- | ||
82 | formatted drives on all operating systems. Especially Windows | ||
83 | seems to lack a reliable way to obtain this information. | ||
84 | (Multiplying sectors/cylinders/heads isn't LBA accurate, | ||
85 | any other way known to me is limited to a specific version | ||
86 | of Windows). If you want to contribute to the ADATFS.txt | ||
87 | file, figure out how the FST undo buffers work. To keep this | ||
88 | software free, DO NOT obtain information from Alesis about | ||
89 | FST which might pollute the project with non-free | ||
90 | information. | ||
91 | |||
92 | The HD24 library | ||
93 | ================ | ||
94 | Directory src/lib contains the HD24 library (and other | ||
95 | library source code). | ||
96 | |||
97 | common.cxx - some common string manipulation functions | ||
98 | convertlib.cpp/.h - conversion between various data types | ||
99 | countsectors.cpp - library to calculate drive size | ||
100 | hd24connect.ico - HD24connect Icon for Windows | ||
101 | hd24devicenamegenerator.cpp/.h - | ||
102 | Library to generate device names that could be | ||
103 | HD24 drives; contains alternatives for all | ||
104 | supported OS platforms | ||
105 | hd24fs.cpp/.h | ||
106 | Library containing definition for HD24 file system | ||
107 | object. | ||
108 | Each file system contains drive info; | ||
109 | The drive info contains 1 or more projects; | ||
110 | Each project contains 0 or more songs; | ||
111 | Each song contains 25 locate points (START | ||
112 | +locate point 1-24) and track slip info for | ||
113 | each track. | ||
114 | |||
115 | Including hd24fs.h is sufficient to have access to | ||
116 | all of this. | ||
117 | |||
118 | hd24project.cpp/.h | ||
119 | Library containing hd24 project decoding. | ||
120 | |||
121 | hd24song.cpp/.h | ||
122 | Library containing hd24 song decoding; | ||
123 | this includes functionality to read audio, set | ||
124 | the song cursor, etc. | ||
125 | |||
126 | hd24utils.cpp/.h | ||
127 | Library that contains useful routines, such as | ||
128 | printing the hd24 catalog, dumping a header, | ||
129 | saving a drive image etc. that do not belong in | ||
130 | the file system decoding library, | ||
131 | but that multiple programs might have a use for. | ||
132 | |||
133 | nojack.cpp/.h | ||
134 | Dummy library to replace jack on windows and other | ||
135 | platforms in case it is not present. | ||
136 | |||
137 | src/lib/FL/ | ||
138 | Native OS file dialog support. | ||
139 | |||
140 | INSTALLER GENERATOR | ||
141 | =================== | ||
142 | |||
143 | The code for the installer generator is found in | ||
144 | src/installer. | ||
145 | |||
146 | Essentially, it takes the compiled binaries of hd24tools, | ||
147 | and converts those to hexdumps in c-source (using an | ||
148 | application called bin2c). This c source is then compiled | ||
149 | and will be able to re-create the original binary | ||
150 | files. | ||
151 | |||
152 | While no complex registry magic is needed, this is | ||
153 | sufficient for simple installations and probably less work | ||
154 | to figure out than other solutions. | ||
155 | |||
156 | This was originally intended to create install wizards for Mac, | ||
157 | but ended up being used for Windows only. Mac users seem | ||
158 | comfortable enough with the install-free .dmg images that they | ||
159 | are presented with. | ||
160 | |||
161 | The install wizard itself is basically implemented as a state | ||
162 | machine. | ||
163 | |||
164 | The installer for Linux installation could still be made a bit | ||
165 | smoother, specifically in the libraries department- the right | ||
166 | libraries are not always available at the right locations yet. | ||
167 | |||
168 | THE ACTUAL HD24TOOLS | ||
169 | ==================== | ||
170 | |||
171 | Some tools only have a console/command line version. They are: | ||
172 | |||
173 | hd24hexview a hex editor | ||
174 | hd24wavefix a program that attempts to recover bit-distorted | ||
175 | audio to something remotely usable again | ||
176 | hd24towav a program that converts raw 24 bit hd24 audio to | ||
177 | wav files | ||
178 | syx2bin a program that converts the HD24 OS .syx files | ||
179 | to binary (not sure if the resulting binaries | ||
180 | are valid) | ||
181 | hd24info a program that prints some info about the hd24 | ||
182 | drives present in the system | ||
183 | |||
184 | And finally, there is the graphical flagship program of the suite | ||
185 | hd24connect. To start development, it would be recommended to | ||
186 | understand the library, then the command line utilities first. | ||
187 | |||
188 | The command line tools are in src/ whereas hd24connect is in | ||
189 | src/frontend. | ||
190 | |||
191 | Originally I intended hd24connect to have a frontend (GUI) and | ||
192 | a backend. As it turned out, the whole thing ended up in the | ||
193 | frontend. If you feel like creating a nice backend so that the | ||
194 | frontend *really* *only* contains GUI stuff, feel free. Sorry. | ||
195 | |||
196 | The entry point of hd24connect is src/frontend/hd24connect.cpp- | ||
197 | this calls and opens the GUI. | ||
198 | |||
199 | The main entrance for the GUI is in fluid file ui_hd24connect.fl | ||
200 | (you *really* should use the 'fluid' user interface editor that | ||
201 | comes with fltk to maintain the .fl files). Method make_window | ||
202 | in class UserInterface starts it all. | ||
203 | |||
204 | TEST SUITE | ||
205 | ========== | ||
206 | There is a directory test/ which should at some point contain | ||
207 | regression tests for hd24tools. To make it easier to perform | ||
208 | such tests, it would need to be possible to control hd24tools | ||
209 | entirely in batch-mode (using MIDI for this is may be a | ||
210 | possibile way). | ||
211 | |||
212 | DOCUMENTATION | ||
213 | ============= | ||
214 | |||
215 | The .pdf documentation may be slightly outdated. If you wish | ||
216 | to update it, you can do so with OpenOffice Writer. | ||
217 | |||
218 | TASKS | ||
219 | ===== | ||
220 | If you want to contribute, here are some things left to do: | ||
221 | |||
222 | - Write support (realtime vs copy mode) | ||
223 | |||
224 | Save altered drive/project/song info | ||
225 | |||
226 | Write support can initially be tested on | ||
227 | drive image files. | ||
228 | |||
229 | Phase A1: Only overwriting existing audio, but | ||
230 | not allocating new space (copy mode) | ||
231 | |||
232 | Phase A2: Allocating new space (copy mode) | ||
233 | |||
234 | Phase B1: realtime write mode with JACK support | ||
235 | |||
236 | - Wave preview | ||
237 | |||
238 | This would have to be awfully smart to be able to display | ||
239 | waves with zero active waiting time and without utilizing | ||
240 | peak files. Use information such as screen width reso- | ||
241 | lution to limit the amount of data that needs to be read | ||
242 | from disk. Probably adding a special read mode in the | ||
243 | library could help support this. | ||
244 | |||
245 | - Figure out how to build (fat) Mac binaries with or without | ||
246 | Mac (but preferrably without requiring both intel and ppc | ||
247 | to build a release that works on either platform) | ||
248 | |||
249 | - Figuring out a way to write wav header info/session | ||
250 | notes to HD24 songs, while maintaining HD24 compatibility | ||
251 | |||
252 | - Adding MIDI support to the library (MMC, MTC) | ||
253 | |||
254 | - Sync to real HD24 recorders? | ||
255 | |||
256 | - Special HD24tools distro containing ReWire support to | ||
257 | allow streaming audio directly to protools/cubase? | ||
258 | |||
259 | - Use real LRC to control HD24tools? | ||
260 | |||
261 | - Figure out OS binary checksum algorithm | ||
262 | |||
263 | - Create a test suite | ||
264 | |||
265 | - Figure out how the HD24 performs Undo administration on | ||
266 | the file system level | ||
267 | |||
268 | - Improve realtime read mode performance for audio streaming | ||
269 | |||
270 | |||