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

Diff of /linuxsampler/trunk/src/engines/EngineBase.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 2972 by schoenebeck, Fri Jul 22 14:37:34 2016 UTC
# Line 689  namespace LinuxSampler { Line 689  namespace LinuxSampler {
689                  NoteIterator itNewNote = pNotePool->allocAppend();                  NoteIterator itNewNote = pNotePool->allocAppend();
690                  const note_id_t newNoteID = pNotePool->getID(itNewNote);                  const note_id_t newNoteID = pNotePool->getID(itNewNote);
691    
692                    // remember the engine's time when this note was triggered exactly
693                    itNewNote->triggerSchedTime = pNoteOnEvent->SchedTime();
694    
695                  // usually the new note (and its subsequent voices) will be                  // usually the new note (and its subsequent voices) will be
696                  // allocated on the key provided by the event's note number,                  // allocated on the key provided by the event's note number,
697                  // however if this new note is requested not to be a regular                  // however if this new note is requested not to be a regular
# Line 1256  namespace LinuxSampler { Line 1259  namespace LinuxSampler {
1259                          // the script's "init" event handler is only executed                          // the script's "init" event handler is only executed
1260                          // once (when the script is loaded or reloaded)                          // once (when the script is loaded or reloaded)
1261                          if (pEngineChannel->pScript && pEngineChannel->pScript->handlerInit) {                          if (pEngineChannel->pScript && pEngineChannel->pScript->handlerInit) {
1262                                dmsg(5,("Engine: exec handlerInit %p\n", pEngineChannel->pScript->handlerInit));
1263                              RTList<ScriptEvent>::Iterator itScriptEvent =                              RTList<ScriptEvent>::Iterator itScriptEvent =
1264                                  pEngineChannel->pScript->pEvents->allocAppend();                                  pEngineChannel->pScript->pEvents->allocAppend();
1265    
1266                              itScriptEvent->cause.pEngineChannel = pEngineChannel;                              itScriptEvent->cause.pEngineChannel = pEngineChannel;
1267                              itScriptEvent->handlers[0] = pEngineChannel->pScript->handlerInit;                              itScriptEvent->handlers[0] = pEngineChannel->pScript->handlerInit;
1268                              itScriptEvent->handlers[1] = NULL;                              itScriptEvent->handlers[1] = NULL;
1269                                itScriptEvent->currentHandler = 0;
1270                                itScriptEvent->executionSlices = 0;
1271                                itScriptEvent->ignoreAllWaitCalls = false;
1272                                itScriptEvent->handlerType = VM_EVENT_HANDLER_INIT;
1273    
1274                              VMExecStatus_t res = pScriptVM->exec(                              VMExecStatus_t res = pScriptVM->exec(
1275                                  pEngineChannel->pScript->parserContext, &*itScriptEvent                                  pEngineChannel->pScript->parserContext, &*itScriptEvent
# Line 1916  namespace LinuxSampler { Line 1924  namespace LinuxSampler {
1924               * @param pEngineChannel - engine channel on which this event occurred on               * @param pEngineChannel - engine channel on which this event occurred on
1925               * @param itEvent - note synthesis parameter change event               * @param itEvent - note synthesis parameter change event
1926               */               */
1927              virtual void ProcessNoteSynthParam(EngineChannel* pEngineChannel, RTList<Event>::Iterator& itEvent) OVERRIDE {              virtual void ProcessNoteSynthParam(EngineChannel* pEngineChannel, RTList<Event>::Iterator& itEvent) {
1928                  EngineChannelBase<V, R, I>* pChannel = static_cast<EngineChannelBase<V, R, I>*>(pEngineChannel);                  EngineChannelBase<V, R, I>* pChannel = static_cast<EngineChannelBase<V, R, I>*>(pEngineChannel);
1929    
1930                  NoteBase* pNote = pChannel->pEngine->NoteByID( itEvent->Param.NoteSynthParam.NoteID );                  NoteBase* pNote = pChannel->pEngine->NoteByID( itEvent->Param.NoteSynthParam.NoteID );
# Line 1954  namespace LinuxSampler { Line 1962  namespace LinuxSampler {
1962                      case Event::synth_param_resonance:                      case Event::synth_param_resonance:
1963                          pNote->Override.Resonance = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;                          pNote->Override.Resonance = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
1964                          break;                          break;
1965                        case Event::synth_param_attack:
1966                            pNote->Override.Attack = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
1967                            break;
1968                        case Event::synth_param_decay:
1969                            pNote->Override.Decay = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
1970                            break;
1971                        case Event::synth_param_release:
1972                            pNote->Override.Release = itEvent->Param.NoteSynthParam.AbsValue = itEvent->Param.NoteSynthParam.Delta;
1973                            break;
1974                  }                  }
1975    
1976                  // move note parameter event to its MIDI key                  // move note parameter event to its MIDI key

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

  ViewVC Help
Powered by ViewVC