I am trying to write a program with python or C or other languages to control multiple speakers on the same computer, in such a way that each speaker plays different, independent signals. For example, two people listening to two different audio files on the same PC. I have looked around at a few sound libraries, and find no nice ways to implement this.
So, what API am I going to use to achieve this? Some advice whould be really helpful.
Note: what I described above is easily achieved with "volume mixer" in windows 11 settings - one can choose a different speaker for each app.
Related
I was recently using a python package called OpenPyXl. It's a package that let me control and write to Excel and I'm trying to understand how something like that even works. How can Python and Excel "talk" to each other? I had a few questions regrading this topic, I hadn't been able to find definitive answers to.
From what I understand after reading a bit, Python must be talking to Excel through some API that the developer (in this case Microsoft I guess) made available for use. Is that generally how software which controls/interacts with other software works?
Without an API are you generally unable to interact with software through your own code? Let's say I wanted to write a program that could play the game solitaire on my windows machine, without Microsoft creating a specific API that makes it possible so some code I write can "talk" to Solitaire, would my only option be some sort of program that attempts to actually visually read and comprehend my screen, and control the mouse to implement moves?
I'm just trying to understand how various pieces of software can interact with each other, thus far my only experience has really only been in self contained scripts, and I don't fully understand if every program has some sort of.
If for instance, I had to write a bot to play solitaire, I don't even know where I would begin, and I just want to have a better understanding of how the pieces fit together.
Can someone guide me as googling does not send me to the right places.
I want to adapt netlogo to include players real or simulated with other technologies. I need to interface the netlogo core (running an established game) and have the moves and choices determined by the external entities, which may be human or automania.
In searching for the API to allow this, I can find is the controlling API which is seems to be for running NetLogo muitiple runs of a model and not what I want.
And please before you close this again suggest how I can make this more focused as the problem is finding the starting point....
Can anyone assist.
Regards
Robert
There are two main ways to interface between NetLogo and the "outside world":
The extensions API.
The controlling API.
Which one to use depends on what you're trying to achieve.
You say that you:
need to interface the netlogo core (running an established game) and have the moves and choices determined by the external entities, which may be human or automania.
That, to me, sounds very much like a job for the extensions API, which is what has been suggested to you on the netlogo-devel group. Extensions allow to add new "primitives" to NetLogo, and those primitives can be written in any language that runs on the JVM (Java, Scala, Clojure, etc.)
So if you have a game written in NetLogo and a bot written in some other language that the JVM can interface with (possibly by using the JNI), you could write a new NetLogo extension command that calls out to the bot (e.g., something like bot:play game-state). A game written in NetLogo could then use that command to let the bot play its turn.
If that is indeed what you want to do, then Jeremy has already given you a good starting point in his netlogo-devel answer, and there is not much we can add to this until you have more specific questions.
You also said, however, that you looked at using the controlling API, so maybe what you had in mind is to have a game written in some other language, and use a NetLogo model to generate the behaviour of a particular player in that game. The controlling API allows you to do that. (It's not just for running a model multiple times!) If you look at the examples in the controlling guide, you'll see that you can use the API to send commands to a NetLogo model and to report the results back to your external program. The only constraint is that this external program needs to be able to talk to the JVM.
If you don't think this answers you question, please try to give us a concrete example of a precise thing that you want to do but do not think can be achieve in one of these two ways. We might be able to help you better than.
I want to do my final year project on augmented reality geo-localization,
Please tell me, from where to start ?
what technology to learn ?
what are recruitments to development this kind of application ?
If you want to perform Geo-Localisation and use GPS, I wouldn't recommend using Unity. It's arbitrary coordinate system can be a bit confusing and difficult to make an app using GPS that's reliable enough.
For Augmented Reality, you can't use anything like Oculus Rift or Google Cardboard, because those are Virtual Reality headsets and have no way of allowing the user to see the real world. Augmented Reality peripherals are things like Microsoft Hololens or Google Glass, neither of which are commercially available but there are cheap knock offs that are. AR can also of course be used on any mobile device, since they all have a camera built-in and chips powerful enough to process all the tracking data.
As for making an actual app, the best thing you can do is have a go. Analyse your market, see where the gaps are. If you want to make an app for a specific OS that isn't cross-platform, I would recommend learning some Objbective-C (for iOS) or Java (for Android), if you don't know any already.
For cross-platform, I would say something like Xamarin would be useful for making an app on both the major OSes, it was recently made free by Microsoft and you can essentially make one app in C# that works across all devices.
For the Augmented Reality itself, there are frameworks out there that can be used for your purposes. Things like Kudan, Vuforia, Wikitude, etc. Some of them offer free versions of their software. You can use these to deal with all the tracking and projection side of things so you don't have to go about creating your own AR engine.
The best thing to do is probably to sit down for a few minutes, or hours, and think about what you're going to do. Figure out what you want the end result to look like, then work backwards and think about the best way to achieve that goal. Eventually you will arrive at the language and engine you want to use to make your life as easy as possible and then you can get started learning from tutorials online and getting your app out into the world.
you can check my tutorial about geo-based augmented reality solution on Android: https://www.netguru.co/blog/augmented-reality-mobile-android
I have presented there the basics and how to start with simple implementation.
Well a good starting point would be to ask yourself few questions:
What type of devices, you plan to work on(oculus rift, google cardboard, Microsoft Hololens, web etc)?
Augmented Reality is achievable in both Web-Context and Application-context. Which route do you want to go for?
Depending on these questions, if you choose to do a normal application based on a device, then depending on the device(Oculus Rift, Google Cardboard, Microsoft Hololens), you would need to grab their specific developer kits and learn how to develop apps using the documentation. For Oculus rift and Microsoft Hololens, you would need the respective Headsets inorder to make an app in that, but If it comes to google cardboard, all you need is you mobile phone with a good processing power.
There is another way to work on augmented reality applications, that is by doing a Web Application using some amazing javascript libraries like Awe.js, Three.js and JSARToolkit.
You can google about them and find out more.
One of the more accessible ways to learn Augmented reality is Project Tango.
Devices are around $500 last I checked and you can use a free version of Unity + Project Tango's free plugin:
https://developers.google.com/project-tango/
Which ever hardware you pick I'd recommend checking out Unity3D as it seems to be the platform of choice for AR/VR at the moment. There are other options... this just provides the most flexibility based on all of the platforms it supports.
Side note: I have no affiliation with Project Tango and am in fact working on another platform... but it isn't as accessible at the moment.
Do you know any digital audio workstation that has API? I would like to create application that can generate music based on such programs possibility. This is purely for my own entertainment, I don't mean to make any kind of commercial moves...
There are a couple of different DAW's you can look at that allow you to interface with a variety of languages. The main ones that spring to mind are Reaper and Ableton. As far as I know, Ableton uses python internally and some clever people have found ways of taking advantage of that here;
https://code.google.com/p/liveapi/
The other one is Reaper, which allows you to script its internal features using Python using something called ReaScript;
http://www.reaper.fm/sdk/reascript/reascript.php
Hope that helps.
I am reading articles about Proximity on Windows Phone. I have the following ideea. I have an app that can exchange small messages between two phones through encoded audio. Can I use proximity and replace NFC support with my app that transfer messages using sound. I need only an advice if the NFC usage in proximity can be replaced with any other functionality that can intentionally send certain messages. I want to know if it;s a good ideea to pursue my concept.
Thanks
Unfortunately for you, Windows Phone OS is not a LEGO constructor where you can replace core system services with your own implementation.
At least not with any documented API.
And if you'll use some undocumented APIs, forget about the windows store.
You can probably do that if you're representing an OEM company that builds windows phone devices.
If you're an individual, what you're trying to do might be possible with Android OS. Search for something like "android building custom ROM".
P.S. I think it's a great idea to pursue your concept.
I really miss the simplicity of IR ports in devices.
Very likely, your acoustic pairing could do the job just as good, while requiring no extra hardware.