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)...
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))
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.
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:
- Ip addresses might change depending connection
- sometimes an ad-hoc connection is needed (during gig)
- at home or during rehearsels the IP address might change
- somtimes I need to control my behringer mixer
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
- midi over bluetooth from Pythonista --> not working (too complex and not enought documentation (see my other thread)
- Mulitpeer --> nu support on MacOs for multipeer over Bluetooth ;(
- direct Bluetooth serial --> no success
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 for al the help and comments!!!
I've seen examples that only get a destinationget and use Midi-Receive on it.
Tried many options and still am stuck.
If you create a client, than You have to select the client in the synth as input.
In the end I want to select the Bluetooth (by name) from the destinations and sent a program change via that.
The most simple example was to try to get a note on via destiantions to a virtual synth and build on that.
That was also my first guess, but in al the examples where the destinations are used, they use MIDIReceived().
If you open een client, then you have to use MIDISend().
I seem to miss something....