Giter Site home page Giter Site logo

Recording? about finch HOT 8 CLOSED

zoul avatar zoul commented on August 22, 2024
Recording?

from finch.

Comments (8)

zoul avatar zoul commented on August 22, 2024

You mean that you want to record a sound and then play it back with Finch? That should be easy. Just record the sound using AVFoundation, use the raw sound data to create an FISample and then you can use the sample to create an FISound.

from finch.

jsplashindia avatar jsplashindia commented on August 22, 2024

Not exactly, I want to do the kinda opposite. Whatever I played with finch, I need to export them as a single sound file. it can be a series of sounds played using Finch.

from finch.

zoul avatar zoul commented on August 22, 2024

Ah, sorry. I don’t know how to do that. Are you after the pitch changes?

from finch.

jsplashindia avatar jsplashindia commented on August 22, 2024

Basically, I've made an instrument that uses Finch to playback sounds. Now, I need to support recording in my instrument. So, after I start recording, I need to be able to capture whatever is played using Finch and then once recording is stopped, export them as a sound file.

from finch.

zoul avatar zoul commented on August 22, 2024

In that case you could use Finch just to play the sounds and use another trick to record. As an example, you could just mark the time and the name of the sample to play during the recording:

- (void) playSample: (NSString*) sampleName
{
    FISound *sound = [self sampleForName:sampleName];
    [sound play];
    if (recording) {
        [currentRecording addSample:sampleName atTime:currentTime];
    }
}

Or something like that, you get the idea. When the user later selects to export the recording, you can stitch the samples together using AVFoundation and export.

from finch.

jsplashindia avatar jsplashindia commented on August 22, 2024

That sounds like a very good idea. Are you sure we can stitch the samples using AVFoundation? Can you point to some resources on how this can be done?

from finch.

zoul avatar zoul commented on August 22, 2024

I’ve done it before, so I’m sure it works. You create a mutable AV composition (see API docs for AVMutableComposition) and there you can insert given assets (see AVURLAsset) created from the samples. In the end you create and configure an AVAssetExportSession and export the mutable composition into a file.

from finch.

jsplashindia avatar jsplashindia commented on August 22, 2024

Thanks for the suggestion. I'll try that out.

from finch.

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.