distort1.h 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (c) 1983-2013 Trevor Wishart and Composers Desktop Project Ltd
  3. * http://www.trevorwishart.co.uk
  4. * http://www.composersdesktop.com
  5. *
  6. This file is part of the CDP System.
  7. The CDP System is free software; you can redistribute it
  8. and/or modify it under the terms of the GNU Lesser General Public
  9. License as published by the Free Software Foundation; either
  10. version 2.1 of the License, or (at your option) any later version.
  11. The CDP System is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with the CDP System; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  18. 02111-1307 USA
  19. *
  20. */
  21. /* floatsam version*/
  22. #define DFLT_DISTORTER_MULT (.01)
  23. #define DFLT_DISTORTER_DEPTH (1.0)
  24. #define DISTORTER_TABLEN (1028)
  25. #define ENDBIT_SPLICE (256.0)
  26. #define PULSE_FRQLIM (6000.0)
  27. #define PULSE_DBLIM (-60)
  28. #define ORIG_PULSENV (0)
  29. #define PULSENV (1)
  30. #define PULSTRN (2)
  31. int process_with_swapped_bufs_on_single_half_cycles(dataptr dz);
  32. int process_with_swapped_bufs_on_full_cycles(dataptr dz);
  33. int process_on_single_buf_with_phase_dependence(dataptr dz);
  34. int process_with_swapped_buf_to_swapped_outbufs(dataptr dz);
  35. int process_with_swapped_bufs_on_full_cycles_with_optional_prescale(dataptr dz);
  36. int process_with_swapped_bufs_on_full_cycles_with_newsize_output_and_skipcycles
  37. (float *outbuf,int skip_param,dataptr dz);
  38. int process_cyclecnt(dataptr dz);
  39. int two_infiles_interleave_process(dataptr dz);
  40. int two_infiles_resize_process(dataptr dz);
  41. int distort_pitch(dataptr dz);
  42. int skip_initial_cycles(int *current_pos,int *current_buf,int phase,int skip_paramno,dataptr dz);
  43. int get_initial_phase(int *initial_phase,dataptr dz);
  44. int do_distort(int tthis,int is_last,int *lastzero,float *cyclemax,dataptr dz);
  45. int distort_env(int *current_buf,int initial_phase,int *current_pos,int *buffer_overrun,int *cnt,dataptr dz);
  46. int distort_rev(int *current_buf,int initial_phase,int *current_pos,int *buffer_overrun,int *cnt,dataptr dz);
  47. int distort_avg(int *current_buf,int inital_phase,int *outbufcnt,int *inbufcnt,int *cnt,dataptr dz);
  48. int distort_omt(int *inbufcnt,int inital_phase,dataptr dz);
  49. int mdistort(int is_last,int *lastzero,int *endsample,int *output_phase,int current_buf,float *cyclemax,
  50. int *no_of_half_cycles,int *startindex,int *startmakrer,int *endindex,dataptr dz);
  51. int distorth(int *bufpos,int phase,int *last_total_samps_read,int *current_buf,dataptr dz);
  52. int distortf(int *bufpos,int phase,int *last_total_samps_read,int *current_buf,dataptr dz);
  53. int distort_shuf(int *current_buf,int initial_phase,int *obufpos,int *current_pos_in_buf,int *cnt,dataptr dz);
  54. int distort_rpt(int *current_buf,int initial_phase,int *obufpos,int *current_pos_in_buf,int *cnt,
  55. int cyclecnt,int *lastcycle_len,int *lastcycle_start,int *last_bufcros,dataptr dz);
  56. int distort_del(int *current_buf,int *current_pos_in_buf,int phase,int *obufpos,int *cnt,dataptr dz);
  57. int distort_del_with_loudness(int *current_buf,int phase,int *obufpos,int *current_pos_in_buf,int *cnt,dataptr dz);
  58. int distort_rpl(int *current_buf,int initial_phase,int *obufpos,int *current_pos_in_buf,int *cnt,dataptr dz);
  59. int distort_tel(int *current_buf,int initial_phase,int *obufpos,int *current_pos_in_buf,int *cnt,dataptr dz);
  60. int distort_flt(int *current_buf,int initial_phase,int *obufpos,int *current_pos_in_buf,dataptr dz);
  61. int two_infiles_interleave_process(dataptr dz);
  62. int two_infiles_resize_process(dataptr dz);
  63. int reset_distorte_modes(dataptr dz);
  64. void prescale(int current_buf,int prescale_param,dataptr dz);
  65. int cop_out(int i,int j,int last_total_bytes_read,dataptr dz);
  66. int change_buf(int *current_buf,int *buffer_overrun,float **buf,dataptr dz);
  67. int change_buff(float **b,int *cycleno_in_group_at_bufcros,int *current_buf,dataptr dz);
  68. int get_full_cycle(float *b,int *buffer_overrun,int *current_buf,int initial_phase,int *current_pos,
  69. int cyclecnt_param,dataptr dz);
  70. int output_val(float value,int *obufpos,dataptr dz);
  71. int distort_overload(dataptr dz);
  72. int overload_preprocess(dataptr dz);
  73. int preprocess_pulse(dataptr dz);
  74. int do_pulsetrain(dataptr dz);
  75. int distort_rpt_frqlim(int *current_buf,int initial_phase,int *obufpos,int *current_pos_in_buf,int *cnt,
  76. int cyclecnt,dataptr dz);