Programmable real-time audio signal processing application
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

notes.txt 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. CONTENTS:
  2. 1) TODO List
  3. 2) OSX Install Notes
  4. SPAT LAB SETUP:
  5. + 1. Stereo
  6. a. TotalMix - select 'diff. stereo' snapshot
  7. b. mixer: Recall preset 91 ('stereo diff')
  8. + 2. Direct - 24 channels - each channel goes in and out on same number.
  9. a. TotalMix - select 'DTS_24ch'
  10. b. mixer: Recall preset 96 ('24ch firecac ufx')
  11. Session Notes: 5/24/14
  12. 1) Move mic's back from the Disklavier to decrease damper noise.
  13. 2) The head phone signal sounds correct.
  14. 3) The the L410 computer is running out of time in release mode.
  15. 4) Better quality speakers are required.
  16. 5) Build a spectrum analyzer and bank of notch filters or graphic EQ to deal with feedback.
  17. 6) The DPA 4011 mics and FMR Audio RNP8380 preamp work well.
  18. 7) Whenever the speaker signal gets to the point where the transform can be heard
  19. the feedback begins to occur.
  20. Session Notes: 1/14/14
  21. 1) The non-grace evenness notes should include a tempo quality evaluation
  22. based on using the 'tfrac' values from column S of the score.
  23. 2) Sliver fade outs are currently tied to the reat-time performance not the captured performance.
  24. In the event that the score follower is lost after beginning a sliver playback
  25. and therefore misses the programmed fade out times begin fading out the
  26. sliver after the attack of the last captured note. This means that
  27. the time location of the captured notes must be accurately indicated
  28. in the sliver.
  29. 3) Allow fades to be tied to the capture notes - this is easy if 2) is done first.
  30. LANGUAGE NOTES:
  31. The primary goal of the language is to initialize a dataflow system.
  32. Sub-goals:
  33. 1) Avoid describing domain specific computation in the language. As much as possible constrain the
  34. language to describe initialization tasks (e.g. object allocation, object connection, initialization
  35. parameters, preset grouping, thread/process allocation, UI layout, ...)
  36. 2) Network Distrubution
  37. 3) UI Layout
  38. Runtime:
  39. + Extensible data-object system.
  40. + Library organization (platform independent UI description, application objects, app-independent objects, vector library)
  41. - Platform independent UI description is a protocol for describing a UI object and a runtime protocol
  42. for communitcating with the UI which is independent of the UI implementation itself. The UI should be
  43. implementable in FLTK, or Javascript. The UI will always run in separate thread and may run in a
  44. separate process.
  45. - Application objects are plug-ins which follow a similar design to the cmDspProc() objects.
  46. + xs
  47. NEW DESIGN NOTES:
  48. + The current designs fundamental weakness is that it uses callbacks to communicate where sequential program
  49. flow would produce a more comprehensible program.
  50. + Dataflow is a natural way to express DSP programs but if it is implemented in a textual, rather than
  51. graphical language, then their are some design princles that must be followed in order
  52. to produce comprehensible programs.
  53. 1) Limit the number of connections as much as possible.
  54. - There are many simple UI->param connections - these should be made automatically and UI
  55. objects should not have to be explicitely created - they should be created by the runtime
  56. environment.
  57. - If multiple pieces of data are part of a single message then they should be sent as a unit
  58. rather than separately. This decreases the number of connections and also removes timing
  59. dependencies - where the application programmer has to know the order of transmission of the
  60. individual pieces. (e.g. MIDI messages always contain {status,d0,d1} rather than having to
  61. send d0 and d1 followed by status to indicate the end of the message {status,d0,d1} should
  62. be sent as a single record.
  63. 2) Eliminate as many event ordering issues as possible
  64. See the example in 1).
  65. 3) Alllow the connections between objects to be made as part of the object allocation.
  66. 4) Allow subprograms to be made. This decreases the complexity of the programs and because
  67. it allows the programs to be organized hierarchically. It also allows the subprograms to
  68. be tested idenpendently.
  69. 5) A natural way to express object multiplicity is required. (e.g. multiple channels).
  70. This leads to a way to naturally create parallel/fan-in/fan-out connections.
  71. + One way to solve some of the problems of the current program would be to add debugging tools.
  72. - Generate dataflow diagrams that show execution order and the order of connections.
  73. The actual sending order of the outputs is not accessible to a static network analyzer because it is
  74. implementation dependent.
  75. - Generate reports of network activity that show the timed order of events.
  76. + The audio system (cmAudioSys) needs to be able to support multiple parallel DSP chains in separate threads.
  77. + UI Related Issues:
  78. - Automatic UI's should be generated by scanning the objects parameters.
  79. - Custom UI's should be created by explicitily naming object variables along with layout info.
  80. + Processors should be able to contain their own processing chains - embeddding processors should be possible.
  81. This naturally leads to a tree address space. (e.g. fx.filter.param1)
  82. + Communication between threads should not necessarily require serialization.
  83. - Use a blackboard approach where object values are read/written from a blackboard. Objects on the same
  84. thread use the same physical blackboard. Blackboards on remote processes stream data in the background.
  85. - This scheme may require double buffering of complex objects to prevent accessing invalid data states.
  86. + Objects that send multiple valued messages should use 'record' based data so that only one connection
  87. is necessary.
  88. STRATEGY:
  89. + implement highly parallel version - which can take advantage of multiple processors
  90. to do more - acoustic pitch tracking, source separation based fades
  91. TODO:
  92. + When a cmMsgList item is selected it should send out the selected index
  93. after the individual data items rather than before them - this way the index
  94. can be used as a definitive signal to perform some action on the previously
  95. transmitted data items.
  96. + cmJson and cmLex should report the name of the file when with syntax error messages.
  97. + Use CSV for mod score file format (to eliminate need for labels)
  98. + Autoload of default pgm cfg, program, enable audio, sequence, score location.
  99. + (done) Circuit switcher patch.
  100. + Review and document the app threading and locking during audio file loading.
  101. + Remove old performance evaluation code from cmScore.
  102. + All programs should be able to reload without crashing via enabling/disabling audio.
  103. + (in new version) Select and save audio devices.
  104. + (done) Mac Conversion
  105. + (done) Live MIDI - to test audio/MIDI delay.
  106. + (done) As threshold increases overall volume decreases - add a compensation algorithm.
  107. + There are unintialized variable warnings on the release build.
  108. + Add preset delete.
  109. + All uses of va_copy() should have a complimentary va_end()
  110. + The list boxes do not show the currently selected item.
  111. + (done)MIDI note messages are sent but do not trigger notes on OSX.
  112. *** Usage Notes
  113. live - Disconnects WT cmd input (WT will not receive an 'on' msg)
  114. Disconnects TL reset input (TL will not receive a 'reset' msg)
  115. Disconnects MFP sel input (MPF will not receive an 'on' msg)
  116. Switches audio input to KR from WT to AIN.
  117. Turn the 'meas' checkbox 'on'.
  118. simulate - Turn the 'audio in' checkbox 'on'.
  119. Switch MFP output from SF to Nano.
  120. (SF MIDI input then comes from the MIDI port.)
  121. audio in - Switch audio input to KR from WT to AIN.
  122. meas - Instruct the SF to generate measurement outputs for the active meas. unit.
  123. Otherwise the measurements must be loaded from the recorded measurment list.
  124. print - Print a report from the SF.
  125. quiet - Turn off SF output.
  126. LA Secs - Fragment recd/play unit look-ahead time in seconds.
  127. Fade DbpSec - Framgent recd/play unit fade out time
  128. (time to fade to 0 following a fade msg)
  129. *** Cross-fade Notes
  130. Cross-fades are initiated by sending any msg to the 'AvailCh.trig' input.
  131. The 'AvailCh' object then toggles the parameter router channels and xfader gates.
  132. Only after this should the new parameter values be transmitted either from
  133. the 'ActiveMeas' object (through the scale range chains) or directly from the
  134. 'ScMod' object.
  135. Sending parameter values prior to triggering the 'AvailCh' will result in the
  136. parameters being sent to the currently active 'Kr'. This will result in two
  137. possibly unintended effects:
  138. 1) The effect of the parameter will be heard immediately - possibly resulting in distortion.
  139. 2) If a subsequent trigger is sent to 'AvailCh' the parameters will be routed to
  140. the fade-out (current) channel rather than the fade-in (next) channel.
  141. **** Live Test Score
  142. + Line 1048 has a red G#5 immediiately following another G#5. Is this correct?
  143. For now the second G#5 has been marked as a 'skip'.
  144. + Changed Tempo sections 25,26,27 to 40,47,47a
  145. + Measurements are taken for sections 51-54 but these sections follow bar 136 and
  146. are therefore outside the test. These sections have therefore been redirected
  147. to the downbeat of 201-204.
  148. *** Testing Notes:
  149. + Equipment List:
  150. Four Microphones: Four performance/ Four recording
  151. 2 inside 2 inside
  152. 2 overhead 2 overhead
  153. 4 powered speakers
  154. 2 Mixers (1 performance 1 recording)
  155. Performance Computer (harpo)/ Audio Interface (delta1010) / MIDI interface (Fastlane)
  156. Recording Computer (crel) / Audio Interface (delta 1010) / MIDI interface (???)
  157. Sensor Strip
  158. + Performance Setup
  159. +------ +
  160. Mic0 ----------->| |
  161. Mic1 ----------->| | sends +-----+ +-------+
  162. Mic2 ----------->| |------->| A/D | | | +------+ +--------+
  163. Mic3 ----------->| Mixer |------->| |------>| harpo |<-------| MIDI |<-----| sensor |
  164. aux | | | | | | +------+ | strip |
  165. Spkr0 <----------| |<-------| |<------| | +--------+
  166. Spkr1 <----------| |<-------| | +------ +
  167. main | | | |
  168. Spkr2 <----------| |<-------| D/A |
  169. Spkr3 <----------| |<-------| |
  170. +-------+ +-----+
  171. + Software Development
  172. - Create Score File
  173. - Create Recording Program (test with long MIDI playback generating audio - look for drift)
  174. Record the index of each MIDI event at it's location in an audio channel.
  175. - Allow all variables and patch connections to be set from the scMod script and have
  176. multiple scripts with varynig effects setups.
  177. - When scanning past ramping variables in scMod the end value should be
  178. taken as the next variable(???) - this is not necessarily correct
  179. because one never knows where a timed change may end - maybe ramped
  180. variables should include a 'skip value' giving the next ambient value
  181. for the ramped variable - experiment with this to figure out what works.
  182. - Add comb filters tuned according to the current MIDI notes as an additional effect.
  183. - Add EQ output stage (use mixer).
  184. - Add an input Compressor.
  185. - The dry signal should be able to be routed to seperate output channels - around the compressor.
  186. (Better would be to output a delayed version of the dry signal that was in sync with the transformed
  187. signal - this might mean simply passing the dry version as separate outputs from KR).
  188. - Create a mode in scMod which increments values based on an onset detector. So that
  189. changes only happen on attacks. This still doesn't help if the pedal is down (or
  190. if notes are sustained) but otherwise might be a better way to ramp parameters.
  191. - (DONE) The ability for the measurements to be called at the correct time must be built in.
  192. (or alternatively to use stored effects).
  193. - (DONE) Effects applied to the playback fragments.
  194. - (DONE?) CROSSFADE BUG - This may be fixed by the change to cmDspAvailCh which
  195. handles the case where no channels are available by sending an error message
  196. but not actually changing the state of the cross fader.
  197. + Experiments:
  198. 1) Speaker placement and live/electronics mix.
  199. 2) Sliver mix level
  200. 3) Try varying degree's of effects
  201. *** 11/19
  202. + The recd/play fade should be able to trigger from a capture note as well as
  203. playback note. An offset might also be useful.
  204. (Should be a default fade for each fragment - keyed to the input. This
  205. will be the fade that will occur when
  206. + Allow setting fade time in the score.
  207. + Allow setting fade rate based on 1.0 to 0.0 from fade point to end point.
  208. + Allow for multiple fades markers per fragment. (what does this mean?)
  209. + Write code to ignore playback when the score follower is not stable -
  210. or to throw out fragments where there is a mistake.
  211. + At the end of each fragment recording the fragment should be truncated by the look-ahead time
  212. to avoid capturing the attack of the marked note.
  213. + Part 2 data analysis: analyze the order of notes in counter rhythms.
  214. + Allow 'evenness' sequences to have non-even relationships.
  215. *** 11/1
  216. + Change the wavetable to read stereo files or add a second wavetable to play the other channel.
  217. + The console window is not always updating from the bottom.
  218. + The 'Dump' button results are not going to the console window.
  219. + Put dry signal into separate output channels.
  220. + Add 'adaptive' mode parameters to scale/range mappings.
  221. + The 'meas'->'parameter' mappings should changable from scMod (mod0.js)
  222. + The 'adaptive' mode parameters (e.g. offset and invert) need to be connected in the patch.
  223. + Create a mode in scMod which increments values based on an onset detector. So that
  224. changes only happen on attacks. This still doesn't help if the pedal is down (or
  225. if notes are sustained) but otherwise might be a better way to ramp parameters.
  226. + Mark all notes in the score according to how well they would act as places to transition.
  227. Notes held while the pedal is down would not be good places to transition.
  228. These indicators would then be used to determine where a section change can occur
  229. when the actual section change is missed.
  230. + (done) All score_loc's and event indexes in meas0.js that beginning with
  231. score location 743 must be decremented by two. (e.g. loc 743 becomes 741 ...)
  232. (score_loc_1.txt is now the correct score file)
  233. + When scanning past ramping variables in scMod the end value should be
  234. taken as the next variable(???) - this is not necessarily correct
  235. because one never knows where a timed change may end - maybe ramped
  236. variables should include a 'skip value' giving the next ambient value
  237. for the ramped variable - experiment with this to figure out what works.
  238. *** 10/17
  239. Select bar 129.
  240. Start on F5 before 129.
  241. Score follower jumps to loc. 978 then backs up to 973.
  242. *** 9/27
  243. * (DONE) Implement live recording for use in part 2.
  244. * Implement a delay between when a new section is set to trigger and when
  245. it actually does. This might allow transitions to be set up prior to when they are heard.
  246. * (DONE) OS-X version crashes when the printf("PROCSET ...) is removed from _cmScProcSets().
  247. * Add ability to set mappings and perf. measure settings to scMod.
  248. * The scMod should play through all changes up to the cur starting location so that
  249. we can mimic the state of playing the piece through but allow starting from any location.
  250. * Experiment with changing settings using the scMod ramping functions.
  251. * Make a source separation based fade using an filter/inverse filter based on the
  252. spectrum prior to the cross-fade. As an extra feature notice the state of the pedal
  253. and decay appropriately.
  254. * The electronic score needs the ability to specify that the output is sent to the audible
  255. cross-fade channel rather than the inactive channel.
  256. * Add a score mode that performs some action (e.g. incr/decr) on each incoming score follower
  257. event.
  258. * In AvailCh what happens when no available channels are found - this may be the cause
  259. of the cross-fade cut-out problem.
  260. * Add eq stage to output.
  261. * Setting the upper slope to a negative value is effective.
  262. * Demo Material: Seq 8 Mark 204 (1024-4 2048-4) Fade 10ms Cost->Threshold.
  263. - recd7 Mark 151
  264. - recd8 Mark 145 - same settings a previous take.
  265. - (recd9) Mark 145 - w/ changing xfade switch to mode 4 at 38
  266. - recd10 Mark 145 - same w/ no mode change
  267. - recd11 Mark 145 - a. 3 different takes w/ score constant - no perf. parameters used - fixed threshold=65
  268. - recd12 Mark 148 b.(same settings as recd9)
  269. - recd13 Mark 151 c.
  270. - recd14 Mark 161 Section 40 - fixed changes see mod0.js for note
  271. - Seq 6 Mark 145 M-92 (38,39,39a) (recd16) (recd17) (recd18) (recd19)
  272. - Seq 7 Mark 167 M-100
  273. *** 8/13
  274. * Cross-fade was cutting out during demo.
  275. * Missing takes between seq 7 and seq 8.
  276. * The MIDI is mis-aligned against the audio.
  277. * Are cost / tempo working? ... test changing mode.
  278. * Add an automatic volume adjustment to prevent parameter changes from causing large volume changes.
  279. * What can we actually do between after a MIDI note is received? Is it already too late to
  280. send parameters w/o affecting the attack of the note.
  281. * Live Test material
  282. Part 1: Meas:76 - (one measure) to get measurments for later sections
  283. Part 1: Meas:94 (sect 38 (Seq 6)) through Meas:136 (include 136 stop at 137).
  284. Part 2: ("/Users/kevin/temp/piano score part 2 draft 1 master m 232 - 241 1st 2 bts.sib")
  285. The downbeat of part two aligns with the 3rd beat (in 4/4) of 122 in the first part.
  286. Ends on measure 131 at end of beat 3.
  287. MISSING MIDI for measures 114:126
  288. *** July 10
  289. ** (done) Make separate mappings and scale/range controls for left and right.
  290. ** Add EQ output stage.
  291. ** Work out the speaker setup.
  292. ** Add capture/playback. Analyze notes on capture and do not play if there are
  293. any wrong notes. (Skipped notes however are acceptable.)
  294. **
  295. ** When a section transition is occurs late - (e.g. due to dropped notes) do not apply
  296. the transformation all at once - instead either ramp it in or step it in on subsequent
  297. attacks. Section transitions which are positively identified are intended to have
  298. dramatic changes so applying the updated parameters immediately is acceptable - but
  299. when the parameters are changed mid-section they should be much applied subtely.
  300. ** (done) Build a database of measurements and setup the program to be able to
  301. apply a given measurement at it's assigned section.
  302. ** Redevelop spectral distortion algorithm to use a spline as the transform.
  303. ** use Log frequency frequency transform instead of FFT.
  304. ** Allow for a continous window size via zero padding.
  305. ** Add a 'write' preset file button - so the preset file can be saved prior to next crash.
  306. ** measurement values can generate MAX_DBL - be sure that are not being sent through to the audio algorithm.
  307. (see ln:965 cmDspKr.c for a hack to fix this)
  308. ** add invert to scale/range to cause output to go in opposite direction.
  309. ** non-grace eveneess are used to generate a measurement value from previous tempo calibration section.
  310. (non-grace evenness notes therefore have two scores: 'evenness' and 'overall-duration').
  311. ** note that the default setting for dyn and even.
  312. ** add dyn,even,tempo,cost number boxes to allow artificial setting of these parameters.
  313. add dyn,even,tempo,cost as modulator variables to allow them to be set from the modulator
  314. With these additions we can simulate apply measurements at the 'application' section.
  315. ** add begining and ending measure numbers to 'seq' labels
  316. ** Gain compensation for mode 4.
  317. ** Do IFFT using cos()^c + i * sin()^c - these bases are orthognal but cause harmonic distortion.
  318. To be efficient this might involve writing an FFT function.
  319. // May 22
  320. ** Crashers (Should be tested but are probably already fixed following score follower debugging.)
  321. Seq 2 m24 Mark 36 & 38
  322. Seq 4: Mark 115
  323. Seq 4: m76-79 Mark 129 (W/ meas: even & dyn -> thresh change min Thresh to 40) - use 4th seq w/ b1
  324. Seq 6: m92 Mark 143
  325. Seq 7: m103 Mark 173
  326. Seq 7: Mark 172 Meas 103 - always crashes on playback.
  327. Seq 4: Mark 76 Meas 40 - crash!
  328. Seq 2: First mark meas 23
  329. Crash seems to happen in cmProc4.c: _cmScMatchInitMtx() ln:1311.
  330. It looks like a memory overrun. Looks like the first line is wrong
  331. shouldn't:
  332. if( rn >p->mrn && cn > p->mcn )
  333. be
  334. if(rn*cn > p->mrn*p->mcn)
  335. BUGS:
  336. // Apr 20
  337. The tempo measurement can produce invalid values. Set score to 22 then play Mark 38.
  338. First tempo measurement is a non-sense value - probably produced by an div by zero.
  339. Also: Mark 8, Meas 10.
  340. Crash on playing Mark 37.
  341. Click on list control outside below list item - crash!
  342. Select Mark 171 (Seq 7) Section 43, m103 crash
  343. // Feb 27
  344. + Audio seems to preceded MIDI by around 250ms this probably arises
  345. from a delay that was inserted by 'mas'. Can the delay be removed?
  346. // Feb 25
  347. + Fix the audio file input/output ports
  348. //
  349. // Feb 6 & 7
  350. //
  351. + Performed notes which arrive which about 50ms could be
  352. considered chords. Extra notes notes which were not part of
  353. the chord are probably common and should be discounted during
  354. the cost analysis.
  355. + (done) Add alignment cost as a 4th variable along with dyn,even,tempo.
  356. + (done) In the score print out (score_loc.txt) Section 2 is starting on Bar 5
  357. when it should start inside Bar 7.
  358. + In Take 1 the 2nd dynamics set is not triggered.
  359. + In Take 3 Eveness 2 the C2 and F#4 are NOT missing althrough they are in the
  360. evalation. Also E7 which ends that set is not marked with an 'e'.
  361. + It is possible to have even-non-grace sets where the note rythm value's are not
  362. all the same (e.g. bar 20 )
  363. + User soft-thresholds for the dynamics categories.
  364. + Set 39 even measure 25 shows the first note as G#2 when it should be C#1
  365. + Missig MIDI note sounded:
  366. C1 score-loc:132
  367. A#2 140
  368. A5 173
  369. C#2 195 Marker 36
  370. E5,G33,A#2,C#1 212-218 Marker 36
  371. E3 185 Marker 37
  372. F5,C#4,G#5 986 Marker 204
  373. -------------------------------------------------------------------------------
  374. OSX - Install Notes
  375. -------------------------------------------------------------------------------
  376. 1. Install macports
  377. 2. Install git-core (sudo port install git-core)
  378. 3. sudo port install fftw-3
  379. 4. sudo port install fftw-3--single
  380. 5. port select --list gcc (which gcc is active)
  381. 6. sudo port install gcc47
  382. 7. sudo port --set gcc mp-gcc47
  383. 8. sudo port install fltk
  384. 9. sudo port install xorg-libX11
  385. 10.sudo port install git-core
  386. 11.sudo port install emacs +x11
  387. 10 install ~/Library/Preferences/org.larke.kc.txt (is this required?)
  388. 11 create ~/Library/Preferences/kc
  389. 12 Install ~/Library/Preferences/time_line.js, time_line_preset.js, time_line_preset.csv
  390. -------------------------------------------------------------------------------
  391. Linux - Install Notes
  392. -------------------------------------------------------------------------------
  393. 1. autoconf
  394. 2. automake
  395. 3. gcc-c++ (to get g++)
  396. 4. blas-devel x64
  397. 5. atlas-devel x64
  398. 6. lapack-devel x64
  399. 7. download fftw-3: ./configure --prefix=/usr
  400. 8. fftwf-3 : ./configure --prefix=/usr --enable-single
  401. 9. fltk-devel x64