Git Product home page Git Product logo

Comments (4)

sensestage avatar sensestage commented on June 26, 2024

File: server/plugins/DiskIO_UGens.cpp

from supercollider.

giuliomoro avatar giuliomoro commented on June 26, 2024

@sensestage do you have any SC code to test this please?

from supercollider.

giuliomoro avatar giuliomoro commented on June 26, 2024

ok nevermind, I got some from http://doc.sccode.org/Classes/DiskOut.html

Server.default = s = Server("belaServer", NetAddr("192.168.7.2", 57110));
OSCFunc.trace(true,true);
s.options.maxLogins( 4 );
s.options.asOptionsString
s.boot;

(
s.dumpOSC(1);
s.initTree;
s.startAliveThread;
);

(
// something to record
SynthDef("bubbles", {
    var f, zout;
    f = LFSaw.kr(0.4, 0, 24, LFSaw.kr([8,7.23], 0, 3, 80)).midicps; // glissando function
    zout = CombN.ar(SinOsc.ar(f, 0, 0.04), 0.2, 0.2, 4); // echoing sine wave
    Out.ar(0, zout);
}).add;

// this will record to the disk
SynthDef("help-Diskout", {arg bufnum;
    DiskOut.ar(bufnum, In.ar(0,2));
}).add;

// this will play it back
SynthDef("help-Diskin-2chan", { arg bufnum = 0;
    Out.ar(0, DiskIn.ar(2, bufnum));
}).add;
)

// start something to record
x = Synth.new("bubbles");
// allocate a disk i/o buffer
b= Buffer.alloc(s, 65536, 2);
// create an output file for this buffer, leave it open
b.write("~/diskouttest.aiff".standardizePath, "aiff", "int16", 0, 0, true);

// This next line actually starts the mode switches ...
// create the diskout node; making sure it comes after the source
d = Synth.tail(nil, "help-Diskout", ["bufnum", b]);
// ... and this stops them:
// stop recording
d.free;
// stop the bubbles
x.free;
// close the buffer and the soundfile
b.close;
// free the buffer
b.free;

// The following block starts mode switches again
// play it back
(
x = Synth.basicNew("help-Diskin-2chan");
m = { arg buf; x.addToHeadMsg(nil, [\bufnum,buf])};

b = Buffer.cueSoundFile(s,"~/diskouttest.aiff".standardizePath, 0, 2, completionMessage: m);
)
// ... and this stops them 
x.free; b.close; b.free; // cleanup

from supercollider.

giuliomoro avatar giuliomoro commented on June 26, 2024

Ok these are caused by mDiskFifoHasData.Signal and the likes. #62 will fix this.

from supercollider.

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.