Code Monkey home page Code Monkey logo

Comments (6)

alexbw avatar alexbw commented on August 30, 2024

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.

pec1985 avatar pec1985 commented on August 30, 2024

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.

morganpackard avatar morganpackard commented on August 30, 2024

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.

alexbw avatar alexbw commented on August 30, 2024

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.

pec1985 avatar pec1985 commented on August 30, 2024

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.

morganpackard avatar morganpackard commented on August 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.