MIDI wireless options

A thought exercise – to come up with various ways of making wireless Midi systems based on projects I’ve already done.

  • any combination of iOS and MacOS devices
  • use touchOSC with above setup
  • Arduino + ethernet shield to wifi router to touchOSC
  • Same as above but using wifi bridge to connect to router*
  • Arduino + wifi shield via UDP*
  • Arduino + wireless SD + xbee to same – one end connected to mac OS device
  • IR emitter/detector pair*
  • Arduino + wireless SD + WiFly rn-xv via UDP*
  • bluetooth* (here’s an app called bluemidi http://www.iosmusician.com/category/bluetooth-midi-on-ios
  • modulated laser pointer and solar panel*
  • convert to audio then use any audio transmission method and convert back to midi*
  • Use RTTY with ham radio*
  • cell phone*

* indicates method not tried yet.

 

 

Merriam Webster API

Dictionary and Thesaurus.

Get a developer API key from here: http://www.dictionaryapi.com

example of a request to the Thesaurus API

curl http://www.dictionaryapi.com/api/v1/references/thesaurus/xml/cheese?key=ee2466d2-07a0-40af-b959-abcdeb125f0ca

Here’s the XML response – filled with synonyms:

<?xml version="1.0" encoding="utf-8" ?>
<entry_list version="1.0">
	<entry id="cheese"><term><hw>cheese</hw></term><fl>noun</fl><sens><mc>that which is of low quality or worth</mc><vi>you wouldn't believe the <it>cheese</it> that the movie studio puts out</vi><syn>cheese, crapola [<it>slang</it>], dreck (<it>also</it> drek), muck, rubbish, sleaze, slop, slush, trash, tripe</syn><rel>camp, kitsch; claptrap, humbug, nonsense; bomb, clinker, clunker, dud, lemon, stinker, turkey; mess, muddle, shambles</rel></sens></entry>
	<entry id="big cheese"><term><hw>big cheese</hw></term><fl>noun</fl><sens><mc>one of high position or importance within a group</mc><vi>thinks he's a <it>big cheese</it> just because he's got a business card</vi><syn>big, big boy, big cheese, bigfoot, biggie, big gun, big leaguer, big-timer, big wheel, bigwig, fat cat, heavy, heavy hitter, heavyweight, high-muck-a-muck (<it>or</it> high-muckety-muck), honcho, kahuna, kingfish, kingpin, major leaguer, muckety-muck (<it>also</it> muck-a-muck <it>or</it> mucky-muck), nabob, nawab, nibs, nob [<it>chiefly British</it>], pooh-bah (<it>also</it> poo-bah), wheel</syn><rel>baron, czar (<it>also</it> tsar <it>or</it> tzar), king, lion, magnate, mogul, prince, tycoon; VIP</rel><near>inferior, subordinate, underling; mediocrity, obscurity</near><ant>lightweight, nobody, nonentity, nothing, shrimp, twerp, whippersnapper, zero, zilch</ant></sens></entry>
</entry_list>

 

 

 

Conversation with a robot in Max

This project brings together several examples of API programming with Max. The pandorabots.api patch contains an example of using curl to generate an XML response file, then converts XML to JSON using a Python script. The resulting JSON file is read into Max and parsed using the [js] object.

Here is an audio recording of my conversation (using Max) with a text chatbot named ‘Chomsky’

‘Chomsky’ lives at http://pandorabots.com.

My voice gets recorded by Max then converted to text by the Google speech-api.

The text is passed to the Pandorabots API. The chatbot response gets spoken by the aka.speech external which uses the Mac OS built-in text-to-speech system.

Note: The above recording was processed with a ‘silence truncate’ effect because there were  3-5 second delays between responses. In realtime it has the feel of the Houston/Apollo dialogs.

pandorabots-api.maxpat (which handles chatbot responses) gets text input from speech-to-google-text-api2.maxpat – a patch that converts speech to text using the Google speech-API.

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

The output (responses from chatbot) get sent to twitter-search-to-speech2.maxpat which “speaks” using the Mac OS  text-to-speech program using the aka.speech external.

files

Max

  • speech-to-google-text-api2.maxpat
  • JSON-google-speech.js
  • pandorabots-api.maxpat
  • JSON-pandorabot.js
  • text-to-speech2.maxpat

externals:

[authorization]

  • none required

external programs:

  • sox: sox audio conversion program must be in the computer’s executable file path, ie., /usr/bin – or you can rewrite the [sprintf] input to [aka.shell] with the actual path. Get sox from: http://sox.sourceforge.net
  • xml2json (python) in tkzic/internetsensors/: xml2json/xml2json.py and xml2json/setup.py (for translating XML to JSON) – [NOTE] you will need to change the path in the [sprintf] object in pandorabots.api to point to the folder containing this python script.

instructions

  • Open the three Max patches.
    • speech-to-google-text-api2.maxpat
    • pandorabots-api.maxpat
    • text-to-speech2.maxpat
  • Clear the custid in the pandorabots-api patch
  • Start audio in the Google speech patch. Then toggle the mic button and say something.
  • After the first response, go to the pandorabots-api patch and click the new custid – so that the chatbot retains the thread of the conversation.

download:

The files for this project can be downloaded from the intenet-sensors archive at github

https://github.com/tkzic/internet-sensors

random word generators