From: Robert J. <rj...@sp...> - 2005-05-09 21:25:20
|
Hi Werner, I had a quick look at the midi plugin interface (which I'm looking forward to playing with!) and I was wondering about tempo/sync etc. I recall that we briefly talked at LAC about making plugins tempo/sync aware. I was thinking about a usecase, if I want to create a delay plugin. I was thinking that there would be a need for another method tick() or similar that would be called periodically. Hmmm, perhaps not. Can the plugin create all events during the original processEvent, with different timestamps? Is it possible to create events far ahead of their play-time? No need for this mail then ;) but I have already written it so I'm sending it anyway!. Hmmm, what about a plugin that produced random output without input. That would require a tick() method I think. Not generally useful, but still ;) A way to tell the plugin about the current tempo might be useful also. Enough babbling. Regards, Robert -- http://spamatica.se/musicsite/ |
From: Werner S. <ws...@se...> - 2005-05-10 08:37:56
|
On Monday 09 May 2005 21:25, Robert Jonsson wrote: > Hi Werner, > > I had a quick look at the midi plugin interface (which I'm looking forward > to playing with!) and I was wondering about tempo/sync etc. > I recall that we briefly talked at LAC about making plugins tempo/sync > aware. > > I was thinking about a usecase, if I want to create a delay plugin. > > I was thinking that there would be a need for another method tick() or > similar that would be called periodically. > Hmmm, perhaps not. Can the plugin create all events during the original > processEvent, with different timestamps? > Is it possible to create events far ahead of their play-time? > No need for this mail then ;) but I have already written it so I'm sending > it anyway!. > Hmmm, what about a plugin that produced random output without input. That > would require a tick() method I think. Not generally useful, but still ;) > > A way to tell the plugin about the current tempo might be useful also. > > Enough babbling. > > Regards, > Robert Hello Robert, dont worry, its all on the way. First i want to change the current midi input filter and midi input transform functions into midi plugins. For this functions you only need midi in/out in the plugin interface. There are two types of midi plugins similar to audio: filter type plugins and plugins which generate events at arbitrary time positions. The distinction is only for efficiency. The generator type plugins need to be polled at every process cycle (jack process()) which can be omitted for the filter type plugins. The next step is to implement generator type plugins and to evaluate, what kind of information should be exposed to the midi plugin interface. MusE should register as JACK timebase master and supply the bar/beat/tick to JACK transport. Then the JACK timebase structure and a float tempo value should be part of the midi plugin process() callback parameter list. An possible example plugin whould be a midi metronome or a simple arpeggiator. Kind Regards, Werner |