Giter VIP home page Giter VIP logo

pd-for-ios's Introduction

After cloning the pd-for-ios repository, please make sure to cd into the pd-for-ios folder and say

git submodule init
git submodule update --init --recursive

These two commands install the dependencies from libpd. After the initial setup, say

git pull
git submodule update --recursive

whenever you want to sync with the GitHub repositories.

pd-for-ios's People

Contributors

danomatika avatar nettoyeurny avatar richardlawler 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

pd-for-ios's Issues

libpd for ios - not working in 64 bit

I'm currently upgrading my app to 64-bit so I can release it to the app store.. It relies extensively on the libpd libraries.

My code works perfectly in 32 bit.. However, on arm64 standard architectures (as specified by Apple's new standards) - libpd compiles, but crashes immediately at runtime.. The offending code is here, in d_arithmetic.c :


static void scalartimes_dsp(t_scalartimes _x, t_signal *_sp)
{
if (sp[0]->s_n&7)
dsp_add(scalartimes_perform, 4, sp[0]->s_vec, &x->x_g,
sp[1]->s_vec, sp[0]->s_n);
else
dsp_add(scalartimes_perf8, 4, sp[0]->s_vec, &x->x_g,
sp[1]->s_vec, sp[0]->s_n);
}


dsp_add is causing an EXC_BAD_ACCESS error. Has anyone managed to compile libpd in 64 bit?

I've been through every single instance of 'malloc' in the project and added 'sizeof' to them, but it still crashes here.

I tried replacing the libpd source with the files from Miller Puckette's 64-bit update - Pd version 0.46-5, 64 bits, compiled for Macintosh OSX 10.8 or later, from Miller's website - but now I'm getting compile errors in z_libpd.c here:


sched_tick(sys_time + sys_time_per_dsp_tick);

and

int libpd_process_short(int ticks, short *inBuffer, short outBuffer) {
PROCESS( short_to_sample, * sample_to_short)
}


with PROCESS returning the error: 'too many arguments to function call, expected 0 have 1'

I hope someone can help, I'm ready to release my app, and Apple's new standards have caused me to pull my hair out.

Here's dsp_add():


void dsp_add(t_perfroutine f, int n, ...)
{
int newsize = dsp_chainsize + n+1, i;
va_list ap;

dsp_chain = t_resizebytes(dsp_chain, dsp_chainsize * sizeof (t_int),
newsize * sizeof (t_int));
dsp_chain[dsp_chainsize-1] = (t_int)f;
va_start(ap, n);
for (i = 0; i < n; i++)
dsp_chain[dsp_chainsize + i] = va_arg(ap, t_int);
va_end(ap);
dsp_chain[newsize-1] = (t_int)dsp_done;
dsp_chainsize = newsize;
}


Thanks,

Carl

library not found for -lpd-ios // Solved

I am having issues in building/ linking the example project. Am I missing something? Any advice greatly appreciated..

Screenshot 2020-07-21 at 13 05 59

MacOS Big Sur Version 11 beta
Xcode Version 11.6
as a deployment target, iOS 8

PdLinkSample Xcode does not compile

Compiling PdLinkSample in XCode 10.1 does not work anymore. Using LinkKit 3.0.4 I get the errors

"Implicit declaration of function 'ABLLinkCaptureAppTimeline' is invalid in C99"

and

".....pd-for-ios/pd-for-ios/PdLinkSample/PdLinkSample/ViewController.m:41:5: Use of undeclared identifier 'ABLLinkTimelineRef'; did you mean 'ABLLinkTimeAtBeat'?"

for the line

ABLLinkTimelineRef timeline = ABLLinkCaptureAppTimeline(linkRef);

in ViewController.m

Do not generate static library for iOS

When building from XCode it the target "libpd-ios" it does not generate the static library.
It works for the "libpd-osx" target.

I updated submodules successfully.

XCode 5.0 / OS X 10.8.5

Errors (Invalid channel Configuration) when running Circle Of Fifths sample - opensl

I thought I would post these here instead of letting them pass unmentioned... I am running Circle Of Fifths and both the master branch and opensl branch give the follow errors at startup:

07-09 00:55:59.620: E/AudioTrack-Java(19859): [ android.media.AudioTrack ] getMinBufferSize(): Invalid channel configuration.
07-09 00:55:59.620: E/AudioTrack-Java(19859): [ android.media.AudioTrack ] getMinBufferSize(): Invalid channel configuration.

I am not familiar with this part of libpd, so I'm not sure what is failing, just thought you should know if you don't already..

Compile error while working through the book's example

I have been following along with the book "Making Musical Apps," and I get an error when building: "Apple Mach-O Linker Error OBJ_C$_PdAudioController." I have a feeling that it has to do with the "User Header Search Path," I'm pretty confident that I have it correct.

Any help would be greatly appreciated! I really want to get to know Pd...

no sound on simulator

Hello, I think that I've pd ios configured correctly , but I can't get sound on my tests , on simulator.
right now I don't have an ios device to test in with a real device. So I'm stuck on simulator.

This is the console output maybe it could help


2017-05-16 01:08:00.264 LibPdTest[77365:1832271] -[PdAudioController print][279] ----- AVAudioSession properties -----
2017-05-16 01:08:00.264 LibPdTest[77365:1832271] -[PdAudioController print][280] category: AVAudioSessionCategoryPlayAndRecord
2017-05-16 01:08:00.264 LibPdTest[77365:1832271] -[PdAudioController print][290] currentHardwareSampleRate: 44100
2017-05-16 01:08:00.264 LibPdTest[77365:1832271] -[PdAudioController print][291] preferredHardwareSampleRate: 44100
2017-05-16 01:08:00.265 LibPdTest[77365:1832271] -[PdAudioController print][292] preferredIOBufferDuration: 0.000000
2017-05-16 01:08:00.265 LibPdTest[77365:1832271] -[PdAudioController print][294] inputIsAvailable: YES
2017-05-16 01:08:00.265 LibPdTest[77365:1832271] -[PdAudioController print][295] currentHardwareInputNumberOfChannels: 2
2017-05-16 01:08:00.266 LibPdTest[77365:1832271] -[PdAudioController print][296] currentHardwareOutputNumberOfChannels: 2
2017-05-16 01:08:00.266 LibPdTest[77365:1832271] -[PdAudioUnit print][99] input ASBD:
2017-05-16 01:08:00.266 LibPdTest[77365:1832271] -[PdAudioUnit print][100]   mSampleRate: 44100Hz
2017-05-16 01:08:00.266 LibPdTest[77365:1832271] -[PdAudioUnit print][101]   mChannelsPerFrame: 2
2017-05-16 01:08:00.267 LibPdTest[77365:1832271] -[PdAudioUnit print][120] output ASBD:
2017-05-16 01:08:00.267 LibPdTest[77365:1832271] -[PdAudioUnit print][121]   mSampleRate: 44100Hz
2017-05-16 01:08:00.267 LibPdTest[77365:1832271] -[PdAudioUnit print][122]   mChannelsPerFrame: 2

any ideas why it does not work ?

my implementation is as follows:

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#import "PdAudioController.h"
#import "PdBase.h"



@interface AppDelegate()
@property (nonatomic, retain) PdAudioController *audioController;
@end


@implementation AppDelegate

@synthesize window;
@synthesize audioController = audioController_;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"LibPdTest"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
  
  
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  // PD STUFF
  self.audioController = [[PdAudioController alloc] init ];
  [self.audioController configurePlaybackWithSampleRate:44100 numberChannels:2 inputEnabled:YES mixingEnabled:YES];
  [PdBase openFile:@"test.pd" path:[[NSBundle mainBundle] resourcePath]];
    
  [self.audioController setActive:YES];
  [self.audioController print];
  
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  
  return YES;
}

@end

multiple instance problem

im trying to make multiple instance of pdbase but couldnt find a way. can anyone explain how to make multiple instances of one pdfile?

PdLinkSample Xcode compilation issues

Hi,
I haven't been able to build and run the PdLinkSample project in XCode. I keep getting "undefined symbols" compilation errors (see below). I have carefully checked my library and header search paths. I have tried various C++ compiler options in XCode. No luck so far. Has anyone had the same issues? Sounds like I am missing a particular setting somewhere, but which one?
Pascal

Undefined symbols for architecture arm64:
  "_ABLLinkCaptureAudioTimeline", referenced from:
      _abl_link_tilde_tick in abl_link.o
      _abl_link_tilde_tick in PdLinkAudioUnit.o
  "_ABLLinkSetTempo", referenced from:
      _abl_link_tilde_tick in abl_link.o
      _abl_link_tilde_tick in PdLinkAudioUnit.o
  "_ABLLinkCommitAudioTimeline", referenced from:
      _abl_link_tilde_tick in abl_link.o
      _abl_link_tilde_tick in PdLinkAudioUnit.o
  "_ABLLinkCaptureAppTimeline", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
  "_ABLLinkRequestBeatAtTime", referenced from:
      _abl_link_tilde_tick in abl_link.o
      _abl_link_tilde_tick in PdLinkAudioUnit.o
  "_ABLLinkBeatAtTime", referenced from:
      _abl_link_tilde_tick in abl_link.o
      _abl_link_tilde_tick in PdLinkAudioUnit.o
  "_ABLLinkGetTempo", referenced from:
      -[ViewController viewDidLoad] in ViewController.o
      _abl_link_tilde_tick in abl_link.o
      _abl_link_tilde_tick in PdLinkAudioUnit.o

dsp_tick crash about 1% of the time

I've had this crash in my app on the audio thread that I can't seem to figure out since it happens inconsistently. Anyone else run into this?

Crashed: AURemoteIO::IOThread
0  App                        0x1344ab6ca (Missing)
1  App                        0x100550f1c dsp_tick (d_ugen.c:336)
2  App                        0x1005893fc sched_tick (m_sched.c:427)
3  App                        0x1005a5bd8 libpd_process_float (z_libpd.c:144)
4  App                        0x1000b8b6c pd::PdBase::processFloat(int, float const*, float*) (PdBase.cpp:136)
5  App                        0x1000f1338 ofxPd::audioOut(float*, int, int) (ofxPd.cpp:777)

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 libpd related, feel free to close this issue. I've reached out to the Link developers as well.

WaveTables is causing exc_bad_access on patch closing

steps to reproduce:

  • Run project on iphone 4s (probably others as well)
  • click on the 'Resynthesis' button, selecting the resynthesis.pd patch and closing the other patch.
  • there is an exc_bad_access that leads back to the patch being closed in it's dealloc.

I think this has only been happening since the new ringbuffer was introduced, but I'm not yet sure.

SwiftUI

Is there any chance to include the libpd/pd-for-ios for the project xCode with SwiftUI ? Is it possible to update the documentation on this issue?

abl_link: multiple objects share connection state

if i have multiple [abl_link~] objects in my running Pd instances, they all share the same connection state.
That is: if i [connect 1( one instance, the other instances will be connected to the global (networked) session as well.

also, multiple [abl_link~] objects in a single Pd instance are connected with each other, even if they are not connected with a global session.

pure-data cloning creates an error

Olivers-MBP:~ olivergreschke$ cd /Users/olivergreschke/Programmierung/iOS/pd-for-ios
Olivers-MBP:pd-for-ios olivergreschke$ git submodule init
Olivers-MBP:pd-for-ios olivergreschke$ git submodule update --init --recursive
Cloning into '/Users/olivergreschke/Programmierung/iOS/pd-for-ios/libpd/pure-data'...
fatal: read error: Connection reset by peer
fatal: clone of 'git://git.code.sf.net/p/pure-data/pure-data' into submodule path '/Users/olivergreschke/Programmierung/iOS/pd-for-ios/libpd/pure-data' failed
Failed to clone 'pure-data'. Retry scheduled
Cloning into '/Users/olivergreschke/Programmierung/iOS/pd-for-ios/libpd/pure-data'...
fatal: read error: Connection reset by peer
fatal: clone of 'git://git.code.sf.net/p/pure-data/pure-data' into submodule path '/Users/olivergreschke/Programmierung/iOS/pd-for-ios/libpd/pure-data' failed
Failed to clone 'pure-data' a second time, aborting
Failed to recurse into submodule path 'libpd'
Olivers-MBP:pd-for-ios olivergreschke$

Can't run PdTest02 on iOS6

After changing the Architectures build setting to ARCHS_STANDARD_32_BIT I could compile the PdTest02 demo for iOS6 but it does not produce any sound. It works fine on iOS5 and in the simulator.

iPhone 4 iOS5 = Yes
iPhone Simulator iOS6 = Yes
iPhone 5 iOS6 = No
iPad 3 iOS6 = No

Any ideas why this is not working?

libpd folder is empty?

So I downloaded pd-for-ios a few months ago, but accidently deleted the pdtest01 sample project.
So I re-downloaded it today, and I noticed that the libpd folder was empty.
This isn't a problem for me since I already have the files, but for a first time downloader...

'system' is unavailable: ... on iOS error - with the recent Xcode 9

I have seen that people worked on that issue, but I still get an error with Xcode 9

s_file.c creates an error with system(cmdbuf);

static void sys_putpreference(const char *key, const char *value)
{
char cmdbuf[MAXPDSTRING];
snprintf(cmdbuf, MAXPDSTRING,
"defaults write org.puredata.pd %s "%s" 2> /dev/null\n", key, value);
system(cmdbuf);
}

receiveFloat doesn't work

In Xcode, all the of the other receive functions autocomplete for me, except for receiveFloat, which doesn't seem to work or register at all, even though it exists in PdBase.h with the other functions that do work (recieveMessages, receiveBangFromSource, etc.).

Is there a way to get this function to work?

Thanks!

abl_link: use variables for paths to 3rd-party modules

please use variables for the paths to 3rd-party modules, e.g.

     LINK_INCLUDE=./link/include
     ASIO_INCLUDE=./link/modules/asio-standalone/asio/include

     cflags = -std=c++11 -I$(LINK_INCLUDE) -I$(ASIO_INCLUDE) -Wno-multichar

Unity iOS

Kindly can you provide instructions to make a build from Unity for iPhone and iPad

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.