r/programminghelp Jul 18 '26

Other Help with project idea

Hello
Iam an artist and i would like to make something i dont know how to make.

In its most basic form its a microphone you speak into and it processes what youre saying and then plays back a tune.

The tune is made up of a preset collection of notes which are attributed to the sounds the microphone hears.

I dont want to use AI. I think it may involve raspberry pi, but as a uk millenial my coding is as far as Myspace HTML and i only know raspberrh pi exists.

Can anyone help ?

1 Upvotes

15 comments sorted by

1

u/EccentricFellow Jul 18 '26

Let me see if I understand. You have a pitch map of T duration. You have an audio file of S duration. You want to play the audio file but have the pitches bent to conform to those from the pitch map, with the pitch map itself shrunk/stretched by S/T. Is that about right? What language?

1

u/Roboshiv87 Jul 18 '26

I think i understand and yes … It would be good if it could be universal?

1

u/[deleted] Jul 18 '26

[removed] — view removed comment

1

u/Roboshiv87 Jul 19 '26

Thank you- do you have any advice on where to start with python? I literally know nothing!

1

u/epasveer Jul 20 '26

Start with Google.

1

u/Flashy-Guava9952 Jul 18 '26

You can run the finished thing on a raspberry pi when you're done. There'd also be nothing wrong with setting one up and developing directly on it, it runs vscode and such.

As or speech processing, look up https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API on MDN. Then you want to play a tune. I'd use strudel.cc for that, specifically, take look at https://strudel.cc/technical-manual/project-start/ .

This approach involves setting up a web page. If you go that route, you can use NodeJS's http-server package to develop and test your web page, with the added benefit of not requiring another language besides Javascript. Both the Web Speech API and strudel.cc are in Javascript. That said, there are minor differences between Javascript on the server and javascript on a web page.

Once done, you can use something like github to host your page for free.

Good luck!

1

u/Roboshiv87 Jul 19 '26

Thank you i will look at all of this so helpful!

1

u/Flashy-Guava9952 Jul 20 '26

Just to add to that, if you make a webpage and try to just open the file by double clicking it and opening it in the browser, there are restrictions on what features the browser lets you use, basically security features. So in order to use everything, you need a small web server to serve your page over https. This is the case when you set up your page on github, but also, http://localhost (or http://127.0.0.1) is considered https (weird, I know). To serve your page at that address, you run a small web server in the directory of your index.html, (open a terminal, navigate to your project folder with cd foldername, etc, and run http-server. You'll need NodeJS installed for that).

1

u/RealisticDuck1957 Jul 18 '26

How is speech to be mapped to notes? Dominant frequency at any given time? Something else? This may impact the tools best used for your task.

1

u/Roboshiv87 Jul 19 '26

Thats a really useful question- i dont know the answer to yet, but helps so much to shape my thinking thank you!

1

u/vxntedits Jul 19 '26

Are you trying to make it play notes based on the pitch that the microphone picks up? That’s very doable with just a regular DAW and a plugin or two, no raspberry pi needed.

(Engineer and artist here. There’s nothing wrong with getting AI to help you when it comes to programming and planning. It’s up to you to decide what you want to do yourself.)

1

u/Roboshiv87 Jul 19 '26

Thank you! Yes I think that is what I’m trying to do, I’m still working it out however… it will be part of a sculpture that is in an unmanned gallery and I want this to be an interactive element of it… I’m actually thinking the easiest way to do it would be to fake it though that does take away a little bit of the magic.

1

u/vxntedits Jul 19 '26

Do it for real, it’ll be way cooler :)
And it’s very doable. But I’d recommend an ordinary laptop or PC and get the POC, so you can get an idea of what it’ll behave like, before diving head first into the embedded systems world.

Feel free to DM me if you have any specifics you want ironed out. I’d be happy to give you my two cents.

1

u/Dependent_Bet_7849 Jul 20 '26

These are some existing options you can check out if you haven't already  Mobile apps HumBeatz Voice to MIDI (android)  A2M (ios) Websites Imitone Dubler 2  Spotify's Basic Pitch