Git Product home page Git Product logo

linkkit's Introduction

LinkKit

iOS SDK for Ableton Link. An overview of Link concepts can be found at https://ableton.github.io/link. All iOS specific documentation, integration guidelines, and test plans can be found at https://ableton.github.io/linkkit.

The LinkKit SDK is distributed as a zip file attached to a release in this repo. Please see the releases tab for the latest release. It is strongly recommended to build apps against an official release for final submission to the App Store. Official releases are those not marked "Pre-release".

By using LinkKit you agree to the terms and conditions of the Ableton Link SDK license.

iOS 14 Compatibility

Link uses UDP multicast messages on the local area network to find other peers. Apple added security measures to iOS 14, that require a special entitlement for the app to be able to send those messages. You can find more information in the LinkKit documentation.

iOS 17 Compatibility

Apple enforces entitlements more strictly since iOS 17. To be able to detect other Link peers on the LAN your application needs the com.apple.developer.multicast entitlement.

Building

It is strongly recommended to use the pre-built version of LinkKit. For debugging and accommodation of exceptional requirements, it is possible to build LinkKit as described below.

Custom builds of LinkKit depend on the cross-platform version of Link and are subject to this license. Please note that the GPL is not compatible with the iOS App Store.

Creating a Xcode project

To generate and open a Xcode Project, use make xcode link_dir=$PATH_TO_LINK_REPOSITORY. The Xcode Project will be located in the build directory.

Building a Release Bundle

Use make link_dir=$PATH_TO_LINK_REPOSITORY to generate a release bundle for all target platforms. The bundle can be found at build/output/LinkKit.zip.

linkkit's People

Contributors

brs-ableton avatar cdi-ableton avatar fgo-ableton avatar mfk-ableton avatar mme-ableton avatar nre-ableton avatar vst-ableton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linkkit's Issues

Initial BPM and ABLinkNew()

During my app's startup sequence, I call ABLinkNew() with a fixed default value of 120BPM. This is because the app is unable to determine the preferred tempo until the user has loaded a project (set).

Later, when the user loads a project, the app does not propose a tempo change to the ABL session but instead uses the session's current tempo. This means the app will confirm to requirement "TEMPO-3: When connected, loading a new document should not change the Link session tempo".

My problem: When a new peer connects to the session and requests the tempo, it gets the default value of 120BPM rather than the current tempo of the peer which started the session. Obviously, this occurs because the session was initialized with 120BPM and no peer has since proposed a tempo change.

My question: Is there a way the app can ask the API 'am I the only peer in this session'? If so, it then it knows it's the master and it may propose the session's tempo even when loading a new set/project.

I've tried using ABLLinkIsConnected() for this purpose, but it can return false for a short time when the peer's initially connecting and therefore gives 'false negatives'.

The enabled state is controlled directly by the user via the ABLLinkSettingsViewController

Hi. I have just stumbled on this limitation. Is there any technical reason for only allowing a developer to open a dedicated iOS only view controller to controller such an important aspect?

I take consistency across platforms very seriously and for me it doesn't make sense to display a view controller that is not in the same visual language of my app.

The fact that Link itself is developed in C++ is great because I can use it in my Android, iOS and desktop apps easily, but this limitation it's just the opposite.

Please advise!

[ABLLinkNotificationView init] causes unrecognized selector

I'm integrating LinkKit into my iOS app, but I find that as soon as LinkKit wants to show a notification (eg. when a peer connects or disconnects) the app crashes with the following output:

-[AppController window]: unrecognized selector sent to instance 0x17d35c60
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppController window]: unrecognized selector sent to instance 0x17d35c60'

Here's the callstack (I've edited for brevity):

Main Thread (1)Queue : com.apple.main-thread (serial)
...
#9	0x1bf64514 in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#10	0x1bf6242a in ___forwarding___ ()
#11	0x1be87f08 in _CF_forwarding_prep_0 ()
#12	0x00c6f000 in -[ABLLinkNotificationView init] ()
#13	0x00c6edba in ABLLinkNotificationsShowMessage ()
#14	0x00c47c64 in std::__1::__function::__func<ABLLinkNew::$_6, std::__1::allocator<ABLLinkNew::$_6>, void (unsigned long)>::operator()(unsigned long&&) ()
#15	0x00c479d4 in ___ZZN7ABLLinkC1EdENK3$_4clEm_block_invoke ()
...
#22	0x1be67e80 in CFRunLoopRunInMode ()
#23	0x1d614bfc in GSEventRunModal ()
#24	0x2102282e in -[UIApplication _run] ()
#25	0x2101cf60 in UIApplicationMain ()
...


AppController is the main UIApplication class, specified in main:

UIApplicationMain(argc, argv, nil, @"AppController");

... and declared like this:

@interface AppController : UIResponder <UIApplicationDelegate>
{
	UIWindow*			mpMainWindow;
	OpenGLView*			mpOpenGLView;
...
}

Any ideas about the selector -[ABLLinkNotificationView init] may be attempting to call?

Beat time: Is it really beats, or quarter notes?

I'm currently dealing with time signatures and how they may affect Ableton Link integration.

Would I be correct in saying that the timeline's 'beat time' is actually quarter notes rather than beats?

Audiobus keeps adding Link participants

Scenario:

  1. Launch Audiobus
  2. I select and launch my app from Audiobus. My app has Link enabled.
  3. My app shows "Links 1" correctly.
  4. Go back to Audiobus
  5. Launch my app again (just by pressing the app icon)
  6. My app now shows "Links 2".
  7. Repeating steps 4-6 keeps adding Links (3, 4, 5, etc...) even though it should stay at "1 Link"

Since Links display is in the Link library, I wanted to bring the issue up here.

libABLLink identical in 1.0.2?

Hey guys

I was just updating to 1.0.2 and it seems that libABLLink.a is identical between the releases, with an md5 of 92059913005b0fc59edd454ae995af05

Is that correct? Is it really just header documentation changes in ABLLink.h and ABLLinkSettingsViewController.h?

Thanks for confirming!

Use of DBL_MIN

Just a minor nitpick, the way DBL_MIN is used in the LinkHut example as a magic number to detect when changes are made, but DBL_MIN is actually a positive number which falls in the range of allowable values. Perhaps you meant to use -DBL_MAX?

No apps discovered to connect

I've been trying to add Ableton Link to my app. Everything seems to work correctly and I'm calling the necessary methods at the right time. However, when I open the Ableton Link menu to connect to apps, none are ever displayed.

This is the full code of the implementation. I just open the settingViewController and enable Link with that.

//
//  AbletonLinkManager.m
//  OnSong
//
//  Created by Jason Kichline on 2/2/16.
//  Copyright © 2016 OnSong LLC. All rights reserved.
//

#import "AbletonLinkManager.h"
#import "OSMetronomeManager.h"
#include <mach/mach_time.h>


static void onSessionTempoChanged(Float64 bpm, void* context) {
    NSLog(@"Tempo changed to: %f", bpm);
}

@implementation AbletonLinkManager

-(id)init {
    self = [super init];
    if(self) {

        // Set up the Ableton Link Library
        float bpm = (float)(([OSMetronomeManager manager].metronome.BPM > [SongMetronome minimumBPM]) ? [OSMetronomeManager manager].metronome.BPM : [SongMetronome defaultBPM]);
        linkRef = ABLLinkNew(bpm, 4);
        ABLLinkSetSessionTempoCallback(linkRef, onSessionTempoChanged, (__bridge void *)self);

        // Listen for changes in application state to deal with turning it on and off
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];

        // Listen for changes to BPM and set accordingly
        [[OSMetronomeManager manager].metronome addObserver:self forKeyPath:@"BPM" options:NSKeyValueChangeNewKey context:nil];
    }
    return self;
}

-(void)didBecomeActive:(NSNotification*)n {
    ABLLinkSetActive(linkRef, true);
}

-(void)didEnterBackground:(NSNotification*)n {
    ABLLinkSetActive(linkRef, false);
}

-(BOOL)isEnabled {
    return ABLLinkIsEnabled(linkRef);
}

-(BOOL)isConnected {
    return ABLLinkIsConnected(linkRef);
}

-(ABLLinkSettingsViewController*)settingsViewController {
    return [ABLLinkSettingsViewController instance:linkRef];
}

-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
    if([keyPath isEqualToString:@"BPM"]) {
        ABLLinkProposeTempo(linkRef, [OSMetronomeManager manager].metronome.BPM, mach_absolute_time());
    }
}

-(void)dealloc {
    ABLLinkDelete(linkRef);
    [[OSMetronomeManager manager].metronome removeObserver:self forKeyPath:@"BPM"];
    [super dealloc];
}

+(BOOL)isSupported {
    return ([UIDevice currentDevice].systemVersion.floatValue >= 8);
}

+(void)load {
    if([self isSupported]) {
        [AbletonLinkManager manager];
    }
}

static AbletonLinkManager* __manager;
+(AbletonLinkManager*)manager {
    if(__manager == nil) {
        __manager = [[AbletonLinkManager alloc] init];
    }
    return __manager;
}

@end

Now, my app is doing other networking related tasks. Is Ableton setting up a Bonjour web service that may be conflicting? Is there any way to debug the networking stack to troubleshoot why this is failing? Is there just something that I have not set up correcting above?

ABLLinkRequestBeatAtTime seemingly not working with ABLLinkCommitAppTimeline

I'm converting my app from pre-2.x to use 2.1.1

My original working code was:

ABLLinkResetBeatTime(_ablLink, 0.0, AECurrentTimeInHostTicks());

However when I convert to the new format, I'm seeing something strange. From the main thread, the following code does not change the beat time:

  const ABLLinkTimelineRef timelineRef = ABLLinkCaptureAppTimeline(_ablLink);
  ABLLinkRequestBeatAtTime(timelineRef, 0.0, AECurrentTimeInHostTicks(), self.quantum);
  ABLLinkCommitAppTimeline(_ablLink, timelineRef);

but if I use:

  const ABLLinkTimelineRef timelineRef = ABLLinkCaptureAudioTimeline(_ablLink);
  ABLLinkRequestBeatAtTime(timelineRef, 0.0, AECurrentTimeInHostTicks(), self.quantum);
  ABLLinkCommitAudioTimeline(_ablLink, timelineRef);

it does work.

Of course, I'm not supposed to use the ABLLinkCaptureAudioTimeline in the main thread and I am certain I'm in the main thread.

Anyone seen anything similar?

Using C++

Hello,
I'm trying to use LinkKit with a C++ framework (either Cinder or openFrameworks), is there an example standard C++ Xcode project to start from?
Is the library limited to ipad or iphone or is it possible to do a desktop app?

Thank you
Bruce

ABLLinkSetTempo does nothing

I've been implementing Link these days and seems to work perfect except for one thing. ABLLinkSetTempo does absolutely nothing.
Here is the code relating to the problem. tempoChange is setted only when the user changes the tempo in my app. Why is this tempo proposal ignored ?

const UInt64 hostTimeAtBufferBegin = inTimeStamp->mHostTime + soundStructPointerArray[0].outputLatency;
    const ABLLinkTimelineRef timeline =
    ABLLinkCaptureAudioTimeline(soundStructPointerArray[0].ablLink);
    if (soundStructPointerArray[0].tempoChange) {
        ABLLinkSetTempo(timeline, soundStructPointerArray[0].tempoChange, hostTimeAtBufferBegin);
        soundStructPointerArray[0].tempoChange=0;
    }

Reachability check

Hi!
I stumbled upon this problem when testing.
App 1 and App 2 is running a link session together, our app (App 3) enables Link but its not connected to the wifi.
App 3 suggest a new bpm to Link, we enable wifi and join the session. What happens now is that
a new bpm in the session is triggered which goes against the Test plan Tempo-2 case.
Should our app check that we're actually connected to the wifi before we suggest a new bpm?
I tried some other apps with Link and none of them seems to be doing this.

Notifications don't appear in apps built with JUCE

We're currently implementing Link in our app built with JUCE. Everything's looking good, but we're not seeing in-app notifications. I'm not sure where to start with finding out why.

It may be useful to refer to the JUCE code that wraps iOS native windows.

I should note that we work closely with the JUCE team closely, so we can expedite any changes required.

Link fails to sync and generates error message

Hi there,

My project is a synth with a built-in sequencer that uses libpd's implementation of Ableton Link, and occasionally I will have sync problems where a log message similar to this will appear:

AUD003534z2: Scheduling trigger update 1955079072

In this particular case I am receiving MIDI from an IAA source; when I press the global IAA play button, the sequencer fails to play (it doesn't receive an increase in beat time or steps), and the above message appears.

I'm just wondering if this is generated by Link or libpd? If not Link related, feel free to close this issue. I've reached out to the libpd developers as well.

Usage of non atomic operations between threads in LinkHut

The method used in LinkHut to communicate info to and from the audio thread, are not atomic and will break sometimes on 32 bit platforms with torn writes. It happens when a Float64 or UInt64 value is half written then the other thread reads the value.

Apple Privacy

I'm using ABLink SDK in several iOS audio apps.
Now the App Store Connect ask a new setting for the privacy:

my question is, ABLink are collecting data?

Thanks.

Thanks for helping users understand your app's privacy practices. Remember that you're responsible for any third-party code that is added to your app, so if your third-party partners collect data from your app, you must represent that in your responses.

“Collect” refers to transmitting data off the device in a way that allows you and/or your third-party partners to access it for a period longer than necessary to service the transmitted request in real time.
“Third-party partners” include analytics tools, advertising networks, third-party SDKs, or other external vendors whose code you have added to the app.

You can view the full list of questions at any time.

________________________________

Do you or your third-party partners collect data from this app?

Yes, we collect data from this app
No, we do not collect data from this app

Tempo Drift on iPhones/iOS 8 but not iPad/iOS 9, possibly linked to mHostTime difference

Hey all,

This isn't exactly a Link issue per se, but I know of no other place (besides the Audiobus developer forums) where there are experts on Core Audio that might be able to offer some insight into this issue. It also could potentially affect other developers integrating Link.

I have implemented Link into my iOS app, and all is working great. However last night I noticed a slight tempo drift on my iPhone compared to my iPad. Upon further testing I observed that at 100bpm (6615.0 frames per 16th note), over the course of 1 minute, the iPhone would fall behind Ableton Link by about 0.038 beats (ie. the first beatTime value was 1.000 and after a minute the beat time was about 99.962). Which is about 15-16% of a 16th note. This seems to drift at a reasonably linear rate and would result in a noticeable discrepancy between the beats after a few minutes when comparing to another app running Link on the iPhone, or against my own app running on the iPad at the same time. Indeed running the app (identical code base) on my iPad Air 1 (iOS 9.0) produced rock solid results with a beat discrepancy of 0.000001 for each beat. Where as both my iPhone 6 (iOS 8.4) and iPhone 5 (iOS 8.1) produced this tempo drift by the same degree.

I figure it must be Core Audio related if the same code was producing two different results, and noticed that on my iPad the difference in value between the inTimeStamp->mHostTime at each callback was 139320, where as on my two iPhones the mHostTime difference between each callback was 139264.

139320 - 139264 = 56 less mHostTime on iPhones, which is 56/139320 = 0.00040195 as a percent

44100 * 60 = 2,646,000 frames per minute
2,646,000 * 0.00040195 = 1063.5597 frames drift

As a percentage of a 16th note (6615 frames), this is 1063.5597 / 6615 = 16.078% - suspiciously close to the 15-16% of 1/16th drift I observed after 1 minute.

So I then added some code into the app that multiplied the frames per 16th beat by a ratio of (139320 / 139264).
eg:

    Float64 newSamples = 44100.0 / ((newTempo * 4.0 )/60.0);  
                  // ( = 6615, where newTempo is 100 )
    newSamples = newSamples * (139320.0 / 139264.0);

This produces very consistent results with no tempo drift after many minutes!
beatTime = 217.999508 bpm = 99.959805 samplesPerBeat = 6617.659984 quantime = 4.000000
beatTime = 218.999527 bpm = 99.959805 samplesPerBeat = 6617.659984 quantime = 4.000000
beatTime = 219.999504 bpm = 99.959805 samplesPerBeat = 6617.659984 quantime = 4.000000
beatTime = 220.999520 bpm = 99.959805 samplesPerBeat = 6617.659984 quantime = 4.000000

However obviously I can't just apply this dodgy fix as I have no idea whats really causing it. Would a discrepancy in mHostTime actually cause this? (ie. does it mean the buffer is delivered to the speakers at an earlier time?). Is the cause iPhones vs iPad hardware or is it iOS 8 vs iOS 9? I would love to know what mHostTime results other people are getting on their devices (ie save the mHostTime between callbacks and each callback just do newHostTime - oldHostTime). Is no one else experiencing this issue? I have compared other Link enabled apps on my iPhone and they don't seem to suffer from any drift issues, however I am not sure whether or not this is because they are constantly recalibrating themselves based on Link's beat time, or whether they're just setting a new tempo once at the start and letting its do its thing until notified of any beat changes, as I am doing.

Anyway, sorry for the long explanation. Any insight anyone could provide would be greatly appreciated!

Cheers,
David

Edit: Just tested on my iPhone 4 / iOS 7.1.2, and although I can't run Link on it I'm getting a mHostTime difference of 139320 - like the iPad.

renderMetronomeIntoBuffer from wav

Sorry for possible nubie question, but I have some trouble with understanding starter example.
To best understand the example I tried to change simple sin signal at renderMetronomeIntoBuffer to some wav file from asset - so we will have to play wav file on each beat.

I read my wav file to array of <float, float>, where first value is time from wav and second is float value. How can I fill that data to buffer at renderMetronomeIntoBuffer ? If my understanding is correct I need to

  • encrease bufferSize by some init settings (???) because 512 is too small for any even simple wav, but good enough for sin signal

  • choose float values from my wav array more closely to secondsAfterClick ?

Are my suggestions correct? Is there is any support from LinkKit for audio files, or maybe you can recommend any third-party sdk, or at least just a way to understand and fill data into buffer at renderMetronomeIntoBuffer?

Any suggestions will be appreciated, thanks in advance.

Memory leaks detected

Instruments detects many memory leaks.

Open LinkHut in Xcode, select Product - Profile, select Leaks, and push the record button.

Xcode 8.3.3 (8E3004b)
LinkKit 2.1.0
LinkKit 2.1.1 beta

Support for Scenes on iPad OS

Symptom: When using UISceneDelegate, the In-App Notification do not show up.
Please add support for UISceneDelegate, a new feature for iPadOS 13.1 which enables windows support on iPads.

differentiate between 2 different link enabled apps running at the same time?

I am building an app that is based on host and guest relationship:
One person starts a session and others can connect to this session to play together.

in case two people are hosting different sessions on the same network, then their Links automatically connect and that is a huge problem, as they affect each other, and they shouldn't. each session should have its own Link connections, but not to another session.

Is there any way to deal with such a case???

Feedback loop with tempo propose

Hi,

I'm having a problem. I have implemented Link as in Link Hut, with the LinkData structure. My app audio callback is calling everything that is being called on LinkHut example, except the fill buffer with click function.

I'm listening to tempo changes in session and changing my app tempo according. It happens that when I modify the tempo in my app, it will cause a new tempo proposal which triggers a tempo change in session, with a tempo that it is inferior with the tempo I have proposed. This cause my application to be stuck in tempo.

How should I handle this case?

Thanks,

Nuno

ARM Mac - Cannot link when building with LinkKit to target (ARM based...) iOS Emulator

Hi!

As the title says: when building using ARM-based Mac, it is not possible to link with LinkKit when targeting the iOS Emulator.

The reason is that on ARM Macs, the Simulator requires ARM code; as opposed to Intel Macs, where the Simulator requires x86 code, and LinkKit can be compiled-in successfully.

In case it helps, you can look at the latest version of the Audiobus SDK, where they've updated to solve this problem for Audiobus developers.

Thanks in advance, Pete

Isn't there a ABLLinkIsConnectedCallback?

I have just stumbled in this scenario.

  • I had Ableton Live open but with Link disabled
  • I had an Ableton Link app open with Link enabled
  • I enabled Link in Live.
  • Link session was established
  • The tempo didn't change in both apps.

I was expecting to have a ABLLinkIsConnectedCallback so I could get the tempo of the session.
I was expecting a linkTempoSession changed on the Link App, but then I thought that this might be intentional.

Can two linkhut apps connect?

I'm testing Link by first running LinkHut on two different iPhones to see if they recognize each other.
However, even after making sure both phones are connected to the same Wifi network (at a Starbucks) and enabling the link in the menu the linkhut apps to not recognize each other.
Is there something else I need to do?

Duplicate symbols when using Boost in own project

I am getting duplicate symbol errors due to using Boost in our app when linking with Link. Workaround is to remove the reference to $(BOOST_ROOT)/libs/system/src/error_code.cpp but this could lead to problems with different Boost versions.

duplicate symbol __ZN5boost6system15system_categoryEv in: /Users/USER/Library/Developer/Xcode/DerivedData/iPRODUCT-fnrscsrtzxoykzcvqebykufwruof/Build/Intermediates/iPRODUCT.build/Debug-iphoneos/iPRODUCT2.build/Objects-normal/armv7/error_code.o /Users/USER/NIBuild/PRODUCT/iPRODUCT/iPRODUCT/LinkKit-1.0.0/lib/libABLLink.a(error_code.o) duplicate symbol __ZN5boost6system16generic_categoryEv in: /Users/USER/Library/Developer/Xcode/DerivedData/iPRODUCT-fnrscsrtzxoykzcvqebykufwruof/Build/Intermediates/iPRODUCT.build/Debug-iphoneos/iPRODUCT2.build/Objects-normal/armv7/error_code.o /Users/USER/NIBuild/PRODUCT/iPRODUCT/iPRODUCT/LinkKit-1.0.0/lib/libABLLink.a(error_code.o) duplicate symbol __ZN5boost6system6throwsE in: /Users/USER/Library/Developer/Xcode/DerivedData/iPRODUCT-fnrscsrtzxoykzcvqebykufwruof/Build/Intermediates/iPRODUCT.build/Debug-iphoneos/iPRODUCT2.build/Objects-normal/armv7/error_code.o /Users/USER/NIBuild/PRODUCT/iPRODUCT/iPRODUCT/LinkKit-1.0.0/lib/libABLLink.a(error_code.o) ld: 3 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Polyrhythm

I would like to synchronize two different devices playing at different tempos. Both devices should play beat 1 of every measure at the same time, but device #1 will beat 3 beats per measure while device #2 will beat 4 beats per measure for example - so only beat 1 of each measure will occur at the same time on both devices.

I have tried to build this using a common tempo. For example, set a bpm of 30 and have each device play at a tempo of bpm*quantum. But I haven't been able to get it to work.

Any idea how this can be accomplished using the sample project as a base?

Getting app featured on Link-enabled music making page

Hi there,

Sorry if this is the wrong place to post this, but I haven't been able to find in the documentation how to get my project featured on the Link-Enabled apps page. If you could link me to the instructions or an e-mail address where I can submit my app, I would greatly appreciate it!

Thanks for all your hard work with Link—it's really excellent for mobile musicians like myself.

-Chris

LinkKit for Catalyst/UIKitForMac

Are there any plans to release a compiled version of LinkKit that's compatible with the UIKitForMac platform?

Background:

At WWDC 2019, Apple announced Catalyst, a new way to compile iPad apps and run them on the Mac. This was previously announced under the code name Marzipan in 2018.

Most iOS dependencies provided as source work fine with Catalyst. Xcode happily re-compiles them for the "UIKitForMac" platform. However, since LinkKit is distributed as a binary-only framework, Catalyst apps can't link against it.

Crash when attempting to enable or disable Link, possible race condition?

We've implemented Link with an openFrameworks based app that uses ofxPd and ofxPof. We're encountering a crash that can be easily replicated using the example patch included in the attached zip. The patch uses the abl_link~ and pof externals which can be installed via Deken using vanilla Pd-0.48-1 on macOS or Linux.

In the example patch, a pofutil object is checking connection every second in order to make it simple to trigger the crash by clicking the toggle attached to the connect message sent to abl_link~. It only takes a few clicks to crash. If you disable the metro banging pofutil to stop the connection check, the crash will not occur.

Antoine (ofxPof) has done some fairly extensive testing and feels this is likely a race condition with Link. The crash occurs the same on all platforms we've tested so far, including iOS with libPd, Pd 0.48-1 or earlier on macOS and Linux, and can be triggered with or without the abl_link~ external included on iOS. On iOS the crash is triggered by toggling Link on/off with ABLLinkSettingsViewController instead of sending a connect message to abl_link~ in the Pd patch.

I know this is a bit of an edge case but any help would be appreciated, thanks!

linkpofcrash.zip

Compiling against iOS 12 SDK – does not find devices on local network

An interesting think I‘ve noticed with my app using LinkKit (but could also reproduce in the LinkHut sample app):

When switching to the iOS 12 SDK (or later), LinkKit fails to detect other devices on my local network. Only Links on the same device are detected.
Compiled with iOS 11 or older, everything seems to work fine and Links to other devices on the same local network are detected as expected.
Why is that? Related to IPv6? Or any permission or capability that might was introduced on iOS 12?

Would be grateful for any advice or feedback!

– Frederik

Localization Support

The view controllers of LinkKit are not localized. Please add standard localization so it can be extended by Localization strings files.

Background audio and link active

I've been attempting to implement the bold sections of this guideline:

When an app moves to the background and it is known that no audio will be generated by the app while in the background, Link should be deactivated by calling ABLLinkSetActive(false) - even if background audio has been enabled for the app.

However, my app supports fairly complex audio/MIDI input configurations and a sequencer which could potentially be triggered externally (eg. via MIDI or Audiobus) and I'm finding that the logic to do this is fairly complex and possibly fragile. I'm starting to feel like it's a potential source of difficult-to-solve end user problems in future.

My app provides users with a checkbox option to 'enable background play'. If disabled, the app will not play audio in the background provided that Audiobus is not connected (as recommended in the Audiobus guidelines).

Is is acceptable to simply link ABL's background active behavior to this user option, rather than the complex play logic I mentioned above? I feel this would be a lot simpler for users (and me) to understand. The app's behavior when it goes to the background would then be something like this:

void OnAppGoesToBackground( ... )
{
      if (!user_option_enable_background_play && !audiobus_connected)
      {
          ABLLinkSetActive(false);
      }
}

WatchOS build

It would be great to have a the LinkKit compiled for watchOS

Big lib size

Hello, the lib size is around 100Mb, is there a way to bring it down? It doubles the size of my app.

[3.1.0] Tempo callback not called if new tempo matches old tempo

After setting up link:
_linkRef = ABLLinkNew (120);

Then changing the tempo:
ABLLinkSetTempo (..., 120, ...);

The tempo callback (defined ABLLinkSetSessionTempoCallback) is not called.

When the tempo is set to anything other than 120, the callback is called correctly.
Not that this was not the case in Link 2.x -- the tempo change callback would always be called.

Is this intentional behaviour? It is surprising!

Are the hostTimeAtOutput argument of the ABLLinkSetTempo method has any restrictions?

I was playing with the LinkHut project. I changed the line where the the new tempo is applied to the link session(AudioEngine.m, line 215).

From this:
ABLLinkSetTempo(sessionState, engineData.proposeBpm, hostTimeAtBufferBegin);
To this:
ABLLinkSetTempo(sessionState, engineData.proposeBpm, hostTimeAtBufferBegin + (UInt64)linkData->secondsToHostTime*5.0);

I also changed the decreaseBpm and increaseBpm methods so the changes to tempo are more rapid.

- (void)increaseBpm {
	_bpm += 60;//  instead of ++_bpm;
    _audioEngine.bpm = _bpm;
}

I thought that with these changes I would get a behaviour where every tempo change is postponed by 5 seconds. But it looks like the tempo still changes immediately after I tap on plus/minus buttons.

Can someone explain me what I am doing wrong?

LinkKit-2.0.0 Beta 2 linker errors

Downloaded the new version and noticed that it generates linker errors:

"_ABLLinkGetSessionTempo", referenced from...
"_ABLLinkPhase", referenced from...
"_ABLLinkProposeTempo", referenced from...
"_ABLLinkResetBeatTime", referenced from...
ld: symbol(s) not found for architecture i386

The old lib was over 100MB but the new one is only 4.5MB

Adhoc network on OSX seems restricted

We tried setting up an adhoc network on OSX to test several iOS devices in isolation from our common Wifi network with Link today. See https://www.ableton.com/en/help/article/link-setup-live/.

It looks like only up to four devices will be linked with each other and then the next group of four devices again only with each other. E.g. four iPads will be in "Link 1" and then four iPhones will be in "Link 2", in order of connecting to the network.

Is that a known issue with OSX adhoc networks?

How to submit my app to the list of Link-enabled apps?

I am 99% sure that I saw somewhere on Ableton link doc pages an instruction of how to submit your app to Ableton so they add it to the official list of the Link-enabled apps. But now I can not find this instruction. I wrote to [email protected] 5 days ago, but got only an auto reply with the links to docs which I already have. Can somebody give me the required link or explain here how to submit my app? Thanks!

iOS 14 Unexpected Behavior

I am testing on iOS14 and am getting some unexpected behavior with Link, where it fails to connect to peers on the local network.

Update : I've been able to reproduce the issue with LinkHut.

To test:
Open Ableton on my computer (10.1.17, macOS 10.15.6) and enable Link.
Open my app on iPad (iOS 13.2, latest LinkKit version) and enable Link,
Open my app on iPhone (iOS 14, latest LinkKit version) and enable Link. The system requests permissions for local network usage, and I accept)

Expected result :
Link works on all three devices.

Actual Result:
Link works between Ableton and the iPad (iOS 13). The iPhone (on iOS14) does not find the other link enabled apps.

This is possibly related to the restrictions on local network access with iOS14. On iOS14, local network access must be confirmed by the user. As expected, this dialog pops-up when enabling Link for the first time. However, granting access does not fix the issue. In addition, if you deny access, the Link View Controller will show the enabled state regardless of permissions.

Additional breadcrumbs :
The App Store build of my app (built with a previous iOS SDK, and older LinkKit) works as expected.

If I open up another one of my Link enabled apps on my device, my app is able to connect to all of the Links in the network. As soon as I quit the other Link app on the device, it disconnects.

I'm able to re-create the issue using the LinkHut demo project. LinkHut will not connect to other Link enabled apps in the network unless the older Link enabled app is also open. LinkHut works correctly on my iPad with iOS13.

Any thoughts or things to try would be greatly appreciated.

Thanks,
Ben

Can't find way to dismiss ABLLinkSettingsViewController

I'm trying to implement the ABLLinkSettingsViewController through a popover on the iPhone and can't figure out the way to do it.

In the docs, there is a "Done" button in the top right which doesn't appear in my implementation.

Here is my code to present the view controller

- (IBAction)abletonLinkButtonAction:(id)sender {
    AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
    ABLLinkSettingsViewController *abletonLinkSettingsView = [ABLLinkSettingsViewController instance:delegate.abletonLinkSession];
    
    // Popover
    abletonLinkSettingsView.modalPresentationStyle = UIModalPresentationPopover;
    UIPopoverPresentationController *popover =  abletonLinkSettingsView.popoverPresentationController;
    popover.sourceView = self.view;
    popover.sourceRect = self.abletonLinkButton.frame;
    
    [self presentViewController:abletonLinkSettingsView animated:YES completion:nil];
}
![simulator screen shot 17 aug 2017 20 33 39](https://user-images.githubusercontent.com/2111315/29427852-67cd2602-838b-11e7-8a06-dcff44553a83.png)

And the attached image is the result

TEMPO-3: When connected, loading a new document should not change the Link session tempo

I can see the rationale for this, but what's the best way to handle documents (ie. sequences) which have tempo automation? I can think of a couple of options:

  1. The app to disables tempo automation when ABL peers are connected. However, this may not be what the user always desires.

  2. The app uses the ABL current tempo until the sequence reaches its first tempo change event, which it then proposes to ABL.

On a related note, if the tempo automation is a ramp, is there any problem with continuously proposing small tempo changes to ABL on every audio callback while the ramp is in progress?

Change font in ABLLinkSettingsViewController

I'm planning to present ABLLinkSettingsViewController via popover Settings menu, but my Settings menu is not using system font. Is it possible to change font in ABLLinkSettingsViewController?

Documentation issue

Hi all,

first off, congrats to the excellent documentation and sample project! The test cases are perfect for ensuring that all documentation was read and understood ;-)

I believe the following is slightly miss-leading and actually worded more correctly in the related test case:

Conversely, if an app in the background is ejected from an Audiobus or IAA session and will therefore >no longer be playing audio, it should deactivate Link.

I can start my app playback while connected to Audiobus and continue playing even when being disconnected. In that case the Link should stay active. We actually just enabled background audio as a little feature along with the Link evaluation...

Compare to the test case:

Conversely, an App that is part of an Audiobus or IAA session session and is then disconnected from >the session while in the background and not playing should deactivate Link.

gruss,
Markus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.