Strange question perhaps. But I have toyed a bit with the idea that it could be exciting to retrieve numbers that change continuously from the web and use them to modulate synth patches. Imagine letting the weather report’s wind speed and direction control a filter or the oil price affect the pitch? Or bitcoin clock? The problem is I’m illiterate when it comes to computers and programming. Has anyone done something similar or has any ideas on how it can be solved practically with a computer or possibly a microcontroller?
welcome to the forum ![]()
interresting ! surely possible but maybe the changes and fluctuations of the values would be too small to have big filter changes, maybe by multiplying the signal, but you must surely be a computer scientist for all that.
I have a couple of examples that might give you a few ideas. I have two based on Twitter data, but it is just numbers so similar principles could be applied elsewhere.
First, I’ve used an Arduino to create “music” from the follower counts of my own Twitter followers. This is an “offline” system - I had to download the numbers from Twitter using a script and then encode it into the Arduino. See: Arduino Twitter Follower R2R Tones – Simple DIY Electronic Music Projects
Then I used a Raspberry Pi Pico to get an “online” grab of the same numbers and use that for musical purposes. See: Raspberry Pi Pico MIDI Twitter Followers – Simple DIY Electronic Music Projects
A slightly different take on things was to use the local Wi-Fi environment as the source for MIDI, this used a Raspberry Pi Pico and a Pimoroni Wireless pack. See: Pico MIDI (H)Arp – Simple DIY Electronic Music Projects
If any of that sounds useful, I’ll do my best to answer further questions on them ![]()
Good luck!
Kevin
hehe
Of course! “The mad professor” has already thought along the same lines. Very exciting project. Was a lot to gain from this. Thanks!
Interesting!
The pi pico project in particular seemed interesting. Although I do not know anything about coding. I really need to take a closer look at this. The challenge will be to extract figures from other online platforms than twitter. Thank you!
Thank you for a nice welcome!
Have you thought a bit like it is done in the youtube video here, that the starting point is changes in percentages or you enter formulas that convert numbers to pitch? If you take a starting point in a C major, for example, could 731 dollars be an arpeggio with h, e, c? Should be possible?
The key will be to split the project up into its component parts:
- Obtaining and parsing your information from an online source and turning it into usable numbers.
- Turning the numbers into whatever musical application you are planning (pitches, sequences, controls, etc).
- Some means of using the numbers to drive some kind of output (direct noise generation, MIDI, CV, clock, or whatever).
Each of these will have its own challenges. The Pico example shows one way of achieving the latter for MIDI that might be reusable. As you say the first point is illustrated for Twitter followers.
I think the thing to do is to decide on a source and then investigate if anyone has done anything with that source’s data via any kind of API and then go from there. If they have, these days you have a fair chance they’ve done it in Python, which might be transferable, but you might have to use something like a full Raspberry Pi environment if you need a “full Python” setup rather than Python on a microcontroller, but it depends on the source and its interfaces.
It won’t be easy if you’re not too familiar with programming already, but it might be possible with some help and guidance, especially if you pick a source someone else has used somehow already.
Kevin
Thanks for the great advice! Provides some direction for the further search for solutions
Not quite the same thing, but I once wrote a Python script to run on my computer, download numbers from the Online Encyclopedia of Integer Sequences, and turn them into MIDI note events on USB MIDI. Of course that relied on my knowledge of Python though it was easier than one might think since I made use of libraries others have written to interface with OEIS and MIDI.
Oh my, yes! OEIS was on my list to do too - I bet that was a lot of fun to do!
I’m going to have to go and take another look now ![]()
Kevin
Very creative project. It has a bit of transfer value to what I’m thinking about. If it were possible to use a microcontroller for this, would it be possible to avoid going the way of midi and generate a CV directly?
There are a number of projects that have used microcontrollers to create CV from MIDI, so you could possibly base it on one of those, to see how to get a CV?
I’ve seen them for Arduino and ATtiny85 using a PWM output, and here is one that used a Raspberry Pi Pico with a MCP4725 digital to analog converter as the output module: Raspberry Pi Pico as MIDI to CV converter - AxWax.EU
Kevin
The main thing with something like an Arduino is getting the numbers off the web and into it. I’ve never used a Raspberry Pi but I’d imagine it’d be a better choice, put a WiFi dongle on it and it can just download away. And then, yes, no need to get MIDI involved, just convert your numbers to pitches and hence V/oct control voltages and generate them with PWM+filtering (does RPi do PWM?) or a DAC, and gates to start/stop notes (i.e. for the envelope generator).
Added: Right, Sam’s crypto module uses a RPi and PWM. There’s more on that end of things in this video:
I would take look at a visual programming tool called Node-RED. It’s is basically made for exactly this - it’s for people who are brand new to programming to connect to an API to get the weather in Tunisia or whatever they need for their IoT projects.
You can run Node-RED on a Raspberry Pi and there are lots of tutorials for it.
You can definitely do this kind of thing with a microcontroller too. It’s just a very sophisticated thing to be doing for a first project.
Another thing to think about is how volatile the API is. The Facebook API seems to get rewritten all the time, for instance. Not a big deal at all when you are learning and tinkering, but for a finished project, it might just stop working after a few months and then need to be rewritten. Could be annoying when you’ve moved on to the next thing. Not every API is like that though.
then again, most people wouldnt feel the need to maintain a project that is just about sending voltages to beep boops based on social media posts.
This was a useful tip! Have googled a bit and see that there may be usable solutions with that platform!
Maybe not. As I have thought more about this, I have become more and more eager to set up a small rig that only stands and plays for itself, and that anyone can go in and listen to at any time.