grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.52k stars 319 forks source link

faust2sc.py does not remove whitespace from parameters #702

Closed madskjeldgaard closed 2 years ago

madskjeldgaard commented 2 years ago

Compiling this: https://github.com/dariosanfilippo/concatenative_granulation

Results in this kind of class. Whitespace should be removed from parameters before making SC class file.

ConcatenativeGranularProcessin : MultiOutUGen {

    *ar{|in0, in1,interpolation length samples(16), grain length s(0.1), buffer position(0), time transposition(1), time async degree(0), time
async depth(0), pitch transposition(1), pitch async degree(0), pitch async depth(0), freeze buffer(0), volume(0)|
      ^this.multiNew('audio', in0, in1,interpolation length samples, grain length s, buffer position, time transposition, time async degree, ti
me async depth, pitch transposition, pitch async degree, pitch async depth, freeze buffer, volume)
    }

    *kr{|in0, in1,interpolation length samples(16), grain length s(0.1), buffer position(0), time transposition(1), time async degree(0), time
async depth(0), pitch transposition(1), pitch async degree(0), pitch async depth(0), freeze buffer(0), volume(0)|
      ^this.multiNew('control', in0, in1,interpolation length samples, grain length s, buffer position, time transposition, time async degree,
time async depth, pitch transposition, pitch async degree, pitch async depth, freeze buffer, volume)
    }

    name { ^"ConcatenativeGranularProcessin" }

    info { ^"Generated with Faust" }

checkInputs {
    if (rate == 'audio', {
      2.do({|i|
        if (inputs.at(i).rate != 'audio', {
          ^(" input at index " + i + "(" + inputs.at(i) +
            ") is not audio rate");
        });
      });
    });
    ^this.checkValidInputs
  }
sletz commented 2 years ago

So it is a faust2sc.pyissue right?

madskjeldgaard commented 2 years ago

So it is a faust2sc.pyissue right?

yep

sletz commented 2 years ago

So a PR is in progress I guess ((-; ?

madskjeldgaard commented 2 years ago

So a PR is in progress I guess ((-; ?

Yep! Making this issue in case I don't fix it.

sletz commented 2 years ago

Whitespace should be removed => or replaced by underscore ? (I remember this is something we do at several places...)

madskjeldgaard commented 2 years ago

Whitespace should be removed => or replaced by underscore ? (I remember this is something we do at several places...)

That's a good idea!

madskjeldgaard commented 2 years ago

I think I've got a fix soon