Adobe-CEP / CEP-Resources

Tools and documentation for building Creative Cloud app extensions with CEP
https://www.adobe.io/apis/creativecloud/cep.html
1.59k stars 821 forks source link

setAudioChannelMapping for ProjectItems (premiere pro) #263

Open maca134 opened 4 years ago

maca134 commented 4 years ago

Using the sample here as reference, i been trying to setup channel mapping but it only works when parameter 2 is set to zero. not completely sure what (4,5) params are suppose to do on a stereo clip but i tried them with no result

var mapping = item.getAudioChannelMapping;
mapping .audioClipsNumber = 1;
mapping .audioChannelsType = 1;
mapping .setMappingForChannel(0,0);
mapping .setMappingForChannel(1,1);
item.setAudioChannelMapping(_mapping);

My assumption is the code above would set left -> left and right -> right channels but only the left channel gets set.

The clip is stereo and I can set the channel mapping manually.

bbb999 commented 4 years ago

I've sent some working example snippets to your email; were they any help?

Hypnotical commented 4 years ago

Hello

Today I learned about programming in Premiere script with this amazing tutorials

Well, I'm not a programmer and it's not easy for me, but, I get how to create buttons and execute some functions (using parts of code from here)

scripting

Now I'm trying to make a button to change the output channel assignement of a multichannel sequence. I have a multichannel sequence (6 audio mono outs, 3 stereo) as you can see on the image.

Is there a way to map the output of channel (by name) from 1-2 to 3-4?

Normally you can do this clicking right button on the track:

scripting2

For example: TRACK NAME OFF_A (mapped from 1-2 audio outs to 3-4).

scripting3

I appreciate any information to help me. Thank you guys

bbb999 commented 4 years ago

You can control sequence channelization, with the sequence settings object.

https://github.com/Adobe-CEP/Samples/blob/5adff5bfad64ed20ae68770ab0e2401790d47e7e/PProPanel/jsx/PPRO/Premiere.jsx#L2277

Hypnotical commented 4 years ago

Thankyou @bbb999 for the info. I'm going to try it. I'll send here my results after/if it works :)

Hypnotical commented 4 years ago

Well, I've been trying all day long... and nothing :)

I think that maybe there is no way to do it. (in fact, I'm not a programmer an maybe I'm wrong). So I just edited a video to show what I would like to get with a line of code. Because I try, and try... and there's no light on my brain xD

This is what I'm trying... https://youtu.be/RKwhUtuq4yg (1 minute video)

The instruction could be something (not far from)... ...Active.Sequence.track[0].setAudioMappChannelTo->1-2 But Maybe there's no instruction to map general tracks, instead of clips inside on tracks?

Thank you :)

bbb999 commented 4 years ago

@Hypnotica , please write me directly, and we can pursue the issue further. bbb@adobe.com