nobody can help me on any of the questions?
I tried to find the answers, but I'm not able to find any of them.
Thanks!
Erik
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
nobody can help me on any of the questions?
I tried to find the answers, but I'm not able to find any of them.
Thanks!
Erik
I've been using Pythonista for and application to display chords, lyrics using JPG and TXT files on iDrive. This works great: I can edit on any Mac in iDrive and see it pop up in the App running on my iPad. It follows the folder structure, so can create extra folders per band, set or for older songs.
I've also included the play-back of audio files (wav or MP3)
Recently I've added the option to change the patches on my synths via an Midi Program Change message. This is not possible in Pythonista, therefor I send an UDP message to MidiFire, this app will receive the message and converts it into a Program change that is sent to my synths.
The app runs smooth in version 3.4 on my MacOs (iMac m1), everything seems to work immediately!!!!
I have a few (perhaps stupid) questions:
Thanks for the possible anwers!
I wrote an Pythonista application to show lyrics and chord for live performance. It also plays backingtracks and is able to sort setlists. Works great. But I missed the option to use it with MIDI program changes to also setup my synths to the matching programs.
Finally I found a way to get this working: Pythonista --> UDP --> MidiFire --> MIDI-out
Could also be used the other way to receive midi data
Use MidiFire with OSC Exchange to MIDI synth. Setup UDP to port 8051, wrap data in sysex to no.
From Pythonista use the simple code that i found elsewhere, easy to tweak into program changes or other midi commands.
I hope this helps others
#https://adamsiembida.com/how-to-send-a-udp-packet-in-python/
import socket
# addressing information of target
#fill in your ip and port
IPADDR = '127.0.0.1'
PORTNUM = 8051
# enter the data content of the UDP packet as hex
msg1 = bytearray([0x90, 0x40, 0x60])
msg2 = bytes.fromhex('903e70')
#or using variable for midi note message
midi_message = '903c50'
midi_packet = bytes.fromhex(midi_message)
# initialize a socket, think of it as a cable
# SOCK_DGRAM specifies that this is UDP
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
try:
# connect the socket, think of it as connecting the cable to the address location
s.connect((IPADDR, PORTNUM))
# send the command
s.send(midi_packet)
s.send(msg1)
s.send(msg2)
# close the socket
except:
pass
# close the socket
s.close()
Thanks ccc,
The idea is great! it will not work in your form of coding as the return value contains a full path.
With minor adjustments it can work.
In my app I read .txt and .jpg files for displaying
However It seems that the problem is the .jpg files. For some reason the are offloaded in iCloud. I got only '.xxxx.jpg' files (with the . ).
After opening the folder with 'Files' the image files had a small cloud icon on top and after a few seconds they started to download from the cloud and that made everything working again.
For some reason the iCloud off loaded the images and downloaded them after opening them with 'files'
Perhaps someone knows why and how to prevent this (As I use this app on stage during a performance)...
Extra info:
The files that I want to read are stored in iCloud, also the python script files.
and for some reason when this happens, I cannot open my python file from pythonista (the iCloud location where I keep my python files is empty), the files do exist when using "Files" on my iPad, I can see the python files, when clicking on it, it will open Pythonista and runs fine
I want to select files from a folder. I use the following code:
from pathlib import Path
self.contents = list(curPath.iterdir())
f = self.contents[i]
name = os.path.basename(os.path.splitext(f)[0])
I have a folder with 66 items, self.contents has 66 items.
Sometimes it contains the correct names, sometimes, there are names with a '.' in the name.
perhaps it has to do with the mix of PathLib and OS.
The strange thing is that is can be working without the '.' for longer time and then suddenly it inludes the '.' files.
Any clue?
Many thanks!
Thanks for all the remarks.
I want to disable WIFI during a gig because some synchonisation services (I use iCloud and Google Drive to synchronize my settings, apple update) use WIFI and might cause CPU spikes and so audio spikes.
Perhaps it might not be a problem when this is an ad-hoc connection .
Mulitpeer works great in Pythonista, but no library for regular python...
Searched for hours.
I might try UDP broadcast just to get the few bytes over to python on my MacBook
Wifi will work for sure. with some UDP messages
The setup is not always the same:
While BT is just there and will connect automatically.
Perhaps I'm wrong with all the WIFI issues and a uniform way of working can be found.
Communication from Pythonista on iPad to MacBook via Bluetooth.
My application is a chord/text application I wrote in Pythonista and want to control my softsynths on my Macbook.
Flow would be:
1 Select song in Pythonista
2 send a message to my Macbook,
3 recieve the message in Pyhton
4 Send the correct Midi program change command from python to Mainstage (or other softsynth-host)
1 and 4 are working
I tried:
I don't want to use WIFI, because this is might be used to control my behringer mixer and internet access. So I don't want to switch with this too often and loose access
Any clue what to use for this?
Thanks!
I tried all possible combination, no midi is recieved by any clients. I spent way too much time on this....
Would be nice if Pythonista had a coreMidi module installed...
Thanks for all the help!