Comments (6)
You can copy your sound twice into the output data. That's probably the fastest. I had plans once to allow for more fine-tuned control of the channel structure, but I ran out of free time.
On Tuesday, August 14, 2012 at 9:27 PM, pec1985 wrote:
This might sound silly, but I would find it useful to make the sound, music, play in mono sound. Can this be done in the setOutputBlock?
—
Reply to this email directly or view it on GitHub (#29).
from novocaine.
I'm sorry, I don't understand. You make it sound very simple, and if I'm not asking too much, could provide a example on how to copy the sound twice to the output data? Or at least, a hint, where in code could I do this?
Thanks.
from novocaine.
I'd say that Novocaine is meant to be the simplest possible way in and out of the hardware, and modifying it to mix a stereo signal down to mono is outside the mission of Novocaine, which is to remove the pain of configuring the Core Audio framework. Where is your audio coming from? If you're interested in working with audio at the sample level, which is what Novocaine is for, doing learning how to mix a stereo signal down to mono should be something you're comfortable doing on your own, and it may be time to study up on some fundamentals of low-level digital audio.
from novocaine.
Thanks Morgan, you said it perfectly.
pec1985, one solution here is a for loop over all of your samples like this
for (int i=0; i < numChannels*numFrames; i+=numChannels)
{
for (int j=i; j < i+numChannels; ++j) {
data[j] = yourAudio[i];
}
}
But Morgan's right, the purpose of Novocaine is to be able to get to working with samples quickly, and folks here won't always be able to provide you with a direct answer. Separate projects (like NVDSP, or perhaps unannounced synthesis libraries) can help you manipulate the samples.
On Aug 15, 2012, at 9:27 AM, Morgan Packard wrote:
I'd say that Novocaine is meant to be the simplest possible way in and out of the hardware, and modifying it to mix a stereo signal down to mono is outside the mission of Novocaine, which is to remove the pain of configuring the Core Audio framework. Where is your audio coming from? If you're interested in working with audio at the sample level, which is what Novocaine is for, doing learning how to mix a stereo signal down to mono should be something you're comfortable doing on your own, and it may be time to study up on some fundamentals of low-level digital audio.
—
Reply to this email directly or view it on GitHub.
from novocaine.
Thanks guys, learning CoreAudio, and all the related frameworks and libraries, is what I'm trying to do. I will keep researching and definitely give that loop a try.
Closing as this is out of the scope of the project.
from novocaine.
It's one thing to learn the frameworks and the libraries, and another thing to learn how to deal with buffers of raw audio data. You can do quite a lot with core audio without ever touching raw audio data. But that's not really what Novocaine is about.
from novocaine.
Related Issues (20)
- Audio distortion isuue while playing on iphone speaker HOT 1
- 1
- use of @autoreleasepool in renderCallback and inputCallback HOT 1
- inputblock + outputblock + forceOutputToSpeaker = Error: Couldn't render the output unit (-50) HOT 1
- Can't play an audio file that was downloaded from server but the data is the same HOT 1
- Music from the Internet HOT 1
- What exactly comes from the newAudio variable?
- Bluetooth Audio? HOT 3
- updateMeters and averagePowerForChannel equivalents for Novocaine? HOT 2
- Setting deployment target to 8.0 causes demo app to crash HOT 2
- Is there anyway to properly convert the audio array (float*) into UTF 8? HOT 7
- m4a files
- Gapless
- RingBuffer.h - class RingBuffer syntax error HOT 3
- Use of deprecated AudioSession APIs on Novocaine.m HOT 2
- How to 8000hz/16000hz get or put as short* array for audio ?
- Is this library suitable to make a lack-in amplifier from microphone input?
- Couldn't initialize the output unit ('!cat') on Device only HOT 1
- Mac Catalyst (UIKit for Mac) support
- Does default sample rate cause resampling and setting buffer size for minimum latency? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from novocaine.