/[svn]/linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.cpp

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

revision 2935 by schoenebeck, Sun Jul 10 14:24:13 2016 UTC revision 2938 by schoenebeck, Mon Jul 11 17:10:40 2016 UTC
# Line 53  namespace LinuxSampler { Line 53  namespace LinuxSampler {
53    
54          Event e = m_vm->m_event->cause; // copy to get fragment time for "now"          Event e = m_vm->m_event->cause; // copy to get fragment time for "now"
55          e.Init(); // clear IDs          e.Init(); // clear IDs
56          e.Type = Event::type_note_on;          e.Type = Event::type_play_note;
57          e.Param.Note.Key = note;          e.Param.Note.Key = note;
58          e.Param.Note.Velocity = velocity;          e.Param.Note.Velocity = velocity;
59          // make this new note dependent to the life time of the original note          // make this new note dependent to the life time of the original note
# Line 67  namespace LinuxSampler { Line 67  namespace LinuxSampler {
67    
68          const note_id_t id = pEngineChannel->ScheduleNoteMicroSec(&e, 0);          const note_id_t id = pEngineChannel->ScheduleNoteMicroSec(&e, 0);
69    
70          // if a duration is supplied (and note-on event was scheduled          // if a duration is supplied (and play-note event was scheduled
71          // successfully above), then schedule a subsequent note-off event          // successfully above), then schedule a subsequent stop-note event
72          if (id && duration > 0) {          if (id && duration > 0) {
73              e.Type = Event::type_note_off;              e.Type = Event::type_stop_note;
74                e.Param.Note.ID = id;
75              e.Param.Note.Velocity = 127;              e.Param.Note.Velocity = 127;
76              pEngineChannel->ScheduleEventMicroSec(&e, duration);              pEngineChannel->ScheduleEventMicroSec(&e, duration);
77          }          }
# Line 214  namespace LinuxSampler { Line 215  namespace LinuxSampler {
215              Event e = pNote->cause;              Event e = pNote->cause;
216              e.Init(); // clear IDs              e.Init(); // clear IDs
217              e.CopyTimeFrom(m_vm->m_event->cause); // set fragment time for "now"              e.CopyTimeFrom(m_vm->m_event->cause); // set fragment time for "now"
218              e.Type = Event::type_note_off;              e.Type = Event::type_stop_note;
219                e.Param.Note.ID = id.noteID();
220                e.Param.Note.Key = pNote->hostKey;
221              e.Param.Note.Velocity = velocity;              e.Param.Note.Velocity = velocity;
222    
223              pEngineChannel->ScheduleEventMicroSec(&e, 0);              pEngineChannel->ScheduleEventMicroSec(&e, 0);
# Line 230  namespace LinuxSampler { Line 233  namespace LinuxSampler {
233                  Event e = pNote->cause;                  Event e = pNote->cause;
234                  e.Init(); // clear IDs                  e.Init(); // clear IDs
235                  e.CopyTimeFrom(m_vm->m_event->cause); // set fragment time for "now"                  e.CopyTimeFrom(m_vm->m_event->cause); // set fragment time for "now"
236                  e.Type = Event::type_note_off;                  e.Type = Event::type_stop_note;
237                    e.Param.Note.ID = id.noteID();
238                    e.Param.Note.Key = pNote->hostKey;
239                  e.Param.Note.Velocity = velocity;                  e.Param.Note.Velocity = velocity;
240    
241                  pEngineChannel->ScheduleEventMicroSec(&e, 0);                  pEngineChannel->ScheduleEventMicroSec(&e, 0);

Legend:
Removed from v.2935  
changed lines
  Added in v.2938

  ViewVC Help
Powered by ViewVC