LiveOSC2 icon indicating copy to clipboard operation
LiveOSC2 copied to clipboard

Populating / editting MIDI clip? ( maybe even modulations and automations? )

Open hems opened this issue 8 years ago • 6 comments

Is it possible to create a MIDI clip with notes inside using the standard functions already implemented through LiveOSC2 ?

i can see set_notes on the doc

set_notes

Parameter: 
list_of_notes [pitch, time, duration, velocity, is_muted] 
Will apply the given notes to the clip, overwriting existing notes. 
An example sequence of calls looks like this: 

call set_notes 
call notes 2 
call note 60 0.0 0.5 100 0 
call note 62 0.5 0.5 64 0 
call done 

For MIDI clips only.

but i fail to find a way of creating a midi clip using LiveOSC2 ?

Thank you

hems avatar Sep 27 '16 20:09 hems

You're absolutely right, this is not yet implemented ;(

stufisher avatar Oct 07 '16 16:10 stufisher

@stufisher would you mind guiding me a bit on how to implement that?

I'm very confused, on how the implementation would be possible, at a first look it seems to be that editing LO2ClipSlotComponent.py might not be enough as it relies on the implementation of _Framework/ClipSlotComponent.py ?

Is there a "generic function" or way of implementing such a function so i could send "RAW Messages" to live, for instance creating the call messages ( like the example i wrote in the first issue message ) on a python script and then send them to LiveOSC using for instance pylive and then LiveOSC forwarding those to Live ?

Thanks a lot for your help

hems avatar Oct 09 '16 06:10 hems

Hey hems, did you ever figure out how to send midi signals to live with this?

LeapGamer avatar Jun 02 '17 05:06 LeapGamer

@LeapGamer nope.. end up giving up on this.. i think perhaps there is other ways that would be less of a mess to achieve similar results!

hems avatar Jun 13 '17 03:06 hems

I've added basic support (get, add, remove) for note editing in #10.

Up next is automation/envelopes, and hopefully some way of getting the time signature of the song or clip to help with displaying note timing/durations.

ccerrillos avatar Jul 02 '17 09:07 ccerrillos

Hi,

You can get the clips time signatures via clip LOM-object's "signature_denominator" and "signature_numerator" properties (get/set/changed). The same properties exist on Song-object as well.

Automations are documented to be available for only session clips. Those are gotten as AutomationEnvelope -instances via clip's automation_envelope(DeviceParameter) -method. Apparently the AutomationEnvelope -instances only give you two methods, insert_step and value_at_time, which seems a bit limited.. As well, the MidiCC-automations seem inaccessible, which would be very unfortunate.

I guess you're using this API http://www.julienbayle.net/PythonLiveAPI_documentation/Live9.6.xml already, or reading the current API from Live -module (there are some changes in 9.7.2).

-juho

On Sun, Jul 2, 2017 at 12:52 PM, Carlos Cerrillos [email protected] wrote:

I've added basic support (get, add, remove) for note editing in #10 https://github.com/stufisher/LiveOSC2/pull/10.

Up next is automation/envelopes, and hopefully some way of getting the time signature of the song or clip to help with displaying note timing/durations.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stufisher/LiveOSC2/issues/4#issuecomment-312481480, or mute the thread https://github.com/notifications/unsubscribe-auth/AUGg8mcV7QgwTVqH46BNsytfXcRqwTDmks5sJ2hVgaJpZM4KIJe- .

juhot avatar Jul 03 '17 08:07 juhot