-
alexandros
That's strange. Remove the word "byte" from lines 37, 44, 45, 50, and 53. That should do it.
-
alexandros
Takes a bit of reading. You might want to check this tutorial https://drymonitis.me/wp-content/uploads/2023/09/Arduino_for_Pders.pdf
and these abstractions https://github.com/alexdrymonitis/Arduino_Pd -
alexandros
Controlling digital I/O from Pd is not so difficult. What is it exactly that you are trying to do? You want to activate-deactivate digital pins?
-
alexandros
I2C is a special protocol that enables communication between devices (e.g. your Arduino with another chip). I'm not use Firmata supports I2C, but I'm pretty sure you'll be better off writing your own code (probably based on examples from the sensor you want to use). Which sensor is this?
-
alexandros
I forgot to add a division object there. The patch should be as follows:
[notein] | [/ 127] | [sig~] | [automatonism_module~]
The pitch input in Automatonism takes values between 0 and 1 and multiplies them internally by 127 before sending them to [mtof].
-
-
alexandros
@spluta I want to investigate the sine wave to band-limited sawtooth example a bit deeper. Is the Python code and the training dataset available? I can't seem to find it in the RTNeural_Plugin folder.
-
alexandros
If I'm not mistaken, Miller uses Fedora. Also, he's about to release Pd-0.56, so it's a good moment to inform him about it. You should probably write to Pd's mailing list which he reads.
-
alexandros
Andy Farnell has simulated the sound of water in Pd. Check his book "Designing Sound".
-
-
alexandros
For the life of me, I can't figure out how to use the
colors
message! If I sendcolors #ff00ff
or something similar to pd, I get abad arguments to colors message
. -
alexandros
You're first mentioning police sirens, and at the end of your post you mention that the Arduino will play through speakers. What is the actual sound source you want to use? If it's some digital synthesis that is played through speakers, then you're much better off with Pd than with the Arduino. If you indeed want to control police sirens in some way, I guess the Arduino could do it, but I have no idea how police sirens work (I tend to avoid them, you see
).
-
alexandros
Doesn't [tabread4~] apply cubic interpolation? If you store a ramp to a table, you could use that with [line~] to read through it, couldn't you?
-
alexandros
You can check the [serial_print] abstraction from here https://github.com/alexdrymonitis/Arduino_Pd
If you print your values in the Arduino code properly (see the help sketch), then in Pd you can use this abstraction with a [send] and get your values with a [receive]. Check the exampes, they should be straight forward. -
alexandros
You can also check the audiolab library (available on deken; Help -> Find externals). It's a collection of vanilla abstractions. Its pitch shifter might be a bit CPU hungry as it is FFT based, but it's pretty good.
-
alexandros
Since your source is a .wav file, why don't you store the file to an array and use [tabplay] or [tabread4~] to read it in a loop? I'm pretty sure that a [vline~] with a long list will be way more CPU hungry, let alone the complexity needed for something like this.
-
alexandros
@porres The main issue that I see with neural networks is the immense amount of data they need to train properly. Apart from being hard to assemble a proper training dataset, there are all these copyright issues and (un)ethical use of data and AI. But in some cases they can be very useful, like controlling lots of parameters with just a couple of knobs (or the mouse pointer position) or messing with sound with variational autoencoders and their latent space, to transform sound in various ways (check the example of this external where the sinewave is turned into a sawtooth - not very clean, but it's just an example), just a couple examples of their use.
Still, I do believe that AI and NNs are a hype that evenrually will phase out and will be replaced by something else that will become the new thing. -
alexandros
@spluta I do have my own project which is an external that enables the creation of neural networks, all written in C from scratch, but I've gone as far as autoencoders, struggling to get it to create variational autoencoders. RTNeural though takes advantage of all the development that has been done in Python packages (the go-to language when it comes to AI), so this external is really nice to have!
-
alexandros
This is a great addition to Pd's AI capabilities! I had thought of creating a Pd external based on RTNeural some time ago, but it was too much for me to handle. I'm grateful you took the initiative and did this! Being able to train NNs in Python and run them natively in Pd opens up a lot of possibilities!
-
alexandros
What OS are you using? I guess you're trying to open a .pd file from inside your system, not inside Pd, right? Your system launches a new Pd instance for some reason. Did you try opening your patches from within Pd with Ctrl+O (or Cmd+O on a mac)?