IAC Driver
I'm going to have to plead myself stumped once more I'm afraid. I really like the concept of MIDI routing without using Audio/MIDI setup, and MidiPatchbay is easy enough to use, but the patch is still not connecting as I had expected it to (somebody only barely understands the basics of computer science if claiming so isn't hubris on my part). My process is as follows:
-
Start MIDIPatchbay, create a single universal MIDI strip with both input and output - name "PD-Input"/"PD-Output" for reference. Allows all notes, allows all messages, clocks in real-time.
-
The patch itself doesn't show up in Audio/MIDI setup. That's fine, as I understand it the MIDI signal is traveling through MIDIPatchbay anyways. IAC is turned off and no software instruments are installed. I can close down Audio/MIDI setup and ignore it.
-
Start Mainstage, make sure that the volume is up, a patch is readied, and that Mainstage recognizes that there is a MIDI input available. Mainstage recognizes "1 MIDI input available"
-
Start PD-Extended and open the Sequencer patch.
-
Go through the process of making sure all components of the patch are functioning (it has a sequence tempo set, all the notes are active, volume is up, all the usual goodies).
-
Check DSP to on (I don't think it's necessary, but I tend to idiot proof my processes).
-
Set MIDI output from PD-Extended to "PD-Input" from MIDIPatchbay.
At this point I have all three pieces of software running, I believe in the correct order, and connected to one another with the only glitch being that I don't get a lick of audio. I'll dump the patch here for reference:
I try to keep things fairly self-explanatory in terms of sends/receives and with comments within the object arrangement, but here's hoping it's legible. If the problem is in the coding of the patch I can take it across to that section of the forum. That said, even making a simple patch to create a note with set number, velocity, and duration on manual bang and send through the midiout doesn't seem to be arriving to Mainstage. I suppose I could use one of my other programs capable of MIDI synthesis, but that seems superfluous.
I really appreciate the help, I've worked with PD less frequently over the past five years or so than when I was first learning the ropes; it always seems like I have to re-learn a few things as well as double check on my knowledge of possible objects to use... Always something new.
markovGenerator: A music generator based on Markov chains with variable length
Edit: There is a general [markov] abstraction now at https://forum.pdpatchrepo.info/topic/12147/midi-into-seq-and-markov-chains/45
This is one of the early projects by @Jona and me. Happy to finally release it.
markovGenerator
Generates music from learned material using Markov chains. It is polyphonic, plays endlessly and supports Markov chains with variable length.
markovGenerator.zip (updated)
Usage:
- Record midi notes or load midi files
- Make Markov system
- Play
-
Record midi notes or load midi files
Until you reset the memory, each new recording will be added to the memory. The recorded material is seen as a loop, so that the last note is followed by the the first note, for endless play. markovGenerator handles recording midi and loading midi files differently: When you record midi, it will record notes according to the midi clock every sixth midi tick. This is defined in the counter in [pd midiclock]. So that way, breaks are being recorded and the rhythm is preserved. When loading midi files, no breaks are being recorded, the notes are just recorded in order, so the rhythm will be lost. In any case, simultaneous notes will be recorded as chords, so polyphony is preserved. -
Make Markov system
Set markovOrder to specify the length of the Markov chain. The higher the order, the more musical information will be kept, the lower the order, the more random it gets. You can use soundFilter and channelFilter to only use notes of the specified sound or channel. This is especially useful when working with midi files. Note that if there are no notes of the specified sound or channel, the Markov system will be empty and nothing will be played. Set the filters to zero to disable them. If you change the settings for the Markov system, click makeMarkov again for them to take effect. You can make new Markov systems with different settings out of the same recorded material over and over again, even when playing. If you record additional notes, click makeMarkov again to incorporate them into the Markov system. -
Play
While playing, you can change the note length, sound and midi out channel. Set soundOut and channelOut to zero to use the sound and channel information of the original material. Playing starts with the Markov chain of the last recorded notes, so the first note might be played first.
Use the markovAll section on the right to control all Markov channels at once. Here you can also set tempo, swing and midiSync, and you can save the project or load previous projects.
Have fun!
If it does not play, make sure that
- you recorded some notes,
- you hit the makeMarkov button,
- soundFilter and channelFilter are not set to values where there are no notes. Try setting the filters to zero and hit makeMarkov again.
About the Markov system:
You can see the Markov system of each Markov channel in [text define $0markov]. Notes are stored as symbols, where the values are joined by "?". A note might look like 42?69?35?10 (pitch?velocity?sound?channel). Chords are joined by "=". A chord of two notes might look like 40?113?35?10=42?49?35?10. Notes and chords are joined to Markov chains by "-". The velocity values are not included in the chains. Sound and midi channel values are only included, if soundFilter or channelFilter are off, respectively. Markov chains of order three may look like 42?35?10-36?35?10=42?35?10-60?35?2 with filters off and simply like 42-37-40 with both filters active, only using the pitch value.
Requires Pd 0.47.1 with the libraries cyclone, zexy and list-abs.
Simple Mobmuplat App: "spiral2audio" - with parameters + use of [wrap] with LCD visualization
Simple Mobmuplat App: "spiral2audio" - with parameters + use of [wrap] with LCD visualization
Not sure about how much (in gaming terms) "playability" this has. But it was/is a lot of fun to think about: how does [wrap] operate on a function (not the wrap part but the sound) and how does that combination of function+wrap play out in audio-vsiual space.
It writes the xy-results of the spiral to an LCD control so you can see what's happening. Particularly interesting once the [wrap] kicks in. Parameters can be changed on the fly and you can clear the LCD to watch how the interaction unfolds as you change those parameters.
(Made a similar one for collatz. But, musically speaking, Collatz is horrible! Spirals somehow appeal way more to my sense of "music".)
The xy-coordinate have been mapped to [makenote] as follows: pitch=y, velocity=x, and duration=y*maxduration. (This can be changed very easily within the patch, if you want a different map).
To use the app just download the zip below and install it like a regular mobmuplat app, aka. "Open with Mobmuplat".
The controls are pretty straight forward:
maxnotes: the maximum number of iterations it will play, from 10-1000 (linear);
res(et): resets the loadbanged defaults (just a simple spiral);
clear: clears the LCD grid, where the function is behind the controls; also does this on res(et);
(max)noteduration: (at 120bpm), 1/32 to 2 wholes;
j: the x-offset;
k: the y-offset;
wrapmin: the mininum midi note value, scaled to the 88 midi piano notes, i.e. {0-88}+20;
wrapmax: the maximum midi note value, (ditto) and is scaled so its minimum is never lower than the wrapmin;
r-incr: the radial incrementor for each note;
theta-incr (+ grid): the theta incrementor; the grid allows you select quadrants of 90 degrees, ex. -1,1 changes the knob's range to 90-180;
+|-: to change the theta incrementor to a + (default) or - value;
and
vol(ume).
Have fun. Let me know what you think.
Ciao.
Peace thru love and music,
Scott
note: it has a wierd bug on first run where it shoots up from (0,-1). Currently, don't know why and haven't the patience/energy to fix it. Sorry. Ciao. If anyone wants to diagnosis and fix that that'd be awesome. Thanks. Happy pd-ing. (It works fine even with the anomaly)
Purr Data rc5
Purr Data release candidate 5!
- small fixes to OSX app bundle name and build instructions
- fixed OSX app bundle name
- fixed GUI errors with some GUI objects on GOP
- use cat icon for patches
- fixed a [grid] crasher with binding symbol leak
- fixed [grid] line drawing bug and GOP xlet display
- added dialog and scale handle for [grid]
- ported moonlib/knob
- get rid of some extraneous debugging messages
- allow to install Purr Data alongside Pd-l2ork
- Scope~ code cleanup
- fixes for arm build
- added some OSX app bundle dependencies for [fluid~] and others
- fix saving preferences under OSX
- added startup paths and libs to preferences dialog
- use "Purr Data" in OSX menu app
- help browser fixes
- fixed MIDI preference saving on OSX and Windows
- added a "Recent Files" menu to the "File" menu
- get consistent behavior for present working directory when opening/saving files
- fix Volume name for OSX dmg installer
- try to standardize a deterministic package name when compiling Purr Data
- add a Pd-l2ork-specific version number
- add command line open args to "Recent Files" list
- fixed crasher with ds "canvas" field
- allow saving the zoom level per canvas
please report lots of bugs to
https://git.purrdata.net/jwilkes/purr-data/issues
Binaries:
Playing sound files based on numbers/sets of numbers?
@whale-av Hello, first I just want to say thank you very much for your help and sorry for not replying sooner, I read all the messages, I just didn't want to bother people before I had an actual issue or a question that I understood enough to know how to ask what to do next. So that's why I'm only replying now. And you're totally right, I have suffered and learned in the past day so my brain's kind of all over the place right now, I'm still struggling to get the hang of this and really understand the patches you sent me (thank you so much for taking the time to make them for me!).
To answer your questions, I will not be assessed for this part of the project, it doesn't matter much how I do it as long as it works because no one will look at the project anyway, the end result is what matters in this case. The only "limitation" is that it has to be done in Pd. Also, my version of Pd is Vanilla (I'm assuming that doesn't change your patch much since you said it'd work in that version), and actually no, there's not really a next stage to this project; all I'm supposed to do is get my sound files to play in a loop when I press Enter (after I've typed all my numbers) and to be able to stop the loop again with Enter. I probably should have mentioned that oops, does that mean I need another keyup object or would the one in the patch work for both starting and stopping the sound?
I actually had a patch of my own but it was very simple and mostly improvised based on what I managed to learn (like I said, completely new to this) and nothing like yours so it probably wouldn't have worked anyway... Is it ok if I use your patch as a starting point? If it is, I'm assuming the next step would be the abstractions. From what I understand, abstractions are used for referencing and reusing old patches in order to keep the new patch clean and not messy. I do need something like that, as I have 17 wav files ready to use. But not all 17 should be used in one loop. I actually only need 5 sound files per loop (like in your patch), but the total number of files I can choose from is 17. To be able to tell the program which file to play based on its corresponding number I probably need the select object, right? Would I need it within the calling patch or the patch being called, a.k.a. abstraction (if my thinking is right, it's probably the calling patch)? There's probably an easier way to do this than an x number of select objects but I'm just not familiar enough with the program, sorry... Also, what difference does it make if it's not 1-digit numbers, but 2-digit, 3-digit and 4-digit combinations? To be more precise, the first, second and fourth sound file should correspond to a 2-digit number, the third to a 3-digit number, and the fifth to a 4-digit number (and I can't change this unfortunately, it's part of the task).
Oh, and is there a way I can make this work on any computer, for example if I copy my files onto a flash drive? Or if I can't, would it drastically affect my main patch if I changed the sound file destinations later, once I know what computer is going to be doing all this? Would I need to change the file destinations in all the patches or would it be possible to do so automatically via abstractions, by changing them in the main patch only (probably not but eh I asked...)?
This is all probably waaay too advanced for a beginner (and I have no idea why they'd give me this task without any prior preparation.......) so I realize I might be asking for too much here, and maybe I'm getting ahead of myself, but I still hope you could give some advice on what to do from here, what's the next step, the elements I need to get this done etc. I'm not in too much hurry, I have time until the 5th of February, so it's ok if you don't have the time for me right now, I can wait a bit!
Thank you so so so much, even just sending me the first patch was such a huge help, thank you! And I hope you can guide me through this for a bit longer!
Purr Data rc4
Edit: Windows binary is now up
Purr Data release candidate 4!
- fixed race when opening pd file in OSX
- partial fix for midi prefs not getting saved under Windows
- fixed #194: saving a loaded abstraction gives errors
- fixed for #201: new subcanvas position isn't saved with patch
- sync the ALSA sequencer port state with the GUI
- reset ALSA MIDI device handles and event buffers when closing
- got rid of more debugging output
- go ahead and allow curly braces in Pd messages
- replace the Pd-extended output~ abstraction with Alexandre Porres' improved version
- report userful value for "dsp-status" method of [pdinfo] by ignorning suspend/resume
- fixed display of dollar signs in properties dialogs
- fixed loading of lyonpotpourri and disis libraries
please report lots of bugs to
https://git.purrdata.net/jwilkes/purr-data/issues
Binaries:
Pd quits when opening Midi settings
Which version of Pd and on which operating system?
Can't say for sure what's up, one long-standing issue with Mac and Windows PD is that PD has never had a proper software midi interface between the app and the system. What it does have is a hack-in that will connect PD midi to - at maximum - the first nine ports on the system's midi port list and nowhere else. ATM only ALSA MIDI on linux has anything close to a fully interfaced PD midi to system buss.
To get full access to the max available midi porting on Mac/Win you have to start with all midi ports on the system deactivated. You then have to use 3d party midi patching software such as Midi Patchbay on Mac (don't use IAC leave it deactivated) or an equivalent Windows program to create nine virtual midi ports to occupy those first eight slots on the system list. Start PD and connect it to the nine virtual ports. Activate all the other midi ports/devices that you need on the system, then use the patching software to do the actually midi routing to external software and devices.
If the above sounds ridiculous -- it is! Supposedly this is actually being worked on (finally) but it requires a major rewrite of badly botched coding. Most of the Pd coders don't really "get" midi and the few that do haven't been very active since they contributed the ALSA code. Take it from someone who has written multiple midi synth editors with Pd-- there's a reason I prefer PureData on linux.
libpd on mac: clarification requested on expected behavior of cpp sample
Hi! I am running Pd-0.47-1-64bit on Mac OS 10.11.6 and libpd 0.9.2. I am trying to work with the samples/cpp/pdtest. Here's the github repo. I currently have an app that takes video and spits out a 2D array of color values for regions of interest to file. I have a pd patch that then loads those into a table and plays the corresponding pitch. I need the two (patch, c++ app) to coordinate the IPC.
I compiled the cpp code in the samples directory however, when running pdtest executable there is no patch opened. Is this by design? I was not able to find a pd-vanilla to build from source so took the most recent (pd-0.47-1-64bit.mac.tar.gz). Does libpd need to have the pd built after libpd? If so, can anyone please point me to a src file?
Here is a truncated output from running the compiled pdtest. Could someone tell me if this is what is expected?
Thank you for your help.
BEGIN Patch Test
Patch: "pd/test.pd" $0: 1003 valid: 1
Patch: "pd/test.pd" $0: 0 valid: 0
Patch: "pd/test.pd" $0: 1005 valid: 1
PD: PATCH OPENED: 1003
print: 0
PD: PATCH OPENED: 1005
print: 0
FINISH Patch Test
BEGIN Message Test
FINISH Message Test
BEGIN MIDI Test
FINISH MIDI Test
BEGIN Array Test
array1 len: 10
array1 0.0857145 0.328572 0.500001 0.57143 0.514287 0.47143 0.357144 0.285715 0.057143 0
array1 0 1 2 3 4 5 6 7 8 9
array1 10 10 10 10 10 10 10 10 10 10
FINISH Array Test
BEGIN PD Test
FINISH PD Test
Processing PD
PD: bang
PD: 100
PD: symbol test string
PD: bang
PD: 100
PD: symbol test string
PD: 1.23 a symbol
PD dollar zero: 1.23 a symbol
PD: 1.23 sent from a List object
PD: msg 1.23 sent from a List object
PD: 1.23 sent from a streamed list
PD MIDI: notein 2 60 64
PD MIDI: ctlin 2 0 64
PD MIDI: pgm 2 101
PD MIDI: midiin 1 239
PD: symbol test
PD: START MSG TEST
CPP: bang toCPP
CPP: float toCPP: 100
CPP: symbol toCPP: kaaa
CPP: list toCPP: 100 2.3 test 1 2 3 ffsfff
CPP: message toCPP: kaa 1 2.3 test ffs
PD: MSG TEST FINISH
PD: START MIDI TEST
PD: MIDI TEST FINISHED
PD: START ARRAY TEST
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD array1: 10
PD: FINISH ARRAY TEST
PD: test_abs: Hello World!
CPP MIDI: note on: 0 0 127
CPP MIDI: note on: 0 0 127
CPP MIDI: note on: 0 60 64
CPP MIDI: control change: 0 64 100
CPP MIDI: program change: 0 99
CPP MIDI: pitch bend: 0 2000
CPP MIDI: aftertouch: 0 100
CPP MIDI: poly aftertouch: 0 64 100
CPP MIDI: midi byte: 0 239
CPP: float env: 75.5457
CPP: float env: 87.9506
CPP: float env: 93.5842
...
CPP: float env: 88.5503
CPP: float env: 87.7612
print: 1
CPP MIDI: note on: 0 0 0
CPP MIDI: note on: 0 1 127
CPP: float env: 86.8932
...
CPP: float env: 41.2584
CPP: float env: 0
print: 2
CPP MIDI: note on: 0 1 0
CPP MIDI: note on: 0 2 127
...
print: 20
CPP MIDI: note on: 0 19 0
CPP MIDI: note on: 0 20 127
Beatmaker Abstract
http://www.2shared.com/photo/mA24_LPF/820_am_July_26th_13_window_con.html
I conceptualized this the other day. The main reason I wanted to make this is because I'm a little tired of complicated ableton live. I wanted to just be able to right click parameters and tell them to follow midi tracks.
The big feature in this abstract is a "Midi CC Module Window" That contains an unlimited (or potentially very large)number of Midi CC Envelope Modules. In each Midi CC Envelope Module are Midi CC Envelope Clips. These clips hold a waveform that is plotted on a tempo divided graph. The waveform is played in a loop and synced to the tempo according to how long the loop is. Only one clip can be playing per module. If a parameter is right clicked, you can choose "Follow Midi CC Envelope Module 1" and the parameter will then be following the envelope that is looping in "Midi CC Envelope Module 1".
Midi note clips function in the same way. Every instrument will be able to select one Midi Notes Module. If you right clicked "Instrument Module 2" in the "Instrument Module Window" and selected "Midi input from Midi Notes Module 1", then the notes coming out of "Midi Notes Module 1" would be playing through the single virtual instrument you placed in "Instrument Module 2".
If you want the sound to come out of your speakers, then navigate to the "Bus" window. Select "Instrument Module 2" with a drop-down check off menu by right-clicking "Inputs". While still in the "Bus" window look at the "Output" window and check the box that says "Audio Output". Now the sound is coming through your speakers. Check off more Instrument Modules or Audio Track Modules to get more sound coming through the same bus.
Turn the "Aux" on to put all audio through effects.
Work in "Bounce" by selecting inputs like "Input Module 3" by right clicking and checking off Input Modules. Then press record and stop. Copy and paste your clip to an Audio Track Module, the "Sampler" or a Side Chain Audio Track Module.
Work in "Master Bounce" to produce audio clips by recording whatever is coming through the system for everyone to hear.
Chop and screw your audio in the sampler with highlight and right click processing effects. Glue your sample together and put it in an Audio Track Module or a Side Chain Audio Track Module.
Use the "Threshold Setter" to perform long linear modulation. Right click any parameter and select "Adjust to Threshold". The parameter will then adjust its minimum and maximum values over the length of time described in the "Threshold Setter".
The "Execution Engine" is used to make sure all changes happen in sync with the music.
IE>If you selected a subdivision of 2, and a length of 2, then it would take four quarter beats(starting from the next quarter beat) for the change to take place. So if you're somewhere in the a (1e+a) then you will have to wait for 2, 3, 4, 5, to pass and your change would happen on 6.
IE>If you selected a subdivision of 1 and a length of 3, you would have to wait 12 beats starting on the next quater beat.
IE>If you selected a subdivision of 8 and a length of 3, you would have to wait one and a half quarter beats starting on the next 8th note.
http://www.pdpatchrepo.info/hurleur/820_am,_July_26th_13_window_conception.png
MIDI YOKE beginner
Hello, i stumbled on Pure Data today and loved the idea of controlling Ableton via an ipod touch. So now i've been sitting here for two hours trying to get this to work.
I've downloaded Pure data and the app for the ipod. So far so good.
When i press buttons on the ipod, it recognises that in Pure Data. Going great.
Now, and i should point out i'm on a windows computer, i have to connect it to ableton. No IAC bus midi stuffs since windows don't have those, so Midi Yoke it is.
I have installed Midi Ox (couldn't find Midi Yoke so... is this the same program?)
and i think... i understand it. I set midi out on DP to midi yoke 1. Set Midi yoke 1 in to midi Yoke 1 out in Midi Ox. In ableton i then highlight everything (track, sync and remote) on both Midi yoke 1 out and in (because i dont know what to highlight so...)
now... nothing. I think the problem is that Midi Ox don't recognise the Midi out from DP but i'm not sure. I don't see any changes at all when i press the buttons on the Ipod in Midi ox.
I'm sorry for all this rambling, and i have googled as much as i can but i haven't found any solution. I did find a tutorial named how to setup as i described http://www.gadgetcracker.com/2009/06/how-to-iphone-touchosc-pure-data-ableton-live/ but link just 404
Please help me