Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Manipulating Midi regions
#1
Am currently trying to write lua script for "humanising" midi tracks and stuck on a few things. Anybody out there know the answers .....

1. Tried the script as a plugin but having problems with delaying midi events. I have used shmem to make buffer, which works but cannot seems to remove entries from the buffer when needed. Tried just setting to nil and table.remove() function but no luck????
2. As a non-realtime script I can get MidiRegion, list all notes but seems no way to alter note parameters using the MidiRegion -> MidiModel->Noteptr ..... am I missing something ? Is there a way of accessing raw Midi events in the region ?

Thanks in advance!
Reply
#2
The MIDIModel currently only exposes :add and :remove methods. I suppose you could remove every note and re-add it.

In short: you create a difference command and then apply it to the region.

One example of adding notes would be the Polyphonic Audio to MIDI script
Reply
#3
Thanks for that, had got that far and all working as a stand alone script.

Is there a way to only get selected notes from a midi region ?

Steve Huh
Reply
#4
Probably not, since MIDI and the Tempo-Map as well as selection is going to change in incompatible ways in Ardour6. Most of the API related this has not yet been exposed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)