Few questions about oversampling
Hi,
About a year ago I started to learn a bit pure data in order to create a patch that would act as a groovebox and that should perform on limited cpu resources since I want it to run on a raspberry pi. First I tried to make somekind of fork of the Martin Brinkmann groovebox patch, even if it allowed me to learn a lot about data flow I didn't went to the core of the patch tweaking with sound generation. This led me to end this attempt at forking MNB groovebox patch because even if I could seperate GUI stuff from sound generation and run it on different thread ect... I couldn't go further in optimization in order to reduce the cpu use.
Then a few weeks ago I decided to start again from scratch my project and this time I wanted to be more patient and learn anything needed in order to be capable of optimizing my patch as much as possible. After making a functional drum machine which runs at 2/3% of cpu with 8 different tracks, 126 steps sequencer, a bit of fx ect... I tried to find synths that would opperate well aside the drum machine. And I basicly didn't find any patch that wouldn't use massive amount of cpu time. So I created my own synths, nothing incredible but I'm happy with what I got, though I noticed some aliasing. I read a bit the floss manual about anti aliasing and apply the method used in the manual(http://write.flossmanuals.net/pure-data/antialiasing/), it work well but my synths almost trippled their cpu use, even if I put all my oscilators in the same subpatch in order to use only one instance of oversampling.
I didn't tried to oversample it less than 16 time but since oversampling is so cpu intensive I'm wondering if there's no other option in order to get a good sound definition at a lower cpu cost. I'm already using banlimited waveform so I don't know what I could do in order to limit the aliasing, especialy for my fm patch where bandlimited waveform isn't very useful in order to reduce aliasing.
Since I want to have at least 4 synth track with some at least one synth having 5 voice polyphony I want to know what the best thing to do. Letting FM aside for this project and use switch~ for oversampling 2 or 4 time my synths that use bandlimited waveform ? Or should I try to run different instances of pd for each synth and controling it from a gui/control patch with netsend(though it wouldn't bring down the cpu use at least it would provide somekind of multithreading for my patch) ? Or is there another way to get some antiliasing ? Or should I review lower my expectation because there is no solution that could provide a decent antialiasing for 4 or more synth running at the same time with a low cpu use in pure data in 2021.
Thanks to everyone that would read my topic and try to give some advice in order to get the best antialising/low cpu use solution.
Starting up problem.
@beem Yes, you cannot rename main.pd........ it's the folder that can be renamed.
@JackOats No. In edit mode drag across the [declare -path patch_editor_abs] with the mouse to select it and then copy it and paste it within the main.pd window before editing it.
If @beem has not solved the problem for you then.........
Let's try something else. Trying to find what is going on.
On your screenshot were a lot of the modules named in red and marked couldn't create.
Choose one, say basic-osc.
In main.pd click on the file menu and then "Put" "Object" and then type basic-osc into the object.
Does it create?....... pop up as a bigger window with the oscillator in it?
No?
Go into the patch_editor_abs folder and copy basic-osc.pd and paste it into the Pd/bin folder, or into the "extra" folder if there is one (the one that contains the ggee folder).
Back to main.pd and try putting the object basic-osc again.
No?
Yes?
If it does then try the module button for basic-osc.
Does it now work?
No?
Copy main.pd into the patch_editor_abs folder..... open it..... and try the first step again (put, object, basic-osc).
If none of that works then I think it must be a security permissions problem.
David.
PdParty, sending/recieving OSC
Hi folks!
I reached this thread because I had the same problem: there were no way to receive OSC messages in PDparty. I was sending a simple bang from Isadora, just for test purposes, and it works fine on PD on my Mac (sending to locahost), but does not work sending to my Iphone IP. I was sure that the OSC were issued corrected, cause I can see them on Isadora OSC monitor.
Finally I found the problem was a conflict between the OSC incoming port in PDparty (Iphone) and de OSC port that the patch is lisent to (specified in a message to netreceive). If this one (in netreceive) is the same that the one in Port incoming (PDparty), you get in the console this error "error: blind: Address already in use (48), and the patch in PDparty do not receive OSC messages. I changed the OSC incoming port in PD settings, and the patch is receiving OSC messages to the port specified in [lisent] and [netreceive].
I attach my test patch (just play the sound file "cascabel" from the bang button or from OSC (send "/toggle1 1" to port 4321 to the IP where PDparty is running).
Hope it is useful for somebody. I was stuck for hours finding the reason for no receiving OSC
Regards
Daniel
TEST_PDparty.pd cascabel.wav
prophet 3003 wavetable synth prototype
hi all ... im developing a funky wavetable synth thats inspired by the sequential circuits prophet 2000 from 1985. it uses the original 12 bit ROM from this synth and and a synthesis menthod called harmonic aliasing.
- all frequencies and repeat rates are related by simple integer relationships
- adaptive just intonation = infinite tuning systems
- 3 oscillators per voice
- wavetables by multiplexing oscs with waveshaped sines
- variable sample rate simulation via resampling with audiorate wavetables (BLITs)
- integrated complex numeric sequencer
- integrated delay for hardware mixer feedback loop with analog eqs
basically it includes everything i think is cool about numeric sequencing and is still really low on dsp because its all based on integers mechanics like early wavetable synths.
this synth can sound really ambient or real raw depending on the complexity of the number relationships and the waveshaping settings. eventually this is going to be a hardware synth with FPGA technology, variable sample rate per oscillator and analog eqs/filter ... just like in the 80s
project logo:
https://i.imgur.com/F1kqrMt.png
prototype patch:
wave multiplexing:
.
harmonic aliasing is inspired by a patch by acreil: https://forum.pdpatchrepo.info/topic/6759/new-anti-aliasing-and-phase-distortion-abstractions.
early discussion: https://forum.pdpatchrepo.info/topic/11176/adaptive-sample-rate-and-harmonic-aliasing-in-pd
.
mixer delay feedback loop feature:
lots of different sounds with audiorate waveshaping:
.
Getting Pure data to work on Raspbian Jessie (giving pure data permission to access device?)
@pmh1d15 OSC is an IP network protocol. You will need Ethernet or Wi-Fi on the Teensy to "talk" OSC...... unless it is possible to get the Teensy to make its USB connector behave like a network port?...... maybe dangerous for future programming requirements?
At the moment it is behaving as a TTY port...... which is logical given that it is its only com port.
Either give it a network port......... https://forum.pjrc.com/threads/40238-Teensy-3-2-with-WIZ820io-and-OSC ......or convert your messages within PD from OSC to TTY data and use the USB connection.
However, looking at your OP link it seems that is exactly what is happening in "pumpsn17".
The patch [slipserial.pd] is doing the conversion to the teensy datastream.
So it is using the tty port and you should have a working system.....
Is [slipserial.pd] looking through the USB port to the pins on the Teensy...... is any voltage appearing on Teensy "S0".
More info here......
https://github.com/CNMAT/OSC
David.
mrpeach on Raspberry
Hi there,
Thanks for taking the time. I am getting a little bit frustrated here, so I guess it’s best to ask the community:
How do I get MrPeach to work on 0.47.1? I am using a Raspberry Pi 3 (running Linux version 4.9.20-v7+) and Pure Data 0.47.1.
I installed mrpeach using the “find externals” functionality. Of course I edited the path to “/home/pi/pd-externals” and created a “mrpeach” entry in the startup preferences.
Some background information: I want my Python code to “communicate” with pd but actually I do not care how they do this. OSC-Messages seem to be the easiest solution.
Well, seemed. I am a total beginner to pd
Help much appreciated
Daniel
By the way here is the log:
tried ./osc/routeOSC.l_arm and failed
tried ./osc/routeOSC.pd_linux and failed
tried ./osc/routeOSC/routeOSC.l_arm and failed
tried ./osc/routeOSC/routeOSC.pd_linux and failed
tried ./osc/routeOSC.pd and failed
tried ./osc/routeOSC.pat and failed
tried ./osc/routeOSC/osc/routeOSC.pd and failed
tried /home/pi/pd-externals/osc/routeOSC.l_arm and failed
tried /home/pi/pd-externals/osc/routeOSC.pd_linux and succeeded
tried ./mrpeach.l_arm and failed
tried ./mrpeach.pd_linux and failed
tried ./mrpeach/mrpeach.l_arm and failed
tried ./mrpeach/mrpeach.pd_linux and failed
tried ./mrpeach.pd and failed
tried ./mrpeach.pat and failed
tried ./mrpeach/mrpeach.pd and failed
tried /home/pi/pd-externals/mrpeach.l_arm and failed
tried /home/pi/pd-externals/mrpeach.pd_linux and failed
tried /home/pi/pd-externals/mrpeach/mrpeach.l_arm and failed
tried /home/pi/pd-externals/mrpeach/mrpeach.pd_linux and failed
tried /home/pi/pd-externals/mrpeach.pd and failed
tried /home/pi/pd-externals/mrpeach.pat and failed
tried /home/pi/pd-externals/mrpeach/mrpeach.pd and failed
mrpeach: can't load library
Parsing OSC format udp list - [SOLVED]
Youd patch used only a UDP connection, no OSC format in messages sent. Even though you typed an OSC-style address in a message, that's not an OSC format. OSC format is bytes that are not so human-readable. You need to incorporate the native OSC objects that come with vanilla, [oscformat]
and [oscparse]
.
Here's a screenshot that does what you probably want (note that the OSC address in [oscformat]
can omit the forward slashes, but since this is a standard OSC-style address, I kept them there):
Noob Trying to Create a MIDI Chorder/Harmonizer
Yet more progress!
But still stuck on sending noteoff messages to a note after its number has changed. Maybe there’s something to do with a cold inlet, working as memory? Wait! Might have found part of the solution…
Followed the first two parts on the synth creation tutorial on Libre Music Production,
(The third and last part of the LMP tutorial has to do with filters and UI, so it shouldn’t have an answer to my noteoff issue.)
Through that tutorial, was able to make a simple polyphonic synth which takes MIDI in and outputs ADSR-enveloped notes to the DAC. So far, so good.
Added a fifth to the mix. Still works. No stuck note.
Then tried adding a third note which progressively goes up with a counter… Boom, noteoff problem again. It does make some sense: need to trigger a velocity of zero to the previous note, But this is where memory would come in handy.
Found part of a solution in using the right inlet of a [float
] object,
libremusic-synth.pd
Now, the synth produces the correct effect, even with multiple incoming notes.
In fact, doing this with [poly
] may bring us closer to the original effect created by Robby Kilgore on the Oberheim Xpander! Adding more polyphony than the notes which are produced internally, getting a rotation of notes… and a comeback of the noteoff problem.
libremusic-synth-rot.pd
So, getting closer, but my learning path is still winding around. Will search for known solutions, as it’s surely a common problem. Don’t necessarily want to go all the way to a minimal sequencer with [tabwrite
] and [tabread
], but it could be a solution and would have the added advantage of leaving a trace on which notes have been generated.
Will get it eventually!
TouchOSC direct USB connection finally possible with Midimux?
Hi folks,
I'm posting here on the theory (and also based on various threads I've seen here & around the internet) that I'm not the only PD user who is interested in using TouchOSC on an iPad to control PD on a Mac over a stable, wired USB connection rather than a sketchy ad-hoc network (which can suffer latency & dropouts when used in venues/areas with wifi interference, and prevents TouchOSC from being a reliable live performance interface).
Most of my searching turned up the same answer: networking over USB is not possible without jailbreaking the iOS device & installing a tethering app (I don't have the option of jailbreaking due to compatibility concerns with other apps I use professionally). I also discovered a free app called midimittr which creates a MIDI bridge with a server application on the OS X side via USB, which is great, but alas my control setup is dependent on OSC messages rather than MIDI.
Now for the (almost) exciting development: far down in search results I learned of the $7 Midimux app/server, which promises both MIDI & OSC connectivity directly via the standard Lightning=USB cable, no jailbreaking required! After buying the app, installing the server, configuring my firewall, checking port settings on all sides—I was thrilled when I was able to send OSC messages from PD to TouchOSC on the iPad! But...... no such luck in the other direction, TouchOSC cannot send to PD. I've tried a variety of port/hostname/IP settings, and fiddled with all of the OSC/UDP receive objects in PD to see if any connection is being made in the iPad->Mac direction, with no success. The MIDI part of the app seems to work just fine both ways.
I am not proficient in advanced networking, so I don't have any other methods for testing to see what the issue may be. I also realize that the problem almost certainly lies on the Midimux/TouchOSC side of things rather than with PD, but as mentioned before, I figure there must be other PD users who would be happy to learn of the potential for a wired TouchOSC interface, and it seems the possibility may be tantalizingly close. If anyone has any thoughts/experiences/suggestions on the subject, I'd be delighted to hear them.
Thanks!
Using pduino and Firmata to read values from the Grove I2C Touch sensor
Hi @alexandros
code is below, if you can figure anything out that would be great !
/* GroveI2CTouchTest.pde - Sample code for the SeeedStudio Grove I2C Touch Sensor
http://seeedstudio.com/wiki/index.php?title=Twig_-_I2C_Touch_Sensor_v0.93b
Prerequisite: A modification of the Grove I2C Touch sensor is needed Solder a pin to
the INT terminal in the I2C sensor to connect it to one pin in Arduino Created by
Wendell A. Capili, August 27, 2011. http://wendellinfinity.wordpress.com
Released into the public domain.*/
#include <Wire.h> // include I2C library
#include <i2c_touch_sensor.h>
#include <MPR121.h>
// include our Grove I2C touch sensor library
// initialize the Grove I2C touch sensor
// IMPORTANT: in this case, INT pin was connected to pin7 of the Arduino
// (this is the interrupt pin)
i2ctouchsensor touchsensor; // keep track of 4 pads' states
//boolean padTouched[4];
long previousMillis = 0;
long interval = 100;
void setup()
{
Serial.begin(9600); // for debugging
Serial.print("begin to init");
Wire.begin(); // needed by the GroveMultiTouch lib
touchsensor.initialize(); // initialize the feelers // initialize the containers
//for(int i=0; i<=3; i++)
//{
// padTouched[i]=false;
//}
}
void loop()
{
unsigned char MPR_Query=0;
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval)
{
previousMillis = currentMillis;
touchsensor.getTouchState();
}
for (int i=0;i<12;i++)
{
if (touchsensor.touched&(1<<i))
{
Serial.print("pin ");
Serial.print(i);
Serial.println(" was touched");
}
}
}
/*
touchsensor.readTouchInputs(); // test read the touch sensors
// loop through our touch sensors 1 to 4
for(int i=0; i<=3; i++)
{
// get the touch state based on pin #
if(feelers.getTouchState(i))
{
if(!padTouched[i])
{ // print in serial that it was touched
Serial.print("Pad ");
Serial.print(i);
Serial.println(" was touched");
}
// flag the touch sensor state
padTouched[i]=true;
}
else
{
if(padTouched[i])
{
// print in serial that it was released
Serial.print("Pad ");
Serial.print(i);
Serial.println(" was released");
} // reset the touch sensor state
padTouched[i]=false;
}
}*/