/[svn]/linuxsampler/trunk/src/engines/common/Event.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/Event.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2948 by schoenebeck, Fri Jul 15 15:29:04 2016 UTC revision 3246 by schoenebeck, Sun May 28 22:22:56 2017 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2016 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2017 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 166  namespace LinuxSampler { Line 166  namespace LinuxSampler {
166                  type_note_pressure, ///< polyphonic key pressure (aftertouch)                  type_note_pressure, ///< polyphonic key pressure (aftertouch)
167                  type_play_note, ///< caused by a call to built-in instrument script function play_note()                  type_play_note, ///< caused by a call to built-in instrument script function play_note()
168                  type_stop_note, ///< caused by a call to built-in instrument script function note_off()                  type_stop_note, ///< caused by a call to built-in instrument script function note_off()
169                    type_kill_note, ///< caused by a call to built-in instrument script function fade_out()
170                  type_note_synth_param, ///< change a note's synthesis parameters (upon real-time instrument script function calls, i.e. change_vol(), change_tune(), change_pan(), etc.)                  type_note_synth_param, ///< change a note's synthesis parameters (upon real-time instrument script function calls, i.e. change_vol(), change_tune(), change_pan(), etc.)
171              } Type;              } Type;
172              enum synth_param_t {              enum synth_param_t {
173                  synth_param_volume,                  synth_param_volume,
174                    synth_param_volume_time,
175                    synth_param_volume_curve,
176                  synth_param_pitch,                  synth_param_pitch,
177                    synth_param_pitch_time,
178                    synth_param_pitch_curve,
179                  synth_param_pan,                  synth_param_pan,
180                  synth_param_cutoff,                  synth_param_cutoff,
181                  synth_param_resonance,                  synth_param_resonance,
182                    synth_param_attack,
183                    synth_param_decay,
184                    synth_param_release,
185                    synth_param_amp_lfo_depth,
186                    synth_param_amp_lfo_freq,
187                    synth_param_pitch_lfo_depth,
188                    synth_param_pitch_lfo_freq,
189              };              };
190              union {              union {
191                  /// Note-on and note-off event specifics                  /// Note-on and note-off event specifics
# Line 340  namespace LinuxSampler { Line 352  namespace LinuxSampler {
352       */       */
353      template<typename T>      template<typename T>
354      void EventGenerator::scheduleAheadMicroSec(RTAVLTree<T>& queue, T& node, int32_t fragmentPosBase, uint64_t microseconds) {      void EventGenerator::scheduleAheadMicroSec(RTAVLTree<T>& queue, T& node, int32_t fragmentPosBase, uint64_t microseconds) {
355          node.scheduleTime = uiTotalSamplesProcessed + fragmentPosBase + float(uiSampleRate) * (float(microseconds) / 1000000.f);          // round up (+1) if microseconds is not zero (i.e. because 44.1 kHz and
356            // 1 us would yield in < 1 and thus would be offset == 0)
357            const sched_time_t offset =
358                (microseconds != 0LL) ?
359                    1.f + (float(uiSampleRate) * (float(microseconds) / 1000000.f))
360                    : 0.f;
361            node.scheduleTime = uiTotalSamplesProcessed + fragmentPosBase + offset;
362          queue.insert(node);          queue.insert(node);
363      }      }
364    

Legend:
Removed from v.2948  
changed lines
  Added in v.3246

  ViewVC Help
Powered by ViewVC