Skip to content

Commit

Permalink
Added Bear Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
extratone committed Feb 2, 2021
1 parent b66496f commit bec1048
Show file tree
Hide file tree
Showing 76 changed files with 3,085 additions and 0 deletions.
102 changes: 102 additions & 0 deletions notes/Bear Notes/Capturing Stereo Audio from Built-In Microphones.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Capturing Stereo Audio from Built-In Microphones
Configure an iOS device’s built-in microphones to add stereo recording capabilities to your app.

## Overview
Stereo audio uses two channels to create the illusion of multidirectional sound, adding greater depth and dimension to your audio and resulting in an immersive listening experience. iOS provides a number of ways to record audio from the built-in microphones, but until now it's been limited to mono audio only. Starting in iOS 14 and iPadOS 14, you can now capture stereo audio using the built-in microphones on supported devices.

Because a user can hold an iOS device in a variety of ways, you need to specify the orientation of the right and left channels in the stereo field. Set the built-in microphone’s directionality by configuring:
* Polar pattern. The system represents the individual device microphones, and beamformers that use multiple microphones, as data sources. Select the front or back data source and set its polar pattern to stereo.
* Input orientation. When recording video, set the input orientation to match the video orientation. When recording audio only, set the input orientation to match the user interface orientation. In both cases, don’t change the orientation during recording.

This sample app shows how to configure your app to record stereo audio, and helps you visualize changes to the input orientation and data-source selection.

* Note: You must run the sample on a supported physical device running iOS 14, or later. To determine whether a device supports stereo recording, query the audio session’s selected data source to see if its [supportedPolarPatterns](https://developer.apple.com/documentation/avfoundation/avaudiosessiondatasourcedescription/1616450-supportedpolarpatterns) array contains the [stereo](https://developer.apple.com/documentation/avfoundation/avaudiosession/polarpattern/3551726-stereo) polar pattern.

## Configure the Audio Session Category
Recording stereo audio requires the app’s audio session to use either the [record](https://developer.apple.com/documentation/avfoundation/avaudiosession/category/1616451-record) or [playAndRecord](https://developer.apple.com/documentation/avfoundation/avaudiosession/category/1616568-playandrecord) category. The sample uses the `playAndRecord` category so it can do both. It also passes the `defaultToSpeaker` and `allowBluetooth` options to route the audio to the speaker instead of the receiver, and to Bluetooth headphones.

```swift
func setupAudioSession() {
do {
let session = AVAudioSession.sharedInstance()
try session.setCategory(.playAndRecord, options: [.defaultToSpeaker, .allowBluetooth])
try session.setActive(true)
} catch {
fatalError("Failed to configure and activate session.")
}
}
```
[View in Source](x-source-tag://SetupAudioSession)

## Select and Configure a Built-In Microphone
An iOS device’s built-in microphone input consists of an array of physical microphones and beamformers, each represented as an instance of `AVAudioSessionDataSourceDescription`. The sample app finds the built-in microphone input by querying the available inputs for the one where the port type equals the built-in microphone, and sets it as the preferred input.

```swift
private func enableBuiltInMic() {
// Get the shared audio session.
let session = AVAudioSession.sharedInstance()

// Find the built-in microphone input.
guard let availableInputs = session.availableInputs,
let builtInMicInput = availableInputs.first(where: { $0.portType == .builtInMic }) else {
print("The device must have a built-in microphone.")
return
}

// Make the built-in microphone input the preferred input.
do {
try session.setPreferredInput(builtInMicInput)
} catch {
print("Unable to set the built-in mic as the preferred input.")
}
}
```
[View in Source](x-source-tag://EnableBuiltInMic)

## Configure the Microphone Input’s Directionality
To configure the microphone input’s directionality, the sample sets its data source’s preferred polar pattern and the session’s input orientation. It performs this configuration in its `selectRecordingOption(_:orientation)` method, which it calls whenever the user rotates the device or changes the recording option selection.

```swift
func selectRecordingOption(_ option: RecordingOption, orientation: Orientation, completion: (StereoLayout) -> Void) {

// Get the shared audio session.
let session = AVAudioSession.sharedInstance()

// Find the built-in microphone input's data sources,
// and select the one that matches the specified name.
guard let preferredInput = session.preferredInput,
let dataSources = preferredInput.dataSources,
let newDataSource = dataSources.first(where: { $0.dataSourceName == option.dataSourceName }),
let supportedPolarPatterns = newDataSource.supportedPolarPatterns else {
completion(.none)
return
}

do {
isStereoSupported = supportedPolarPatterns.contains(.stereo)
// If the data source supports stereo, set it as the preferred polar pattern.
if isStereoSupported {
// Set the preferred polar pattern to stereo.
try newDataSource.setPreferredPolarPattern(.stereo)
}

// Set the preferred data source and polar pattern.
try preferredInput.setPreferredDataSource(newDataSource)

// Update the input orientation to match the current user interface orientation.
try session.setPreferredInputOrientation(orientation.inputOrientation)

} catch {
fatalError("Unable to select the \(option.dataSourceName) data source.")
}

// Call the completion handler with the updated stereo layout.
completion(StereoLayout(orientation: newDataSource.orientation!,
stereoOrientation: session.inputOrientation))
}
```
[View in Source](x-source-tag://SelectDataSource)

This method finds the data source with the selected name, sets its preferred polar pattern to stereo, and then sets it as the input’s preferred data source. Finally, it sets the preferred input orientation to match the device’s user interface orientation.
#documentation
#iP12PM
6 changes: 6 additions & 0 deletions notes/Bear Notes/Form.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Form
Leave it to [Jon Rettinger](https://youtu.be/eRxq9IyZ4Cc) to back me up on the size hype thing... Yes, the 12 Pro Max is *bigger*- and definitely prompts a conversation on how big we’re actually going to let smartphones get before we... idk.. call them something else(?) - but it’s far from *alarmingly huge* or anything, as [Nilay Patel’s review](https://www.theverge.com/21555901/iphone-12-pro-max-review) seems to suggest. It’s very possible that I say this out of Big Hand Privilege, though - auto journalist Matt Farrah (whom I trust completely) noted that he chose the 12 Mini because he can use it one-handed. It occurred to me, hearing this, that my own usership hasn’t really ever included this aspect. Nilay felt so strongly about the 12 Pro Max’s size that he recommends you find a way to experience its size in person before ordering one. My concern - as much as I love the idea of the 12 Mini - centers around the fact that I am already starting to struggle with the diminishing size of the buttons in the UX of popular apps like [TikTok](https://vm.tiktok.com/ZMe17ocYh/), and I’d rather not make my eyes struggle with text size any more than absolutely necessary. Handily enough, one can now access iOS’ text-enlarging slider from within the Control Center.

For myself and others, the flat sides of the design prompt a reflection on how this may be the first genuinely beautiful iPhone since the iPhone 4.

#iP12PM
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Galaxy S21 Ultra vs. iPhone 12 Pro Max: Which takes better night photos?

![](Galaxy%20S21%20Ultra%20vs.%20iPhone%2012%20Pro%20Max%20Which%20takes%20better%20night%20photos?/545b927b-387d-491a-aaf6-2ccaa44881d2-galaxy-s21-ultra-review-08.jpg)
This isn't a review of the Galaxy S21 Ultra or its regular camera capabilities. [You can read our in-depth review here](https://www.inputmag.com/reviews/galaxy-s21-ultra-review-the-iphone-12-pro-max-gets-put-to-shame). This is a head-to-head showdown between the S21 Ultra and iPhone 12 Pro Max cameras for low-light and night photography.

[Galaxy S21 Ultra vs. iPhone 12 Pro Max: Which takes better night photos?](https://www.inputmag.com/reviews/galaxy-s21-ultra-vs-iphone-12-pro-max-which-camera-phone-takes-better-night-photos)
#iP12PM
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions notes/Bear Notes/Hardware Notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Hardware Notes
- [ ] The **Crud** issue...
[GSMArena’s Video Review](https://youtu.be/TfRtC5cQCpA) also shows crud around the lenses.
## Display
> OLED can be seen as a replacement for LCD, or liquid crystal displays. You might be reading this article on an LCD screen right now, given how ubiquitous the technology has been since its inception in the early 1960s. For reference, every iPhone before the iPhone X used LCD screens. Even the regular iPhone 11 last year used it, with the more expensive 11 Pro moving to OLED. For reference, the iPhone X and XS used OLED, too.
> The most important functional difference between OLED and LCD that you need to know is the presence of a backlight. An OLED display uses that organic film we mentioned earlier to emit light when an electrical current runs through it. In other words, OLED can function all on its own without the need for a backlight. LCD has served humanity well for decades, but it needs a backlight to display anything.
[Everything you need to know about the OLED display rumored to be on the iPhone 12](https://mashable.com/article/oled-explained-iphone-apple/)
It’s difficult to remark with much insight on the OLED display vs. the LCD unit on my iPhone 8 Plus without the latter device in my posession to physically compare, but the contrast (literally, hehe) is especially obvious when a given app’s “high contrast dark mode” is selected. While my iPhone 8 Plus review began with a note on how insignificant True Tone appeared to be, it’s worth noting that it’s certainly a significant component of the experience, now - how much the upgraded display technology factors into this change, I know not.
The Big Issue among tech media is a refresh rate complaint... the iPhone 12 Pro line’s display is limited to 60Hz, while the rest of the market’s flagship lineup pushes to 120Hz and beyond. This is not something I am equipped to comment on, but I will say that 60 frames per second has always seemed like plenty to me.

## Camera
> Front-facing 4K, 60fps capture is impressive, but useless — vloggers all have GoPros or DSLRs, these days, and sharing through Snapchat and Instagram will always be ultra-compressed.
I am not - nor have I ever been - one of these self-described *Camera Nerds*, but it strikes ~~ me that “real” camera nerds own one or more DSLRs and would surely prefer them over their handset’s camera in nearly every situation. Obviously, though, I am 100% out of touch when it comes to The Camera Issue. Two years later, and tech media appears to be unable to stop talking about smartphone cameras. The industry, predictably, seems to have gone right along with it. Now, I have in my posession an $1100 telephone designed around its camera system, which has sent me on a similar, completely bonkers camera-testing escapaade. In my defense, the thought *I should’ve just bought a DSLR* was [stuck in my mind](https://twitter.com/neoyokel/status/1344559416968966144?s=21) throughout the lot of it.
[Camera Test Embeds]
In short, I think we’re expecting far too much out of our smartphones and would end up gaining much in the end if we stopped.
- [ ] I have been shooting RAW photos on iPhone for a while now... thanks to Halide, which may or may not be completely worthless, now.

## Battery and Magnets
I am genuinely worried about the future we continue to set ourselves up for, full of spent batteries and no way to responsibly despose of them.
#iP12PM
52 changes: 52 additions & 0 deletions notes/Bear Notes/Jorts Battery Log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Jorts Battery Log
- - - -
**TOE**: December 12, 2020 at 08:34:41 CST
**Location**: 38.93397363372048,-92.38790472046693
**Battery Level**: 80%
Outside Temp/Humidity: 39.2°F/88%
- - - -
**TOE**: December 12, 2020 at 03:37:59 CST
**Location**: 38.93400410193851,-92.3879305367287
**Battery Level**: 99%
Outside Temp/Humidity: 41°F/84%
- - - -
**TOE**: December 11, 2020 at 21:23:20 CST
**Location**: 38.93397572919627,-92.38797244624456
**Battery Level**: 87%
Outside Temp/Humidity: 48.2°F/90%
- - - -
**TOE**: December 11, 2020 at 18:26:38 CST
**Location**: 38.93407166007807,-92.38806623974105
**Battery Level**: 92%
Outside Temp/Humidity: 53.6°F/87%
- - - -
**TOE**: December 11, 2020 at 17:03:36 CST
**Location**: 38.93370335235362,-92.38772160263653
**Battery Level**: 66%
Outside Temp/Humidity: 51.8°F/94%
- - - -
**TOE**: December 11, 2020 at 16:27:34 CST
**Location**: 38.9340088377138,-92.38798317508062
**Battery Level**: 69%
Outside Temp/Humidity: 51.8°F/93%
- - - -
**TOE**: December 11, 2020 at 16:01:22 CST
**Location**: 38.93418427094718,-92.38783624031802
**Battery Level**: 56%
Outside Temp/Humidity: 51.8°F/94%
- - - -
**TOE**: December 11, 2020 at 12:51:16 CST
**Location**: 38.93400766424735,-92.38797487699648
**Battery Level**: 99%
Outside Temp/Humidity: 48.2°F/91%
- - - -
**TOE**: December 11, 2020 at 12:49:42 CST
**Location**: 38.93397644165804,-92.38805383452436
**Battery Level**: 99%
Outside Temp/Humidity: 48.2°F/91%
- - - -
**TOE**: December 11, 2020 at 12:47:10 CST
**Location**: 38.93404781356355,-92.38795911901852
**Battery Level**: 99%
Outside Temp/Humidity: 48.2°F/91%
#documentation #iP12PM
114 changes: 114 additions & 0 deletions notes/Bear Notes/Jorts Data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Jorts Data
### Operating System
- System: iOS 14.2.1
- System Build: 18B121
- Kernel: Darwin 20.1.0

### Device Information
- Device: iPhone
- Device ID: iPhone13,4
- Model: D54pAP
- Name: Jorts
- Hostname: Jorts

### CPU Information
- CPU Model: N/A
- GPU Model: N/A
- Motion Coprocessor: N/A
- Core Number: 6
- CPU Architecture: 64
- CPU Frequency: N/A
- TB Frequency: 24
- L1 Cache Size: 128
- L1D Cache Size: 64
- L2 Cache Size: 4096
- Byteorder: 1234
- Cacheline: 128

### Hardware Features
- Display Resolution: 2688 x 1242
- Pixel Density: N/A
- Battery Voltage: 3.8 V
- Battery Capacity: N/A
- Rear Camera: No
- Front Camera: No
- Touchscreen: Yes
- Microphone: Yes
- Speaker: Yes
- Wi-Fi: Yes
- Bluetooth: Yes
- NFC: Yes
- Accelerometer: Yes
- Gyroscopic Sensor: Yes
- Ambient Light Sensor: Yes
- Proximity Sensor: Yes
- Fingerprint Sensor: Yes
- Magnetometer: Yes
- Barometer: Yes
- Phone: Yes
- GPS: Yes

Battery Status
- Battery Percentage: 78%
- Battery State: Charging

Storage Usage
- Used: 90.9 GB (35.5 %)
- Free: 164.9 GB (64.5 %)
- Total Storage: 255.9 GB

CPU Usage
- Usage: 3.8 %
- Idle: 96.2 %
- Avg Load (1, 5, 15 min): 1.31, 1.60, 1.90

Memory
- Wired: 861.2 MB
- Active: 1654.3 MB
- Inactive: 1621.7 MB
- Other: 1359.6 MB
- Free: 214.4 MB
- Total Memory: 5711.2 MB

System Uptime
- Boot Time: 12/11/20, 16:55
- Uptime: 21h 4m

Connection
- Default Gateway IP: 192.168.0.1
- DNS Server IP: 192.168.0.1, 108.166.149.2
- External IP: 104.166.200.131
- External IP Hostname: 104-166-200-131.client.mchsi.com
- External IP AS Number: AS30036
- External IP AS Name: MEDIACOM-ENTERPRISE-BUSINESS
- Default Gateway IPv6: fe80::1eb0:44ff:feb2:cca3
- DNS Server IPv6: fe80::1eb0:44ff:feb2:cca3
- External IPv6: 2604:2d80:4d02:4e00:31fd:134b:a717:4b25
- External IPv6 Hostname: N/A
- External IPv6 AS Number: AS30036
- External IPv6 AS Name: MEDIACOM-ENTERPRISE-BUSINESS
- HTTP Proxy: N/A

Wi-Fi Information
- Network Connected: Yes
- SSID: long1950-5G
- BSSID: 1c:b0:44:b2:cc:a7
- IP Address: 192.168.0.83
- Subnet Mask: 255.255.255.0
- IPv6 Addresses: fe80::428:33d5:606e:19ef / 64, 2604:2d80:4d02:4e00:10a0:c529:f10c:f4b4 / 64, 2604:2d80:4d02:4e00:31fd:134b:a717:4b25 / 64, 2604:2d80:4d02:4e00::1004 / 64
- Received Since Boot: 448.67 MB
- Sent Since Boot: 1.17 GB

Cell Information
- Network Connected: Yes
- Network Type: N/A
- IP Address: 10.41.19.40
- IPv6 Addresses: fe80::cfe:2ae8:2d5:101a / 64, 2600:381:1129:c4d:1871:f625:78cd:d4fd / 64, 2600:381:1129:c4d:bc11:175c:7450:f7bc / 64
- Carrier Name: AT&T
- Country Code: us
- MCC / MNC: 310 / 280
- VOIP Support: Yes
- Received Since Boot: 757.71 MB
- Sent Since Boot: 95.04 MB
#documentation
#iP12PM
8 changes: 8 additions & 0 deletions notes/Bear Notes/Native Software (iOS 14).md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Native Software (iOS 14)
[[iOS 14 Review Notes]]
## Siri, Discreet Idiot
Siri Shortcuts are essentially associated with Apple’s personal assistent only in name, but she does still have a particular value you may or may not have considered: if you’re the sort to worry about your “privacy” in 2021, Siri is [the most discreet voice assistent available](https://www.theverge.com/2019/8/29/20837077/apple-siri-privacy-opt-out-voice-human-grading-review), by far. Of course, this also makes her the definitive *worst* in functional terms, yet she remains the only one which has added (albeit diminutive) value to my own life. The “disable all alarms” command - while it should probably exist on its own in the native Clocks app - is a particularly useful function.
- - - -
- [ ] Fonts?

#iP12PM
Loading

0 comments on commit bec1048

Please sign in to comment.