Using your computer as a signal generator [closed] - circuit

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm not quite sure where to post this question, but I think Stack Overflow has a lot of smart people who could help.
I'm wondering if there is a way I can combine programming and electrical circuits. Can I somehow turn my computer into a signal generator to create AC waveforms which I could apply to an external circuit that I've created? Could I then program my computer with say C++ code to change the amplitude/frequency of the waveform (hopefully this if possible doesn't require assembly language which I know nothing about expect that its code that operates more directly with the CPU or something). Basically, I'm looking for a way to combine coding with electrical circuits. Anything will do. I just want to get better at both because they both interest me.

Yes, you can use your audio channel.
You have to consider its frequency response: (theoretical Maximum of 20kHz?)
You also have to buffer the audio output. Use an opamp as a buffer for that. You do not want to overload your audio jack.
You will run into challenges of how "Fast" you can send data to your audio channel. But I think it is possible.
Another way is to use a good old parallel port, IF you have one :). Those are nice to command some electronics.

Related

How would you play sounds from a microcontroller (STM32 etc.)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
For example, how would a washing machine play a specific sound (MP3 or WAV or whatever) when finished? Which external components are needed?
I know this is a really vague question but I could not find any real solutions except some kind of MP3 player module which seems to be more "end-user friendly" instead of being used programmatically (skip and pause buttons).
Various beeps can be made simply by toggling a pin, but I assume your are looking for something more melodious, and without using a sound synthesiser.
For short sound bites: you can store them in (external) memory and play them through a DAC, if your MCU has one. I put a basic implementation of this for SAMD21G-based Arduinos here; the idea is the same for all MCUs that have a DAC. If your MCU doesn't have a DAC, you can use an external one, or make a "poor man's DAC" by using PWM and low-pass filtering the output.
Another option is creating an I2S stream from stored samples and send them to an external amplifier (module) that accepts I2S. It helps when your MCU has an I2S peripheral.
For longer sounds, your best bet is probably playing them from a MCU-controlled MP3-player, because you need the SD-card storage or a similarly large storage anyway for large sound files.
In all cases, you'll need an external amplifier and speaker.

How to write linux app/library to interact with Samsung Galaxy Buds headphones? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'd like to write some library/app to interact with Galaxy Buds.
I assume that this would require me to somehow sniff packages it sends to my mobile telephone and get which corresponds to what command(volume/pause/play) and so on. And then write some wrapper for it? I'd like to make this app/library reusable between different Linux distros, and not-that-hard-portable to Mac OS.
Knowing all that I still in the place where I'm not sure where to start from.
I'd appreciate suggestions to any part of this process e.g (Programming language selection, software for BT sniffing ...)
I do have some experience with C#/Java/C++, but I'm willing to learn if these aren't most suitable for solving the issue.
I don't know that much about the libraries needed for such a solution, but as far as sniffing is concerned, I know that Wireshark (WireShark_Bluetooth_Sniffing) is a good starting place.Once you isolate the touch commands, I assume you can map them to media commands, as described here: D-Bus_Media_Commands

Bluetooth Beginner, Need Advice [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
So I'm hopelessly lost right now. I found an attractive bluetooth chip from Nordic Semiconductor (the NRF52840) that I want to use for a couple project ideas I have. Now I have an HC-05 module for my arduino, so I'm not entirely lost on programming a bluetooth module perse, but I really need advice on how I can make my own. I want to make a bluetooth module that works exactly like the HC-05 but on a much smaller scale. I'm talking fitbit small. I'm not making a smartwatch or fitbit, but that's relatively the size I would need it to be.
So bottom line to whoever got lost in that mumbling explanation of my hopelessness, I need some advice on how to develop my own Bluetooth module PCB. The onboard chip will be the aforementioned NRF52480. Thank you to anybody who helps!!
Given that you are endeavoring in a very complex task, I would recommend you to start from the reference designs provided by the chip manufacturer. They are very valuable, especially when dealing with RF.
See here and here, for example. About RF design, this talk may be interesting for you as well.

Linux Audio Sub Systems [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to know about Linux audio, i spent a lot of time on reading but i didn't understand(clearly). Can anybody give a brief information on various Linux audio sub systems(Like OSS, ALSA, JACK, Gstreamer, Phonon, Xine)?.
Any help, Thanks in advance.
I once wrote a famous blog post about the jungle of Linux audio output formats. You can find it here.
Regrettably, the picture is no longer there, here's a copy:
It's a bit old (dating from 2007), but I hope it gives you the general idea. OSS and ALSA are the layers closest to the actual audio hardware. All the other libraries and frameworks simply talk to those lower layers. And as you can see, some of these libs and frameworks actually have wrappers around other libs and frameworks.
Which layer you want to call upon depends largely on what you wish to accomplish.

helping getting started with audio programming languages [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a small application I have been working on for some time to help my son with his speech delay. I am using gstreamer to play phonemes, small audio clips about 100ms long.
Things are fine but I find it a bit distasteful to use a library that has such powerful video features for an audio only application.
I was thinking that an audio programing language might be able to play short audio clips on-the-fly too.
I've been reading about these DSLs and there are quite a few of them. However it seems that csound, Supercollider and Chuck are the front runners.
All I really need to do right now is to play small audio clips, preferably from a C binding, in near real time and I only need to run on Linux.
Could anyone help me pick a language for this? There are so many features I "can't see the forest for the trees".
Once I have one picked out, I will have a tool for my immediate needs and a platform to grow with as my needs change.
SuperCollider has great real-time capabilities and makes it pretty easy to play sound files via its sclang interpreter. It's also not that hard to communicate with the supercollider server (scsynth, the part of supercollider that actually synthesize sounds) via open sound control (OSC) messages, so you can control the synth from another, separate application.
Don't know much about chuck but I hear it's good for on-the-fly, live audio programming too so it might work.
I wouldn't recommand CSound since it's meant to be used for composition, more like a "compiled" language vs interpreted. You basically write a score file and generate a whole sound file from that, so it's probably not what you want.

Resources