Ms Pinky SDK - OSX sample project is missing from download
-
- Posts:7
- Joined:Sun May 03, 2015 2:25 pm
I've downloaded the SDK. The readme says there should be a "a sample application project" in the OSX folder, but it isn't there.
I'm keen to see a sample application so I can get a head start on how to incorporate the library into my own apps.
Does anyone have this to hand? Or can it be made available via the download, or emailed to me directly, please?
I'm keen to see a sample application so I can get a head start on how to incorporate the library into my own apps.
Does anyone have this to hand? Or can it be made available via the download, or emailed to me directly, please?
-
- Site Admin
- Posts:1093
- Joined:Mon Jun 07, 2004 9:17 pm
The sample app is no longer supported. Sorry! But it's really very simple to use the SDK and I can provide some code snippets here:
Basically you just instantiate the vinyl tracking object with MPVT2_CreateNew(), and then use that instance assigned to a void * pointer to access the other SDK functions. SDK functions which set parameters of the tracker have names like "MPVT2_SetXXX" and these should be called from a low-priority thread because they can take a bit of time to compute. The MPVT2_ProcessBuffer() routine can be called from your realtime audio processing thread. With these snippets, and with the provided .pdf file in the SDK you should have plenty of information on how to get started.
Code: Select all
void *vinyl_tracker;
double power_thresh = -30.0;
double cutoff_sharpness = 2.5;
//instantiate the Ms Pinky vinyl tracking object
vinyl_tracker = MPVT2_CreateNew(8192, getSampleRate());
MPVT2_SetVinylGeneration(vinyl_tracker, 4);
MPVT2_SetAbsoluteMode(vinyl_tracker, true);
MPVT2_SetSignalPowerThreshold(vinyl_tracker, power_thresh);
MPVT2_SetCutoffSharpness(vinyl_tracker, cutoff_sharpness);
……..
// Called for each buffer of input samples inside your audio service callback
MPVT2_ProcessBuffer(vinyl_tracker, buffer.getSampleData(0), buffer.getSampleData(1),
buffer.getNumSamples(), velocityVals, powerVals, positionVals, num_measurements);
-
- Posts:7
- Joined:Sun May 03, 2015 2:25 pm
To be honest I'm struggling with a few fundamentals at that moment. I'm not even sure what language I'm supposed to be coding in!
If you could help me get over a few hurdles, and start up a simple project, I'd be happy to share it here with the community so that others like me in future have something to start with.
I'm guessing I need to start either a C, C++, or Objective-C project?
Currently, I've got a Cocoa Application project started in Xcode 6, and I've added the library to the project. However, if I #import "VinylTrackFramework.h" then Xcode flags up a syntax error in that file.
Thanks in advance for your help!![Smile :)](./images/smilies/icon_smile.gif)
If you could help me get over a few hurdles, and start up a simple project, I'd be happy to share it here with the community so that others like me in future have something to start with.
I'm guessing I need to start either a C, C++, or Objective-C project?
Currently, I've got a Cocoa Application project started in Xcode 6, and I've added the library to the project. However, if I #import "VinylTrackFramework.h" then Xcode flags up a syntax error in that file.
Thanks in advance for your help!
![Smile :)](./images/smilies/icon_smile.gif)
-
- Site Admin
- Posts:1093
- Joined:Mon Jun 07, 2004 9:17 pm
-
- Posts:7
- Joined:Sun May 03, 2015 2:25 pm
Ok, I'm making some progress, but have become stuck again. I've tried two approaches.
The first approach was to create an OSX Cocoa application (which I have a little experience in building) and somehow include the Ms Pinky library in the project. The issue here is that a Cocoa Application is written in Obj-C, and the Ms Pinky library is written in C++. It seems there are ways to mix the two, but I'm struggling to understand it: http://www.philjordan.eu/article/mixing ... bjective-c++
It would seem simpler to build a pure C++ application. Xcode doesn't have a template for this. However, the Juce framework ( http://www.juce.com ) can generate a working Xcode C++ project for you, and this is my second approach. The Juce template projects build just fine in Xcode, but I run into problems when trying to use the Ms Pinky library in the project.
If a add a private property called vinyl_tracker to the class, then try to assign it in the constructor like this:
...then the error message I get from Xcode is:
The first approach was to create an OSX Cocoa application (which I have a little experience in building) and somehow include the Ms Pinky library in the project. The issue here is that a Cocoa Application is written in Obj-C, and the Ms Pinky library is written in C++. It seems there are ways to mix the two, but I'm struggling to understand it: http://www.philjordan.eu/article/mixing ... bjective-c++
It would seem simpler to build a pure C++ application. Xcode doesn't have a template for this. However, the Juce framework ( http://www.juce.com ) can generate a working Xcode C++ project for you, and this is my second approach. The Juce template projects build just fine in Xcode, but I run into problems when trying to use the Ms Pinky library in the project.
If a add a private property called vinyl_tracker to the class, then try to assign it in the constructor like this:
Code: Select all
...
#include "VinylTrackFramework.h"
class MainContentComponent : public AudioAppComponent
{
public:
//==============================================================================
MainContentComponent()
: phase (0.0f),
phaseDelta (0.0f),
frequency (5000.0f),
amplitude (0.2f),
sampleRate (0.0),
expectedSamplesPerBlock (0)
{
setSize (800, 600);
vinyl_tracker = MPVT2_CreateNew(8192, 44100);
// specify the number of input and output channels that we want to open
setAudioChannels (2, 2);
}
...
private:
//==============================================================================
float phase;
float phaseDelta;
float frequency;
float amplitude;
double sampleRate;
int expectedSamplesPerBlock;
Point<float> lastMousePosition;
void *vinyl_tracker;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
};
...
Any ideas what I could be doing wrong? "Undefined symbols for architecture x86_64" suggests it has a problem with me building a 64 bit app. I've tried changing the architecture config to "Universal Binary (32 bit)" via the Juce IDE, but I get the same error.
Undefined symbols for architecture x86_64:
"_MPVT2_CreateNew", referenced from:
MainContentComponent::MainContentComponent() in MainComponent.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
-
- Posts:7
- Joined:Sun May 03, 2015 2:25 pm
-
- Posts:7
- Joined:Sun May 03, 2015 2:25 pm
-
- Posts:7
- Joined:Sun May 03, 2015 2:25 pm
The solution was simple - I just had to include LibVinylTrack.a in my project, following the instructions in the accepted answer on this post: http://stackoverflow.com/questions/1840 ... ure-x86-64
I'm not very experienced with Xcode, so chances were it would be something simple![Smile :)](./images/smilies/icon_smile.gif)
Edited to add: the correct way to do this in a Juce project is to add the config via Juce and *not* Xcode, otherwise Juce will overwrite the config next time it auto-generates the Xcode project. This is how it should be done: http://www.juce.com/forum/topic/xcode-l ... aries-link
I'm not very experienced with Xcode, so chances were it would be something simple
![Smile :)](./images/smilies/icon_smile.gif)
Edited to add: the correct way to do this in a Juce project is to add the config via Juce and *not* Xcode, otherwise Juce will overwrite the config next time it auto-generates the Xcode project. This is how it should be done: http://www.juce.com/forum/topic/xcode-l ... aries-link
Last edited by discopatrick on Sat May 09, 2015 6:35 pm, edited 1 time in total.
-
- Site Admin
- Posts:1093
- Joined:Mon Jun 07, 2004 9:17 pm
Glad to hear there is progress!
I think your choice of the JUCE framework is an excellent one. That way whatever application you create will automatically be cross-platform with Windoze. I use JUCE for the Pinky VST/AU.
One thing to keep in mind is that the MPVT2_SetVinylGeneration() method should not be called from your real-time audio thread, but instead should be called from another low-priority thread, such as the GUI widget callback thread. And while this function is doing it's thing, you must make sure that your other thread(s) is/are not accessing the instance of vinyl_tracker for any purpose as this could cause a crash! So just use semaphores or whatever to make sure of that.
All the other MPVT2_Setxxx and the MPVT2_Queryxxx methods can be called from any thread.
I think your choice of the JUCE framework is an excellent one. That way whatever application you create will automatically be cross-platform with Windoze. I use JUCE for the Pinky VST/AU.
One thing to keep in mind is that the MPVT2_SetVinylGeneration() method should not be called from your real-time audio thread, but instead should be called from another low-priority thread, such as the GUI widget callback thread. And while this function is doing it's thing, you must make sure that your other thread(s) is/are not accessing the instance of vinyl_tracker for any purpose as this could cause a crash! So just use semaphores or whatever to make sure of that.
All the other MPVT2_Setxxx and the MPVT2_Queryxxx methods can be called from any thread.
well it should be easiest as ever with the newcoming ios9 and audiounit extension support (isn`t it?) but meanwhile there are few possibilities to use your vinyl with djplayer app which supports relative mode from any timecode system available...
Also it is possible to go the hardware route with raspi 2 board and linux externals from Ms. Pinky sdk!
Exciting times once again for the Pinkies community... <3
Also it is possible to go the hardware route with raspi 2 board and linux externals from Ms. Pinky sdk!
Exciting times once again for the Pinkies community... <3
...
Mudo means mute person.
Researching new interface paradigms
...
Mudo means mute person.
Researching new interface paradigms
...