This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#experimental program to try out midi in with Sonic-Pi 2.12.0-midi-alpha3 by Robin Newman March 2017 | |
#An Oxygen8 v2 keyboards is connected to my Mac. | |
#This sends midi signals to the m2o module of osmid which translates the midi to OSC and | |
#feeds the signals to the osc_cues_port in Sonic Pi | |
#the midi messages can therefore be detected by judicious use of the sync command | |
#look at the osmid_m2o and osc_cues logs to figure out the message(s) to intercept | |
#further useful info in osmid readme files at The osmid distribution is at https://github.com/llloret/osmid | |
#in my case the keyboard was connected to port 2, and I used the first midi channel (0) | |
set_sched_ahead_time! 0.1 #reduced this to reduce latency |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''FTP server for Pythonista (iOS) | |
You can use this to exchange files with a Mac/PC or a file management app on the same device (e.g. Transmit). | |
If you use a Mac, you can connect from the Finder, using the "Go -> Connect to Server..." menu item. | |
''' | |
import os | |
from socket import gethostname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File Transfer for Pythonista | |
# ============================ | |
# This script allows you to transfer Python files from | |
# and to Pythonista via local Wifi. | |
# It starts a basic HTTP server that you can access | |
# as a web page from your browser. | |
# When you upload a file that already exists, it is | |
# renamed automatically. | |
# From Pythonista's settings, you can add this script | |
# to the actions menu of the editor for quick access. |