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.
Pretty please CoreMidi for 1.6
-
Developing musical applications in pythonista. Want to play more notes that just the 2 piano octaves without having to have a "note" waveform library.
-
A big YES, PLEASE for this from me as well!
-
Wave module is supported, see forums for example.
I think things are a lot faster with numpy now, than in last build.
Probably does not really work for realtime work, but you could generate a library of files as needed. -
Actually, if you keep the sample rate low, it is possible to generate files in near real time and play them. I was surprised.
Here is a simple piano made using wavs that are generated upon first key press, then cached.
I haven't tried it, but it looks like pySynth will work in pythonista, you would use a tempfile for playing arbitrary sequences that are predefined, like a midi file. As long as you keep the sample rate low enough, numpy is quick. -
I'm not really (atm) interested in sound generation on the iDevice but actually in MIDI in itself to control external devices or to act as a MIDI filter or processor.
-
Same application as SplotlightKid. I found this project that could make it reasonably doable.
https://github.com/sixohsix/simplecoremidi
Only 256 lines of C code to wrap the MIDI connect read write and reset. Should allow you to talk to synths running on the device as well as via wired and now Bluetooth devices.
-
Couldn't agree more, MIDI and better audio in general (simple ADSR synthesis like a Commodore 64, even) would really make Pythonista and iOS devices way more useful for me...
-
We have been discussing this in another thread (search for CoreMIDI). Getting CoreMIDI linked into Pythonista is required and then someone could take a shot at using ctypes to convert the simplecoremidi code to Python.
@omz says the following ... "I'm not currently linking against CoreMIDI – and there's another problem: MIDISourceCreate and MIDIDestinationCreate require that the app declares the 'audio' background mode, which is a build-time thing that you can't modify after the app is installed... While declaring this would actually be useful for other things, I'm not sure if I could get the app through review with background audio enabled because it could be abused for all sorts of things (e.g. running in the background forever while looping a silent track...). I don't know, maybe I'll have to integrate a music player to have an official reason."
All of my applications would require reliable background processing anyway, so I hope omz decides to take the plunge and see if he can get past app review with it. My main application for it would be to translate MIDI data in the background as it moves from one device to another and playing MIDI data to synths that I have installed. All of this would require the script to be running in the background and not getting cancelled all the time. There are already LOTs of music apps out there to do this but none of them are programmable.