Skip to content

Commit

Permalink
added version 2.3.4 with more control over dsk and transition styles
Browse files Browse the repository at this point in the history
  • Loading branch information
sneat committed Jun 30, 2014
1 parent de33864 commit 15b2632
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 12 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# atemOSC v2.3.3
# atemOSC v2.3.4

## Changelog v2.3.4
- added support for specifying transition style
- added more control over downstream keyer states

## Changelog v2.3.3
- added support for controlling Media Players
Expand Down Expand Up @@ -66,11 +70,21 @@ For preview selection `/atem/preview/$i` can be used.
- **auto** `/atem/transition/auto`
- **fade-to-black** `/atem/transition/ftb`

To set the transition style of the Auto transition:

- **Mix** `/atem/transition/set-style/mix`
- **Dip** `/atem/transition/set-style/dip`
- **Wipe** `/atem/transition/set-style/wipe`
- **Stinger** `/atem/transition/set-style/sting`
- **DVE** `/atem/transition/set-style/dve`

Additional options.

- **Toggle Upstream Keyer 1** `/atem/usk/1` (up to `/atem/usk/4`, depends on your ATEM switcher)
- **Prepare Upstream Keyer 1** `/atem/nextusk/1` (up to `/atem/nextusk/4`, depends on your ATEM switcher)
- **Toggle Downstreamkeyer 1** `/atem/dsk/1` (up to `/atem/dsk/4`, depends on your ATEM switcher)
- **Auto Toggle Downstreamkeyer 1** `/atem/dsk/1` (up to `/atem/dsk/4`, depends on your ATEM switcher)
- **Tie Downstreamkeyer 1** `/atem/dsk/tie/1` (up to `/atem/dsk/tie/4`, depends on your ATEM switcher)
- **Cut Toggle Downstreamkeyer 1** `/atem/dsk/toggle/1` (up to `/atem/dsk/toggle/4`, depends on your ATEM switcher)
- **Set Media Player $i source to Clip $x** `/atem/mplayer/$i/clip/$x`
- e.g. `/atem/mplayer/1/clip/1` ()up to `/atem/mplayer/1/clip/2`, depends on your ATEM switcher
- e.g. `/atem/mplayer/2/clip/1` (up to `/atem/mplayer/2/clip/2`, depends on your ATEM switcher)
Expand Down
95 changes: 86 additions & 9 deletions atemOSC/SwitcherPanelAppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,33 @@ - (void) receivedOSCMessage:(OSCMessage *)m {
[[address objectAtIndex:2] isEqualToString:@"transition"] &&
[[address objectAtIndex:3] isEqualToString:@"ftb"]) {
mMixEffectBlock->PerformFadeToBlack();
} else if ([[address objectAtIndex:1] isEqualToString:@"atem"] &&
[[address objectAtIndex:2] isEqualToString:@"transition"] &&
[[address objectAtIndex:3] isEqualToString:@"set-type"]) {

HRESULT result;
NSString *style = [address objectAtIndex:4];
REFIID transitionStyleID = IID_IBMDSwitcherTransitionParameters;
IBMDSwitcherTransitionParameters* mTransitionStyleParameters=NULL;
result = mMixEffectBlock->QueryInterface(transitionStyleID, (void**)&mTransitionStyleParameters);
if (SUCCEEDED(result))
{
if ([style isEqualToString:@"mix"]){
mTransitionStyleParameters->SetNextTransitionStyle(bmdSwitcherTransitionStyleMix);
}
if ([style isEqualToString:@"dip"]){
mTransitionStyleParameters->SetNextTransitionStyle(bmdSwitcherTransitionStyleDip);
}
if ([style isEqualToString:@"wipe"]){
mTransitionStyleParameters->SetNextTransitionStyle(bmdSwitcherTransitionStyleWipe);
}
if ([style isEqualToString:@"sting"]){
mTransitionStyleParameters->SetNextTransitionStyle(bmdSwitcherTransitionStyleStinger);
}
if ([style isEqualToString:@"dve"]){
mTransitionStyleParameters->SetNextTransitionStyle(bmdSwitcherTransitionStyleDVE);
}
}
} else if ([[address objectAtIndex:1] isEqualToString:@"atem"] &&
[[address objectAtIndex:2] isEqualToString:@"nextusk"]) {
switch ([[address objectAtIndex:3] intValue]) {
Expand Down Expand Up @@ -372,17 +399,51 @@ - (void) receivedOSCMessage:(OSCMessage *)m {
}
} else if ([[address objectAtIndex:1] isEqualToString:@"atem"] &&
[[address objectAtIndex:2] isEqualToString:@"dsk"]) {
int t = [[address objectAtIndex:3] intValue];

if (t<=dsk.size()) {
if ([[address objectAtIndex:3] isEqualToString:@"tie"])
{
int t = [[address objectAtIndex:4] intValue];

if (t<=dsk.size()) {

std::list<IBMDSwitcherDownstreamKey*>::iterator iter = dsk.begin();
std::advance(iter, t-1);
IBMDSwitcherDownstreamKey * key = *iter;

bool isTied;
key->GetTie(&isTied);
bool isTransitioning;
key->IsTransitioning(&isTransitioning);
if (!isTransitioning) key->SetTie(!isTied);
}
} else if ([[address objectAtIndex:3] isEqualToString:@"toggle"])
{
int t = [[address objectAtIndex:4] intValue];

std::list<IBMDSwitcherDownstreamKey*>::iterator iter = dsk.begin();
std::advance(iter, t-1);
IBMDSwitcherDownstreamKey * key = *iter;
if (t<=dsk.size()) {

std::list<IBMDSwitcherDownstreamKey*>::iterator iter = dsk.begin();
std::advance(iter, t-1);
IBMDSwitcherDownstreamKey * key = *iter;

bool isLive;
key->GetOnAir(&isLive);
bool isTransitioning;
key->IsTransitioning(&isTransitioning);
if (!isTransitioning) key->SetOnAir(!isLive);
}
} else {
int t = [[address objectAtIndex:3] intValue];

bool isTransitioning;
key->IsAutoTransitioning(&isTransitioning);
if (!isTransitioning) key->PerformAutoTransition();
if (t<=dsk.size()) {

std::list<IBMDSwitcherDownstreamKey*>::iterator iter = dsk.begin();
std::advance(iter, t-1);
IBMDSwitcherDownstreamKey * key = *iter;

bool isTransitioning;
key->IsAutoTransitioning(&isTransitioning);
if (!isTransitioning) key->PerformAutoTransition();
}
}
} else if ([[address objectAtIndex:1] isEqualToString:@"atem"] &&
[[address objectAtIndex:2] isEqualToString:@"mplayer"]) {
Expand Down Expand Up @@ -557,6 +618,18 @@ - (IBAction)helpButtonPressed:(id)sender {
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\tFade-to-black: " attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"/atem/transition/ftb\n" attributes:infoAttribute]];

[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\nTransition type:\n" attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\tSet to Mix: " attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"/atem/transition/set-style/mix\n" attributes:infoAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\tSet to Dip: " attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"/atem/transition/set-style/dip\n" attributes:infoAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\tSet to Wipe: " attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"/atem/transition/set-style/wipe\n" attributes:infoAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\tSet to Stinger: " attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"/atem/transition/set-style/sting\n" attributes:infoAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\tSet to DVE: " attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"/atem/transition/set-style/dve\n" attributes:infoAttribute]];

[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:@"\nUpstream Keyers:\n" attributes:addressAttribute]];
for (int i = 0; i<keyers.size();i++) {
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"\tOn Air KEY %d: ",i+1] attributes:addressAttribute]];
Expand All @@ -574,6 +647,10 @@ - (IBAction)helpButtonPressed:(id)sender {
for (int i = 0; i<dsk.size();i++) {
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"\tAuto-Transistion DSK%d: ",i+1] attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"/atem/dsk/%d\n",i+1] attributes:infoAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"\tTie Next-Transistion DSK%d: ",i+1] attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"/atem/dsk/tie/%d\n",i+1] attributes:infoAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"\tToggle DSK%d: ",i+1] attributes:addressAttribute]];
[helpString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"/atem/dsk/toggle/%d\n",i+1] attributes:infoAttribute]];
}


Expand Down
2 changes: 1 addition & 1 deletion atemOSC/atemOSC-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.3.3</string>
<string>2.3.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit 15b2632

Please sign in to comment.