How can I play the "Sound Effects" at macOS? - macos-monterey

In macOS, I found some sounds in the path: System Preferences - Sounds - Sounds Effects
How can I play it by code? Is there any system call here I can use?
I found some similar questions which play sounds by Swift, but if possible, I want to use Python or another coding language
Also, I have tried say "sth" and afplay /System/Library/Sounds/Bottle.aiff,but they are not the same

Related

Realtime microphone input to output on iOS with swift

I have the following issue, and I have found a few topics here talking about it but none of these is actually answering my question.
I'm pretty new with iOS development, I searched the apple documentation but didn't found anything useful
I need to get the audio Sample/Buffer/Stream from the headphone microphone, in a manipulable variable or something like that. Then push it back to the headphones. That I can hear my voice when I'm talking.
I found things about AVFoundation but nothing more.
I know it’s possible to do that but I did not find how to
Can anybody help me further ?
Notice that the language you are looking for is swift,so you might can finding something useful on EZAudio,even this project was deprecated at June 13,2016.You might want to check the example which called PassThrough in this project,this example has the function "Hearing the voice while talking",and this project was written with swift.Wish could help.

Designing a library for Hardware-accelerated unsupported containers on iOS (and Airplay)

I'm trying to put together an open source library that allows iOS devices to play files with unsupported containers, as long as the track formats/codecs are supported. e.g.: a Matroska video (MKV) file with an H264 video track and an AAC audio track. I'm making an app that surely could use that functionality and I bet there are many more out there that would benefit from it. Any help you can give (by commenting here or—even better— collaborating with me) is much appreciated. This is where I'm at so far:
I did a bit of research trying to find out how players like AVPlayerHD or Infuse can play non-standard containers and still have hardware acceleration. It seems like they transcode small chunks of the whole video file and play those in sequence instead.
It's a good solution. But if you want to throw that video to an Apple TV, things don't work as planned since the video is actually a bunch of smaller chunks being played as a playlist. This site has way more info, but at its core streaming to Apple TV is essentially a progressive download of the MP4/MPV file being played.
I'm thinking a sort of streaming proxy is the way to go. For the playing side of things, I've been investigating AVSampleBufferDisplayLayer (more info here) as a way of playing the video track. I haven't gotten to audio yet. Things get interesting when you think about the AirPlay side of things: by having a "container proxy", we can make any file look like it has the right container without the file size implications of transcoding.
It seems like GStreamer might be a good starting point for the proxy. I need to read up on it; I've never used it before. Does this approach sound like a good one for a library that could be used for App Store apps?
Thanks!
Finally got some extra time to go over GStreamer. Especially this article about how it is already updated to use the hardware decoding provided by iOS 8. So no need to develop this; GStreamer seems to be the answer.
Thanks!
The 'chucked' solution is no longer necessary in iOS 8. You should simply set up a video decode session and pass in NALUs.
https://developer.apple.com/videos/wwdc/2014/#513

Play a video from a url in default player in Native SDK for BlackBerry 10

I am developing an application for playing video from a url in bb10 cascades.I know it's very simple to play in media player.Please help me to play a video in default player.
I strongly recommend that you review the documentation provided on the BB10 Native micro-site that you will find here:
http://developer.blackberry.com/native/
I know there is a lot to look at, but it does seem to me to be quite logically presented. I just looked round and fairly quickly found this:
http://developer.blackberry.com/native/documentation/cascades/graphics_multimedia/audio_video/playing_audio_or_video.html
which seems to answer your question. Alternatively, you want want to just invoke the native player, in which case you need to look here:
http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/invocation_framework.html

How can I generate musical notes on iOS and play them?

I am creating a musical app which generate some music. I already used MIDI functions on Mac to create a MIDI file with MIDI events (unfortunately, I don't remember names of those functions).
I am looking for a way to create instrumental notes (MIDI's or anything else) programmatically in order to play them. I also would like to have multiple channels playing those notes at the same time.
I already tried 'SoundBankPlayer' but apparently, it can't play multiple instruments at the same time.
Have you got an idea?
This answer might be a bit more work than you intended, but you can use PD on iOS to do this. More precisely, you can use libpd for iOS for the synthesis, and then use any number of community-donated patches for the sound you're looking for.
In iOS 5:
MusicSequence, MusicTrack, MusicPlayer will do what you want.
http://developer.apple.com/library/ios/#documentation/AudioToolbox/Reference/MusicSequence_Reference/Reference/reference.html#//apple_ref/doc/uid/TP40009331
Check out AUSampler AudioUnit for iOS, you'll probably have to delve into Core Audio, which has some learning curve. ;)

iOS xcode microphone volume detection?

What frameworks are required to detect how loud someone is talking into a microphone... Also, can anyone tell me what to search for in the documentation or google so I can create some code... What line of code would be commonly used when detecting volume levels of noise through the microphone? Thanks!
This seems to be a duplicate of:
Realtime microphone sound level monitoring
However, that question is old and the accepted answer links to a deprecated library. They now recommend that you instead use AVAudioRecorder. They suggest this tutorial and it seems to be what you are looking for.

Resources