-
cerupcat
I have a tone and chord generator that can produce 1 - 8 tones simultaneously. What's the proper way to ensure that the there's never any clipping and the amplitude stays the same when playing 1 tone or 8? Should I be dynamically dividing the amplitude by the number of tones being played?
-
cerupcat
It seems that [sigmund~] is really great for frequencies from 200hz - 15000hz, but when it gets below 200hz it starts having problems (especially below 100hz).
[helmholtz~] on the other hand works great all way down to 20hz, but it cuts off at 2000hz.
Is there a good way to combine them so that sigmund~ could handle the upper range and helmholtz~ handle the lower range? For example, should I route the audio to sigmund and helmholtz at the same time and then let helmholtz have preference if they both find a value? Or should I do some kind of cutoff filter and send the highs to sigmund and the lows to helmholtz?
Or maybe I have the wrong parameters for lower notes in sigmund?
-
cerupcat
I'm trying to align the frequency discovered by [sigmund~] with a spectrum graph.
I tried using a logarithmic scale, but they're not aligning. I'm currently using the E-01-spectrum example. How can I plot the input frequency so that it'll align with spikes on the spectrum? -
cerupcat
I currently am storing numbers in a list. The numbers are in sets of 3s for representing Pitch, Volume, Pan. For example, [70 127 .5] is one set and each list has multiple sets. I would like to be able to remove or skip reading a set if the first number in the set (Pitch) matches one already in the set. For example in [34 127 .5, 39 127 .1, 34 127 .7] the last set would be skipped or removed (when reading the list) since the first number (34) matches the first number in the first set. Essentially, I don't want any duplicate Pitch's to go through.
Is there a way to sort lists in sets of 3? If so, I could just use the 'change' object. How would I best do this. I thought about using an array or table, storing the set only if the first number wasn't already utilized in the array, but I don't know how I would handle all 3 numbers (3-axis) in one array.
Any thoughts?
-
cerupcat
I'm doing a project for iOS and therefore the GPL objects from PD (like expr, limiter~, z~) can't be used. Is there another simple way to create a limiter? Maybe using env and then lowering the volume if it's above 1? Any best practices, advice, or sample patches for something like this?
-
cerupcat
Instead of rendering to a audio file (wav, aiff, etc), I'd like to save/record real-time parameter changes to a text file (with timestamp) so they can later be loaded in and playback what was recorded. I'm not sure what the best way to go about this would be. Are there any recommendations?
I imagine each parameter worth saving would have a [change] object after it to see if it's changed and if so it sends the parameter to be saved along with a timestamp that PD could read in and send those parameters in time based on the timestamp. I'm not sure about the playback part and how to send a float/notein based on a timestamp.
Any thought on a clean solution would be great. Maybe it's as simple as using the [change] and [textfile] object?
-
cerupcat
What are the different ways for creating a GUI for a PD patch (other than using canvases)?
I don't know much about this, but is there an openGL external for creating a GUI for PD patches?
Also, is there a way to open PD and a PD patch through another program. For example, if a GUI is created for PD in another program/application/C++/etc. is there a way for PD/Patch to load on the startup of the GUI? Or do you need to startup PD separately? What connections may be necessary for this?
Thank you for any thoughts =)
-
cerupcat
I have a patch that receives an ID number when an object is added on a physcial table, and receives the ID number of an object when it is removed (from the table).
All add IDs come through the same outlet, and all the remove IDs come out another outlet.
Is there a way I can sort or list out what IDs are currently active or save the numbers received through the add or remove outlets? Since the ID numbers aren't received in a single list or message (but one after the other) how can I keep track of them when they come out the same outlet?
For example, the add outlet may receive a 1, then a 2, then a 3, then a 4 and then the remove outlet may receive a 3. This means only 1, 2, and 4 are still active.
One thought I had was creating a
all add objects, but is there a way to remove things from a list if they match what is inside? For example, if a 1 is in the add list, and the remove ID outlet receives a 1, it'll remove the number "1" from the add list.
-
cerupcat
Is there a way to "set" a new array into tabrecieve? I tried sending it a set message, just like tabread4, but that doesn't work.
Is there some way I can switch between different arrays for tabrecieve? Maybe a work around?
Also, is there a [spigot] like gate object for signals (not controls)?
-
cerupcat
Hi,
Is there something like the "float" object (right inlet stores, left inlet can send), but for messages?
I have an array that I'm sending "set newarray" into, but I don't want it to actually send it until it gets a bang.
The reason is I have one MIDI note that picks the array to send, but I want the second MIDI note to trigger it actually being sent. First note picks it, second note needs to send it, therefore I need to store it first.
Basically I am wondering if there's an object that can store messages, and will send them when it gets another bang.
Any thoughts?
It would be better if it wasn't an extended object also :-\
-
cerupcat
I'm making an algorithmic based program and I just thought of a new way that I'd like to generate length of notes. I'm still new to pd and programming in general, so I was wondering what the best and easiest way would be to go about making something like my chart below:
4 = note lengths of 4000ms (4 seconds), 2 = 2 seconds, 1 = 1 second, 1/2 = half second. So similar to whole, half, quarter, and eight notes. If the first note (when banged from a random 50/50 chance) is a 4, then the second note can be a 1 or a 2. If the second note is a 1, the third note must be a 2 and so on. I hope the diagram explains what I am trying to accomplish. The goal in doing this is so that on every 4 and 8 notes, the notes line up again (since I have 4 parts to this music generation).
I originally was doing something else to get note lengths, using a route 8 and a random note was triggered by a metronome, and then the metronome (received this length and) didn't choose another until the length of the first note finished. I'm having a hard time switching over to this new concept.
This notelength, is passed to a random note chooser using route 8.
Any help would be great! =)
-
cerupcat
I've read the posts about pitch shifting and time-stretching, but I'm new to pd and programming in general so some of it is over my head. I'm building a sample-based algorithmic melody generator. I am only using one sample per instrument though. Without any time-stretching of course the farther away the pitch is from the original sample it sounds worse.
I've looked over the Fourier-analysis and also phase-vocoder, but I'm not quite sure how to use them. Is there a more simple way (even if it doesn't sound as great as fft) to time stretch so it sounds better. Some of the samples have vibrato (and obviously that sounds bad if going too slow or too fast). The stretching would have to be in "real-time." If I have multiple instruments, it seems like fft is a lot more work then may be necessary. I know timestrethcing/pitch shifting depends on samplerate, but don't know much more than that. Someone said as an alternative you can use two phasors? I can post my patch if it helps.
Thanks for any advice.
-
cerupcat
Great, thanks acreil. I'll give that a try.
The tones are all either: sine, square, triangle, or square waves and only one type of wave at a time.
-
cerupcat
Hi ralf, seems I never saw your solution.
Looks really great. I was wondering what is supposed to be in the right most inlet? I checked out your Nigredo patch, but it seems you're using a CSSound limiter instead? I could find an example use of this version.
-
cerupcat
Ah thanks, that makes more sense. I'm not sure why it still doesn't line up for me, but i'll play with it some more.
I'm actually aiming to visualize overtones to see 'tone quality'. So ideally if sigmund~ finds a pitch, it would plot the spectrum from that frequency and above. Is there an easy method for that (having the spectrum start a defined frequency)?
-
cerupcat
Yeah, [fiddle~] becomes unstable around 3000hz and can only go as low as 108hz.
[helmholtz~] is the most stable overall, but it has a hard cutoff at 2000hz.
So my only thought was to combine two and sigmund is faster and more stable than fiddle.
-
cerupcat
Ah thanks you! I knew it had to be something simple.
-
cerupcat
Well, I thought I had things working but I don't.
I'm attaching a patch that demonstrates what's happening. For some reason it works if I pass the pitch, vol, pan values in using a metronome so that the values send slowly. But, if I bang a bunch of messages at the same time, it doesn't seem to work.
You can see the print messages. If the table is cleared, all messages should pass until there's a duplicate. This seems to work on the Method 1 in the patch. Method 2 though only seems to pass the first 3 messages and then doesn't pass the rest (even though there's no pitch duplicates).
I'm using PD in a c++ application (using libpd) and so I'm passing the pitch, vol, pan as a list from the c++ part of the application. The notes aren't send all at the same exact time, but they're very close together.
Can anyone spot and error?
-
cerupcat
Thanks everyone this was really helpful.
I basically used Maelstorm's method of using a table. I use the MIDI note (pitch) as the table index. When a new list comes in (pitch, volume, pan), I check if the table index at that pitch is 0 and if it is, I add the values to a 'final' list and set the index to 1 so another note with same pitch won't pass the next time.
I can post the patch in a bit in case anyone is interested. I'm not sure it's the most optimal way (kind of looks ugly - although most patches do).
-
cerupcat
Thank you for the quick response Jwif! I'll try these out.