Converting 0-127 CC Knob Into "Endless" Encoder
Whew... that's a tricky one that I myself have attempted before. There are a few ways to potentially do this, but it depends on some things... Like nodsp said, the range is an important factor as well as the behavior of how it handles jumping between maximum and minimum values... and also the knob that is being used along with how the device handles sending the values received for that knob. If it spins endlessly, but stops sending values after after the knob turns past the minimum or maximum, thats a problem. If the knob reaches the min or max, and continues to send the min or max value each time the knob is turned past the value, then i'd do an endless encoder like this... endless-encoder.pd
To make a range constraint, just throw a modulo ( [%] ) object at the output, or something like [cyclone/wrap]
If the device being input does not send values once the knob goes past the limit, it becomes a bit more complicated. Youd have to take the expr object and set it so that when it receives a 0, it outputs 1 and if it receives a 127, it outputs 126, then route that back into the device to set the value so that you will get an output from the device on the next turn of the knob. does that make sense?
Parse OSC messages to send them
@endorak This will get the message you want ( 192.168.3.234 -> 188.8.131.526 ) through in OSC format. It's the easiest way and Max should receive it (I hope) in a useful format......maybe.pd
It looks like you are using extended..... let us know if you need a vanilla solution.
You don't need the set message, or the trigger....... but it shows the message you are sending. It can be simpler if you wish..........just this.........
The /aaa is dropped..... it is seen as a definition of the parts that follow as a "list".
So the parts of the list...... "1234" "123.457" etc. can be copied into the message using $1 $2 $3 etc.
You don't want $1 or $2.......... the bits you are looking for are $3 $4 $5.... and those variables are replaced by the data arriving at the message inlet and sent on to the [packOSC] object, with a message header (it could be /woof ... or /whatever. It identifies the message for the osc receiver just like the /aaa did coming from your Python script.
The [packOSC] object sends a string of integers....... that [netsend] understands.
Setting [expr] formula dynamically
@Jona No, I want to create multiple instances of the same abstraction and send to each 2 lists: one containing the expression for [expr] and one with the variables for the expression (sending the latter to the first inlet of [expr] will distribute the floats to the outlets, since different instances will have a different number of inlets depending on the expression). The parent would patch would look like this:
Actually it turns out that it can be done with dynamic patching somehow, but the problems are not the spaces but special characters like comma or $0 (which I might need to use if the [expr] expression is looking up values from a table in the parent patch), and so the message needs to be formatted like this.
It's pretty messy but at least it works.
No audio coming out of pd when playing score
So, Hello! my score in iannix finally worked with pd extended, but I cant record it because there are interruptions (the audio freezes then starts again and so on), and i dont know if its because of my processor or sound card or whatever, so im trying vanilla latest version to see if i can record it with that, knowing that it is 64 bit, now, i had problems with vanilla because there were a lot of things that it couldnt create, so i saw a post with some similar problems and i got some objects to work. Now the osc messages are coming through iannix score to pd vanilla, but no audio is coming through, i already tested the audio in "media test audio and midi" and it worked but not when i press play on my score, and on the console i get these messages: mrpeach cant load library, initbang couldnt create and pvu~ couldnt create...
Im attaching the iannix score and the pd patch and a photo, what do i need to do to make these problems go away and make the audio come through?
markovGenerator: A music generator based on Markov chains with variable length
This is one of the early projects by @Jona and me. Happy to finally release it.
Generates music from learned material using Markov chains. It is polyphonic, plays endlessly and supports Markov chains with variable length.
- Record midi notes or load midi files
- Make Markov system
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.
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.
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.
Synth patches missing [knob]'s from "flatgui" in Purr Data & Pd
Got a knob to show !
At least there's only one knob now in Britain (you'll only understand this if you're a Brit) ... anyway ...
So, I don't understand how to use the above syntax yet ([moonlib/mknob]). So I added moonlib path and moonlib name to end of lists in Purr Data preferences (I thought PD would just hierarchically read the entire extra directory but whatever) and just changing "knob" to "mknob" creates the control. I have not checked yet if the sound it being altered correctly, however it does respond to mouse control.
EDIT: All controls working and knobs seem to effect sound OK although I don't know what Zorg is supposed to sound like. It does not sound "right" but it just might not be what I was expecting. I'll see what happens with the other synth.
Some questions regarding a loop station
They don't necessarily play in time anyway.
Well, nor do I.
But you can fix this later at mastering. You could record the click track to a second channel (having sent it out and back in) to aid with re-syncing. The distance from ear to monitoring you can measure physically and calculate the delay.
And when I know the latency in advance, I can record while I play along and shift the recording afterwards, so it'll be in sync again.
I'm not shure, but I think, when I use Katja's latency patch, it measures the latency between speakers and microphone. Only trouble might be too much ambient noise.
For now I tried to crossfade at the end of the sample. I'm mixing a fade-in of the start of the sample with a fade-out of the end of the sample.
Maybe this picture is helpfull for a better understanding:
The startsamples are taken from $0-temp, which is recorded first and which is delayed by the latency.
$0-sound is the array used for playback.
I tried to use a crossfade of equal power, but still I can hear a little dip when the sample is restarted.
This is the calculation: expr ( 1 - cos( $f1 * (3.14159 / 2) ) )
with 0 < $f1 < 1
This is, what it looks like in a scope:
The first row shows the cutted sample $0-sound. It's start is around 112800 samples. On the left side you can see the end with a fade out.
The second row shows the fade-in of the start sample.
The third row is the mixed result.
Here's the new patch:
Are there any ideas of how the mixing can be done better?
Permutations, second part, can anybody get this patch to work?
@whale-av ok, so a few things, whenever I open "mix mod" there is this:error: receive~ mixer_in-$1: no matching send.
For "part timbre" there is this:throw~ voice_out$1: no matching catch
For "part voice": throw~ voice_out$1: no matching catch
and for "voice gen": throw~ voice_out0: no matching catch, I dont understand why there are several "timbre_gen" sub patches(or what are the subcurves?), other than that Im kind of understanding what i have to do to make new voices and timbres for the voices, but on the graphs when ever i need to add one, i cant change its number above the graph, I click on the graph, then properties, and there isnt a window to change the number, Ive seen the window before, but now it just doesnt appear...(this on extended), I had to open timbre-gen to change the numbers on vanilla and then re open it on extended, because on vanilla this happens in the console :
... couldn't create
... couldn't create
... couldn't create
... couldn't create
... couldn't create
here are some pictures:
Store a variable to compare to current variable
just to give some context of the design. Im taking influence from applications such as mlr:
and digital synthesis with parameter control ….
I was imaging i need the buttons working independantly in some areas as different co-ord will have different functions and jobs that can’t intervene with each other
these are the print messages from the serialosc object:
I really wanted to try the monophonic keys.pd but the array objects arn’t recognised ? I tried including a table so see if it would be recognised to store the values in there?
I want to link this design he’s using velocity to compare to a previous value I wasn’t sure if it would be helpful yet? I think its applied differently because of the live signal and the way it receive data…
I'm not sure what onepole~ is so I didn't look @ the patch too much, but I believe a doppler effect could be achieved simply by calculating the distance of the sound source from the listening location and then putting the amount of time that it would take sound to travel that far into vd~. So, if sound travels 343 m/s on average and your sound source is 343 meters away you would put 1 second into vd~ and update vd~ with line~ whenever the sound source's position changes. That should create a pitch shift effect automatically
However the situation becomes more complicated with multiple sound sources as you'll need multiple delay lines. At that point memory usage would be something to consider, and perhaps the possibility of using a single delay line for all sound sources