aboutsummaryrefslogtreecommitdiff
path: root/doc/DEVELOPING.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/DEVELOPING.txt')
-rw-r--r--doc/DEVELOPING.txt270
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 @@
1Developing HD24tools
2====================
3
4To start on development of hd24tools, here are a few tips to get you started.
5
6Development environment
7=======================
8You will want libsndfile, libportaudio and the Fast Light Toolkit FLTK to be
9present on your system. On Linux you will also want the Jack Audio Connection
10Kit (optionally on Mac as well). The targeted compiler is gcc.
11
12On Windows, development is based on a MSYS/MinGW environment.
13
14On Mac, XCode is needed, as well as portaudio, libsndfile and FLTK.
15
16Configuring and building
17========================
18Configuration is auto-detected by running
19
20 ./configure
21
22Building is done with
23
24 make
25
26Installing is optional. You may want to run the following as root:
27
28 make install
29
30which will install common binaries to /usr/bin. More interestingly,
31you can run
32
33 make installer
34
35to create the installer for the current platform. Finally, with
36
37 make clean
38
39you can work from a clean configuration. The configure script also
40calls make clean.
41
42Cross-compiling
43===============
44Cross compiling is highly experimental and will probably fail for
45most purposes. On linux, you can say
46
47 ./configure os=win32
48
49which will attempt to create windows .exe files. However, until
50now only hd24hexview.exe has been successfully built on Linux.
51
52
53
54./configure
55make
56
57Setup
58=====
59During configuration, the set of libraries, make files etc to
60use is decided by the files in the setup directory. The file
61Makefile.in which is located there contains the release number
62which must be bumped up for every version. Unless you build
63official releases, please add your name to the release number
64or make your personal releases otherwise distinguishable from
65official releases.
66
67To perform library detection etc, there are files called
68Makefile.setup.<platform> in the setup directory. These are
69called with various targets to figure out if libraries exist.
70
71Unless porting to a new platform or adding external libraries,
72you will probably rarely need to change most of the setup
73scripts.
74
75File system documentation
76=========================
77Reverse-engineered information about the ADAT FST file system
78can be found in doc/ADATFS.txt. Probably this file contains
79enough info to not only allow reading ADAT drives but also to
80write them. The biggest obstacle in writing ADAT drives so
81far has been to get an accurate LBA sector count of non-
82formatted drives on all operating systems. Especially Windows
83seems to lack a reliable way to obtain this information.
84(Multiplying sectors/cylinders/heads isn't LBA accurate,
85any other way known to me is limited to a specific version
86of Windows). If you want to contribute to the ADATFS.txt
87file, figure out how the FST undo buffers work. To keep this
88software free, DO NOT obtain information from Alesis about
89FST which might pollute the project with non-free
90information.
91
92The HD24 library
93================
94Directory src/lib contains the HD24 library (and other
95library source code).
96
97common.cxx - some common string manipulation functions
98convertlib.cpp/.h - conversion between various data types
99countsectors.cpp - library to calculate drive size
100hd24connect.ico - HD24connect Icon for Windows
101hd24devicenamegenerator.cpp/.h -
102 Library to generate device names that could be
103 HD24 drives; contains alternatives for all
104 supported OS platforms
105hd24fs.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
118hd24project.cpp/.h
119 Library containing hd24 project decoding.
120
121hd24song.cpp/.h
122 Library containing hd24 song decoding;
123 this includes functionality to read audio, set
124 the song cursor, etc.
125
126hd24utils.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
133nojack.cpp/.h
134 Dummy library to replace jack on windows and other
135 platforms in case it is not present.
136
137src/lib/FL/
138 Native OS file dialog support.
139
140INSTALLER GENERATOR
141===================
142
143The code for the installer generator is found in
144src/installer.
145
146Essentially, it takes the compiled binaries of hd24tools,
147and converts those to hexdumps in c-source (using an
148application called bin2c). This c source is then compiled
149and will be able to re-create the original binary
150files.
151
152While no complex registry magic is needed, this is
153sufficient for simple installations and probably less work
154to figure out than other solutions.
155
156This was originally intended to create install wizards for Mac,
157but ended up being used for Windows only. Mac users seem
158comfortable enough with the install-free .dmg images that they
159are presented with.
160
161The install wizard itself is basically implemented as a state
162machine.
163
164The installer for Linux installation could still be made a bit
165smoother, specifically in the libraries department- the right
166libraries are not always available at the right locations yet.
167
168THE ACTUAL HD24TOOLS
169====================
170
171Some tools only have a console/command line version. They are:
172
173hd24hexview a hex editor
174hd24wavefix a program that attempts to recover bit-distorted
175 audio to something remotely usable again
176hd24towav a program that converts raw 24 bit hd24 audio to
177 wav files
178syx2bin a program that converts the HD24 OS .syx files
179 to binary (not sure if the resulting binaries
180 are valid)
181hd24info a program that prints some info about the hd24
182 drives present in the system
183
184And finally, there is the graphical flagship program of the suite
185hd24connect. To start development, it would be recommended to
186understand the library, then the command line utilities first.
187
188The command line tools are in src/ whereas hd24connect is in
189src/frontend.
190
191Originally I intended hd24connect to have a frontend (GUI) and
192a backend. As it turned out, the whole thing ended up in the
193frontend. If you feel like creating a nice backend so that the
194frontend *really* *only* contains GUI stuff, feel free. Sorry.
195
196The entry point of hd24connect is src/frontend/hd24connect.cpp-
197this calls and opens the GUI.
198
199The main entrance for the GUI is in fluid file ui_hd24connect.fl
200(you *really* should use the 'fluid' user interface editor that
201comes with fltk to maintain the .fl files). Method make_window
202in class UserInterface starts it all.
203
204TEST SUITE
205==========
206There is a directory test/ which should at some point contain
207regression tests for hd24tools. To make it easier to perform
208such tests, it would need to be possible to control hd24tools
209entirely in batch-mode (using MIDI for this is may be a
210possibile way).
211
212DOCUMENTATION
213=============
214
215The .pdf documentation may be slightly outdated. If you wish
216to update it, you can do so with OpenOffice Writer.
217
218TASKS
219=====
220If 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