stufisher / LiveOSC2

New version of LiveOSC for Live 9
99 stars 31 forks source link

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

Open hems opened 7 years ago

hems commented 7 years ago

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

stufisher commented 7 years ago

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

hems commented 7 years ago

@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

LeapGamer commented 7 years ago

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

hems commented 7 years ago

@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!

ccerrillos commented 7 years ago

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.

juhot commented 7 years ago

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 notifications@github.com 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- .