Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DiskIO UGens cause mode changes #52

Closed
sensestage opened this issue Jul 19, 2017 · 4 comments
Closed

DiskIO UGens cause mode changes #52

sensestage opened this issue Jul 19, 2017 · 4 comments

Comments

@sensestage
Copy link

DiskOut: mode changes are happening.
Probably this will also happen with DiskIn.

DiskIO_UGens create a disk io thread that runs in non real time to write the buffer to disk

@sensestage
Copy link
Author

File: server/plugins/DiskIO_UGens.cpp

@giuliomoro
Copy link

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

@giuliomoro
Copy link

giuliomoro commented Aug 6, 2017

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

@giuliomoro
Copy link

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

giuliomoro added a commit that referenced this issue Oct 23, 2020
giuliomoro added a commit that referenced this issue Nov 25, 2020
giuliomoro added a commit that referenced this issue Dec 1, 2020
giuliomoro added a commit that referenced this issue Dec 18, 2020
giuliomoro added a commit that referenced this issue Dec 19, 2020
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Dec 19, 2020
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Dec 20, 2020
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Dec 20, 2020
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Dec 20, 2020
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Dec 20, 2020
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Jan 23, 2021
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Jan 28, 2021
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Jan 28, 2021
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Jan 28, 2021
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Jan 28, 2021
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Feb 10, 2021
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
giuliomoro added a commit that referenced this issue Feb 10, 2021
It relies on the __COBALT__ macro which is defined if Xenomai is used.
Currently only used by the Bela backend, but it is not strictly Bela-specific.
Gives a good 7% save on CPU on Bela.

Closes #62
Closes #52
Closes #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants