Our product is a dimmable light bulb, connected via Bluetooth and App, App can adjust the brightness (color) of the bulb, the brightness value is 1-100.
Now the App wants to add a function that automatically dims according to music (Mp3). While playing music, it automatically adjusts the brightness of the light according to the rhythm and sound size of the music.
The music has been played using https://github.com/adrianstevens/Xamarin-Plugins/tree/master/SimpleAudioPlayer
My question is, when playing music (Mp3), how do I convert the rhythm and intensity of the music to a 1-100 number and send it as a brightness value to the light bulb?
A lot of C# (Windows-based) music analysis examples were found online, but Xamarin was not found.
Thank you for your help!
Sounds cool! There are two parts to your problem,
Enhancing the audio player - Since you have implemented the Audio Player already, all you need to do is add a Value changed event to the slider, as shown in this official Microsoft Example, so that changing the value of the slider will now also communicate with your device/bulb
Communicating with your device - This will depend on how your device accepts values over bluetooth. We wouldn't be able to know for sure what serial values your bulb is accepting, but you have to send serial data values through bluetooth. You can use this to help simplify with this part.
I want to display the spectrum of output audio of my windows C# application. Currently i am using NAudio Library to calculate information through PCM data of input file. But it seems that this process is taking a lot of time and processing in older systems configurations. So i was wondering if i can use the windows audio output data to do so. I meant this.
As you can see windows is generating green bar of current sound output. And it does recognize multiple outputs in MIXER. So is there any way to get this data and use in my application to escape extra calculation? And i haven't posted any code or my work as i am not sure how to do that and if that is even possible so kindly bear with me.
Thank. You.
Take a look at Stereomix which echos the computer's output as an input device. Listening to this input will be the probably easiest way to detect sounds playing. Also take a look at Loopback Recording.
I want to record sound to a file and at the same time I want to be able to play audio from the same file in C#
For example, play the last 15 seconds but the microphone has to keep on registering and recording while replaying.
Is this possible and in that case, which is the best approach to do this?
The answer is YES, and you should play around with low level audio API, namely WaveIn/Out functions from winmm.dll, through P/Invoke in C#.
In short words, you need to use WaveIn to capture input signal from a input device and store in some structure, then use WaveOut to play back the audio simultaneously, or some delay after.
Here is a project you can start with: a duplex audio player. You can download the project and play around with it and see how it achieves it, then do some modifications upon the project to achieve what you want :)
I am developing some .net applications with c# for various Motorola devices running Windows Mobile and Windows CE. These include the MC9190 and the WT41N0. On these two models, it beeps very loudly when a barcode is scanned. Is there anyway using the Motorola emdk or by changing a registry setting to make the beep quieter without turning the beep off altogether.
I don't know if this works for all Motorola devices, but you could try including Symbol.Audio and:
using Symbol.Audio;
...
using (StandardAudio audio = new StandardAudio(Device.AvailableDevices[0]))
{
audio.BeeperVolume = 1;
}
You can inspect the audio.BeeperVolumeLevels property to see what the maximum volume level is.
In Symbol scanner terminology this is called "feedback", and by default it's the local feedback setting that gets in the way of properly managing the audio.
In your application, after you create the reader, the following settings control it:
_BarcodeReader.Parameters.Feedback.Success.BeepFrequency = 2000
_BarcodeReader.Parameters.Feedback.Success.BeepTime = 20
_BarcodeReader being the reader object. I set it to lower frequency for a shorter time above.
If you need to eliminate the beeping altogether:
_BarcodeReader.Parameters.Feedback.Success.BeepTime = 0
You may want to add your own wave file:
_BarcodeReader.Parameters.Feedback.Success.WaveFile = "decode.wav"
This is also the case with the DataWedge software that ships with MC9xxx and MC3xxx series. If you're using DataWedge, look for "local feedback" under the feedback menu, from Scanner, under Basic configuration.
The scan audio can only be managed from the feedback settings, volume control and other methods have no effect. It seems Zebra (previously Motorola) used high-volume default for loud industrial settings, wish they had considered a better way to configure though.
I put a piece of Scotch tape over the speaker on mine.
The tape dampens most of the noise while I am testing here at my desk, but it is simple to remove so they can hear it out on the floor.
Outside or on our production floor, they need the loud noise.
If that doesn't work for you, in the Settings on our Datalogic Falcons, there is a Decoding application. One of the inputs there is called Audio and enables someone to turn down the volume.
Since I don't have the SDK for the Datalogic Falcon, I can only post a low resolution cell phone clip. Hope this helps.
There is a configuration utility for motorola devices. It is a single exe file you can put on your device and then you can adjust several settings and also the beeper volume. I had a look on support.symbol.com but I didn't found it. I think you can get it from your vendor-support.
In our situation with a Motorola MC9590 device using telnet sessions, the volume control on the left-side of the device needs to be adjusted down prior to signing into the telnet session. The volume level remains at the established setting once the user signs into their telnet session.
The volume can be controlled by pressing the blue function key and then the H or M key. The display brightness can be controlled by pressing the blue function key and then the D or I key.
the way I made it silence was : go to control panel -> All control panel items -> Devices and Printers. find the Symbol bar code and right click and select Keyboard settings, on the speed box you will see a Repeat delay icon just drag that all the way to the left and the sound should go away.
I want to make a volume leveler so that I don't have to constantly jocky the volume down during loud scenes and up during dialog. Ads on Pandora blasting my ear drums is also annoying.
Is there any way to get what volume is being sent to the speakers? If I can get that number I can turn the volume up and down programatically.
You can try the PInvoke command waveOutSetVolume for this purpose:
http://pinvoke.net/default.aspx/winmm/waveOutSetVolume.html
There is also a corresponding waveOutGetVolume to read the current volume.