metro qmetro

Debugging a Max patch that speeds up arrow keys after you hold a key down for 2 seconds. The metro object was hanging the patch, no matter what the speed. Replacing the metro with qmetro solved the problem

 

FCDproplus

Mac OS frequency control and Max external

notes

update 11/29/2013 – Checked the fcdpp in Mac OS 10.8 – still having issues with sync loss – also noticed that the fcdpp picks up interference from the Macbook trackpad in the shortwave bands – but after further research determined trackpad really does transmit RF.

My notes from September seemed a bit sparse. But I was able to determine that maxsdr5c.maxpat in maxsdr6 and the basicSDR4.maxpat were modified to use the new fcdpp external driver – also, maxsdr5c has the arrow keys mapped to awsd – due to an issue with metro/qmetro – but I will probably map them back again.

Am thinking about giving up on the fcdpp – but should test it out on windows first to make sure its not a hardware issue.

update 9/24/2013 – have written a Max external for the fcdp+ – its called funcubeplus.mxo

Its in the 6.1.3 sdk folder under basic examples. There’s a test patch in Max teaching examples called: funcube-pro-plus-test.maxpat

I have updated the code in tkzic/maxsdr6/maxsdr6 with the new drivers, etc., but have not posted to github – as am awaiting answer to sync issues.

Need to use the ad_portaudio core audio driver – or Max will crash.

Audio sync issues: the fcdp+ produces annoying buzzing artifacts during normal listening and especially right after you change frequency on the device. Have tried every possible Max audio setting to no avail. There have been other postings to the development group – so we’ll see what happens…

= previous post =

I’m listening to the fcdproplus radio in a Max SDR patch on the Macbook. Will need to fix a bug in the maxsdr5 patch with arrow keys – and write a new external for the pro plus – but here are the other details.

Using Alex Csete’s and David Pello’s fcdctrl code – see this post on R-pi

http://www.oz9aec.net/index.php/funcube-dongle/479-the-funcube-dongle-propro-on-the-raspberry-pi

Here’s the hacked fcdctrl code that works with the pro plus:

https://gitorious.org/fcdcontrol/fcdcontrol-proplus/source/d8055cfe4ba2e015a23f2ad8f4a80f4135441e74:

This project was set for linux, so I downloaded the most recent hidapi from here:

https://github.com/signal11/hidapi/downloads

and used the mac hid.c and hidapi.h code.

changed  Makefile to use these files and the Mac frameworks…

Code is in tkzic/fcdproplus/mac-fcdcontrol-proplus/

Also added this line to fcd.c – for the pro-plus

#define FCDPP 1

Also in Max, needed to use the ad_portaudio Core Audio driver – it crashed with the regular core audio driver.

 

Use gen~ to build iOS AU effects

Summary:

  1. In Max, write a gen~ patch and export as c++ to xcode
  2. Compile AU effect in xcode (code-signing with Audiobus API key) and launch on iPad
  3. Any app which recognizes Audiobus protocol can find and use your effect.

Details…

There are instructions at http://cycling74.com/wiki/index.php?title=Gen_Code_Export_iOS – which are expanded upon here.

Preliminaries to Preliminaries…

  1. Download the gen~ tremelo effect patch which runs ‘as is’ – and is set up to work as an AU effect with controls – from here: http://designingsound.org/2013/04/a-tremolo-au-plugin-with-max – the download button is near the end of the blog post.
  2. Download the c74 sample project  Media:iOSGenFilter.zip and copy it somewhere. This will be your project folder. It contains an xcode project file  and source code for the audiobus AU wrapper thing.
[annotations to c74 wiki notes follow:]

Preliminaries

  • Download the AudioBus SDK [1] – You will need to register as a developer. (alternatively, you can clone the github archive)
  • Download The Amazing Audio Engine SDK [2] (alternatively, you can clone the github archive)
  • Download the AudioBus iOS app in order to test [3] – It costs $4.99. Install it on your iPad or iPhone/iPod
  • Obtain a temporary Audiobus API key – You can’t do this until after you finish step 9 below.

 

Building an Audiobus iOS project

  1. Duplicate the provided Xcode project – (not necessary unless you want to change the project name – you already copied it into your project folder). If you want to duplicate it – check out this stackOverflow post: http://stackoverflow.com/questions/6428247/duplicating-an-xcode-4-project
  2. Copy The Amazing Audio Engine SDK to the project folder. – Here are specifics:
    1. Launch TheAmazingAudioEngine.xcodeproj
    2. In xcode, build it
    3. In ‘products’ group  in xcode navigator, <ctrl>-click on the libTheAmazingAudioEngine.a file and open in finder.
    4. Copy this file into iosGenFilter folder inside your project folder
    5. You can close the AmazingAudioEngine project in Xcode now.
    6. Now, in finder, copy the AmazingAudioEngine folder (the one that contains .h and .m files) into the iosGenFilter folder
  3. From Audiobus SDK, copy the Audiobus folder and libAudiobus.a file to the  iosGenFilter folder
  4. Open the tremelo Max patch which you downloaded.
  5. In Max, Send gen~ the exportcode message in order to export the genpatcher as C++ code – actually do this…
    1. Using inspector on the gen~ object Choose the GenFilter folder (inside iosGenFilter folder) to save the exported code to.
    2. Lock patch and click on the exportcode message box to export the code.
  6. Launch GenFilter.xcodeproj in the iosGenFilter folder.
  7. In xcode, Change the namespace used in GenFilter.mm to match that of the exported code
    1. This means, find the statement near top of file starting with “using namespace” and make it look like this: using namespace gen_exported;
    2. (if you get a bunch of errors – then you need to find out what your exported code is called. It will be the most recent .cpp file in the GenFilter folder.)
  8. Copy your Audiobus API key to the appropriate location in AppDelegate.mm – can’t do this just yet – so skip.
  9. Connect your iPad to the computer. Build the project for iPad
  10. In ‘products’ group  in xcode navigator, <ctrl>-click on the libThe GenFilter.app file and select ‘open in finder’.
    1. <ctrl>-click GenFilter.app in finder and select ‘open package contents’. – leave this finder window open
    2. in a broswer go to http://developer.audiob.us/temporary-registration – you’ll probably need to login with your user/password set up earlier.
    3. drag the info.plist file from the finder window (step A) into the dropbox in the browser.  You should get a screen with your temporary API key. I had to do this twice to get it to work.
    4. Now copy the API key into the AppDelegate.mm file replacing the one in the following statement – it was around line 50. – re-build project to make sure you have no errors
   // Create an Audiobus instance
    self.audiobusController = [[[ABAudiobusController alloc] initWithAppLaunchURL:[NSURL URLWithString:@"genfilter.audiobus://"] apiKey:@"MTM4MDY1ODQzNSoqKkdlbkZpbHRlcioqKmdlbmZpbHRlci5hdWRpb2J1czovLw==:caS8WT1r4OmYz6t89pDq37qNi29hwFba+7+7bP8WubzyKN7Xj+tnU31/Wcaw580zQg8Jz+vC6Ha0H+qDM9JhdBxfQZ7w/R0VHrvsbZYQEJkj1bNpg2h2DfsF1mvFr6jb"] autorelease];
Now do the following steps (with iPad still connected to your computer)
  1. Launch audiobus on your iPad
  2. click the run button in xcode to launch GenFilter on your iPad
  3. In audiobus, select mic input, headphone output, and GenFilter for effect.

 

How to set up Max Twitter triggers with Xively and Zapier

note: 6/2021 – Everything on this post no longer works, except the idea. See Internetsensors posts for current methods

notes

pachube.com and cosm.com have now changed into xively.com. Also Twitter has migrated to the version 1.1 API. The old method of sending tweets with cosm.com no longer works as of of June 2013.

Here are revised instructions for setting up an intermediary program that allows you to send Tweets from Max/MSP using a xively.com “device” (feed). This setup is required by the tweetCurl patches in the Max/MSP internet sensors project:

https://reactivemusic.net/?p=5859

Summary: the Max program will issue an http: put request to your xively.com feed with the Tweet text as data. When the data is received it triggers a request to xapier.com which logs into your Twitter account and sends the Tweet. xapier.com handles authentication using Oauth.

1. set up a xively.com account (self explanatory)

2. add a device. From the xively.com home page select “develop” from the “web tools” menu. You’ll get a screen like this one:

Click on +add device. The following screen will appear:

Fill in the fields. The names and choices can be whatever you want.  Then click the “Add Device” box to get the following screen:

Now click on +Add Channel. Fill in the Channel ID field with the name: tweet (as shown below) then click the “save channel” box.

3. Add Trigger. The trigger will link this channel to Twitter. Please follow the instructions here: https://xively.com/dev/tutorials/zapier/

Notes:

  • You will need to sign up for a free zapier account
  • assign Twitter as your action service for the “zap”
  • For the ‘message’ field of your zap select “body trigger datastream value value”. This will be the actual text of the tweet coming from xively.com
  • limited to 10 tweets per hour
  • when you select twitter as an action in zapier, it will attempt to log you in to do the oauth authentication. If you are already logged into Twitter – make sure its the correct account.
  • zapier will provide you with the URL to insert into the trigger field in your xively.com device.
4. From the xively.com device screen copy the feed-ID and API-key into your Max patch in the appropriate fields.